asv-hlps 1.4.5 → 1.4.7
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/lib/cjs/auth/auth.d.ts +2 -1
- package/lib/cjs/auth/auth.js +18 -23
- package/lib/cjs/markets/index.d.ts +2 -0
- package/lib/cjs/markets/index.js +18 -0
- package/lib/cjs/markets/models/Market.d.ts +8 -0
- package/lib/cjs/markets/models/Market.js +2 -0
- package/lib/cjs/markets/models/UMarket.d.ts +11 -0
- package/lib/cjs/markets/models/UMarket.js +2 -0
- package/lib/cjs/markets/models/index.d.ts +2 -0
- package/lib/cjs/markets/models/index.js +18 -0
- package/lib/cjs/markets/products/models/Product.d.ts +39 -0
- package/lib/cjs/markets/products/models/Product.js +2 -0
- package/lib/cjs/markets/products/models/ProductAsset.d.ts +8 -0
- package/lib/cjs/markets/products/models/ProductAsset.js +2 -0
- package/lib/cjs/markets/products/models/ProductCat.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductCat.js +2 -0
- package/lib/cjs/markets/products/models/ProductCollection.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductCollection.js +2 -0
- package/lib/cjs/markets/products/models/ProductDepot.d.ts +11 -0
- package/lib/cjs/markets/products/models/ProductDepot.js +2 -0
- package/lib/cjs/markets/products/models/ProductElt.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductElt.js +2 -0
- package/lib/cjs/markets/products/models/ProductGrp.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductGrp.js +2 -0
- package/lib/cjs/markets/products/models/ProductImage.d.ts +4 -0
- package/lib/cjs/markets/products/models/ProductImage.js +6 -0
- package/lib/cjs/markets/products/models/ProductIn.d.ts +42 -0
- package/lib/cjs/markets/products/models/ProductIn.js +6 -0
- package/lib/cjs/markets/products/models/ProductState.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductState.js +2 -0
- package/lib/cjs/markets/products/models/ProductStock.d.ts +6 -0
- package/lib/cjs/markets/products/models/ProductStock.js +2 -0
- package/lib/cjs/markets/products/models/ProductTag.d.ts +3 -0
- package/lib/cjs/markets/products/models/ProductTag.js +2 -0
- package/lib/cjs/markets/products/models/ProductVariant.d.ts +6 -0
- package/lib/cjs/markets/products/models/ProductVariant.js +2 -0
- package/lib/cjs/markets/products/models/index.d.ts +13 -0
- package/lib/cjs/markets/products/models/index.js +29 -0
- package/lib/cjs/markets/shops/index.d.ts +1 -0
- package/lib/cjs/markets/shops/index.js +17 -0
- package/lib/cjs/markets/shops/models/Shop.d.ts +13 -0
- package/lib/cjs/markets/shops/models/Shop.js +2 -0
- package/lib/cjs/markets/users/models/User.d.ts +7 -0
- package/lib/cjs/markets/users/models/User.js +2 -0
- package/lib/cjs/npms/yup.js +17 -7
- package/lib/cjs/shared/models/IIcon.d.ts +4 -0
- package/lib/cjs/shared/models/IIcon.js +6 -0
- package/lib/cjs/shared/models/NaAcIc.d.ts +7 -0
- package/lib/cjs/shared/models/NaAcIc.js +7 -0
- package/lib/cjs/shared/models/NaCoAcIc.d.ts +4 -0
- package/lib/cjs/shared/models/NaCoAcIc.js +7 -0
- package/lib/cjs/users/user.js +17 -7
- package/lib/cjs/utils.d.ts +1 -0
- package/lib/cjs/utils.js +5 -0
- package/lib/esm/auth/auth.d.ts +2 -1
- package/lib/esm/auth/auth.js +18 -23
- package/lib/esm/markets/index.d.ts +2 -0
- package/lib/esm/markets/index.js +2 -0
- package/lib/esm/markets/models/Market.d.ts +8 -0
- package/lib/esm/markets/models/Market.js +1 -0
- package/lib/esm/markets/models/UMarket.d.ts +11 -0
- package/lib/esm/markets/models/UMarket.js +1 -0
- package/lib/esm/markets/models/index.d.ts +2 -0
- package/lib/esm/markets/models/index.js +2 -0
- package/lib/esm/markets/products/models/Product.d.ts +39 -0
- package/lib/esm/markets/products/models/Product.js +1 -0
- package/lib/esm/markets/products/models/ProductAsset.d.ts +8 -0
- package/lib/esm/markets/products/models/ProductAsset.js +1 -0
- package/lib/esm/markets/products/models/ProductCat.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductCat.js +1 -0
- package/lib/esm/markets/products/models/ProductCollection.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductCollection.js +1 -0
- package/lib/esm/markets/products/models/ProductDepot.d.ts +11 -0
- package/lib/esm/markets/products/models/ProductDepot.js +1 -0
- package/lib/esm/markets/products/models/ProductElt.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductElt.js +1 -0
- package/lib/esm/markets/products/models/ProductGrp.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductGrp.js +1 -0
- package/lib/esm/markets/products/models/ProductImage.d.ts +4 -0
- package/lib/esm/markets/products/models/ProductImage.js +2 -0
- package/lib/esm/markets/products/models/ProductIn.d.ts +42 -0
- package/lib/esm/markets/products/models/ProductIn.js +2 -0
- package/lib/esm/markets/products/models/ProductState.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductState.js +1 -0
- package/lib/esm/markets/products/models/ProductStock.d.ts +6 -0
- package/lib/esm/markets/products/models/ProductStock.js +1 -0
- package/lib/esm/markets/products/models/ProductTag.d.ts +3 -0
- package/lib/esm/markets/products/models/ProductTag.js +1 -0
- package/lib/esm/markets/products/models/ProductVariant.d.ts +6 -0
- package/lib/esm/markets/products/models/ProductVariant.js +1 -0
- package/lib/esm/markets/products/models/index.d.ts +13 -0
- package/lib/esm/markets/products/models/index.js +13 -0
- package/lib/esm/markets/shops/index.d.ts +1 -0
- package/lib/esm/markets/shops/index.js +1 -0
- package/lib/esm/markets/shops/models/Shop.d.ts +13 -0
- package/lib/esm/markets/shops/models/Shop.js +1 -0
- package/lib/esm/markets/users/models/User.d.ts +7 -0
- package/lib/esm/markets/users/models/User.js +1 -0
- package/lib/esm/shared/models/IIcon.d.ts +4 -0
- package/lib/esm/shared/models/IIcon.js +2 -0
- package/lib/esm/shared/models/NaAcIc.d.ts +7 -0
- package/lib/esm/shared/models/NaAcIc.js +3 -0
- package/lib/esm/shared/models/NaCoAcIc.d.ts +4 -0
- package/lib/esm/shared/models/NaCoAcIc.js +3 -0
- package/lib/esm/utils.d.ts +1 -0
- package/lib/esm/utils.js +4 -0
- package/package.json +9 -9
package/lib/cjs/auth/auth.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ste, SteGrp, UserGrp, UserRole } from "../users/models";
|
|
2
|
+
import AuthTag from "./models/AuthTag";
|
|
2
3
|
interface AuthParam {
|
|
3
4
|
tag?: string;
|
|
4
5
|
roles?: string[];
|
|
@@ -17,7 +18,7 @@ interface AuthParam {
|
|
|
17
18
|
url?: string;
|
|
18
19
|
}
|
|
19
20
|
type TData = {
|
|
20
|
-
tags?: string[];
|
|
21
|
+
tags?: AuthTag[] | string[];
|
|
21
22
|
ste: Ste;
|
|
22
23
|
role: UserRole;
|
|
23
24
|
roles: string[];
|
package/lib/cjs/auth/auth.js
CHANGED
|
@@ -2,33 +2,28 @@
|
|
|
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");
|
|
5
6
|
const arraySome = (arr1, arr2) => {
|
|
6
7
|
return arr1.some((x) => arr2.includes(x));
|
|
7
8
|
};
|
|
8
9
|
const getAuth = (authUser, authSte, param) => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
10
|
-
/* if (param?.tag && authUser?.tags?.length) {
|
|
11
|
-
const tags: string[] = [];
|
|
12
|
-
for (const tag of authUser.tags) {
|
|
13
|
-
tags.push(tag?.code?.toLowerCase());
|
|
14
|
-
}
|
|
15
|
-
const authIn = tags?.includes(param?.tag?.toLowerCase());
|
|
16
|
-
if (authIn) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
} */
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
20
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)) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
let tags = [];
|
|
13
|
+
if ((0, utils_1.checkIsStringOfArray)(authUser.tags)) {
|
|
14
|
+
tags = authUser === null || authUser === void 0 ? void 0 : authUser.tags;
|
|
15
|
+
}
|
|
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());
|
|
27
22
|
if (authIn) {
|
|
28
23
|
return true;
|
|
29
24
|
}
|
|
30
25
|
}
|
|
31
|
-
if (((
|
|
26
|
+
if (((_d = param === null || param === void 0 ? void 0 : param.roles) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
32
27
|
/* if (isStaffSte(authSte, authUser.ste.name) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
|
|
33
28
|
return true;
|
|
34
29
|
} */
|
|
@@ -38,7 +33,7 @@ const getAuth = (authUser, authSte, param) => {
|
|
|
38
33
|
}
|
|
39
34
|
// ------ staff ------
|
|
40
35
|
if (param === null || param === void 0 ? void 0 : param.staff) {
|
|
41
|
-
if (((
|
|
36
|
+
if (((_e = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
|
|
42
37
|
(0, user_1.isStaffSte)(authSte, authUser.ste.name) &&
|
|
43
38
|
["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
|
|
44
39
|
return true;
|
|
@@ -59,7 +54,7 @@ const getAuth = (authUser, authSte, param) => {
|
|
|
59
54
|
param.client.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
|
|
60
55
|
return true;
|
|
61
56
|
}
|
|
62
|
-
if (((
|
|
57
|
+
if (((_f = param === null || param === void 0 ? void 0 : param.client.roles) === null || _f === void 0 ? void 0 : _f.length) &&
|
|
63
58
|
(param === null || param === void 0 ? void 0 : param.client.steGrps.length) &&
|
|
64
59
|
["ceo", ...param === null || param === void 0 ? void 0 : param.client.roles].includes(authUser.role.code.toLowerCase()) &&
|
|
65
60
|
(param === null || param === void 0 ? void 0 : param.client.steGrps).includes(authUser.ste.grp.code.toLowerCase())) {
|
|
@@ -68,13 +63,13 @@ const getAuth = (authUser, authSte, param) => {
|
|
|
68
63
|
}
|
|
69
64
|
}
|
|
70
65
|
// ------ ste grps ------
|
|
71
|
-
if (((
|
|
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())) {
|
|
72
67
|
return true;
|
|
73
68
|
}
|
|
74
|
-
if (((
|
|
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())) {
|
|
75
70
|
return true;
|
|
76
71
|
}
|
|
77
|
-
if (((
|
|
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())) {
|
|
78
73
|
return true;
|
|
79
74
|
}
|
|
80
75
|
return false;
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
|
18
|
+
__exportStar(require("./products/models"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./Market"), exports);
|
|
18
|
+
__exportStar(require("./UMarket"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Market } from "../../models/Market";
|
|
2
|
+
import { Shop } from "../../shops/models/Shop";
|
|
3
|
+
import { ProductCat } from "./ProductCat";
|
|
4
|
+
import { ProductImage } from "./ProductImage";
|
|
5
|
+
import { ProductIn } from "./ProductIn";
|
|
6
|
+
interface Stock {
|
|
7
|
+
sumIns: number;
|
|
8
|
+
sumOuts: number;
|
|
9
|
+
qtityPerPackaging: number;
|
|
10
|
+
}
|
|
11
|
+
export interface Product {
|
|
12
|
+
capacity: string;
|
|
13
|
+
cat: ProductCat;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
description: string;
|
|
16
|
+
designation: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
iconName: string;
|
|
19
|
+
iconPack: string;
|
|
20
|
+
id: number;
|
|
21
|
+
images: ProductImage[];
|
|
22
|
+
ins: ProductIn[];
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
isAvailable?: boolean;
|
|
25
|
+
isBulk: boolean;
|
|
26
|
+
market: Market;
|
|
27
|
+
price: number;
|
|
28
|
+
publicPrice: number;
|
|
29
|
+
qtityLimit: number;
|
|
30
|
+
qtityUnit: number;
|
|
31
|
+
stock: Stock;
|
|
32
|
+
qtityPerBox: number;
|
|
33
|
+
qtityPerPackaging: number;
|
|
34
|
+
ref: string;
|
|
35
|
+
salePrice: number;
|
|
36
|
+
shop: Shop;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import EInOutMotive from "../../../shared/models/EInOutMotive";
|
|
2
|
+
import { Product } from "./Product";
|
|
3
|
+
import { ProductDepot } from "./ProductDepot";
|
|
4
|
+
export declare class ProductIn {
|
|
5
|
+
id: number;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
lot: string;
|
|
8
|
+
qtity: number;
|
|
9
|
+
comment: string;
|
|
10
|
+
isEdit: boolean;
|
|
11
|
+
motive: EInOutMotive;
|
|
12
|
+
authorId: number;
|
|
13
|
+
qtityPerPackaging: number;
|
|
14
|
+
/**
|
|
15
|
+
* remaining qtity
|
|
16
|
+
*/
|
|
17
|
+
qtityIn: number;
|
|
18
|
+
isOutDate: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* expired
|
|
21
|
+
*/
|
|
22
|
+
isOut: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* if true the productIn is created from transfering qtity from another productin
|
|
25
|
+
*/
|
|
26
|
+
fromTransfert: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* indique the qtity waiting to transfert after transfert validation
|
|
29
|
+
*/
|
|
30
|
+
qtityInTransfert: number;
|
|
31
|
+
/**
|
|
32
|
+
* is true if the transfert not validate
|
|
33
|
+
*/
|
|
34
|
+
inTransfert: boolean;
|
|
35
|
+
depotId: number;
|
|
36
|
+
productId: number;
|
|
37
|
+
designation: string;
|
|
38
|
+
salePrice: number;
|
|
39
|
+
publicPrice: number;
|
|
40
|
+
product: Product;
|
|
41
|
+
depot: ProductDepot;
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./Product";
|
|
2
|
+
export * from "./ProductAsset";
|
|
3
|
+
export * from "./ProductCat";
|
|
4
|
+
export * from "./ProductCollection";
|
|
5
|
+
export * from "./ProductDepot";
|
|
6
|
+
export * from "./ProductElt";
|
|
7
|
+
export * from "./ProductGrp";
|
|
8
|
+
export * from "./ProductImage";
|
|
9
|
+
export * from "./ProductIn";
|
|
10
|
+
export * from "./ProductState";
|
|
11
|
+
export * from "./ProductStock";
|
|
12
|
+
export * from "./ProductTag";
|
|
13
|
+
export * from "./ProductVariant";
|
|
@@ -0,0 +1,29 @@
|
|
|
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("./Product"), exports);
|
|
18
|
+
__exportStar(require("./ProductAsset"), exports);
|
|
19
|
+
__exportStar(require("./ProductCat"), exports);
|
|
20
|
+
__exportStar(require("./ProductCollection"), exports);
|
|
21
|
+
__exportStar(require("./ProductDepot"), exports);
|
|
22
|
+
__exportStar(require("./ProductElt"), exports);
|
|
23
|
+
__exportStar(require("./ProductGrp"), exports);
|
|
24
|
+
__exportStar(require("./ProductImage"), exports);
|
|
25
|
+
__exportStar(require("./ProductIn"), exports);
|
|
26
|
+
__exportStar(require("./ProductState"), exports);
|
|
27
|
+
__exportStar(require("./ProductStock"), exports);
|
|
28
|
+
__exportStar(require("./ProductTag"), exports);
|
|
29
|
+
__exportStar(require("./ProductVariant"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models/Shop";
|
|
@@ -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/Shop"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UMarket } from "../../models/UMarket";
|
|
2
|
+
import { Product } from "../../products/models/Product";
|
|
3
|
+
export interface Shop {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
logo: string;
|
|
9
|
+
banner: string;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
products: Product[];
|
|
12
|
+
umarket: UMarket;
|
|
13
|
+
}
|
package/lib/cjs/npms/yup.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
package/lib/cjs/users/user.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
package/lib/cjs/utils.d.ts
CHANGED
|
@@ -108,3 +108,4 @@ 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,6 +5,7 @@ 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;
|
|
8
9
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
10
|
const relativeTime_1 = __importDefault(require("dayjs/plugin/relativeTime"));
|
|
10
11
|
const lodash_1 = __importDefault(require("lodash"));
|
|
@@ -774,3 +775,7 @@ const checkObjInArray = (objs, checkProp, prop = "id") => {
|
|
|
774
775
|
});
|
|
775
776
|
};
|
|
776
777
|
exports.checkObjInArray = checkObjInArray;
|
|
778
|
+
function checkIsStringOfArray(array) {
|
|
779
|
+
// return array.every((element) => typeof element === "string");
|
|
780
|
+
return array.some((element) => typeof element === "string");
|
|
781
|
+
}
|