asv-hlps 1.4.9 → 1.4.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 (81) hide show
  1. package/lib/cjs/auth/auth.d.ts +1 -1
  2. package/lib/cjs/auth/auth.js +12 -18
  3. package/lib/cjs/auth/authService.js +0 -13
  4. package/lib/cjs/auth/models/index.d.ts +1 -0
  5. package/lib/cjs/auth/storageService.js +0 -23
  6. package/lib/cjs/buys/models/Buy.d.ts +9 -9
  7. package/lib/cjs/cashs/models/index.d.ts +0 -1
  8. package/lib/cjs/index.d.ts +0 -1
  9. package/lib/cjs/index.js +0 -1
  10. package/lib/cjs/markets/index.d.ts +4 -1
  11. package/lib/cjs/markets/index.js +4 -1
  12. package/lib/cjs/markets/models/Market.d.ts +1 -1
  13. package/lib/cjs/markets/models/UMarket.d.ts +1 -1
  14. package/lib/cjs/markets/models/index.d.ts +2 -2
  15. package/lib/cjs/markets/models/index.js +0 -16
  16. package/lib/cjs/markets/products/hlpProduct.d.ts +2 -2
  17. package/lib/cjs/markets/products/hlpProduct.js +16 -16
  18. package/lib/cjs/markets/products/models/Product.d.ts +2 -2
  19. package/lib/cjs/markets/shops/index.d.ts +1 -1
  20. package/lib/cjs/markets/shops/index.js +1 -1
  21. package/lib/cjs/markets/shops/models/Shop.d.ts +1 -1
  22. package/lib/cjs/markets/shops/models/index.d.ts +1 -0
  23. package/lib/cjs/markets/users/index.d.ts +1 -0
  24. package/lib/cjs/markets/users/index.js +17 -0
  25. package/lib/cjs/markets/users/models/index.d.ts +1 -0
  26. package/lib/cjs/shared/models/IIcon.js +0 -4
  27. package/lib/cjs/shared/models/NaAcIc.js +0 -5
  28. package/lib/cjs/shared/models/NaCoAcIc.js +0 -5
  29. package/lib/cjs/shared/models/TVariant.d.ts +2 -0
  30. package/lib/cjs/shared/models/TVariant.js +2 -0
  31. package/lib/cjs/shared/models/index.d.ts +4 -3
  32. package/lib/cjs/users/models/User.d.ts +1 -1
  33. package/lib/cjs/users/models/UserAbs.d.ts +1 -1
  34. package/lib/cjs/users/models/UserBase.d.ts +14 -14
  35. package/lib/cjs/utils.d.ts +0 -1
  36. package/lib/cjs/utils.js +0 -5
  37. package/lib/esm/auth/auth.d.ts +1 -1
  38. package/lib/esm/auth/auth.js +12 -18
  39. package/lib/esm/auth/authService.js +0 -13
  40. package/lib/esm/auth/models/index.d.ts +1 -0
  41. package/lib/esm/auth/storageService.js +0 -23
  42. package/lib/esm/buys/models/Buy.d.ts +9 -9
  43. package/lib/esm/cashs/models/index.d.ts +0 -1
  44. package/lib/esm/index.d.ts +0 -1
  45. package/lib/esm/index.js +0 -1
  46. package/lib/esm/markets/index.d.ts +4 -1
  47. package/lib/esm/markets/index.js +4 -1
  48. package/lib/esm/markets/models/Market.d.ts +1 -1
  49. package/lib/esm/markets/models/UMarket.d.ts +1 -1
  50. package/lib/esm/markets/models/index.d.ts +2 -2
  51. package/lib/esm/markets/models/index.js +1 -2
  52. package/lib/esm/markets/products/hlpProduct.d.ts +2 -2
  53. package/lib/esm/markets/products/hlpProduct.js +16 -16
  54. package/lib/esm/markets/products/models/Product.d.ts +2 -2
  55. package/lib/esm/markets/shops/index.d.ts +1 -1
  56. package/lib/esm/markets/shops/index.js +1 -1
  57. package/lib/esm/markets/shops/models/Shop.d.ts +1 -1
  58. package/lib/esm/markets/shops/models/index.d.ts +1 -0
  59. package/lib/esm/markets/users/index.d.ts +1 -0
  60. package/lib/esm/markets/users/index.js +1 -0
  61. package/lib/esm/markets/users/models/index.d.ts +1 -0
  62. package/lib/esm/shared/models/IIcon.js +1 -2
  63. package/lib/esm/shared/models/NaAcIc.js +1 -3
  64. package/lib/esm/shared/models/NaCoAcIc.js +1 -3
  65. package/lib/esm/shared/models/TVariant.d.ts +2 -0
  66. package/lib/esm/shared/models/TVariant.js +1 -0
  67. package/lib/esm/shared/models/index.d.ts +4 -3
  68. package/lib/esm/users/models/User.d.ts +1 -1
  69. package/lib/esm/users/models/UserAbs.d.ts +1 -1
  70. package/lib/esm/users/models/UserBase.d.ts +14 -14
  71. package/lib/esm/utils.d.ts +0 -1
  72. package/lib/esm/utils.js +0 -4
  73. package/package.json +4 -3
  74. package/lib/cjs/bootstrap.d.ts +0 -1
  75. package/lib/cjs/users/models/EUserTag.d.ts +0 -14
  76. package/lib/esm/bootstrap.d.ts +0 -1
  77. package/lib/esm/users/models/EUserTag.d.ts +0 -14
  78. /package/lib/cjs/{bootstrap.js → markets/shops/models/index.js} +0 -0
  79. /package/lib/cjs/{users/models/EUserTag.js → markets/users/models/index.js} +0 -0
  80. /package/lib/esm/{bootstrap.js → markets/shops/models/index.js} +0 -0
  81. /package/lib/esm/{users/models/EUserTag.js → markets/users/models/index.js} +0 -0
