@open-tender/cloud 0.0.62 → 0.0.63

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.
@@ -286,4 +286,5 @@ export declare const selectContentSection: (page: keyof ConfigContent) => (state
286
286
  };
287
287
  } | null;
288
288
  export declare const selectSoldOutMsg: (state: AppState) => string;
289
+ export declare const selectOutpostName: (state: AppState) => string | undefined;
289
290
  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.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.selectOutpostName = 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");
@@ -120,4 +120,6 @@ const selectSoldOutMsg = (state) => {
120
120
  return soldOutMessage || 'Sold out for day';
121
121
  };
122
122
  exports.selectSoldOutMsg = selectSoldOutMsg;
123
+ 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; };
124
+ exports.selectOutpostName = selectOutpostName;
123
125
  exports.configReducer = configSlice.reducer;
@@ -286,4 +286,5 @@ export declare const selectContentSection: (page: keyof ConfigContent) => (state
286
286
  };
287
287
  } | null;
288
288
  export declare const selectSoldOutMsg: (state: AppState) => string;
289
+ export declare const selectOutpostName: (state: AppState) => string | undefined;
289
290
  export declare const configReducer: import("redux").Reducer<ConfigState, import("redux").AnyAction>;
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
3
- import { decorateTheme } from '@open-tender/utils';
3
+ import { capitalize, decorateTheme } from '@open-tender/utils';
4
4
  import { ReducerType } from './types';
5
5
  import OpenTenderAPI from '../services/api';
6
6
  const initialState = {
@@ -100,4 +100,5 @@ export const selectSoldOutMsg = (state) => {
100
100
  const { soldOutMessage } = ((_a = state.config.content) === null || _a === void 0 ? void 0 : _a.menu) || {};
101
101
  return soldOutMessage || 'Sold out for day';
102
102
  };
103
+ 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; };
103
104
  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.62",
3
+ "version": "0.0.63",
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",