@open-tender/store 0.5.18 → 0.5.20

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/.DS_Store CHANGED
Binary file
@@ -28,7 +28,11 @@ var KioskActionType;
28
28
  })(KioskActionType = exports.KioskActionType || (exports.KioskActionType = {}));
29
29
  var enhanceTheme = function (theme) {
30
30
  var icons = tslib_1.__assign(tslib_1.__assign({}, theme.icons), { strokeLinejoin: 'miter', strokeLinecap: 'square' });
31
- return tslib_1.__assign(tslib_1.__assign({}, theme), { icons: icons });
31
+ var kiosk = {
32
+ padding: '1rem',
33
+ gutter: '0.5rem'
34
+ };
35
+ return tslib_1.__assign(tslib_1.__assign({}, theme), { icons: icons, kiosk: kiosk });
32
36
  };
33
37
  exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.FetchKiosk, function (_a, _b) {
34
38
  var apiUrl = _a.apiUrl;
@@ -270,6 +270,10 @@ export interface TCItems {
270
270
  desktop: TCItem;
271
271
  mobile: TCItem;
272
272
  }
273
+ export interface TCKiosk {
274
+ padding: string;
275
+ gutter: string;
276
+ }
273
277
  export interface TCLayout {
274
278
  containerMaxWidth: string;
275
279
  headerHeightApp: string;
@@ -338,6 +342,7 @@ export interface ThemeCloud {
338
342
  icons: TCIcons;
339
343
  inputs: TCInputs;
340
344
  item: TCItems;
345
+ kiosk: TCKiosk;
341
346
  layout: TCLayout;
342
347
  lineHeight: TCLineHeight;
343
348
  links: TCLinks;
@@ -53,6 +53,13 @@ var layoutToPixels = function (object, ratio) {
53
53
  return tslib_1.__assign(tslib_1.__assign({}, obj), (_b = {}, _b[key] = (0, exports.remsToPixels)(value, ratio), _b));
54
54
  }, {});
55
55
  };
56
+ var kioskToPixels = function (object, ratio) {
57
+ return Object.entries(object).reduce(function (obj, _a) {
58
+ var _b;
59
+ var key = _a[0], value = _a[1];
60
+ return tslib_1.__assign(tslib_1.__assign({}, obj), (_b = {}, _b[key] = (0, exports.remsToPixels)(value, ratio), _b));
61
+ }, {});
62
+ };
56
63
  var paddingToPixels = function (padding, ratio) {
57
64
  var _a = padding.split(' '), top = _a[0], horizontal = _a[1], bottom = _a[2];
58
65
  var topPx = (0, exports.remsToPixels)(top, ratio);
@@ -200,10 +207,11 @@ var decorateTheme = function (theme, ratio) {
200
207
  var fonts = makeFonts(theme.fonts, theme.lineHeight, ratio);
201
208
  var inputs = makeInputs(theme.inputs, ratio);
202
209
  var item = makeItems(theme.item, ratio);
210
+ var kiosk = kioskToPixels(theme.kiosk, ratio);
203
211
  var layout = layoutToPixels(theme.layout, ratio);
204
212
  var lineHeight = makeLineHeight(theme.lineHeight, fonts.sizes.main);
205
213
  var welcome = makeWelcomes(theme.welcome, ratio);
206
214
  var icons = makeIcons(theme.icons, ratio);
207
- return tslib_1.__assign(tslib_1.__assign({}, theme), { border: border, buttons: buttons, cards: cards, counts: counts, fonts: fonts, inputs: inputs, item: item, lineHeight: lineHeight, layout: layout, welcome: welcome, icons: icons });
215
+ return tslib_1.__assign(tslib_1.__assign({}, theme), { border: border, buttons: buttons, cards: cards, counts: counts, fonts: fonts, inputs: inputs, item: item, lineHeight: lineHeight, kiosk: kiosk, layout: layout, welcome: welcome, icons: icons });
208
216
  };
209
217
  exports.decorateTheme = decorateTheme;
@@ -25,7 +25,11 @@ export var KioskActionType;
25
25
  })(KioskActionType || (KioskActionType = {}));
26
26
  var enhanceTheme = function (theme) {
27
27
  var icons = __assign(__assign({}, theme.icons), { strokeLinejoin: 'miter', strokeLinecap: 'square' });
28
- return __assign(__assign({}, theme), { icons: icons });
28
+ var kiosk = {
29
+ padding: '1rem',
30
+ gutter: '0.5rem'
31
+ };
32
+ return __assign(__assign({}, theme), { icons: icons, kiosk: kiosk });
29
33
  };
30
34
  export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, function (_a, _b) {
31
35
  var apiUrl = _a.apiUrl;
@@ -270,6 +270,10 @@ export interface TCItems {
270
270
  desktop: TCItem;
271
271
  mobile: TCItem;
272
272
  }
273
+ export interface TCKiosk {
274
+ padding: string;
275
+ gutter: string;
276
+ }
273
277
  export interface TCLayout {
274
278
  containerMaxWidth: string;
275
279
  headerHeightApp: string;
@@ -338,6 +342,7 @@ export interface ThemeCloud {
338
342
  icons: TCIcons;
339
343
  inputs: TCInputs;
340
344
  item: TCItems;
345
+ kiosk: TCKiosk;
341
346
  layout: TCLayout;
342
347
  lineHeight: TCLineHeight;
343
348
  links: TCLinks;
@@ -47,6 +47,13 @@ var layoutToPixels = function (object, ratio) {
47
47
  return __assign(__assign({}, obj), (_b = {}, _b[key] = remsToPixels(value, ratio), _b));
48
48
  }, {});
49
49
  };
50
+ var kioskToPixels = function (object, ratio) {
51
+ return Object.entries(object).reduce(function (obj, _a) {
52
+ var _b;
53
+ var key = _a[0], value = _a[1];
54
+ return __assign(__assign({}, obj), (_b = {}, _b[key] = remsToPixels(value, ratio), _b));
55
+ }, {});
56
+ };
50
57
  var paddingToPixels = function (padding, ratio) {
51
58
  var _a = padding.split(' '), top = _a[0], horizontal = _a[1], bottom = _a[2];
52
59
  var topPx = remsToPixels(top, ratio);
@@ -191,9 +198,10 @@ export var decorateTheme = function (theme, ratio) {
191
198
  var fonts = makeFonts(theme.fonts, theme.lineHeight, ratio);
192
199
  var inputs = makeInputs(theme.inputs, ratio);
193
200
  var item = makeItems(theme.item, ratio);
201
+ var kiosk = kioskToPixels(theme.kiosk, ratio);
194
202
  var layout = layoutToPixels(theme.layout, ratio);
195
203
  var lineHeight = makeLineHeight(theme.lineHeight, fonts.sizes.main);
196
204
  var welcome = makeWelcomes(theme.welcome, ratio);
197
205
  var icons = makeIcons(theme.icons, ratio);
198
- return __assign(__assign({}, theme), { border: border, buttons: buttons, cards: cards, counts: counts, fonts: fonts, inputs: inputs, item: item, lineHeight: lineHeight, layout: layout, welcome: welcome, icons: icons });
206
+ return __assign(__assign({}, theme), { border: border, buttons: buttons, cards: cards, counts: counts, fonts: fonts, inputs: inputs, item: item, lineHeight: lineHeight, kiosk: kiosk, layout: layout, welcome: welcome, icons: icons });
199
207
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.5.18",
3
+ "version": "0.5.20",
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",