@react-pakistan/util-functions 1.23.33 → 1.23.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.
Files changed (101) hide show
  1. package/api/cors/index.js +6 -6
  2. package/api/stellar-solutions/app-user/index.js +97 -38
  3. package/api/stellar-solutions/banking-detail/index.js +107 -48
  4. package/api/stellar-solutions/branch/index.js +107 -48
  5. package/api/stellar-solutions/company/index.js +124 -57
  6. package/api/stellar-solutions/company-report/index.js +48 -13
  7. package/api/stellar-solutions/contact/index.js +132 -65
  8. package/api/stellar-solutions/currency/index.js +101 -42
  9. package/api/stellar-solutions/customer/index.js +149 -74
  10. package/api/stellar-solutions/expense/index.js +132 -65
  11. package/api/stellar-solutions/expense-category/index.js +133 -66
  12. package/api/stellar-solutions/lead/index.js +132 -65
  13. package/api/stellar-solutions/menu-order/index.js +97 -38
  14. package/api/stellar-solutions/payment/index.js +135 -77
  15. package/api/stellar-solutions/payment-mode/index.js +90 -31
  16. package/api/stellar-solutions/preference/index.js +71 -28
  17. package/api/stellar-solutions/product/index.js +144 -77
  18. package/api/stellar-solutions/product-category/index.js +130 -63
  19. package/api/stellar-solutions/profile/index.js +152 -77
  20. package/api/stellar-solutions/quote-invoice/index.js +280 -201
  21. package/api/stellar-solutions/quote-invoice-report/index.js +48 -13
  22. package/api/stellar-solutions/tax/index.js +103 -44
  23. package/constants/react-pakistan.js +11 -22
  24. package/constants/social-media-sizes.js +33 -32
  25. package/general/basic-get.js +68 -6
  26. package/general/basic-post.js +55 -6
  27. package/general/camel-to-sentence-case.js +3 -3
  28. package/general/check-even-odd-length.js +1 -1
  29. package/general/create-date.js +4 -4
  30. package/general/dynamic-page-limit.js +15 -4
  31. package/general/enum-to-text.js +2 -2
  32. package/general/fetch-supabase-image.js +53 -15
  33. package/general/format-date.js +13 -12
  34. package/general/generate-blog-schema.js +10 -9
  35. package/general/generate-breadcrumb-schema.js +5 -4
  36. package/general/generate-faq-schema.js +5 -3
  37. package/general/generate-grid.js +2 -2
  38. package/general/generate-organization-schema.js +14 -13
  39. package/general/get-day-name.js +1 -1
  40. package/general/get-full-name.js +4 -1
  41. package/general/get-href.js +1 -1
  42. package/general/get-month-name.js +1 -1
  43. package/general/get-pathname.js +1 -1
  44. package/general/index.d.ts +2 -2
  45. package/general/index.js +2 -2
  46. package/general/is-next-button-disabled.js +1 -1
  47. package/general/is-odd.js +1 -1
  48. package/general/is-previous-button-disabled.js +1 -1
  49. package/general/remove-data-image-prefix.js +2 -2
  50. package/general/repeat-times.js +3 -3
  51. package/general/resolve-anchor-link.js +4 -4
  52. package/general/resolve-current-date.js +2 -2
  53. package/general/resolve-grid.js +1 -1
  54. package/general/resolve-initials.js +2 -2
  55. package/general/set-timezone.js +6 -3
  56. package/general/slugify.js +2 -2
  57. package/general/text-to-enum.js +1 -1
  58. package/general/text-to-sentence-case.js +1 -1
  59. package/general/truncate-text.js +1 -1
  60. package/general/upload-blob-to-private-supabase.d.ts +11 -0
  61. package/general/upload-blob-to-private-supabase.js +62 -0
  62. package/general/upload-blob-to-public-supabase.d.ts +11 -0
  63. package/general/upload-blob-to-public-supabase.js +62 -0
  64. package/general/upload-image-to-private-supabase.js +51 -15
  65. package/general/upload-image-to-public-supabase.js +51 -15
  66. package/general/url-to-sentence-case.js +4 -4
  67. package/general/validate-comment.js +1 -1
  68. package/general/validate-email.js +2 -2
  69. package/general/validate-name.js +1 -1
  70. package/hooks/use-change.js +14 -5
  71. package/hooks/use-debounce.js +7 -6
  72. package/hooks/use-fetch.js +82 -31
  73. package/hooks/use-force-render.js +3 -3
  74. package/hooks/use-ip-geo-location.js +57 -22
  75. package/hooks/use-is-mobile.js +6 -6
  76. package/hooks/use-position.js +16 -16
  77. package/hooks/use-sticky.js +9 -8
  78. package/hooks/use-toggle-state.js +6 -5
  79. package/hooks/use-window-event-listener.js +4 -4
  80. package/local-storage/get-storage-value.js +2 -2
  81. package/local-storage/remove-storage-value.js +1 -1
  82. package/local-storage/set-storage-value.js +1 -1
  83. package/package.json +1 -1
  84. package/storybook/generate-sitemap.js +6 -22
  85. package/storybook/preview.js +13 -2
  86. package/storybook/react-design-story-script.js +7 -11
  87. package/storybook/react-emoji-collection.js +23 -33
  88. package/storybook/react-emoji-story-script.js +9 -13
  89. package/storybook/react-emoji-story-template.js +1 -46
  90. package/storybook/react-icon-collection.js +17 -27
  91. package/storybook/react-icon-story-script.js +9 -13
  92. package/storybook/react-icon-story-template.js +1 -46
  93. package/storybook/react-logo-collection.js +17 -27
  94. package/storybook/react-logo-story-script.js +9 -13
  95. package/storybook/react-logo-story-template.js +1 -46
  96. package/storybook/responsive-component.js +11 -46
  97. package/storybook/theme.js +4 -4
  98. package/general/upload-image-blob-to-private-supabase.d.ts +0 -11
  99. package/general/upload-image-blob-to-private-supabase.js +0 -27
  100. package/general/upload-image-blob-to-public-supabase.d.ts +0 -11
  101. package/general/upload-image-blob-to-public-supabase.js +0 -27
