@open-tender/store 0.3.33 → 0.3.34

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.
@@ -2,6 +2,8 @@ import { IndexedError, RequestErrorAPI } from '../types';
2
2
  export declare const isEmpty: (obj: any) => boolean;
3
3
  export declare const contains: (arr: [], values: []) => boolean;
4
4
  export declare const makeRandomNumberString: () => string;
5
+ export declare const getWidth: () => number;
6
+ export declare const getHeight: () => number;
5
7
  export declare const convertStringToArray: (s: string) => string[];
6
8
  export declare const serialize: (obj: Record<string, string>) => string;
7
9
  export declare const capitalize: (s: string) => string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleRespError = exports.pixelsToInt = exports.remsToInt = exports.formatDollars = exports.formatQuantity = exports.addCommas = exports.capitalize = exports.serialize = exports.convertStringToArray = exports.makeRandomNumberString = exports.contains = exports.isEmpty = void 0;
3
+ exports.handleRespError = exports.pixelsToInt = exports.remsToInt = exports.formatDollars = exports.formatQuantity = exports.addCommas = exports.capitalize = exports.serialize = exports.convertStringToArray = exports.getHeight = exports.getWidth = exports.makeRandomNumberString = exports.contains = exports.isEmpty = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var isEmpty = function (obj) {
6
6
  return (!obj || (obj.constructor === Object && Object.entries(obj).length === 0));
@@ -14,6 +14,14 @@ var makeRandomNumberString = function () {
14
14
  return Math.floor(Math.random() * 1000000000).toString();
15
15
  };
16
16
  exports.makeRandomNumberString = makeRandomNumberString;
17
+ var getWidth = function () {
18
+ return Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.documentElement.clientWidth);
19
+ };
20
+ exports.getWidth = getWidth;
21
+ var getHeight = function () {
22
+ return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight);
23
+ };
24
+ exports.getHeight = getHeight;
17
25
  var convertStringToArray = function (s) {
18
26
  return s
19
27
  ? s
@@ -2,6 +2,8 @@ import { IndexedError, RequestErrorAPI } from '../types';
2
2
  export declare const isEmpty: (obj: any) => boolean;
3
3
  export declare const contains: (arr: [], values: []) => boolean;
4
4
  export declare const makeRandomNumberString: () => string;
5
+ export declare const getWidth: () => number;
6
+ export declare const getHeight: () => number;
5
7
  export declare const convertStringToArray: (s: string) => string[];
6
8
  export declare const serialize: (obj: Record<string, string>) => string;
7
9
  export declare const capitalize: (s: string) => string;
@@ -8,6 +8,12 @@ export var contains = function (arr, values) {
8
8
  export var makeRandomNumberString = function () {
9
9
  return Math.floor(Math.random() * 1000000000).toString();
10
10
  };
11
+ export var getWidth = function () {
12
+ return Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.documentElement.clientWidth);
13
+ };
14
+ export var getHeight = function () {
15
+ return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight);
16
+ };
11
17
  export var convertStringToArray = function (s) {
12
18
  return s
13
19
  ? s
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.3.33",
3
+ "version": "0.3.34",
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",