@cuemath/web-utils 1.0.3-beta.1 → 1.0.3
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/constants/date-time/index.d.ts +1 -1
- package/dist/constants/date-time/index.js +2 -2
- package/dist/constants/date-time/index.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/date-time/index.ts +1 -1
- package/src/index.ts +0 -2
- package/dist/e-cna/index.d.ts +0 -1
- package/dist/e-cna/index.js +0 -11
- package/dist/e-cna/index.js.map +0 -1
- package/dist/url/index.d.ts +0 -3
- package/dist/url/index.js +0 -20
- package/dist/url/index.js.map +0 -1
- package/src/e-cna/index.ts +0 -8
- package/src/url/index.ts +0 -19
|
@@ -8,7 +8,7 @@ export declare const DAY: {
|
|
|
8
8
|
Sat: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const shorthandWeekDayArray: string[];
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const monthArray: string[];
|
|
12
12
|
export declare const weekDayArray: string[];
|
|
13
13
|
export declare const TWENTY_FOUR_HOURS_IN_SECONDS: number;
|
|
14
14
|
export declare const HOUR_FORMAT: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HOUR_FORMAT = exports.TWENTY_FOUR_HOURS_IN_SECONDS = exports.weekDayArray = exports.
|
|
3
|
+
exports.HOUR_FORMAT = exports.TWENTY_FOUR_HOURS_IN_SECONDS = exports.weekDayArray = exports.monthArray = exports.shorthandWeekDayArray = exports.DAY = void 0;
|
|
4
4
|
exports.DAY = {
|
|
5
5
|
Sun: 'Sunday',
|
|
6
6
|
Mon: 'Monday',
|
|
@@ -11,7 +11,7 @@ exports.DAY = {
|
|
|
11
11
|
Sat: 'Saturday',
|
|
12
12
|
};
|
|
13
13
|
exports.shorthandWeekDayArray = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];
|
|
14
|
-
exports.
|
|
14
|
+
exports.monthArray = [
|
|
15
15
|
'Jan',
|
|
16
16
|
'Feb',
|
|
17
17
|
'Mar',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/date-time/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG;IACjB,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,UAAU;CAChB,CAAC;AAEW,QAAA,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEnE,QAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/date-time/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG;IACjB,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,UAAU;IACf,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,UAAU;CAChB,CAAC;AAEW,QAAA,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEnE,QAAA,UAAU,GAAG;IACxB,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;CACN,CAAC;AAEW,QAAA,YAAY,GAAa;IACpC,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;CACX,CAAC;AAEW,QAAA,4BAA4B,GAAW,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ;AAE7D,QAAA,WAAW,GAAG;IACzB,kBAAkB,EAAE,EAAE;IACtB,uBAAuB,EAAE,EAAE;CAC5B,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -20,6 +20,4 @@ __exportStar(require("./local-storage"), exports);
|
|
|
20
20
|
__exportStar(require("./date-time-helper"), exports);
|
|
21
21
|
__exportStar(require("./object"), exports);
|
|
22
22
|
__exportStar(require("./growth-source"), exports);
|
|
23
|
-
__exportStar(require("./url"), exports);
|
|
24
|
-
__exportStar(require("./e-cna"), exports);
|
|
25
23
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC;AAChC,qDAAmC;AACnC,2CAAyB;AACzB,kDAAgC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC;AAChC,qDAAmC;AACnC,2CAAyB;AACzB,kDAAgC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/dist/e-cna/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const showLaptopQuestion: () => boolean;
|
package/dist/e-cna/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.showLaptopQuestion = void 0;
|
|
4
|
-
const iso_country_code_1 = require("../constants/country/iso-country-code");
|
|
5
|
-
const cookie_1 = require("../cookie");
|
|
6
|
-
const showLaptopQuestion = () => {
|
|
7
|
-
const cueCountryCode = (0, cookie_1.getCookie)('cue_country_code');
|
|
8
|
-
return cueCountryCode === iso_country_code_1.COUNTRY_NAME_COUNTRY_CODE_MAP.INDIA;
|
|
9
|
-
};
|
|
10
|
-
exports.showLaptopQuestion = showLaptopQuestion;
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/dist/e-cna/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/e-cna/index.ts"],"names":[],"mappings":";;;AAAA,4EAA0G;AAC1G,sCAAsC;AAE/B,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,kBAAkB,CAAC,CAAC;IAErD,OAAO,cAAc,KAAK,gDAAgB,CAAC,KAAK,CAAC;AACnD,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B"}
|
package/dist/url/index.d.ts
DELETED
package/dist/url/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOrigin = exports.getQueryField = exports.getUrlWithoutHash = void 0;
|
|
4
|
-
const getUrlWithoutHash = (asPath) => {
|
|
5
|
-
return asPath?.includes('#') ? asPath.split('#')[0] : asPath;
|
|
6
|
-
};
|
|
7
|
-
exports.getUrlWithoutHash = getUrlWithoutHash;
|
|
8
|
-
const getQueryField = (asPath, field) => {
|
|
9
|
-
const searchParams = asPath?.split('?') || [];
|
|
10
|
-
const queryParams = searchParams.length > 1 ? searchParams[1] : '';
|
|
11
|
-
const params = new URLSearchParams(queryParams);
|
|
12
|
-
return params.get(field) || '';
|
|
13
|
-
};
|
|
14
|
-
exports.getQueryField = getQueryField;
|
|
15
|
-
const getOrigin = () => {
|
|
16
|
-
const { origin = '' } = typeof window !== 'undefined' && window.location ? window.location : {};
|
|
17
|
-
return origin;
|
|
18
|
-
};
|
|
19
|
-
exports.getOrigin = getOrigin;
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/dist/url/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/url/index.ts"],"names":[],"mappings":";;;AAAO,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE;IAC1D,OAAO,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC/D,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEK,MAAM,aAAa,GAAG,CAAC,MAAc,EAAE,KAAa,EAAE,EAAE;IAC7D,MAAM,YAAY,GAAa,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEnE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC;IAEhD,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEK,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GACnB,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAE1E,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALW,QAAA,SAAS,aAKpB"}
|
package/src/e-cna/index.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { COUNTRY_NAME_COUNTRY_CODE_MAP as ISO_COUNTRY_CODE } from '../constants/country/iso-country-code';
|
|
2
|
-
import { getCookie } from '../cookie';
|
|
3
|
-
|
|
4
|
-
export const showLaptopQuestion = () => {
|
|
5
|
-
const cueCountryCode = getCookie('cue_country_code');
|
|
6
|
-
|
|
7
|
-
return cueCountryCode === ISO_COUNTRY_CODE.INDIA;
|
|
8
|
-
};
|
package/src/url/index.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const getUrlWithoutHash = (asPath: string): string => {
|
|
2
|
-
return asPath?.includes('#') ? asPath.split('#')[0] : asPath;
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
export const getQueryField = (asPath: string, field: string) => {
|
|
6
|
-
const searchParams: string[] = asPath?.split('?') || [];
|
|
7
|
-
const queryParams = searchParams.length > 1 ? searchParams[1] : '';
|
|
8
|
-
|
|
9
|
-
const params = new URLSearchParams(queryParams);
|
|
10
|
-
|
|
11
|
-
return params.get(field) || '';
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const getOrigin = () => {
|
|
15
|
-
const { origin = '' } =
|
|
16
|
-
typeof window !== 'undefined' && window.location ? window.location : {};
|
|
17
|
-
|
|
18
|
-
return origin;
|
|
19
|
-
};
|