@@ -9,57 +9,116 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
10
  });
11
11
  };
12
+ var __generator = (this && this.__generator) || function (thisArg, body) {
13
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
14
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
15
+ function verb(n) { return function (v) { return step([n, v]); }; }
16
+ function step(op) {
17
+ if (f) throw new TypeError("Generator is already executing.");
18
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
19
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20
+ if (y = 0, t) op = [op[0] & 2, t.value];
21
+ switch (op[0]) {
22
+ case 0: case 1: t = op; break;
23
+ case 4: _.label++; return { value: op[1], done: false };
24
+ case 5: _.label++; y = op[1]; op = [0]; continue;
25
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
26
+ default:
27
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
28
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
29
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
30
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
31
+ if (t[2]) _.ops.pop();
32
+ _.trys.pop(); continue;
33
+ }
34
+ op = body.call(thisArg, _);
35
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
36
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
37
+ }
38
+ };
12
39
  Object.defineProperty(exports, "__esModule", { value: true });
13
40
  exports.deleteTax = exports.postTax = exports.getTaxById = exports.getTaxes = void 0;
14
- const getTaxes = (_a) => __awaiter(void 0, [_a], void 0, function* ({ prisma, }) {
15
- const taxes = yield prisma.tax.findMany({
16
- orderBy: {
17
- createdAt: 'desc',
18
- },
41
+ var getTaxes = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
42
+ var taxes;
43
+ var prisma = _b.prisma;
44
+ return __generator(this, function (_c) {
45
+ switch (_c.label) {
46
+ case 0: return [4 /*yield*/, prisma.tax.findMany({
47
+ orderBy: {
48
+ createdAt: 'desc',
49
+ },
50
+ })];
51
+ case 1:
52
+ taxes = _c.sent();
53
+ return [2 /*return*/, taxes];
54
+ }
19
55
  });
20
- return taxes;
21
- });
56
+ }); };
22
57
  exports.getTaxes = getTaxes;
23
- const getTaxById = (_b) => __awaiter(void 0, [_b], void 0, function* ({ prisma, id, }) {
24
- const tax = yield prisma.tax.findUnique({
25
- where: {
26
- id,
27
- },
58
+ var getTaxById = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
59
+ var tax;
60
+ var prisma = _b.prisma, id = _b.id;
61
+ return __generator(this, function (_c) {
62
+ switch (_c.label) {
63
+ case 0: return [4 /*yield*/, prisma.tax.findUnique({
64
+ where: {
65
+ id: id,
66
+ },
67
+ })];
68
+ case 1:
69
+ tax = _c.sent();
70
+ return [2 /*return*/, tax];
71
+ }
28
72
  });
29
- return tax;
30
- });
73
+ }); };
31
74
  exports.getTaxById = getTaxById;
