@react-pakistan/util-functions 1.25.9 → 1.25.11

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 (57) hide show
  1. package/api/stellar-solutions/bank/cache.d.ts +0 -104
  2. package/api/stellar-solutions/bank/cache.js +237 -296
  3. package/api/stellar-solutions/bank/index.d.ts +1 -1
  4. package/api/stellar-solutions/bank/index.js +0 -15
  5. package/api/stellar-solutions/branch/cache.d.ts +0 -102
  6. package/api/stellar-solutions/branch/cache.js +241 -296
  7. package/api/stellar-solutions/branch/index.d.ts +1 -1
  8. package/api/stellar-solutions/branch/index.js +0 -15
  9. package/api/stellar-solutions/company/cache.d.ts +0 -106
  10. package/api/stellar-solutions/company/cache.js +247 -308
  11. package/api/stellar-solutions/company/index.d.ts +1 -1
  12. package/api/stellar-solutions/company/index.js +0 -15
  13. package/api/stellar-solutions/contact/cache.d.ts +0 -108
  14. package/api/stellar-solutions/contact/cache.js +247 -308
  15. package/api/stellar-solutions/contact/index.d.ts +1 -1
  16. package/api/stellar-solutions/contact/index.js +0 -15
  17. package/api/stellar-solutions/currency/cache.d.ts +0 -104
  18. package/api/stellar-solutions/currency/cache.js +243 -296
  19. package/api/stellar-solutions/currency/index.d.ts +1 -1
  20. package/api/stellar-solutions/currency/index.js +0 -15
  21. package/api/stellar-solutions/customer/cache.d.ts +0 -108
  22. package/api/stellar-solutions/customer/cache.js +249 -308
  23. package/api/stellar-solutions/customer/index.d.ts +1 -1
  24. package/api/stellar-solutions/customer/index.js +0 -15
  25. package/api/stellar-solutions/expense/cache.d.ts +0 -106
  26. package/api/stellar-solutions/expense/cache.js +247 -308
  27. package/api/stellar-solutions/expense/index.d.ts +1 -1
  28. package/api/stellar-solutions/expense/index.js +0 -15
  29. package/api/stellar-solutions/expense-category/cache.d.ts +0 -94
  30. package/api/stellar-solutions/expense-category/cache.js +224 -281
  31. package/api/stellar-solutions/expense-category/index.d.ts +1 -1
  32. package/api/stellar-solutions/expense-category/index.js +0 -15
  33. package/api/stellar-solutions/payment-mode/cache.d.ts +0 -102
  34. package/api/stellar-solutions/payment-mode/cache.js +245 -296
  35. package/api/stellar-solutions/payment-mode/index.d.ts +1 -1
  36. package/api/stellar-solutions/payment-mode/index.js +0 -15
  37. package/api/stellar-solutions/preference/cache.d.ts +0 -90
  38. package/api/stellar-solutions/preference/cache.js +218 -269
  39. package/api/stellar-solutions/preference/index.d.ts +1 -1
  40. package/api/stellar-solutions/preference/index.js +0 -15
  41. package/api/stellar-solutions/product/cache.d.ts +0 -94
  42. package/api/stellar-solutions/product/cache.js +222 -281
  43. package/api/stellar-solutions/product/index.d.ts +1 -1
  44. package/api/stellar-solutions/product/index.js +0 -15
  45. package/api/stellar-solutions/product-category/cache.d.ts +0 -94
  46. package/api/stellar-solutions/product-category/cache.js +224 -281
  47. package/api/stellar-solutions/product-category/index.d.ts +1 -1
  48. package/api/stellar-solutions/product-category/index.js +0 -15
  49. package/api/stellar-solutions/tax/cache.d.ts +0 -102
  50. package/api/stellar-solutions/tax/cache.js +235 -296
  51. package/api/stellar-solutions/tax/index.d.ts +1 -1
  52. package/api/stellar-solutions/tax/index.js +0 -15
  53. package/general/format-secs.d.ts +1 -0
  54. package/general/format-secs.js +21 -0
  55. package/general/index.d.ts +1 -0
  56. package/general/index.js +1 -0
  57. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- export * from './cache';
2
1
  import { TaxBE } from '../type';
3
2
  type PrismaClient = any;
4
3
  export interface ListTaxArgs {
@@ -53,3 +52,4 @@ export declare const updateTax: ({ description, enabled, id, isDefault, preferen
53
52
  * @returns {Promise<TaxBE>} Deleted tax
54
53
  */
55
54
  export declare const deleteTax: ({ id, prisma, }: DeleteTaxArgs) => Promise<TaxBE>;
55
+ export {};
@@ -10,20 +10,6 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
- };
27
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -71,7 +57,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
71
57
  };
72
58
  Object.defineProperty(exports, "__esModule", { value: true });
73
59
  exports.deleteTax = exports.updateTax = exports.unitTaxById = exports.listTax = void 0;
74
- __exportStar(require("./cache"), exports);
75
60
  var multi_part_search_1 = require("../../../general/multi-part-search");
76
61
  /**
77
62
  * Retrieves a paginated list of taxes
@@ -0,0 +1 @@
1
+ export declare const formatSecs: (sec: number) => string;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatSecs = void 0;
4
+ var formatSecs = function (sec) {
5
+ if (sec >= 0) {
6
+ var hours = Math.floor(sec / 3600);
7
+ var minutes = Math.floor((sec % 3600) / 60);
8
+ var secs = sec % 60;
9
+ return "".concat(hours, "h ").concat(minutes, "m ").concat(secs, "s");
10
+ }
11
+ else {
12
+ // For negative seconds, convert to negative hours and positive minutes/seconds
13
+ var absSec = Math.abs(sec);
14
+ var hours = -Math.ceil(absSec / 3600);
15
+ var remaining = absSec % 3600;
16
+ var minutes = Math.floor((3600 - remaining) / 60) % 60;
17
+ var secs = (60 - (absSec % 60)) % 60;
18
+ return "".concat(hours, "h ").concat(minutes, "m ").concat(secs, "s");
19
+ }
20
+ };
21
+ exports.formatSecs = formatSecs;
@@ -15,6 +15,7 @@ export * from './format-date';
15
15
  export * from './format-number';
16
16
  export * from './format-phone';
17
17
  export * from './format-pricing';
18
+ export * from './format-secs';
18
19
  export * from './format-time';
19
20
  export * from './full-month-range';
20
21
  export * from './full-year-range';
package/general/index.js CHANGED
@@ -31,6 +31,7 @@ __exportStar(require("./format-date"), exports);
31
31
  __exportStar(require("./format-number"), exports);
32
32
  __exportStar(require("./format-phone"), exports);
33
33
  __exportStar(require("./format-pricing"), exports);
34
+ __exportStar(require("./format-secs"), exports);
34
35
  __exportStar(require("./format-time"), exports);
35
36
  __exportStar(require("./full-month-range"), exports);
36
37
  __exportStar(require("./full-year-range"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.25.9",
3
+ "version": "1.25.11",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {