@open-tender/cloud 0.0.122 → 0.0.123

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.
@@ -87,4 +87,5 @@ export declare const selectContentSection: <T extends keyof ConfigContent>(page:
87
87
  export declare const selectSoldOutMsg: (state: AppState) => string;
88
88
  export declare const selectHeaderHeight: (state: AppState) => (isBrowser: boolean) => number;
89
89
  export declare const selectOutpostName: (state: AppState) => string | undefined;
90
+ export declare const selectHasCatering: (state: AppState) => boolean;
90
91
  export declare const configReducer: import("redux").Reducer<ConfigState, import("redux").AnyAction>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.configReducer = 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.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;
5
5
  const tslib_1 = require("tslib");
6
6
  const toolkit_1 = require("@reduxjs/toolkit");
7
7
  const utils_1 = require("@open-tender/utils");
@@ -130,4 +130,10 @@ const selectHeaderHeight = (state) => (isBrowser) => {
130
130
  exports.selectHeaderHeight = selectHeaderHeight;
131
131
  const selectOutpostName = (state) => { var _a, _b, _c; return ((_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.locationName.OUTPOST) ? (0, utils_1.capitalize)((_c = (_b = state.config.settings) === null || _b === void 0 ? void 0 : _b.locationName.OUTPOST[0]) !== null && _c !== void 0 ? _c : '') : undefined; };
132
132
  exports.selectOutpostName = selectOutpostName;
133
+ const selectHasCatering = (state) => {
134
+ var _a;
135
+ const { orderTypes } = state.config.settings || {};
136
+ return (_a = orderTypes === null || orderTypes === void 0 ? void 0 : orderTypes.includes('CATERING')) !== null && _a !== void 0 ? _a : false;
137
+ };
138
+ exports.selectHasCatering = selectHasCatering;
133
139
  exports.configReducer = configSlice.reducer;
@@ -87,4 +87,5 @@ export declare const selectContentSection: <T extends keyof ConfigContent>(page:
87
87
  export declare const selectSoldOutMsg: (state: AppState) => string;
88
88
  export declare const selectHeaderHeight: (state: AppState) => (isBrowser: boolean) => number;
89
89
  export declare const selectOutpostName: (state: AppState) => string | undefined;
90
+ export declare const selectHasCatering: (state: AppState) => boolean;
90
91
  export declare const configReducer: import("redux").Reducer<ConfigState, import("redux").AnyAction>;
@@ -108,4 +108,9 @@ export const selectHeaderHeight = (state) => (isBrowser) => {
108
108
  return parseInt(height.replace('rem', '')) * 10;
109
109
  };
110
110
  export const selectOutpostName = (state) => { var _a, _b, _c; return ((_a = state.config.settings) === null || _a === void 0 ? void 0 : _a.locationName.OUTPOST) ? capitalize((_c = (_b = state.config.settings) === null || _b === void 0 ? void 0 : _b.locationName.OUTPOST[0]) !== null && _c !== void 0 ? _c : '') : undefined; };
111
+ export const selectHasCatering = (state) => {
112
+ var _a;
113
+ const { orderTypes } = state.config.settings || {};
114
+ return (_a = orderTypes === null || orderTypes === void 0 ? void 0 : orderTypes.includes('CATERING')) !== null && _a !== void 0 ? _a : false;
115
+ };
111
116
  export const configReducer = configSlice.reducer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.0.122",
3
+ "version": "0.0.123",
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",