32
- const postTax = (_c) => __awaiter(void 0, [_c], void 0, function* ({ description, enabled, id, isDefault, preferenceId, prisma, taxName, taxValue, }) {
33
- const tax = yield prisma.tax.upsert({
34
- where: {
35
- id,
36
- },
37
- update: {
38
- description,
39
- enabled,
40
- isDefault,
41
- preferenceId,
42
- taxName,
43
- taxValue,
44
- },
45
- create: {
46
- description,
47
- enabled,
48
- isDefault,
49
- preferenceId,
50
- taxName,
51
- taxValue,
52
- },
75
+ var postTax = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
76
+ var tax;
77
+ var description = _b.description, enabled = _b.enabled, id = _b.id, isDefault = _b.isDefault, preferenceId = _b.preferenceId, prisma = _b.prisma, taxName = _b.taxName, taxValue = _b.taxValue;
78
+ return __generator(this, function (_c) {
79
+ switch (_c.label) {
80
+ case 0: return [4 /*yield*/, prisma.tax.upsert({
81
+ where: {
82
+ id: id,
83
+ },
84
+ update: {
85
+ description: description,
86
+ enabled: enabled,
87
+ isDefault: isDefault,
88
+ preferenceId: preferenceId,
89
+ taxName: taxName,
90
+ taxValue: taxValue,
91
+ },
92
+ create: {
93
+ description: description,
94
+ enabled: enabled,
95
+ isDefault: isDefault,
96
+ preferenceId: preferenceId,
97
+ taxName: taxName,
98
+ taxValue: taxValue,
99
+ },
100
+ })];
101
+ case 1:
102
+ tax = _c.sent();
103
+ return [2 /*return*/, tax];
104
+ }
53
105
  });
54
- return tax;
55
- });
106
+ }); };
56
107
  exports.postTax = postTax;
57
- const deleteTax = (_d) => __awaiter(void 0, [_d], void 0, function* ({ prisma, id, }) {
58
- const tax = yield prisma.tax.delete({
59
- where: {
60
- id,
61
- },
108
+ var deleteTax = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
109
+ var tax;
110
+ var prisma = _b.prisma, id = _b.id;
111
+ return __generator(this, function (_c) {
112
+ switch (_c.label) {
113
+ case 0: return [4 /*yield*/, prisma.tax.delete({
114
+ where: {
115
+ id: id,
116
+ },
117
+ })];
118
+ case 1:
119
+ tax = _c.sent();
120
+ return [2 /*return*/, tax];
121
+ }
62
122
  });
63
- return tax;
64
- });
123
+ }); };
65
124
  exports.deleteTax = deleteTax;
