@open-tender/cloud 0.1.111 → 0.1.112

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.
@@ -6,6 +6,7 @@ export interface ConfigState {
6
6
  appTheme: AppTheme | null;
7
7
  brand: ConfigBrand | null;
8
8
  content: ConfigContent | null;
9
+ stylesheet: string | null;
9
10
  error: any;
10
11
  isApp: boolean | undefined;
11
12
  isBackgroundFetch: boolean;
@@ -41,6 +42,7 @@ export declare const selectBrand: (state: AppState) => ConfigBrand | null;
41
42
  export declare const selectTheme: (state: AppState) => Theme | null;
42
43
  export declare const selectContent: (state: AppState) => ConfigContent | null;
43
44
  export declare const selectSettings: (state: AppState) => ConfigSettings | null;
45
+ export declare const selectStylesheet: (state: AppState) => string | null;
44
46
  export declare const selectApi: (state: AppState) => any;
45
47
  export declare const selectAccountConfig: (state: AppState) => {
46
48
  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.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.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,6 +13,7 @@ const initialState = {
13
13
  appTheme: null,
14
14
  brand: null,
15
15
  content: null,
16
+ stylesheet: null,
16
17
  theme: null,
17
18
  isApp: false,
18
19
  isBackgroundFetch: false,
@@ -58,13 +59,14 @@ const configSlice = (0, toolkit_1.createSlice)({
58
59
  extraReducers: builder => {
59
60
  builder
60
61
  .addCase(exports.fetchConfig.fulfilled, (state, action) => {
61
- const { app, isApp, brand, content, theme, settings } = action.payload;
62
+ const { app, isApp, brand, content, theme, settings, stylesheet } = action.payload;
62
63
  state.app = app;
63
64
  state.brand = brand;
64
65
  state.content = content;
65
66
  state.theme = !isApp && theme ? theme : null;
66
67
  state.appTheme = isApp && theme ? (0, utils_1.decorateTheme)(theme) : null;
67
68
  state.settings = settings;
69
+ state.stylesheet = stylesheet;
68
70
  state.loading = 'idle';
69
71
  state.api = new api_1.default(app);
70
72
  state.error = null;
@@ -97,6 +99,8 @@ const selectContent = (state) => state.config.content;
97
99
  exports.selectContent = selectContent;
98
100
  const selectSettings = (state) => state.config.settings;
99
101
  exports.selectSettings = selectSettings;
102
+ const selectStylesheet = (state) => state.config.stylesheet;
103
+ exports.selectStylesheet = selectStylesheet;
100
104
  const selectApi = (state) => state.config.api;
101
105
  exports.selectApi = selectApi;
102
106
  const selectAccountConfig = (state) => { var _a; return (_a = state.config.content) === null || _a === void 0 ? void 0 : _a.account; };
@@ -6,6 +6,7 @@ export interface ConfigState {
6
6
  appTheme: AppTheme | null;
7
7
  brand: ConfigBrand | null;
8
8
  content: ConfigContent | null;
9
+ stylesheet: string | null;
9
10
  error: any;
10
11
  isApp: boolean | undefined;
11
12
  isBackgroundFetch: boolean;
@@ -41,6 +42,7 @@ export declare const selectBrand: (state: AppState) => ConfigBrand | null;
41
42
  export declare const selectTheme: (state: AppState) => Theme | null;
42
43
  export declare const selectContent: (state: AppState) => ConfigContent | null;
43
44
  export declare const selectSettings: (state: AppState) => ConfigSettings | null;
45
+ export declare const selectStylesheet: (state: AppState) => string | null;
44
46
  export declare const selectApi: (state: AppState) => any;
45
47
  export declare const selectAccountConfig: (state: AppState) => {
46
48
  addresses: import("@open-tender/types").ConfigContentField;
@@ -9,6 +9,7 @@ const initialState = {
9
9
  appTheme: null,
10
10
  brand: null,
11
11
  content: null,
12
+ stylesheet: null,
12
13
  theme: null,
13
14
  isApp: false,
14
15
  isBackgroundFetch: false,
@@ -54,13 +55,14 @@ const configSlice = createSlice({
54
55
  extraReducers: builder => {
55
56
  builder
56
57
  .addCase(fetchConfig.fulfilled, (state, action) => {
57
- const { app, isApp, brand, content, theme, settings } = action.payload;
58
+ const { app, isApp, brand, content, theme, settings, stylesheet } = action.payload;
58
59
  state.app = app;
59
60
  state.brand = brand;
60
61
  state.content = content;
61
62
  state.theme = !isApp && theme ? theme : null;
62
63
  state.appTheme = isApp && theme ? decorateTheme(theme) : null;
63
64
  state.settings = settings;
65
+ state.stylesheet = stylesheet;
64
66
  state.loading = 'idle';
65
67
  state.api = new OpenTenderAPI(app);
66
68
  state.error = null;
@@ -87,6 +89,7 @@ export const selectBrand = (state) => state.config.brand;
87
89
  export const selectTheme = (state) => state.config.theme;
88
90
  export const selectContent = (state) => state.config.content;
89
91
  export const selectSettings = (state) => state.config.settings;
92
+ export const selectStylesheet = (state) => state.config.stylesheet;
90
93
  export const selectApi = (state) => state.config.api;
91
94
  export const selectAccountConfig = (state) => { var _a; return (_a = state.config.content) === null || _a === void 0 ? void 0 : _a.account; };
92
95
  export const selectDisplaySettings = (state) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
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",