@@ -18,7 +18,7 @@ interface AuthParam {
18
18
  url?: string;
19
19
  }
20
20
  type TData = {
21
- tags?: AuthTag[] | string[];
21
+ tags?: AuthTag[];
22
22
  ste: Ste;
23
23
  role: UserRole;
24
24
  roles: string[];
@@ -2,28 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAuth = void 0;
4
4
  const user_1 = require("../users/user");
5
- const utils_1 = require("../utils");
6
5
  const arraySome = (arr1, arr2) => {
7
6
  return arr1.some((x) => arr2.includes(x));
8
7
  };
9
8
  const getAuth = (authUser, authSte, param) => {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
11
- if ((param === null || param === void 0 ? void 0 : param.tag) && ((_a = authUser === null || authUser === void 0 ? void 0 : authUser.tags) === null || _a === void 0 ? void 0 : _a.length)) {
12
- let tags = [];
13
- if ((0, utils_1.checkIsStringOfArray)(authUser.tags)) {
14
- tags = authUser === null || authUser === void 0 ? void 0 : authUser.tags;
9
+ var _a, _b, _c, _d, _e, _f;
10
+ if ((param === null || param === void 0 ? void 0 : param.tag) && (authUser === null || authUser === void 0 ? void 0 : authUser.tags.length)) {
11
+ const tags = [];
12
+ for (const tag of authUser.tags) {
13
+ tags.push(tag.code.toLowerCase());
15
14
  }
16
- else {
17
- for (const tag of authUser.tags) {
18
- tags.push((_b = tag === null || tag === void 0 ? void 0 : tag.code) === null || _b === void 0 ? void 0 : _b.toLowerCase());
19
- }
20
- }
21
- const authIn = tags === null || tags === void 0 ? void 0 : tags.includes((_c = param === null || param === void 0 ? void 0 : param.tag) === null || _c === void 0 ? void 0 : _c.toLowerCase());
15
+ const authIn = tags.includes(param.tag.toLowerCase());
22
16
  if (authIn) {
23
17
  return true;
24
18
  }
25
19
  }
26
- if (((_d = param === null || param === void 0 ? void 0 : param.roles) === null || _d === void 0 ? void 0 : _d.length) > 0) {
20
+ if (((_a = param === null || param === void 0 ? void 0 : param.roles) === null || _a === void 0 ? void 0 : _a.length) > 0) {
27
21
  /* if (isStaffSte(authSte, authUser.ste.name) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
28
22
  return true;
29
23
  } */
@@ -33,7 +27,7 @@ const getAuth = (authUser, authSte, param) => {
33
27
  }
34
28
  // ------ staff ------
35
29
  if (param === null || param === void 0 ? void 0 : param.staff) {
36
- if (((_e = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
30
+ if (((_b = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
37
31
  (0, user_1.isStaffSte)(authSte, authUser.ste.name) &&
38
32
  ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
39
33
  return true;
@@ -54,7 +48,7 @@ const getAuth = (authUser, authSte, param) => {
54
48
  param.client.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
55
49
  return true;
56
50
  }
57
- if (((_f = param === null || param === void 0 ? void 0 : param.client.roles) === null || _f === void 0 ? void 0 : _f.length) &&
51
+ if (((_c = param === null || param === void 0 ? void 0 : param.client.roles) === null || _c === void 0 ? void 0 : _c.length) &&
58
52
  (param === null || param === void 0 ? void 0 : param.client.steGrps.length) &&
59
53
  ["ceo", ...param === null || param === void 0 ? void 0 : param.client.roles].includes(authUser.role.code.toLowerCase()) &&
60
54
  (param === null || param === void 0 ? void 0 : param.client.steGrps).includes(authUser.ste.grp.code.toLowerCase())) {
@@ -63,13 +57,13 @@ const getAuth = (authUser, authSte, param) => {
63
57
  }
64
58
  }
65
59
  // ------ ste grps ------
66
- if (((_g = param === null || param === void 0 ? void 0 : param.steGrps) === null || _g === void 0 ? void 0 : _g.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
60
+ if (((_d = param === null || param === void 0 ? void 0 : param.steGrps) === null || _d === void 0 ? void 0 : _d.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
67
61
  return true;
68
62
  }
69
- if (((_h = param === null || param === void 0 ? void 0 : param.grps) === null || _h === void 0 ? void 0 : _h.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
63
+ if (((_e = param === null || param === void 0 ? void 0 : param.grps) === null || _e === void 0 ? void 0 : _e.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
70
64
  return true;
71
65
  }
72
- if (((_j = param === null || param === void 0 ? void 0 : param.steNames) === null || _j === void 0 ? void 0 : _j.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
66
+ if (((_f = param === null || param === void 0 ? void 0 : param.steNames) === null || _f === void 0 ? void 0 : _f.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
73
67
  return true;
74
68
  }
75
69
  return false;
@@ -53,15 +53,6 @@ class AuthService {
53
53
  return false;
54
54
  }
55
55
  });
56
- /* login = async (tob: LoginType, httpService: any) => {
57
- try {
58
- const { data: jwt } = await httpService.post("auth/login", tob);
59
- this.setStorageToken(jwt.token);
60
- return true;
61
- } catch (error) {
62
- console.log(error);
63
- }
64
- }; */
65
56
  this.logout = () => {
66
57
  this.removeStorageToken();
67
58
  // userAuthNavigate("/");
@@ -78,9 +69,6 @@ class AuthService {
78
69
  return null;
79
70
  }
80
71
  };
81
- /* getAuth = (authUser: User | UserNotarial, authSte: string[], param?: AuthParam) => {
82
- return getAuth(authUser, authSte, param);
83
- }; */
84
72
  this.getAuth = (param) => {
85
73
  return (0, auth_1.getAuth)(this.authUser(), this.authStes, param);
86
74
  };
@@ -92,4 +80,3 @@ class AuthService {
92
80
  }
93
81
  }
94
82
  exports.AuthService = AuthService;
95
- // export default new AuthService("awPharma");
@@ -1,3 +1,4 @@
1
1
  export { default as AuthTag } from "./AuthTag";
2
2
  export { default as AuthTagCat } from "./AuthTagCat";
3
3
  export { default as AuthTagSub } from "./AuthTagSub";
4
+ export { default as AuthTagGrp } from "./AuthTagGrp";
@@ -39,26 +39,3 @@ class StorageService {
39
39
  }
40
40
  }
41
41
  exports.default = new StorageService();
42
- /* class StorageService {
43
- getStorage = (key: string, local = false) => {
44
- if (!key) {
45
- return null;
46
- }
47
- return !local ? sessionStorage.getItem(key) : localStorage.getItem(key);
48
- };
49
-
50
- setStorage = (key: string, value: string, local = false): any => {
51
- if (!key) {
52
- return null;
53
- }
54
- !local ? sessionStorage.setItem(key, value) : localStorage.setItem(key, value);
55
- };
56
-
57
- removeStorage = (key: string) => {
58
- localStorage.removeItem(key);
59
- sessionStorage.removeItem(key);
60
- };
61
- }
62
-
63
- export default new StorageService();
64
- */
@@ -2,18 +2,18 @@ import User from "../../users/models/User";
2
2
  import BuyItem from "./BuyItem";
3
3
  export default interface Buy {
4
4
  id: number;
5
- ref: string;
6
- createdAt: any;
5
+ author?: User;
7
6
  buyDate: any;
8
- totalAmount?: number;
9
- totalAmountTva?: number;
10
- totalQtity?: number;
11
- nbProducts?: number;
12
- isValided: boolean;
13
- isReceipt: boolean;
14
7
  buyProducts?: BuyItem[];
15
8
  comment: string;
9
+ createdAt: any;
10
+ isReceipt: boolean;
11
+ isValided: boolean;
12
+ nbProducts?: number;
16
13
  pvd?: User;
17
- author?: User;
14
+ ref: string;
15
+ totalAmount?: number;
16
+ totalAmountTva?: number;
17
+ totalQtity?: number;
18
18
  get getQtity(): void;
19
19
  }
@@ -3,5 +3,4 @@ export { default as BankAccount } from "./BankAccount";
3
3
  export { default as Currency } from "./Currency";
4
4
  export { default as Deposit } from "./Deposit";
5
5
  export { default as Feed } from "./Feed";
6
- export { default as PaymentMode } from "./PaymentMode";
7
6
  export { default as Spent } from "./Spent";
@@ -1,7 +1,6 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./shared/bazars/BsColors";
5
4
  export * from "./buys";
6
5
  export * from "./cashs";
7
6
  export * from "./comptas";
package/lib/cjs/index.js CHANGED
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./acts"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./bills"), exports);
20
- __exportStar(require("./shared/bazars/BsColors"), exports);
21
20
  __exportStar(require("./buys"), exports);
22
21
  __exportStar(require("./cashs"), exports);
23
22
  __exportStar(require("./comptas"), exports);
@@ -1,2 +1,5 @@
1
1
  export * from "./models";
2
- export * from "./products/models";
2
+ export * from "./products";
3
+ export * from "./sales";
4
+ export * from "./shops";
5
+ export * from "./users";
@@ -15,4 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./models"), exports);
18
- __exportStar(require("./products/models"), exports);
18
+ __exportStar(require("./products"), exports);
19
+ __exportStar(require("./sales"), exports);
20
+ __exportStar(require("./shops"), exports);
21
+ __exportStar(require("./users"), exports);
@@ -1,4 +1,4 @@
1
- export interface Market {
1
+ export default interface Market {
2
2
  id?: number;
3
3
  name: string;
4
4
  code: string;
@@ -1,5 +1,5 @@
1
1
  import User from "../../users/models/User";
2
- import { Market } from "./Market";
2
+ import Market from "./Market";
3
3
  export default interface UMarket {
4
4
  id: number;
5
5
  createdAt: Date;
@@ -1,2 +1,2 @@
1
- export * from "./Market";
2
- export * from "./UMarket";
1
+ export { default as Market } from "./Market";
2
+ export { default as UMarket } from "./UMarket";
@@ -1,18 +1,2 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Market"), exports);
18
- __exportStar(require("./UMarket"), exports);
@@ -1,13 +1,13 @@
1
1
  import Product from "./models/Product";
2
2
  import { ProductStock } from "./models/ProductStock";
3
3
  declare class HlpProduct {
4
+ stock: (product: Product, param: "salable" | "packs" | "units") => number;
5
+ extraFiilters: (row: Product) => string;
4
6
  qtityInAllDepots(stock: ProductStock, prms?: {
5
7
  exceptDepots?: string[];
6
8
  main?: "master" | "slave";
7
9
  }): number;
8
10
  getStockSalable(product: Product): number;
9
- stock: (product: Product, param: "salable" | "packs" | "units") => number;
10
- extraFiilters: (row: Product) => string;
11
11
  }
12
12
  declare const _default: HlpProduct;
13
13
  export default _default;
@@ -18,30 +18,30 @@ class HlpProduct {
18
18
  }
19
19
  };
20
20
  this.extraFiilters = (row) => row.designation; /* +
21
- row.codeCompta +
22
- (row.tva > 0 ? "@tva" : "") +
23
- (row.isAvailable ? "@dispo" : "") +
24
- (!row.isAvailable ? "@indispo" : "") +
25
- (row.isActive ? "@actif" : "") +
26
- (!row.isActive ? "@inactif" : "") +
27
- (row.isPrivate ? "@private" : "") +
28
- (!row.isPrivate ? "@noprivate" : ""); */
21
+ row.codeCompta +
22
+ (row.tva > 0 ? "@tva" : "") +
23
+ (row.isAvailable ? "@dispo" : "") +
24
+ (!row.isAvailable ? "@indispo" : "") +
25
+ (row.isActive ? "@actif" : "") +
26
+ (!row.isActive ? "@inactif" : "") +
27
+ (row.isPrivate ? "@private" : "") +
28
+ (!row.isPrivate ? "@noprivate" : ""); */
29
29
  }
30
30
  qtityInAllDepots(stock, prms) {
31
31
  const ins = stock.sumIns - stock.sumOuts;
32
32
  return ins <= 0 ? 0 : ins;
33
33
  }
34
34
  getStockSalable(product) {
35
- const stockAllSalable = +this.qtityInAllDepots(product.stock);
35
+ const stockAllSalable = this.qtityInAllDepots(product.stock);
36
36
  const stockProduct = Math.trunc(stockAllSalable / product.qtityUnit);
37
37
  /* let stockSalable: number = 0;
38
-
39
- if (stockAllSalable <= stockStore) {
40
- stockSalable = stockAllSalable;
41
- }
42
- if (stockAllSalable > stockStore) {
43
- stockSalable = stockStore;
44
- } */
38
+
39
+ if (stockAllSalable <= stockStore) {
40
+ stockSalable = stockAllSalable;
41
+ }
42
+ if (stockAllSalable > stockStore) {
43
+ stockSalable = stockStore;
44
+ } */
45
45
  // return stockSalable || 0;
46
46
  return stockProduct || 0;
47
47
  }
@@ -1,5 +1,5 @@
1
- import { Market } from "../../models/Market";
2
- import { Shop } from "../../shops/models/Shop";
1
+ import Market from "../../models/Market";
2
+ import Shop from "../../shops/models/Shop";
3
3
  import ProductCat from "./ProductCat";
4
4
  import ProductImage from "./ProductImage";
5
5
  import ProductIn from "./ProductIn";
@@ -1 +1 @@
1
- export * from "./models/Shop";
1
+ export * from "./models";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./models/Shop"), exports);
17
+ __exportStar(require("./models"), exports);
@@ -1,6 +1,6 @@
1
1
  import UMarket from "../../models/UMarket";
2
2
  import Product from "../../products/models/Product";
3
- export interface Shop {
3
+ export default interface Shop {
4
4
  id: number;
5
5
  name: string;
6
6
  title: string;
@@ -0,0 +1 @@
1
+ export { default as Shop } from "./Shop";
@@ -0,0 +1 @@
1
+ export * from "./models";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./models"), exports);
@@ -0,0 +1 @@
1
+ export { default as User } from "./User";
@@ -1,6 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IIcon = void 0;
4
- class IIcon {
5
- }
6
- exports.IIcon = IIcon;
@@ -1,7 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NaAcIc = void 0;
4
- const IIcon_1 = require("./IIcon");
5
- class NaAcIc extends IIcon_1.IIcon {
6
- }
7
- exports.NaAcIc = NaAcIc;
@@ -1,7 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NaCoAcIc = void 0;
4
- const NaAcIc_1 = require("./NaAcIc");
5
- class NaCoAcIc extends NaAcIc_1.NaAcIc {
6
- }
7
- exports.NaCoAcIc = NaCoAcIc;
@@ -0,0 +1,2 @@
1
+ type TVariant = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
2
+ export default TVariant;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +1,13 @@
1
1
  import { IParam } from "./IParam";
2
+ export { default as Color } from "./Color";
2
3
  export { default as EInOutMotive } from "./EInOutMotive";
3
4
  export { default as IPath } from "./IPath";
5
+ export { default as Matter } from "./Matter";
6
+ export { default as Measure } from "./Measure";
4
7
  export { default as NaAc } from "./NaAc";
5
8
  export { default as NaCoAc } from "./NaCoAc";
6
9
  export { default as NaCoShortAc } from "./NaCoShortAc";
7
10
  export { default as OpDate } from "./OpDate";
8
- export { default as Matter } from "./Matter";
9
- export { default as Measure } from "./Measure";
10
11
  export { default as Size } from "./Size";
11
- export { default as Color } from "./Color";
12
+ export { default as TVariant } from "./TVariant";
12
13
  export { IParam };
@@ -38,7 +38,7 @@ export default interface User extends Address {
38
38
  tags?: AuthTag[];
39
39
  zone?: Zone;
40
40
  role?: UserRole;
41
- roles?: UserRole[];
41
+ roles?: string[];
42
42
  ste?: Ste;
43
43
  fullname?: string;
44
44
  }
@@ -25,7 +25,7 @@ export default interface UserAbs extends Address {
25
25
  grp?: UserGrp;
26
26
  tags?: AuthTag[];
27
27
  role?: UserRole;
28
- roles?: UserRole[];
28
+ roles?: string[];
29
29
  ste?: Ste;
30
30
  fullname?: string;
31
31
  }
@@ -7,25 +7,25 @@ import UserRole from "./UserRole";
7
7
  import UserTitr from "./UserTitr";
8
8
  export default interface UserBase extends Address {
9
9
  id: number;
10
- codeCompta?: string | number;
11
- firstname: string;
12
- lastname: string;
13
- username?: string;
14
10
  birthday?: Date | string;
15
- password?: string;
16
- ip?: string;
17
- isActive: boolean;
18
- isValided?: boolean;
11
+ clp?: string;
12
+ codeCompta?: string | number;
19
13
  disabled?: boolean;
20
- isBadPayer?: boolean;
14
+ firstname: string;
21
15
  foto?: string;
22
- clp?: string;
16
+ fullname?: string;
23
17
  gender?: Gender;
24
- titr?: UserTitr;
25
18
  grp?: UserGrp;
26
- tags?: AuthTag[];
19
+ ip?: string;
20
+ isActive: boolean;
21
+ isBadPayer?: boolean;
22
+ isValided?: boolean;
23
+ lastname: string;
24
+ password?: string;
27
25
  role?: UserRole;
28
- roles?: UserRole[];
26
+ roles?: string[];
29
27
  ste?: Ste;
30
- fullname?: string;
28
+ tags?: AuthTag[];
29
+ titr?: UserTitr;
30
+ username?: string;
31
31
  }
@@ -108,4 +108,3 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
108
108
  export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
109
109
  export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
110
110
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
111
- export declare function checkIsStringOfArray(array: unknown[]): array is string[];
package/lib/cjs/utils.js CHANGED
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.unCheckedAll = exports.inputChecked = exports.arrayMultiChecked = exports.getPeriodDateColor = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.reformatDates = exports.firstDayOfDate = exports.dateToString = exports.dateDiff = exports.dateFormatter = exports.replaceSpacesWith = exports.replaceAllIn = exports.toPlural = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = exports.refGenerator = exports.removeBackSlashOccurences = exports.stringifyFormatter = exports.removeString = exports.diffArraysByProp = exports.diffArraysByFunc = exports.deepClone = exports.findFirstSequenceMissing = exports.fillNumWithZero = exports.findSequencesMissing = exports.sequencesToNumbers = exports.notInSequence = exports.currencyFormatterCfa = exports.formatToStringCfa = exports.currencyFormatter = exports.formatToString = exports.checkAuth = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.duplicateObjects = exports.removeDuplicateObjects = exports.getRandomColor = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = exports.formatDateFirstDayFr = exports.isEmpty = void 0;
7
7
  exports.checkObjInArray = exports.arraySome = exports.winMaxHeight = exports.toggleProp = exports.roundLastNDigits = exports.removeParamKeyName = exports.countryIsoToFlag = exports.monthStringName = exports.returnBool = exports.formatAmountToString = exports.reduceTimes = exports.reduceSum = exports.sumAmount = exports.fillEndWithZero = exports.fillStartWithZero = exports.absFromSequence = exports.returnDates = exports.displayFrDatePeriode = exports.getArrayOfRandomColor = exports.randomHslColor = exports.randomHexColor = exports.randomRgbColor = exports.randomInteger = exports.insertAtInArray = exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = exports.formatMonthYearToLocaleString = exports.calculPercent = exports.validEmail = exports.convertToCfa = exports.packAndUnit = void 0;
8
- exports.checkIsStringOfArray = checkIsStringOfArray;
9
8
  const dayjs_1 = __importDefault(require("dayjs"));
10
9
  const relativeTime_1 = __importDefault(require("dayjs/plugin/relativeTime"));
11
10
  const lodash_1 = __importDefault(require("lodash"));
@@ -775,7 +774,3 @@ const checkObjInArray = (objs, checkProp, prop = "id") => {
775
774
  });
776
775
  };
777
776
  exports.checkObjInArray = checkObjInArray;
778
- function checkIsStringOfArray(array) {
779
- // return array.every((element) => typeof element === "string");
780
- return array.some((element) => typeof element === "string");
781
- }
@@ -18,7 +18,7 @@ interface AuthParam {
18
18
  url?: string;
19
19
  }
20
20
  type TData = {
21
- tags?: AuthTag[] | string[];
21
+ tags?: AuthTag[];
22
22
  ste: Ste;
23
23
  role: UserRole;
24
24
  roles: string[];
@@ -1,26 +1,20 @@
1
1
  import { isStaffSte } from "../users/user";
2
- import { checkIsStringOfArray } from "../utils";
3
2
  const arraySome = (arr1, arr2) => {
4
3
  return arr1.some((x) => arr2.includes(x));
5
4
  };
6
5
  const getAuth = (authUser, authSte, param) => {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
8
- if ((param === null || param === void 0 ? void 0 : param.tag) && ((_a = authUser === null || authUser === void 0 ? void 0 : authUser.tags) === null || _a === void 0 ? void 0 : _a.length)) {
9
- let tags = [];
10
- if (checkIsStringOfArray(authUser.tags)) {
11
- tags = authUser === null || authUser === void 0 ? void 0 : authUser.tags;
6
+ var _a, _b, _c, _d, _e, _f;
7
+ if ((param === null || param === void 0 ? void 0 : param.tag) && (authUser === null || authUser === void 0 ? void 0 : authUser.tags.length)) {
8
+ const tags = [];
9
+ for (const tag of authUser.tags) {
10
+ tags.push(tag.code.toLowerCase());
12
11
  }
13
- else {
14
- for (const tag of authUser.tags) {
15
- tags.push((_b = tag === null || tag === void 0 ? void 0 : tag.code) === null || _b === void 0 ? void 0 : _b.toLowerCase());
16
- }
17
- }
18
- const authIn = tags === null || tags === void 0 ? void 0 : tags.includes((_c = param === null || param === void 0 ? void 0 : param.tag) === null || _c === void 0 ? void 0 : _c.toLowerCase());
12
+ const authIn = tags.includes(param.tag.toLowerCase());
19
13
  if (authIn) {
20
14
  return true;
21
15
  }
22
16
  }
23
- if (((_d = param === null || param === void 0 ? void 0 : param.roles) === null || _d === void 0 ? void 0 : _d.length) > 0) {
17
+ if (((_a = param === null || param === void 0 ? void 0 : param.roles) === null || _a === void 0 ? void 0 : _a.length) > 0) {
24
18
  /* if (isStaffSte(authSte, authUser.ste.name) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
25
19
  return true;
26
20
  } */
@@ -30,7 +24,7 @@ const getAuth = (authUser, authSte, param) => {
30
24
  }
31
25
  // ------ staff ------
32
26
  if (param === null || param === void 0 ? void 0 : param.staff) {
33
- if (((_e = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
27
+ if (((_b = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
34
28
  isStaffSte(authSte, authUser.ste.name) &&
35
29
  ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
36
30
  return true;
@@ -51,7 +45,7 @@ const getAuth = (authUser, authSte, param) => {
51
45
  param.client.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
52
46
  return true;
53
47
  }
54
- if (((_f = param === null || param === void 0 ? void 0 : param.client.roles) === null || _f === void 0 ? void 0 : _f.length) &&
48
+ if (((_c = param === null || param === void 0 ? void 0 : param.client.roles) === null || _c === void 0 ? void 0 : _c.length) &&
55
49
  (param === null || param === void 0 ? void 0 : param.client.steGrps.length) &&
56
50
  ["ceo", ...param === null || param === void 0 ? void 0 : param.client.roles].includes(authUser.role.code.toLowerCase()) &&
57
51
  (param === null || param === void 0 ? void 0 : param.client.steGrps).includes(authUser.ste.grp.code.toLowerCase())) {
@@ -60,13 +54,13 @@ const getAuth = (authUser, authSte, param) => {
60
54
  }
61
55
  }
62
56
  // ------ ste grps ------
63
- if (((_g = param === null || param === void 0 ? void 0 : param.steGrps) === null || _g === void 0 ? void 0 : _g.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
57
+ if (((_d = param === null || param === void 0 ? void 0 : param.steGrps) === null || _d === void 0 ? void 0 : _d.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
64
58
  return true;
65
59
  }
66
- if (((_h = param === null || param === void 0 ? void 0 : param.grps) === null || _h === void 0 ? void 0 : _h.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
60
+ if (((_e = param === null || param === void 0 ? void 0 : param.grps) === null || _e === void 0 ? void 0 : _e.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
67
61
  return true;
68
62
  }
69
- if (((_j = param === null || param === void 0 ? void 0 : param.steNames) === null || _j === void 0 ? void 0 : _j.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
63
+ if (((_f = param === null || param === void 0 ? void 0 : param.steNames) === null || _f === void 0 ? void 0 : _f.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
70
64
  return true;
71
65
  }
72
66
  return false;
@@ -47,15 +47,6 @@ export class AuthService {
47
47
  return false;
48
48
  }
49
49
  });
50
- /* login = async (tob: LoginType, httpService: any) => {
51
- try {
52
- const { data: jwt } = await httpService.post("auth/login", tob);
53
- this.setStorageToken(jwt.token);
54
- return true;
55
- } catch (error) {
56
- console.log(error);
57
- }
58
- }; */
59
50
  this.logout = () => {
60
51
  this.removeStorageToken();
61
52
  // userAuthNavigate("/");
@@ -72,9 +63,6 @@ export class AuthService {
72
63
  return null;
73
64
  }
74
65
  };
75
- /* getAuth = (authUser: User | UserNotarial, authSte: string[], param?: AuthParam) => {
76
- return getAuth(authUser, authSte, param);
77
- }; */
78
66
  this.getAuth = (param) => {
79
67
  return getAuth(this.authUser(), this.authStes, param);
80
68
  };
@@ -85,4 +73,3 @@ export class AuthService {
85
73
  this.authStes = authStes;
86
74
  }
87
75
  }
88
- // export default new AuthService("awPharma");
@@ -1,3 +1,4 @@
1
1
  export { default as AuthTag } from "./AuthTag";
2
2
  export { default as AuthTagCat } from "./AuthTagCat";
3
3
  export { default as AuthTagSub } from "./AuthTagSub";
4
+ export { default as AuthTagGrp } from "./AuthTagGrp";
@@ -37,26 +37,3 @@ class StorageService {
37
37
  }
38
38
  }
39
39
  export default new StorageService();
40
- /* class StorageService {
41
- getStorage = (key: string, local = false) => {
42
- if (!key) {
43
- return null;
44
- }
45
- return !local ? sessionStorage.getItem(key) : localStorage.getItem(key);
46
- };
47
-
48
- setStorage = (key: string, value: string, local = false): any => {
49
- if (!key) {
50
- return null;
51
- }
52
- !local ? sessionStorage.setItem(key, value) : localStorage.setItem(key, value);
53
- };
54
-
55
- removeStorage = (key: string) => {
56
- localStorage.removeItem(key);
57
- sessionStorage.removeItem(key);
58
- };
59
- }
60
-
61
- export default new StorageService();
62
- */
@@ -2,18 +2,18 @@ import User from "../../users/models/User";
2
2
  import BuyItem from "./BuyItem";
3
3
  export default interface Buy {
4
4
  id: number;
5
- ref: string;
6
- createdAt: any;
5
+ author?: User;
7
6
  buyDate: any;
8
- totalAmount?: number;
9
- totalAmountTva?: number;
10
- totalQtity?: number;
11
- nbProducts?: number;
12
- isValided: boolean;
13
- isReceipt: boolean;
14
7
  buyProducts?: BuyItem[];
15
8
  comment: string;
9
+ createdAt: any;
10
+ isReceipt: boolean;
11
+ isValided: boolean;
12
+ nbProducts?: number;
16
13
  pvd?: User;
17
- author?: User;
14
+ ref: string;
15
+ totalAmount?: number;
16
+ totalAmountTva?: number;
17
+ totalQtity?: number;
18
18
  get getQtity(): void;
19
19
  }
@@ -3,5 +3,4 @@ export { default as BankAccount } from "./BankAccount";
3
3
  export { default as Currency } from "./Currency";
4
4
  export { default as Deposit } from "./Deposit";
5
5
  export { default as Feed } from "./Feed";
6
- export { default as PaymentMode } from "./PaymentMode";
7
6
  export { default as Spent } from "./Spent";
@@ -1,7 +1,6 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./shared/bazars/BsColors";
5
4
  export * from "./buys";
6
5
  export * from "./cashs";
7
6
  export * from "./comptas";
package/lib/esm/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from "./acts";
2
2
  export * from "./auth";
3
3
  export * from "./bills";
4
- export * from "./shared/bazars/BsColors";
5
4
  export * from "./buys";
6
5
  export * from "./cashs";
7
6
  export * from "./comptas";
@@ -1,2 +1,5 @@
1
1
  export * from "./models";
2
- export * from "./products/models";
2
+ export * from "./products";
3
+ export * from "./sales";
4
+ export * from "./shops";
5
+ export * from "./users";
@@ -1,2 +1,5 @@
1
1
  export * from "./models";
2
- export * from "./products/models";
2
+ export * from "./products";
3
+ export * from "./sales";
4
+ export * from "./shops";
5
+ export * from "./users";
@@ -1,4 +1,4 @@
1
- export interface Market {
1
+ export default interface Market {
2
2
  id?: number;
3
3
  name: string;
4
4
  code: string;
@@ -1,5 +1,5 @@
1
1
  import User from "../../users/models/User";
2
- import { Market } from "./Market";
2
+ import Market from "./Market";
3
3
  export default interface UMarket {
4
4
  id: number;
5
5
  createdAt: Date;
@@ -1,2 +1,2 @@
1
- export * from "./Market";
2
- export * from "./UMarket";
1
+ export { default as Market } from "./Market";
2
+ export { default as UMarket } from "./UMarket";
@@ -1,2 +1 @@
1
- export * from "./Market";
2
- export * from "./UMarket";
1
+ export {};
@@ -1,13 +1,13 @@
1
1
  import Product from "./models/Product";
2
2
  import { ProductStock } from "./models/ProductStock";
3
3
  declare class HlpProduct {
4
+ stock: (product: Product, param: "salable" | "packs" | "units") => number;
5
+ extraFiilters: (row: Product) => string;
4
6
  qtityInAllDepots(stock: ProductStock, prms?: {
5
7
  exceptDepots?: string[];
6
8
  main?: "master" | "slave";
7
9
  }): number;
8
10
  getStockSalable(product: Product): number;
9
- stock: (product: Product, param: "salable" | "packs" | "units") => number;
10
- extraFiilters: (row: Product) => string;
11
11
  }
12
12
  declare const _default: HlpProduct;
13
13
  export default _default;
@@ -16,30 +16,30 @@ class HlpProduct {
16
16
  }
17
17
  };
18
18
  this.extraFiilters = (row) => row.designation; /* +
19
- row.codeCompta +
20
- (row.tva > 0 ? "@tva" : "") +
21
- (row.isAvailable ? "@dispo" : "") +
22
- (!row.isAvailable ? "@indispo" : "") +
23
- (row.isActive ? "@actif" : "") +
24
- (!row.isActive ? "@inactif" : "") +
25
- (row.isPrivate ? "@private" : "") +
26
- (!row.isPrivate ? "@noprivate" : ""); */
19
+ row.codeCompta +
20
+ (row.tva > 0 ? "@tva" : "") +
21
+ (row.isAvailable ? "@dispo" : "") +
22
+ (!row.isAvailable ? "@indispo" : "") +
23
+ (row.isActive ? "@actif" : "") +
24
+ (!row.isActive ? "@inactif" : "") +
25
+ (row.isPrivate ? "@private" : "") +
26
+ (!row.isPrivate ? "@noprivate" : ""); */
27
27
  }
28
28
  qtityInAllDepots(stock, prms) {
29
29
  const ins = stock.sumIns - stock.sumOuts;
30
30
  return ins <= 0 ? 0 : ins;
31
31
  }
32
32
  getStockSalable(product) {
33
- const stockAllSalable = +this.qtityInAllDepots(product.stock);
33
+ const stockAllSalable = this.qtityInAllDepots(product.stock);
34
34
  const stockProduct = Math.trunc(stockAllSalable / product.qtityUnit);
35
35
  /* let stockSalable: number = 0;
36
-
37
- if (stockAllSalable <= stockStore) {
38
- stockSalable = stockAllSalable;
39
- }
40
- if (stockAllSalable > stockStore) {
41
- stockSalable = stockStore;
42
- } */
36
+
37
+ if (stockAllSalable <= stockStore) {
38
+ stockSalable = stockAllSalable;
39
+ }
40
+ if (stockAllSalable > stockStore) {
41
+ stockSalable = stockStore;
42
+ } */
43
43
  // return stockSalable || 0;
44
44
  return stockProduct || 0;
45
45
  }
@@ -1,5 +1,5 @@
1
- import { Market } from "../../models/Market";
2
- import { Shop } from "../../shops/models/Shop";
1
+ import Market from "../../models/Market";
2
+ import Shop from "../../shops/models/Shop";
3
3
  import ProductCat from "./ProductCat";
4
4
  import ProductImage from "./ProductImage";
5
5
  import ProductIn from "./ProductIn";
@@ -1 +1 @@
1
- export * from "./models/Shop";
1
+ export * from "./models";
@@ -1 +1 @@
1
- export * from "./models/Shop";
1
+ export * from "./models";
@@ -1,6 +1,6 @@
1
1
  import UMarket from "../../models/UMarket";
2
2
  import Product from "../../products/models/Product";
3
- export interface Shop {
3
+ export default interface Shop {
4
4
  id: number;
5
5
  name: string;
6
6
  title: string;
@@ -0,0 +1 @@
1
+ export { default as Shop } from "./Shop";
@@ -0,0 +1 @@
1
+ export * from "./models";
@@ -0,0 +1 @@
1
+ export * from "./models";
@@ -0,0 +1 @@
1
+ export { default as User } from "./User";
@@ -1,2 +1 @@
1
- export class IIcon {
2
- }
1
+ export {};
@@ -1,3 +1 @@
1
- import { IIcon } from "./IIcon";
2
- export class NaAcIc extends IIcon {
3
- }
1
+ export {};
@@ -1,3 +1 @@
1
- import { NaAcIc } from "./NaAcIc";
2
- export class NaCoAcIc extends NaAcIc {
3
- }
1
+ export {};
@@ -0,0 +1,2 @@
1
+ type TVariant = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
2
+ export default TVariant;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,13 @@
1
1
  import { IParam } from "./IParam";
2
+ export { default as Color } from "./Color";
2
3
  export { default as EInOutMotive } from "./EInOutMotive";
3
4
  export { default as IPath } from "./IPath";
5
+ export { default as Matter } from "./Matter";
6
+ export { default as Measure } from "./Measure";
4
7
  export { default as NaAc } from "./NaAc";
5
8
  export { default as NaCoAc } from "./NaCoAc";
6
9
  export { default as NaCoShortAc } from "./NaCoShortAc";
7
10
  export { default as OpDate } from "./OpDate";
8
- export { default as Matter } from "./Matter";
9
- export { default as Measure } from "./Measure";
10
11
  export { default as Size } from "./Size";
11
- export { default as Color } from "./Color";
12
+ export { default as TVariant } from "./TVariant";
12
13
  export { IParam };
@@ -38,7 +38,7 @@ export default interface User extends Address {
38
38
  tags?: AuthTag[];
39
39
  zone?: Zone;
40
40
  role?: UserRole;
41
- roles?: UserRole[];
41
+ roles?: string[];
42
42
  ste?: Ste;
43
43
  fullname?: string;
44
44
  }
@@ -25,7 +25,7 @@ export default interface UserAbs extends Address {
25
25
  grp?: UserGrp;
26
26
  tags?: AuthTag[];
27
27
  role?: UserRole;
28
- roles?: UserRole[];
28
+ roles?: string[];
29
29
  ste?: Ste;
30
30
  fullname?: string;
31
31
  }
@@ -7,25 +7,25 @@ import UserRole from "./UserRole";
7
7
  import UserTitr from "./UserTitr";
8
8
  export default interface UserBase extends Address {
9
9
  id: number;
10
- codeCompta?: string | number;
11
- firstname: string;
12
- lastname: string;
13
- username?: string;
14
10
  birthday?: Date | string;
15
- password?: string;
16
- ip?: string;
17
- isActive: boolean;
18
- isValided?: boolean;
11
+ clp?: string;
12
+ codeCompta?: string | number;
19
13
  disabled?: boolean;
20
- isBadPayer?: boolean;
14
+ firstname: string;
21
15
  foto?: string;
22
- clp?: string;
16
+ fullname?: string;
23
17
  gender?: Gender;
24
- titr?: UserTitr;
25
18
  grp?: UserGrp;
26
- tags?: AuthTag[];
19
+ ip?: string;
20
+ isActive: boolean;
21
+ isBadPayer?: boolean;
22
+ isValided?: boolean;
23
+ lastname: string;
24
+ password?: string;
27
25
  role?: UserRole;
28
- roles?: UserRole[];
26
+ roles?: string[];
29
27
  ste?: Ste;
30
- fullname?: string;
28
+ tags?: AuthTag[];
29
+ titr?: UserTitr;
30
+ username?: string;
31
31
  }
@@ -108,4 +108,3 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
108
108
  export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
109
109
  export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
110
110
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
111
- export declare function checkIsStringOfArray(array: unknown[]): array is string[];
package/lib/esm/utils.js CHANGED
@@ -685,7 +685,3 @@ export const checkObjInArray = (objs, checkProp, prop = "id") => {
685
685
  return x[prop] === checkProp;
686
686
  });
687
687
  };
688
- export function checkIsStringOfArray(array) {
689
- // return array.every((element) => typeof element === "string");
690
- return array.some((element) => typeof element === "string");
691
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -18,10 +18,11 @@
18
18
  "devDependencies": {
19
19
  "@types/bcryptjs": "^2.4.6",
20
20
  "@types/express": "^5.0.0",
21
- "@types/lodash": "^4.17.14",
21
+ "@types/jwt-decode": "^3.1.0",
22
+ "@types/lodash": "^4.17.15",
22
23
  "@types/pdfmake": "^0.2.11",
23
24
  "@types/randomatic": "^3.1.5",
24
- "@types/react": "^19.0.4"
25
+ "@types/react": "^19.0.8"
25
26
  },
26
27
  "dependencies": {
27
28
  "axios": "^1.7.9",
@@ -1 +0,0 @@
1
- export type VariantType = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
@@ -1,14 +0,0 @@
1
- declare const enum UserTags {
2
- MEMO = "users_memos",
3
- TOOLS = "users_tools",
4
- GRP_CL = "users_grps_cl",
5
- BAZARS = "users_bazars",
6
- GRP_PH = "users_grps_ph",
7
- GRP_AG = "users_grps_ag",
8
- GRP_LA = "users_grps_la",
9
- GRP_FR = "users_grps_fr",
10
- GRP_SF = "users_grps_sf",
11
- GRP_PA = "users_grps_pa",
12
- GRP_ST = "users_grps_st"
13
- }
14
- export default UserTags;
@@ -1 +0,0 @@
1
- export type VariantType = "warning" | "purple" | "secondary" | "pink" | "primary" | "success" | "danger" | "light" | "white" | "info" | "link" | string;
@@ -1,14 +0,0 @@
1
- declare const enum UserTags {
2
- MEMO = "users_memos",
3
- TOOLS = "users_tools",
4
- GRP_CL = "users_grps_cl",
5
- BAZARS = "users_bazars",
6
- GRP_PH = "users_grps_ph",
7
- GRP_AG = "users_grps_ag",
8
- GRP_LA = "users_grps_la",
9
- GRP_FR = "users_grps_fr",
10
- GRP_SF = "users_grps_sf",
11
- GRP_PA = "users_grps_pa",
12
- GRP_ST = "users_grps_st"
13
- }
14
- export default UserTags;