@@ -6,8 +6,7 @@ exports.reactPakistanProjects = {
6
6
  alt: 'React Pakistan',
7
7
  appLink: '',
8
8
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750977/GitHub/optimised/React_Pakistan_Storybook_Logo.jpg',
9
- description: `React Pakistan is an OpenSource & Free Software (FOSS) platform,
10
- creating React software solutions for the global community. ⭐⭐⭐`,
9
+ description: "React Pakistan is an OpenSource & Free Software (FOSS) platform,\n creating React software solutions for the global community. \u2B50\u2B50\u2B50",
11
10
  githubLink: '',
12
11
  npmLink: '',
13
12
  title: 'React Pakistan 🔥🔥🔥',
@@ -16,8 +15,7 @@ exports.reactPakistanProjects = {
16
15
  alt: 'React Pakistan - React Commons Collection',
17
16
  appLink: 'https://taimoormk.github.io/react-commons-collection',
18
17
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750673/GitHub/optimised/react-commons-collection.jpg',
19
- description: `A generic, Commons library for React web apps, following modern approach by
20
- building your project's UI in isolation using state of the art Storybook along with React.`,
18
+ description: "A generic, Commons library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
21
19
  githubLink: 'https://github.com/Taimoormk/react-commons-collection',
22
20
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-commons-collection',
23
21
  title: 'React Commons Collection',
@@ -26,8 +24,7 @@ exports.reactPakistanProjects = {
26
24
  alt: 'React Pakistan - React UI Collection',
27
25
  appLink: 'https://taimoormk.github.io/react-ui-collection',
28
26
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750673/GitHub/optimised/react-ui-collection.jpg',
29
- description: `A generic to specific, UI/UX library for React web apps, following modern approach by
30
- building your project's UI in isolation using state of the art Storybook along with React.`,
27
+ description: "A generic to specific, UI/UX library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
31
28
  githubLink: 'https://github.com/Taimoormk/react-ui-collection',
32
29
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-ui-collection',
33
30
  title: 'React UI Collection',
@@ -36,8 +33,7 @@ exports.reactPakistanProjects = {
36
33
  alt: 'React Pakistan - React Icon Collection',
37
34
  appLink: 'https://react-pakistan.github.io/react-icon-collection',
38
35
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750668/GitHub/optimised/react-icons-collection.jpg',
39
- description: `A generic, SVG Icon library for React web apps, following modern approach by
40
- building your project's UI in isolation using state of the art Storybook along with React.`,
36
+ description: "A generic, SVG Icon library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
41
37
  githubLink: 'https://github.com/react-pakistan/react-icon-collection',
42
38
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-icon-collection',
43
39
  title: 'React Icon Collection',
@@ -46,8 +42,7 @@ exports.reactPakistanProjects = {
46
42
  alt: 'React Pakistan - React Logo Collection',
47
43
  appLink: 'https://react-pakistan.github.io/react-logo-collection',
48
44
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750668/GitHub/optimised/react-logo-collection.jpg',
49
- description: `A generic, SVG Logo library for React web apps, following modern approach by
50
- building your project's UI in isolation using state of the art Storybook along with React.`,
45
+ description: "A generic, SVG Logo library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
51
46
  githubLink: 'https://github.com/react-pakistan/react-logo-collection',
52
47
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-logo-collection',
53
48
  title: 'React Logo Collection',
@@ -56,8 +51,7 @@ exports.reactPakistanProjects = {
56
51
  alt: 'React Pakistan - React Emoji Collection',
57
52
  appLink: 'https://react-pakistan.github.io/react-emoji-collection',
58
53
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1613750673/GitHub/optimised/react-emoji-collection.jpg',
59
- description: `A generic, SVG Emoji library for React web apps, following modern approach by
60
- building your project's UI in isolation using state of the art Storybook along with React.`,
54
+ description: "A generic, SVG Emoji library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
61
55
  githubLink: 'https://github.com/react-oakistan/react-emoji-collection',
62
56
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-commons-collection',
63
57
  title: 'React Emoji Collection',
@@ -66,8 +60,7 @@ exports.reactPakistanProjects = {
66
60
  alt: 'React Pakistan - React Native Commons Collection',
67
61
  appLink: '',
68
62
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1566355017/GitHub/optimised/react-native-commons-collection.jpg',
69
- description: `A generic, Commons library for React Native apps, following modern approach by
70
- building your project's UI in isolation using state of the art Storybook along with React Native.`,
63
+ description: "A generic, Commons library for React Native apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React Native.",
71
64
  githubLink: 'https://github.com/react-pakistan/react-native-commons-collection',
72
65
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-native-commons-collection',
73
66
  title: 'React Native Commons Collection',
@@ -76,8 +69,7 @@ exports.reactPakistanProjects = {
76
69
  alt: 'React Pakistan - React Native UI Collection',
77
70
  appLink: '',
78
71
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1566355017/GitHub/optimised/react-native-ui-collection.jpg',
79
- description: `A generic to specific, UI/UX library for React Native apps, following modern approach by
80
- building your project's UI in isolation using state of the art Storybook along with React.`,
72
+ description: "A generic to specific, UI/UX library for React Native apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
81
73
  githubLink: 'https://github.com/react-pakistan/react-native-ui-collection',
82
74
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-native-ui-collection',
83
75
  title: 'React Native UI Collection',
@@ -86,8 +78,7 @@ exports.reactPakistanProjects = {
86
78
  alt: 'React Pakistan - React Native Icon Collection',
87
79
  appLink: '',
88
80
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1566355017/GitHub/optimised/react-native-icon-collection.jpg',
89
- description: `A generic, SVG Icon library for React Native apps, following modern approach by
90
- building your project's UI in isolation using state of the art Storybook along with React.`,
81
+ description: "A generic, SVG Icon library for React Native apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
91
82
  githubLink: 'https://github.com/react-pakistan/react-native-icon-collection',
92
83
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-native-icon-collection',
93
84
  title: 'React Native Icon Collection',
@@ -96,8 +87,7 @@ exports.reactPakistanProjects = {
96
87
  alt: 'React Pakistan - React Native Logo Collection',
97
88
  appLink: '',
98
89
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1566355017/GitHub/optimised/react-native-logo-collection.jpg',
99
- description: `A generic, SVG Logo library for React Native apps, following modern approach by
100
- building your project's UI in isolation using state of the art Storybook along with React.`,
90
+ description: "A generic, SVG Logo library for React Native apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
101
91
  githubLink: 'https://github.com/react-pakistan/react-native-logo-collection',
102
92
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-native-logo-collection',
103
93
  title: 'React Native Logo Collection',
@@ -106,8 +96,7 @@ exports.reactPakistanProjects = {
106
96
  alt: 'React Pakistan - React Native Emoji Collection',
107
97
  appLink: '',
108
98
  bannerImage: 'https://res.cloudinary.com/dq6hflqwx/image/upload/v1566355017/GitHub/optimised/react-native-emoji-collection.jpg',
109
- description: `A generic, SVG Emoji library for React web apps, following modern approach by
110
- building your project's UI in isolation using state of the art Storybook along with React.`,
99
+ description: "A generic, SVG Emoji library for React web apps, following modern approach by\n building your project's UI in isolation using state of the art Storybook along with React.",
111
100
  githubLink: 'https://github.com/react-pakistan/react-native-emoji-collection',
112
101
  npmLink: 'https://www.npmjs.com/package/@react-pakistan/react-native-emoji-collection',
113
102
  title: 'React Native Emoji Collection',
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ var _a, _b;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.MOBILE_PLATFORM_MEDIA_SIZES = exports.MOBILE_PLATFORM_TYPES = exports.SOCIAL_MEDIA_POST_SIZES = exports.SOCIAL_MEDIA_POST_TYPES = void 0;
4
5
  var SOCIAL_MEDIA_POST_TYPES;
@@ -28,112 +29,112 @@ var SOCIAL_MEDIA_POST_TYPES;
28
29
  SOCIAL_MEDIA_POST_TYPES["YOUTUBE_CHANNEL_PROFILE"] = "YOUTUBE_CHANNEL_PROFILE";
29
30
  SOCIAL_MEDIA_POST_TYPES["YOUTUBE_CHANNEL_COVER"] = "YOUTUBE_CHANNEL_COVER";
30
31
  })(SOCIAL_MEDIA_POST_TYPES || (exports.SOCIAL_MEDIA_POST_TYPES = SOCIAL_MEDIA_POST_TYPES = {}));
31
- exports.SOCIAL_MEDIA_POST_SIZES = {
32
- [SOCIAL_MEDIA_POST_TYPES.FACEBOOK_COVER_PHOTO]: {
32
+ exports.SOCIAL_MEDIA_POST_SIZES = (_a = {},
33
+ _a[SOCIAL_MEDIA_POST_TYPES.FACEBOOK_COVER_PHOTO] = {
33
34
  height: '360px',
34
35
  width: '820px',
35
36
  },
36
- [SOCIAL_MEDIA_POST_TYPES.FACEBOOK_EVENT_COVER]: {
37
+ _a[SOCIAL_MEDIA_POST_TYPES.FACEBOOK_EVENT_COVER] = {
37
38
  height: '1080px',
38
39
  width: '1920px',
39
40
  },
40
- [SOCIAL_MEDIA_POST_TYPES.FACEBOOK_PROFILE_PHOTO]: {
41
+ _a[SOCIAL_MEDIA_POST_TYPES.FACEBOOK_PROFILE_PHOTO] = {
41
42
  height: '400px',
42
43
  width: '400px',
43
44
  },
44
- [SOCIAL_MEDIA_POST_TYPES.FACEBOOK_POST_SHARE]: {
45
+ _a[SOCIAL_MEDIA_POST_TYPES.FACEBOOK_POST_SHARE] = {
45
46
  height: '630px',
46
47
  width: '1200px',
47
48
  },
48
- [SOCIAL_MEDIA_POST_TYPES.FACEBOOK_STORIES]: {
49
+ _a[SOCIAL_MEDIA_POST_TYPES.FACEBOOK_STORIES] = {
49
50
  height: '1920px',
50
51
  width: '1080px',
51
52
  },
52
- [SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_PROFILE_PHOTO]: {
53
+ _a[SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_PROFILE_PHOTO] = {
53
54
  height: '400px',
54
55
  width: '400px',
55
56
  },
56
- [SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_PHOTO_SHARE]: {
57
+ _a[SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_PHOTO_SHARE] = {
57
58
  height: '1080px',
58
59
  width: '1080px',
59
60
  },
60
- [SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_STORIES]: {
61
+ _a[SOCIAL_MEDIA_POST_TYPES.INSTAGRAM_STORIES] = {
61
62
  height: '1920px',
62
63
  width: '1080px',
63
64
  },
64
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_PROFILE_PHOTO]: {
65
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_PROFILE_PHOTO] = {
65
66
  height: '400px',
66
67
  width: '400px',
67
68
  },
68
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_PROFILE_BACKGROUND]: {
69
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_PROFILE_BACKGROUND] = {
69
70
  height: '396px',
70
71
  width: '1584px',
71
72
  },
72
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_COMPANY_LOGO]: {
73
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_COMPANY_LOGO] = {
73
74
  height: '300px',
74
75
  width: '300px',
75
76
  },
76
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_COMPANY_COVER]: {
77
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_COMPANY_COVER] = {
77
78
  height: '768px',
78
79
  width: '1536px',
79
80
  },
80
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_SHARED_IMAGE]: {
81
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_SHARED_IMAGE] = {
81
82
  height: '736px',
82
83
  width: '1200px',
83
84
  },
84
- [SOCIAL_MEDIA_POST_TYPES.LINKEDIN_SHARED_IMAGE_LINK]: {
85
+ _a[SOCIAL_MEDIA_POST_TYPES.LINKEDIN_SHARED_IMAGE_LINK] = {
85
86
  height: '628px',
86
87
  width: '1200px',
87
88
  },
88
- [SOCIAL_MEDIA_POST_TYPES.PINTEREST_PROFILE_PHOTO]: {
89
+ _a[SOCIAL_MEDIA_POST_TYPES.PINTEREST_PROFILE_PHOTO] = {
89
90
  height: '400px',
90
91
  width: '400px',
91
92
  },
92
- [SOCIAL_MEDIA_POST_TYPES.PINTEREST_BOARD_COVER]: {
93
+ _a[SOCIAL_MEDIA_POST_TYPES.PINTEREST_BOARD_COVER] = {
93
94
  height: '600px',
94
95
  width: '600px',
95
96
  },
96
- [SOCIAL_MEDIA_POST_TYPES.PINTEREST_SHARED_PIN]: {
97
+ _a[SOCIAL_MEDIA_POST_TYPES.PINTEREST_SHARED_PIN] = {
97
98
  height: '900px',
98
99
  width: '600px',
99
100
  },
100
- [SOCIAL_MEDIA_POST_TYPES.PINTEREST_PROFILE_COVER]: {
101
+ _a[SOCIAL_MEDIA_POST_TYPES.PINTEREST_PROFILE_COVER] = {
101
102
  height: '1080px',
102
103
  width: '1920px',
103
104
  },
104
- [SOCIAL_MEDIA_POST_TYPES.SNAPCHAT_SHARED_IMAGE]: {
105
+ _a[SOCIAL_MEDIA_POST_TYPES.SNAPCHAT_SHARED_IMAGE] = {
105
106
  height: '1920px',
106
107
  width: '1080px',
107
108
  },
108
- [SOCIAL_MEDIA_POST_TYPES.TWITTER_HEADER]: {
109
+ _a[SOCIAL_MEDIA_POST_TYPES.TWITTER_HEADER] = {
109
110
  height: '500px',
110
111
  width: '1500px',
111
112
  },
112
- [SOCIAL_MEDIA_POST_TYPES.TWITTER_PROFILE_PHOTO]: {
113
+ _a[SOCIAL_MEDIA_POST_TYPES.TWITTER_PROFILE_PHOTO] = {
113
114
  height: '400px',
114
115
  width: '400px',
115
116
  },
116
- [SOCIAL_MEDIA_POST_TYPES.TWITTER_POST_SHARE]: {
117
+ _a[SOCIAL_MEDIA_POST_TYPES.TWITTER_POST_SHARE] = {
117
118
  height: '630px',
118
119
  width: '1200px',
119
120
  },
120
- [SOCIAL_MEDIA_POST_TYPES.YOUTUBE_CHANNEL_PROFILE]: {
121
+ _a[SOCIAL_MEDIA_POST_TYPES.YOUTUBE_CHANNEL_PROFILE] = {
121
122
  height: '800px',
122
123
  width: '800px',
123
124
  },
124
- [SOCIAL_MEDIA_POST_TYPES.YOUTUBE_CHANNEL_COVER]: {
125
+ _a[SOCIAL_MEDIA_POST_TYPES.YOUTUBE_CHANNEL_COVER] = {
125
126
  height: '423px',
126
127
  width: '1546px',
127
128
  },
128
- };
129
+ _a);
129
130
  var MOBILE_PLATFORM_TYPES;
130
131
  (function (MOBILE_PLATFORM_TYPES) {
131
132
  MOBILE_PLATFORM_TYPES["ANDROID"] = "android";
132
133
  MOBILE_PLATFORM_TYPES["IOS"] = "ios";
133
134
  MOBILE_PLATFORM_TYPES["WINDOWS"] = "windows";
134
135
  })(MOBILE_PLATFORM_TYPES || (exports.MOBILE_PLATFORM_TYPES = MOBILE_PLATFORM_TYPES = {}));
135
- exports.MOBILE_PLATFORM_MEDIA_SIZES = {
136
- [MOBILE_PLATFORM_TYPES.ANDROID]: {
136
+ exports.MOBILE_PLATFORM_MEDIA_SIZES = (_b = {},
137
+ _b[MOBILE_PLATFORM_TYPES.ANDROID] = {
137
138
  appIcons: {
138
139
  googlePlay: {
139
140
  height: '512px',
@@ -211,7 +212,7 @@ exports.MOBILE_PLATFORM_MEDIA_SIZES = {
211
212
  },
212
213
  },
213
214
  },
214
- [MOBILE_PLATFORM_TYPES.IOS]: {
215
+ _b[MOBILE_PLATFORM_TYPES.IOS] = {
215
216
  appIcons: {
216
217
  xxxxxlarge: {
217
218
  height: '1024px',
@@ -303,7 +304,7 @@ exports.MOBILE_PLATFORM_MEDIA_SIZES = {
303
304
  },
304
305
  },
305
306
  },
306
- appleWatchMenuIcons: {
307
+ _b.appleWatchMenuIcons = {
307
308
  largeWatch: {
308
309
  height: '80px',
309
310
  width: '80px',
@@ -313,7 +314,7 @@ exports.MOBILE_PLATFORM_MEDIA_SIZES = {
313
314
  width: '70px',
314
315
  },
315
316
  },
316
- appleWatchCompanionIcons: {
317
+ _b.appleWatchCompanionIcons = {
317
318
  large: {
318
319
  height: '87px',
319
320
  width: '87px',
@@ -323,4 +324,4 @@ exports.MOBILE_PLATFORM_MEDIA_SIZES = {
323
324
  width: '58px',
324
325
  },
325
326
  },
326
- };
327
+ _b);
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
15
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
16
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9,12 +20,63 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
20
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
21
  });
11
22
  };
23
+ var __generator = (this && this.__generator) || function (thisArg, body) {
24
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
+ function verb(n) { return function (v) { return step([n, v]); }; }
27
+ function step(op) {
28
+ if (f) throw new TypeError("Generator is already executing.");
29
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
30
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
+ if (y = 0, t) op = [op[0] & 2, t.value];
32
+ switch (op[0]) {
33
+ case 0: case 1: t = op; break;
34
+ case 4: _.label++; return { value: op[1], done: false };
35
+ case 5: _.label++; y = op[1]; op = [0]; continue;
36
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
+ default:
38
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
+ if (t[2]) _.ops.pop();
43
+ _.trys.pop(); continue;
44
+ }
45
+ op = body.call(thisArg, _);
46
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
+ }
49
+ };
50
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
51
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
52
+ if (ar || !(i in from)) {
53
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
54
+ ar[i] = from[i];
55
+ }
56
+ }
57
+ return to.concat(ar || Array.prototype.slice.call(from));
58
+ };
12
59
  Object.defineProperty(exports, "__esModule", { value: true });
13
60
  exports.basicGet = void 0;
14
- const basicGet = (url) => (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (opts = {}) {
15
- const headers = opts.headers ? opts.headers : {};
16
- headers['Content-Type'] = 'application/json';
17
- const response = yield fetch(url, Object.assign({ headers, method: 'GET' }, opts));
18
- return response.json();
19
- });
61
+ var basicGet = function (url) { return function () {
62
+ var args_1 = [];
63
+ for (var _i = 0; _i < arguments.length; _i++) {
64
+ args_1[_i] = arguments[_i];
65
+ }
66
+ return __awaiter(void 0, __spreadArray([], args_1, true), void 0, function (opts) {
67
+ var headers, response;
68
+ if (opts === void 0) { opts = {}; }
69
+ return __generator(this, function (_a) {
70
+ switch (_a.label) {
71
+ case 0:
72
+ headers = opts.headers ? opts.headers : {};
73
+ headers['Content-Type'] = 'application/json';
74
+ return [4 /*yield*/, fetch(url, __assign({ headers: headers, method: 'GET' }, opts))];
75
+ case 1:
76
+ response = _a.sent();
77
+ return [2 /*return*/, response.json()];
78
+ }
79
+ });
80
+ });
81
+ }; };
20
82
  exports.basicGet = basicGet;
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
15
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
16
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -9,12 +20,50 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
20
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
21
  });
11
22
  };
23
+ var __generator = (this && this.__generator) || function (thisArg, body) {
24
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
25
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
26
+ function verb(n) { return function (v) { return step([n, v]); }; }
27
+ function step(op) {
28
+ if (f) throw new TypeError("Generator is already executing.");
29
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
30
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
31
+ if (y = 0, t) op = [op[0] & 2, t.value];
32
+ switch (op[0]) {
33
+ case 0: case 1: t = op; break;
34
+ case 4: _.label++; return { value: op[1], done: false };
35
+ case 5: _.label++; y = op[1]; op = [0]; continue;
36
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
37
+ default:
38
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
39
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
40
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
41
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
42
+ if (t[2]) _.ops.pop();
43
+ _.trys.pop(); continue;
44
+ }
45
+ op = body.call(thisArg, _);
46
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
47
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
48
+ }
49
+ };
12
50
  Object.defineProperty(exports, "__esModule", { value: true });
13
51
  exports.basicPost = void 0;
14
- const basicPost = (url) => (payload, opts = {}) => () => __awaiter(void 0, void 0, void 0, function* () {
15
- const headers = opts.headers ? opts.headers : {};
16
- headers['Content-Type'] = 'application/json';
17
- const response = yield fetch(url, Object.assign(Object.assign({ method: 'POST' }, opts), { body: JSON.stringify(payload), headers }));
18
- return response.json();
19
- });
52
+ var basicPost = function (url) { return function (payload, opts) {
53
+ if (opts === void 0) { opts = {}; }
54
+ return function () { return __awaiter(void 0, void 0, void 0, function () {
55
+ var headers, response;
56
+ return __generator(this, function (_a) {
57
+ switch (_a.label) {
58
+ case 0:
59
+ headers = opts.headers ? opts.headers : {};
60
+ headers['Content-Type'] = 'application/json';
61
+ return [4 /*yield*/, fetch(url, __assign(__assign({ method: 'POST' }, opts), { body: JSON.stringify(payload), headers: headers }))];
62
+ case 1:
63
+ response = _a.sent();
64
+ return [2 /*return*/, response.json()];
65
+ }
66
+ });
67
+ }); };
68
+ }; };
20
69
  exports.basicPost = basicPost;
@@ -10,11 +10,11 @@
10
10
  /** End file docs */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.camelToSentenceCase = void 0;
13
- const camelToSentenceCase = (str) => {
14
- const newString = str.replace(/([A-Z])/g, ' $1');
13
+ var camelToSentenceCase = function (str) {
14
+ var newString = str.replace(/([A-Z])/g, ' $1');
15
15
  return newString
16
16
  .split(' ')
17
- .map((_str) => _str.charAt(0).toUpperCase() + _str.slice(1))
17
+ .map(function (_str) { return _str.charAt(0).toUpperCase() + _str.slice(1); })
18
18
  .join(' ');
19
19
  };
20
20
  exports.camelToSentenceCase = camelToSentenceCase;
@@ -12,5 +12,5 @@
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.checkEvenOddLength = void 0;
14
14
  /* eslint-disable @typescript-eslint/no-explicit-any */
15
- const checkEvenOddLength = (arr) => (arr.length % 2 === 0 ? 2 : 1);
15
+ var checkEvenOddLength = function (arr) { return (arr.length % 2 === 0 ? 2 : 1); };
16
16
  exports.checkEvenOddLength = checkEvenOddLength;
@@ -10,10 +10,10 @@
10
10
  /** End file docs */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createDate = void 0;
13
- const date_fns_tz_1 = require("date-fns-tz");
14
- const set_timezone_1 = require("./set-timezone");
15
- const defaultTimezone = 'Asia/Karachi';
16
- const createDate = (date, tz) => {
13
+ var date_fns_tz_1 = require("date-fns-tz");
14
+ var set_timezone_1 = require("./set-timezone");
15
+ var defaultTimezone = 'Asia/Karachi';
16
+ var createDate = function (date, tz) {
17
17
  if (tz || !date) {
18
18
  return (0, set_timezone_1.setTimezone)(date ? (0, date_fns_tz_1.toDate)(date) : new Date(), tz || defaultTimezone);
19
19
  }