sk-front-lib 0.17.53 → 0.17.55
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/api/model/api-config.d.ts +6 -0
- package/api/model/api-pageable-param.d.ts +11 -0
- package/api/model/api-pageable.d.ts +11 -0
- package/api/model/api-response.d.ts +8 -0
- package/api/model/index.d.ts +4 -0
- package/api/package.json +10 -0
- package/api/public_api.d.ts +3 -0
- package/api/sk-api.module.d.ts +12 -0
- package/api/sk-api.service.d.ts +34 -0
- package/api/sk-front-lib-api.d.ts +5 -0
- package/article/package.json +10 -0
- package/article/public_api.d.ts +6 -0
- package/article/sk-article-editor-server.component.d.ts +23 -0
- package/article/sk-article-editor.component.d.ts +27 -0
- package/article/sk-article-server.module.d.ts +10 -0
- package/article/sk-article.module.d.ts +9 -0
- package/article/sk-article.service.d.ts +96 -0
- package/article/sk-froala-editor.directive.d.ts +40 -0
- package/article/sk-front-lib-article.d.ts +5 -0
- package/crud/package.json +10 -0
- package/crud/public_api.d.ts +24 -0
- package/crud/sk-account.service.d.ts +16 -0
- package/crud/sk-affiliate.service.d.ts +38 -0
- package/crud/sk-auth-admin.guard.d.ts +13 -0
- package/crud/sk-auth.guard.d.ts +13 -0
- package/crud/sk-auth.service.d.ts +33 -0
- package/crud/sk-board.service.d.ts +21 -0
- package/crud/sk-brand.service.d.ts +19 -0
- package/crud/sk-cart.service.d.ts +72 -0
- package/crud/sk-category.service.d.ts +28 -0
- package/crud/sk-comment.service.d.ts +15 -0
- package/crud/sk-config.service.d.ts +13 -0
- package/crud/sk-contact.service.d.ts +15 -0
- package/crud/sk-coupon.service.d.ts +24 -0
- package/crud/sk-document.service.d.ts +51 -0
- package/crud/sk-etc.service.d.ts +12 -0
- package/crud/sk-file.service.d.ts +18 -0
- package/crud/sk-front-lib-crud.d.ts +5 -0
- package/crud/sk-keyword.service.d.ts +19 -0
- package/crud/sk-order.service.d.ts +45 -0
- package/crud/sk-point.service.d.ts +17 -0
- package/crud/sk-product.service.d.ts +84 -0
- package/crud/sk-promotion.service.d.ts +41 -0
- package/crud/sk-search.service.d.ts +12 -0
- package/crud/sk-store.service.d.ts +17 -0
- package/crud/sk-user.service.d.ts +25 -0
- package/esm2020/api/model/api-config.mjs +2 -0
- package/esm2020/api/model/api-pageable-param.mjs +29 -0
- package/esm2020/api/model/api-pageable.mjs +3 -0
- package/esm2020/api/model/api-response.mjs +3 -0
- package/esm2020/api/model/index.mjs +4 -0
- package/esm2020/api/public_api.mjs +4 -0
- package/esm2020/api/sk-api.module.mjs +35 -0
- package/esm2020/api/sk-api.service.mjs +145 -0
- package/esm2020/api/sk-front-lib-api.mjs +5 -0
- package/esm2020/article/public_api.mjs +7 -0
- package/esm2020/article/sk-article-editor-server.component.mjs +51 -0
- package/esm2020/article/sk-article-editor.component.mjs +93 -0
- package/esm2020/article/sk-article-server.module.mjs +33 -0
- package/esm2020/article/sk-article.module.mjs +32 -0
- package/esm2020/article/sk-article.service.mjs +248 -0
- package/esm2020/article/sk-froala-editor.directive.mjs +325 -0
- package/esm2020/article/sk-front-lib-article.mjs +5 -0
- package/esm2020/crud/public_api.mjs +25 -0
- package/esm2020/crud/sk-account.service.mjs +36 -0
- package/esm2020/crud/sk-affiliate.service.mjs +94 -0
- package/esm2020/crud/sk-auth-admin.guard.mjs +31 -0
- package/esm2020/crud/sk-auth.guard.mjs +31 -0
- package/esm2020/crud/sk-auth.service.mjs +67 -0
- package/esm2020/crud/sk-board.service.mjs +54 -0
- package/esm2020/crud/sk-brand.service.mjs +46 -0
- package/esm2020/crud/sk-cart.service.mjs +256 -0
- package/esm2020/crud/sk-category.service.mjs +63 -0
- package/esm2020/crud/sk-comment.service.mjs +43 -0
- package/esm2020/crud/sk-config.service.mjs +31 -0
- package/esm2020/crud/sk-contact.service.mjs +39 -0
- package/esm2020/crud/sk-coupon.service.mjs +62 -0
- package/esm2020/crud/sk-document.service.mjs +110 -0
- package/esm2020/crud/sk-etc.service.mjs +25 -0
- package/esm2020/crud/sk-file.service.mjs +37 -0
- package/esm2020/crud/sk-front-lib-crud.mjs +5 -0
- package/esm2020/crud/sk-keyword.service.mjs +46 -0
- package/esm2020/crud/sk-order.service.mjs +133 -0
- package/esm2020/crud/sk-point.service.mjs +45 -0
- package/esm2020/crud/sk-product.service.mjs +168 -0
- package/esm2020/crud/sk-promotion.service.mjs +84 -0
- package/esm2020/crud/sk-search.service.mjs +25 -0
- package/esm2020/crud/sk-store.service.mjs +47 -0
- package/esm2020/crud/sk-user.service.mjs +73 -0
- package/esm2020/google-analytics/google-analytics-router.module.mjs +30 -0
- package/esm2020/google-analytics/google-analytics.module.mjs +40 -0
- package/esm2020/google-analytics/initializers/google-analytics-router.initializer.mjs +24 -0
- package/esm2020/google-analytics/initializers/google-analytics.initializer.mjs +46 -0
- package/esm2020/google-analytics/interfaces/google-analytics-command.mjs +2 -0
- package/esm2020/google-analytics/interfaces/google-analytics-settings.mjs +2 -0
- package/esm2020/google-analytics/public_api.mjs +11 -0
- package/esm2020/google-analytics/services/google-analytics.service.mjs +223 -0
- package/esm2020/google-analytics/sk-front-lib-google-analytics.mjs +5 -0
- package/esm2020/google-analytics/tokens/google-analytics-settings-token.mjs +5 -0
- package/esm2020/google-analytics/types/ga-action.type.mjs +2 -0
- package/esm2020/google-analytics/types/ga-bind.type.mjs +2 -0
- package/esm2020/image/public_api.mjs +3 -0
- package/esm2020/image/sk-front-lib-image.mjs +5 -0
- package/esm2020/image/sk-image.component.mjs +262 -0
- package/esm2020/image/sk-image.module.mjs +43 -0
- package/esm2020/lib/sk-byte.pipe.mjs +4 -4
- package/esm2020/lib/sk-date-time.pipe.mjs +4 -4
- package/esm2020/lib/sk-date.pipe.mjs +4 -4
- package/esm2020/lib/sk-front-lib.module.mjs +5 -5
- package/esm2020/lib/sk-keys.pipe.mjs +4 -4
- package/esm2020/lib/sk-time.pipe.mjs +4 -4
- package/esm2020/model/lib/article.mjs +11 -0
- package/esm2020/model/lib/audit.mjs +12 -0
- package/esm2020/model/lib/auth.mjs +2 -0
- package/esm2020/model/lib/board.mjs +21 -0
- package/esm2020/model/lib/cart.mjs +29 -0
- package/esm2020/model/lib/comment.mjs +25 -0
- package/esm2020/model/lib/contact.mjs +28 -0
- package/esm2020/model/lib/coupon.mjs +23 -0
- package/esm2020/model/lib/document.mjs +49 -0
- package/esm2020/model/lib/etc.mjs +57 -0
- package/esm2020/model/lib/file.mjs +8 -0
- package/esm2020/model/lib/filetype.mjs +179 -0
- package/esm2020/model/lib/grid.mjs +83 -0
- package/esm2020/model/lib/nicepay.mjs +81 -0
- package/esm2020/model/lib/order.mjs +106 -0
- package/esm2020/model/lib/payment.mjs +36 -0
- package/esm2020/model/lib/point.mjs +47 -0
- package/esm2020/model/lib/product-series.mjs +2 -0
- package/esm2020/model/lib/product.mjs +157 -0
- package/esm2020/model/lib/promotion.mjs +80 -0
- package/esm2020/model/lib/shipping.mjs +37 -0
- package/esm2020/model/lib/tosspay.mjs +61 -0
- package/esm2020/model/lib/user.mjs +61 -0
- package/esm2020/model/public_api.mjs +24 -0
- package/esm2020/model/sk-front-lib-model.mjs +5 -0
- package/esm2020/search-address/dialog/dialog.component.mjs +27 -0
- package/esm2020/search-address/public_api.mjs +4 -0
- package/esm2020/search-address/sk-front-lib-search-address.mjs +5 -0
- package/esm2020/search-address/sk-search-address.directive.mjs +41 -0
- package/esm2020/search-address/sk-search-address.model.mjs +8 -0
- package/esm2020/search-address/sk-search-address.module.mjs +52 -0
- package/esm2020/search-address/sk-search-address.service.mjs +65 -0
- package/esm2020/uploader/public_api.mjs +4 -0
- package/esm2020/uploader/sk-front-lib-uploader.mjs +5 -0
- package/esm2020/uploader/sk-uploader-file-item.model.mjs +95 -0
- package/esm2020/uploader/sk-uploader.animation.mjs +47 -0
- package/esm2020/uploader/sk-uploader.class.mjs +188 -0
- package/esm2020/uploader/sk-uploader.component.mjs +120 -0
- package/esm2020/uploader/sk-uploader.directive.mjs +44 -0
- package/esm2020/uploader/sk-uploader.module.mjs +62 -0
- package/fesm2015/sk-front-lib-api.mjs +218 -0
- package/fesm2015/sk-front-lib-api.mjs.map +1 -0
- package/fesm2015/sk-front-lib-article.mjs +762 -0
- package/fesm2015/sk-front-lib-article.mjs.map +1 -0
- package/fesm2015/sk-front-lib-crud.mjs +1529 -0
- package/fesm2015/sk-front-lib-crud.mjs.map +1 -0
- package/fesm2015/sk-front-lib-google-analytics.mjs +361 -0
- package/fesm2015/sk-front-lib-google-analytics.mjs.map +1 -0
- package/fesm2015/sk-front-lib-image.mjs +306 -0
- package/fesm2015/sk-front-lib-image.mjs.map +1 -0
- package/fesm2015/sk-front-lib-model.mjs +1173 -0
- package/fesm2015/sk-front-lib-model.mjs.map +1 -0
- package/fesm2015/sk-front-lib-search-address.mjs +188 -0
- package/fesm2015/sk-front-lib-search-address.mjs.map +1 -0
- package/fesm2015/sk-front-lib-uploader.mjs +551 -0
- package/fesm2015/sk-front-lib-uploader.mjs.map +1 -0
- package/fesm2015/sk-front-lib.mjs +19 -19
- package/fesm2015/sk-front-lib.mjs.map +1 -1
- package/fesm2020/sk-front-lib-api.mjs +216 -0
- package/fesm2020/sk-front-lib-api.mjs.map +1 -0
- package/fesm2020/sk-front-lib-article.mjs +771 -0
- package/fesm2020/sk-front-lib-article.mjs.map +1 -0
- package/fesm2020/sk-front-lib-crud.mjs +1525 -0
- package/fesm2020/sk-front-lib-crud.mjs.map +1 -0
- package/fesm2020/sk-front-lib-google-analytics.mjs +358 -0
- package/fesm2020/sk-front-lib-google-analytics.mjs.map +1 -0
- package/fesm2020/sk-front-lib-image.mjs +309 -0
- package/fesm2020/sk-front-lib-image.mjs.map +1 -0
- package/fesm2020/sk-front-lib-model.mjs +1173 -0
- package/fesm2020/sk-front-lib-model.mjs.map +1 -0
- package/fesm2020/sk-front-lib-search-address.mjs +186 -0
- package/fesm2020/sk-front-lib-search-address.mjs.map +1 -0
- package/fesm2020/sk-front-lib-uploader.mjs +549 -0
- package/fesm2020/sk-front-lib-uploader.mjs.map +1 -0
- package/fesm2020/sk-front-lib.mjs +19 -19
- package/fesm2020/sk-front-lib.mjs.map +1 -1
- package/google-analytics/google-analytics-router.module.d.ts +8 -0
- package/google-analytics/google-analytics.module.d.ts +10 -0
- package/google-analytics/initializers/google-analytics-router.initializer.d.ts +5 -0
- package/google-analytics/initializers/google-analytics.initializer.d.ts +4 -0
- package/google-analytics/interfaces/google-analytics-command.d.ts +4 -0
- package/google-analytics/interfaces/google-analytics-settings.d.ts +6 -0
- package/google-analytics/package.json +10 -0
- package/google-analytics/public_api.d.ts +10 -0
- package/google-analytics/services/google-analytics.service.d.ts +85 -0
- package/google-analytics/sk-front-lib-google-analytics.d.ts +5 -0
- package/google-analytics/tokens/google-analytics-settings-token.d.ts +3 -0
- package/google-analytics/types/ga-action.type.d.ts +1 -0
- package/google-analytics/types/ga-bind.type.d.ts +1 -0
- package/image/package.json +10 -0
- package/image/public_api.d.ts +3 -0
- package/image/sk-front-lib-image.d.ts +5 -0
- package/image/sk-image.component.d.ts +112 -0
- package/image/sk-image.module.d.ts +12 -0
- package/lib/sk-byte.pipe.d.ts +1 -1
- package/lib/sk-date-time.pipe.d.ts +1 -1
- package/lib/sk-date.pipe.d.ts +1 -1
- package/lib/sk-keys.pipe.d.ts +1 -1
- package/lib/sk-time.pipe.d.ts +1 -1
- package/model/lib/article.d.ts +13 -0
- package/model/lib/audit.d.ts +13 -0
- package/model/lib/auth.d.ts +8 -0
- package/model/lib/board.d.ts +39 -0
- package/model/lib/cart.d.ts +45 -0
- package/model/lib/comment.d.ts +43 -0
- package/model/lib/contact.d.ts +40 -0
- package/model/lib/coupon.d.ts +116 -0
- package/model/lib/document.d.ts +104 -0
- package/model/lib/etc.d.ts +220 -0
- package/model/lib/file.d.ts +24 -0
- package/model/lib/filetype.d.ts +10 -0
- package/model/lib/grid.d.ts +97 -0
- package/model/lib/nicepay.d.ts +39 -0
- package/model/lib/order.d.ts +163 -0
- package/model/lib/payment.d.ts +33 -0
- package/model/lib/point.d.ts +30 -0
- package/model/lib/product-series.d.ts +25 -0
- package/model/lib/product.d.ts +310 -0
- package/model/lib/promotion.d.ts +169 -0
- package/model/lib/shipping.d.ts +44 -0
- package/model/lib/tosspay.d.ts +29 -0
- package/model/lib/user.d.ts +54 -0
- package/model/package.json +10 -0
- package/model/public_api.d.ts +23 -0
- package/model/sk-front-lib-model.d.ts +5 -0
- package/package.json +67 -3
- package/search-address/dialog/dialog.component.d.ts +13 -0
- package/search-address/package.json +10 -0
- package/search-address/public_api.d.ts +3 -0
- package/search-address/sk-front-lib-search-address.d.ts +5 -0
- package/search-address/sk-search-address.directive.d.ts +15 -0
- package/search-address/sk-search-address.model.d.ts +40 -0
- package/search-address/sk-search-address.module.d.ts +14 -0
- package/search-address/sk-search-address.service.d.ts +13 -0
- package/uploader/package.json +10 -0
- package/uploader/public_api.d.ts +4 -0
- package/uploader/sk-front-lib-uploader.d.ts +5 -0
- package/uploader/sk-uploader-file-item.model.d.ts +29 -0
- package/uploader/sk-uploader.animation.d.ts +1 -0
- package/uploader/sk-uploader.class.d.ts +47 -0
- package/uploader/sk-uploader.component.d.ts +28 -0
- package/uploader/sk-uploader.directive.d.ts +15 -0
- package/uploader/sk-uploader.module.d.ts +16 -0
- /package/{index.d.ts → sk-front-lib.d.ts} +0 -0
|
@@ -0,0 +1,1173 @@
|
|
|
1
|
+
class Audit {
|
|
2
|
+
constructor(data = {}) {
|
|
3
|
+
if (data === null) {
|
|
4
|
+
data = {};
|
|
5
|
+
}
|
|
6
|
+
this.createdBy = data.createdBy || '';
|
|
7
|
+
this.createdDate = data.createdDate || '';
|
|
8
|
+
this.updatedBy = data.updatedBy || '';
|
|
9
|
+
this.updatedDate = data.updatedDate || '';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var SkUserRoleName;
|
|
14
|
+
(function (SkUserRoleName) {
|
|
15
|
+
SkUserRoleName["Admin"] = "ROLE_ADMIN";
|
|
16
|
+
SkUserRoleName["Developer"] = "ROLE_DEVELOPER";
|
|
17
|
+
SkUserRoleName["Manager"] = "ROLE_MANAGER";
|
|
18
|
+
SkUserRoleName["User"] = "ROLE_USER";
|
|
19
|
+
SkUserRoleName["Dealer"] = "ROLE_DEALER";
|
|
20
|
+
SkUserRoleName["Leave"] = "ROLE_LEAVE";
|
|
21
|
+
SkUserRoleName["Affiliate"] = "ROLE_AFFILIATE";
|
|
22
|
+
})(SkUserRoleName || (SkUserRoleName = {}));
|
|
23
|
+
class SkUser extends Audit {
|
|
24
|
+
constructor(data = {}) {
|
|
25
|
+
super(data);
|
|
26
|
+
this.id = data.id;
|
|
27
|
+
this.email = data.email;
|
|
28
|
+
this.nickname = data.nickname;
|
|
29
|
+
this.emailValid = data.emailValid || false;
|
|
30
|
+
this.roles = data.roles || [];
|
|
31
|
+
// set transient values
|
|
32
|
+
this.roleNames = this.roles.map(value => value.name);
|
|
33
|
+
}
|
|
34
|
+
hasRole(role) {
|
|
35
|
+
return this.roleNames.indexOf(role) > -1;
|
|
36
|
+
}
|
|
37
|
+
hasRoleFromArray(roles = []) {
|
|
38
|
+
if (!roles || roles.length === 0) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
let result = false;
|
|
42
|
+
roles.forEach(role => {
|
|
43
|
+
result = result || this.hasRole(role);
|
|
44
|
+
});
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
isEmpty() {
|
|
48
|
+
return !this.id;
|
|
49
|
+
}
|
|
50
|
+
isAnonymous() {
|
|
51
|
+
return this.isEmpty();
|
|
52
|
+
}
|
|
53
|
+
isAdmin() {
|
|
54
|
+
return this.hasRole(SkUserRoleName.Admin);
|
|
55
|
+
}
|
|
56
|
+
isDeveloper() {
|
|
57
|
+
return this.hasRole(SkUserRoleName.Developer);
|
|
58
|
+
}
|
|
59
|
+
isManager() {
|
|
60
|
+
return this.hasRole(SkUserRoleName.Manager);
|
|
61
|
+
}
|
|
62
|
+
isDealer() {
|
|
63
|
+
return this.hasRole(SkUserRoleName.Dealer);
|
|
64
|
+
}
|
|
65
|
+
isUser() {
|
|
66
|
+
return this.hasRole(SkUserRoleName.User);
|
|
67
|
+
}
|
|
68
|
+
isAdminAccessable() {
|
|
69
|
+
return this.isAdmin() || this.isDeveloper() || this.isManager();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class SkFile extends Audit {
|
|
74
|
+
constructor(data = {}) {
|
|
75
|
+
super(data);
|
|
76
|
+
Object.assign(this, data);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
class FileType {
|
|
81
|
+
static getMimeClass(file) {
|
|
82
|
+
let mime = '';
|
|
83
|
+
let name = '';
|
|
84
|
+
if (file instanceof SkFile) {
|
|
85
|
+
mime = file.mime;
|
|
86
|
+
name = file.sourceFilename;
|
|
87
|
+
}
|
|
88
|
+
if (file instanceof File) {
|
|
89
|
+
mime = file.type;
|
|
90
|
+
name = file.name;
|
|
91
|
+
}
|
|
92
|
+
let mimeClass = 'application';
|
|
93
|
+
if (this.mime_psd.indexOf(mime) !== -1) {
|
|
94
|
+
mimeClass = 'image';
|
|
95
|
+
}
|
|
96
|
+
else if (mime.match('image.*')) {
|
|
97
|
+
mimeClass = 'image';
|
|
98
|
+
}
|
|
99
|
+
else if (mime.match('video.*')) {
|
|
100
|
+
mimeClass = 'video';
|
|
101
|
+
}
|
|
102
|
+
else if (mime.match('audio.*')) {
|
|
103
|
+
mimeClass = 'audio';
|
|
104
|
+
}
|
|
105
|
+
else if (mime === 'application/pdf') {
|
|
106
|
+
mimeClass = 'pdf';
|
|
107
|
+
}
|
|
108
|
+
else if (this.mime_compress.indexOf(mime) !== -1) {
|
|
109
|
+
mimeClass = 'compress';
|
|
110
|
+
}
|
|
111
|
+
else if (this.mime_doc.indexOf(mime) !== -1) {
|
|
112
|
+
mimeClass = 'doc';
|
|
113
|
+
}
|
|
114
|
+
else if (this.mime_xsl.indexOf(mime) !== -1) {
|
|
115
|
+
mimeClass = 'xls';
|
|
116
|
+
}
|
|
117
|
+
else if (this.mime_ppt.indexOf(mime) !== -1) {
|
|
118
|
+
mimeClass = 'ppt';
|
|
119
|
+
}
|
|
120
|
+
if (mimeClass === 'application') {
|
|
121
|
+
mimeClass = this.fileTypeDetection(name);
|
|
122
|
+
}
|
|
123
|
+
return mimeClass;
|
|
124
|
+
}
|
|
125
|
+
static fileTypeDetection(inputFilename) {
|
|
126
|
+
const types = {
|
|
127
|
+
jpg: 'image',
|
|
128
|
+
jpeg: 'image',
|
|
129
|
+
tif: 'image',
|
|
130
|
+
psd: 'image',
|
|
131
|
+
bmp: 'image',
|
|
132
|
+
png: 'image',
|
|
133
|
+
nef: 'image',
|
|
134
|
+
tiff: 'image',
|
|
135
|
+
cr2: 'image',
|
|
136
|
+
dwg: 'image',
|
|
137
|
+
cdr: 'image',
|
|
138
|
+
ai: 'image',
|
|
139
|
+
indd: 'image',
|
|
140
|
+
pin: 'image',
|
|
141
|
+
cdp: 'image',
|
|
142
|
+
skp: 'image',
|
|
143
|
+
stp: 'image',
|
|
144
|
+
'3dm': 'image',
|
|
145
|
+
mp3: 'audio',
|
|
146
|
+
wav: 'audio',
|
|
147
|
+
wma: 'audio',
|
|
148
|
+
mod: 'audio',
|
|
149
|
+
m4a: 'audio',
|
|
150
|
+
compress: 'compress',
|
|
151
|
+
zip: 'compress',
|
|
152
|
+
rar: 'compress',
|
|
153
|
+
'7z': 'compress',
|
|
154
|
+
lz: 'compress',
|
|
155
|
+
z01: 'compress',
|
|
156
|
+
bz2: 'compress',
|
|
157
|
+
gz: 'compress',
|
|
158
|
+
alz: 'compress',
|
|
159
|
+
pdf: 'pdf',
|
|
160
|
+
xls: 'xls',
|
|
161
|
+
xlsx: 'xls',
|
|
162
|
+
ods: 'xls',
|
|
163
|
+
mp4: 'video',
|
|
164
|
+
avi: 'video',
|
|
165
|
+
wmv: 'video',
|
|
166
|
+
mpg: 'video',
|
|
167
|
+
mts: 'video',
|
|
168
|
+
flv: 'video',
|
|
169
|
+
'3gp': 'video',
|
|
170
|
+
vob: 'video',
|
|
171
|
+
m4v: 'video',
|
|
172
|
+
mpeg: 'video',
|
|
173
|
+
m2ts: 'video',
|
|
174
|
+
mov: 'video',
|
|
175
|
+
doc: 'doc',
|
|
176
|
+
docx: 'doc',
|
|
177
|
+
eps: 'doc',
|
|
178
|
+
txt: 'doc',
|
|
179
|
+
odt: 'doc',
|
|
180
|
+
rtf: 'doc',
|
|
181
|
+
ppt: 'ppt',
|
|
182
|
+
pptx: 'ppt',
|
|
183
|
+
pps: 'ppt',
|
|
184
|
+
ppsx: 'ppt',
|
|
185
|
+
key: 'ppt',
|
|
186
|
+
odp: 'ppt'
|
|
187
|
+
};
|
|
188
|
+
const chunks = inputFilename.split('.');
|
|
189
|
+
if (chunks.length < 2) {
|
|
190
|
+
return 'application';
|
|
191
|
+
}
|
|
192
|
+
const extension = chunks[chunks.length - 1].toLowerCase();
|
|
193
|
+
if (types[extension] === undefined) {
|
|
194
|
+
return 'application';
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
return types[extension];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/* MS office */
|
|
202
|
+
FileType.mime_doc = [
|
|
203
|
+
'application/msword',
|
|
204
|
+
'application/msword',
|
|
205
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
206
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
|
207
|
+
'application/vnd.ms-word.document.macroEnabled.12',
|
|
208
|
+
'application/vnd.ms-word.template.macroEnabled.12'
|
|
209
|
+
];
|
|
210
|
+
FileType.mime_xsl = [
|
|
211
|
+
'application/vnd.ms-excel',
|
|
212
|
+
'application/vnd.ms-excel',
|
|
213
|
+
'application/vnd.ms-excel',
|
|
214
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
215
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
|
216
|
+
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
|
217
|
+
'application/vnd.ms-excel.template.macroEnabled.12',
|
|
218
|
+
'application/vnd.ms-excel.addin.macroEnabled.12',
|
|
219
|
+
'application/vnd.ms-excel.sheet.binary.macroEnabled.12'
|
|
220
|
+
];
|
|
221
|
+
FileType.mime_ppt = [
|
|
222
|
+
'application/vnd.ms-powerpoint',
|
|
223
|
+
'application/vnd.ms-powerpoint',
|
|
224
|
+
'application/vnd.ms-powerpoint',
|
|
225
|
+
'application/vnd.ms-powerpoint',
|
|
226
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
227
|
+
'application/vnd.openxmlformats-officedocument.presentationml.template',
|
|
228
|
+
'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
|
229
|
+
'application/vnd.ms-powerpoint.addin.macroEnabled.12',
|
|
230
|
+
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
231
|
+
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
232
|
+
'application/vnd.ms-powerpoint.slideshow.macroEnabled.12'
|
|
233
|
+
];
|
|
234
|
+
/* PSD */
|
|
235
|
+
FileType.mime_psd = [
|
|
236
|
+
'image/photoshop',
|
|
237
|
+
'image/x-photoshop',
|
|
238
|
+
'image/psd',
|
|
239
|
+
'application/photoshop',
|
|
240
|
+
'application/psd',
|
|
241
|
+
'zz-application/zz-winassoc-psd'
|
|
242
|
+
];
|
|
243
|
+
/* Compressed files */
|
|
244
|
+
FileType.mime_compress = [
|
|
245
|
+
'application/x-gtar',
|
|
246
|
+
'application/x-gcompress',
|
|
247
|
+
'application/compress',
|
|
248
|
+
'application/x-tar',
|
|
249
|
+
'application/x-rar-compressed',
|
|
250
|
+
'application/octet-stream',
|
|
251
|
+
'application/x-zip-compressed',
|
|
252
|
+
'application/zip-compressed',
|
|
253
|
+
'application/x-7z-compressed',
|
|
254
|
+
'application/gzip',
|
|
255
|
+
'application/x-bzip2'
|
|
256
|
+
];
|
|
257
|
+
|
|
258
|
+
class SkArticle extends Audit {
|
|
259
|
+
constructor(data = {}) {
|
|
260
|
+
super(data);
|
|
261
|
+
this.id = data.id;
|
|
262
|
+
this.content = data.content;
|
|
263
|
+
this.images = (data.images || []).map(item => new SkFile(item));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
class SkBoard extends Audit {
|
|
268
|
+
constructor(data = {}) {
|
|
269
|
+
super(data);
|
|
270
|
+
Object.assign(this, {
|
|
271
|
+
skin: 'default',
|
|
272
|
+
showSupport: false,
|
|
273
|
+
permissions: {
|
|
274
|
+
publicRead: true,
|
|
275
|
+
publicWrite: false,
|
|
276
|
+
secretRead: false,
|
|
277
|
+
secretWrite: false,
|
|
278
|
+
useNotice: false
|
|
279
|
+
}
|
|
280
|
+
}, data);
|
|
281
|
+
}
|
|
282
|
+
isEmpty() {
|
|
283
|
+
return !this.id;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
var SkProductType;
|
|
288
|
+
(function (SkProductType) {
|
|
289
|
+
SkProductType["Package"] = "PACKAGE";
|
|
290
|
+
SkProductType["Single"] = "SINGLE";
|
|
291
|
+
})(SkProductType || (SkProductType = {}));
|
|
292
|
+
var SkProductStuffType;
|
|
293
|
+
(function (SkProductStuffType) {
|
|
294
|
+
SkProductStuffType["Hardware"] = "HARDWARE";
|
|
295
|
+
SkProductStuffType["Software"] = "SOFTWARE";
|
|
296
|
+
SkProductStuffType["Furniture"] = "FURNITURE";
|
|
297
|
+
})(SkProductStuffType || (SkProductStuffType = {}));
|
|
298
|
+
var SkProductStatus;
|
|
299
|
+
(function (SkProductStatus) {
|
|
300
|
+
SkProductStatus["Preorder"] = "PREORDER";
|
|
301
|
+
SkProductStatus["Onsale"] = "ONSALE";
|
|
302
|
+
SkProductStatus["Soldout"] = "SOLDOUT";
|
|
303
|
+
SkProductStatus["Deactivate"] = "DEACTIVATE";
|
|
304
|
+
})(SkProductStatus || (SkProductStatus = {}));
|
|
305
|
+
var SkProductAccessPolicy;
|
|
306
|
+
(function (SkProductAccessPolicy) {
|
|
307
|
+
SkProductAccessPolicy["Public"] = "PUBLIC";
|
|
308
|
+
SkProductAccessPolicy["Hidden"] = "HIDDEN";
|
|
309
|
+
SkProductAccessPolicy["PrivateLink"] = "PRIVATE_LINK";
|
|
310
|
+
SkProductAccessPolicy["PrivateUser"] = "PRIVATE_USER";
|
|
311
|
+
})(SkProductAccessPolicy || (SkProductAccessPolicy = {}));
|
|
312
|
+
class SkProductBrand {
|
|
313
|
+
constructor(data = {}) {
|
|
314
|
+
this.id = data.id;
|
|
315
|
+
this.product = data.product ? new SkProduct(data.product) : null;
|
|
316
|
+
this.brand = data.brand;
|
|
317
|
+
this.isDefault = data.isDefault || false;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
class SkProductCategory {
|
|
321
|
+
constructor(data = {}) {
|
|
322
|
+
this.id = data.id;
|
|
323
|
+
this.product = data.product ? new SkProduct(data.product) : null;
|
|
324
|
+
this.category = data.category;
|
|
325
|
+
this.isDefault = data.isDefault || false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
class SkProductImage {
|
|
329
|
+
constructor(data = {}) {
|
|
330
|
+
this.id = data.id;
|
|
331
|
+
this.product = data.product ? new SkProduct(data.product) : new SkProduct();
|
|
332
|
+
this.file = data.file ? new SkFile(data.file) : new SkFile();
|
|
333
|
+
this.orderIndex = data.orderIndex || -1;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
var SkProductOptionType;
|
|
337
|
+
(function (SkProductOptionType) {
|
|
338
|
+
SkProductOptionType["Base"] = "BASE";
|
|
339
|
+
SkProductOptionType["Additional"] = "ADDITIONAL";
|
|
340
|
+
SkProductOptionType["Multiple"] = "MULTIPLE"; // 추가옵션 (가격 범위 산정에 영향을 미치지 않으며, 중복으로 선택 가능하다)
|
|
341
|
+
})(SkProductOptionType || (SkProductOptionType = {}));
|
|
342
|
+
class SkProductPackage {
|
|
343
|
+
constructor(data = {}) {
|
|
344
|
+
this.id = data.id;
|
|
345
|
+
this.children = data.children ? new SkProduct(data.children) : null;
|
|
346
|
+
this.hidden = data.hidden || false;
|
|
347
|
+
this.share = data.share || (data.children ? data.children.price.retail : 0);
|
|
348
|
+
this.amount = data.amount || 1;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
class SkProduct extends Audit {
|
|
352
|
+
constructor(data = {}) {
|
|
353
|
+
super(data);
|
|
354
|
+
this.id = data.id;
|
|
355
|
+
this.title = data.title;
|
|
356
|
+
this.code = data.code;
|
|
357
|
+
this.url = data.url;
|
|
358
|
+
this.type = data.type || SkProductType.Single;
|
|
359
|
+
this.stuffType = data.stuffType;
|
|
360
|
+
this.status = data.status || SkProductStatus.Onsale;
|
|
361
|
+
this.preorderStartDate = data.preorderStartDate;
|
|
362
|
+
this.brands = (data.brands || []).map(item => new SkProductBrand(item));
|
|
363
|
+
this.categories = (data.categories || []).map(item => new SkProductCategory(item));
|
|
364
|
+
this.keywords = (data.keywords || []);
|
|
365
|
+
this.images = (data.images || []).map(item => new SkProductImage(item));
|
|
366
|
+
this.accessPolicy = data.accessPolicy || SkProductAccessPolicy.Public;
|
|
367
|
+
this.accessPolicyValue = data.accessPolicyValue;
|
|
368
|
+
this.price = Object.assign({}, {
|
|
369
|
+
message: '',
|
|
370
|
+
quotaFree: false,
|
|
371
|
+
paymentNaver: false,
|
|
372
|
+
overseas: false,
|
|
373
|
+
original: 0,
|
|
374
|
+
retail: 0,
|
|
375
|
+
pointAmount: 0,
|
|
376
|
+
pointType: 'AMOUNT',
|
|
377
|
+
maxUsablePoint: 50,
|
|
378
|
+
wholesaleNormal: 0,
|
|
379
|
+
wholesaleDealer: 0,
|
|
380
|
+
wholesaleConditionA: 0,
|
|
381
|
+
wholesaleConditionB: 0,
|
|
382
|
+
wholesaleConditionC: 0,
|
|
383
|
+
useVarPrice: false,
|
|
384
|
+
useVarPriceXc: false,
|
|
385
|
+
varCurrency: 'USD',
|
|
386
|
+
varFormula: '',
|
|
387
|
+
varMap: 0,
|
|
388
|
+
varCost: 0,
|
|
389
|
+
varAddAmount: 0,
|
|
390
|
+
varAddPercent: 0,
|
|
391
|
+
varUpdatedDate: null
|
|
392
|
+
}, data.price);
|
|
393
|
+
this.stockConfig = Object.assign({}, { useStockHistory: false, useAutoStatusChange: false, useXchangeApi: false }, data.stockConfig);
|
|
394
|
+
this.opengraph = Object.assign({}, { ogTitle: '', ogAutoFill: true, ogDesc: '', ogImage: null }, data.opengraph);
|
|
395
|
+
this.naverep = Object.assign({}, { naverepShow: true, naverepCustom: false, naverepTitle: '', naverepCategory: '' }, data.naverep);
|
|
396
|
+
this.catalog = Object.assign({}, { catalogShow: true, catalogCustom: false, catalogTitle: '', catalogCategory: null }, data.catalog);
|
|
397
|
+
this.edelivery = Object.assign({}, { sku: '', downloadLink: '', template: '' }, data.edelivery);
|
|
398
|
+
this.furnitureAssembly = data.furnitureAssembly || false;
|
|
399
|
+
this.options = data.options || [];
|
|
400
|
+
this.articleDesc = data.articleDesc ? new SkArticle(data.articleDesc) : new SkArticle();
|
|
401
|
+
this.articleSpec = data.articleSpec ? new SkArticle(data.articleSpec) : new SkArticle();
|
|
402
|
+
this.packages = (data.packages || []).map(item => new SkProductPackage(item));
|
|
403
|
+
this.activated = data.activated || false;
|
|
404
|
+
this.listOrder = data.listOrder || 0;
|
|
405
|
+
this.viewCount = data.viewCount || 0;
|
|
406
|
+
this.simpleText = data.simpleText || '';
|
|
407
|
+
}
|
|
408
|
+
isEmpty() {
|
|
409
|
+
return !this.id;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
function getSkProductStatusText(status) {
|
|
413
|
+
switch (status) {
|
|
414
|
+
case SkProductStatus.Deactivate:
|
|
415
|
+
return '판매 중지';
|
|
416
|
+
case SkProductStatus.Onsale:
|
|
417
|
+
return '판매중';
|
|
418
|
+
case SkProductStatus.Preorder:
|
|
419
|
+
return '예약판매';
|
|
420
|
+
case SkProductStatus.Soldout:
|
|
421
|
+
return '품절';
|
|
422
|
+
default:
|
|
423
|
+
return status;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
function getSkProductAccessPolicyText(accessPolicy) {
|
|
427
|
+
switch (accessPolicy) {
|
|
428
|
+
case SkProductAccessPolicy.Hidden:
|
|
429
|
+
return '어드민 외 접근불가';
|
|
430
|
+
case SkProductAccessPolicy.PrivateLink:
|
|
431
|
+
return '링크로만 접근 가능';
|
|
432
|
+
case SkProductAccessPolicy.PrivateUser:
|
|
433
|
+
return '해당 유저만 접근 가능';
|
|
434
|
+
case SkProductAccessPolicy.Public:
|
|
435
|
+
return '공개';
|
|
436
|
+
default:
|
|
437
|
+
return accessPolicy;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
var SkDocumentType;
|
|
442
|
+
(function (SkDocumentType) {
|
|
443
|
+
SkDocumentType["Editorial"] = "EDITORIAL";
|
|
444
|
+
SkDocumentType["Studio"] = "STUDIO";
|
|
445
|
+
SkDocumentType["Post"] = "POST";
|
|
446
|
+
SkDocumentType["Page"] = "PAGE";
|
|
447
|
+
})(SkDocumentType || (SkDocumentType = {}));
|
|
448
|
+
class SkDocumentAttachment {
|
|
449
|
+
constructor(data = {}) {
|
|
450
|
+
this.id = data.id;
|
|
451
|
+
this.file = new SkFile(data.file);
|
|
452
|
+
this.title = data.title;
|
|
453
|
+
this.url = data.url;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
class SkDocument extends Audit {
|
|
457
|
+
constructor(data = {}) {
|
|
458
|
+
super(data);
|
|
459
|
+
this.id = data.id;
|
|
460
|
+
this.type = data.type;
|
|
461
|
+
this.url = data.url;
|
|
462
|
+
this.title = data.title;
|
|
463
|
+
this.author = data.author ? new SkUser(data.author) : null;
|
|
464
|
+
this.activate = data.activate || false;
|
|
465
|
+
this.published = data.published || false;
|
|
466
|
+
this.secret = data.secret || false;
|
|
467
|
+
this.notice = data.notice || false;
|
|
468
|
+
this.article = data.article ? new SkArticle(data.article) : null;
|
|
469
|
+
this.image = data.image ? new SkFile(data.image) : null;
|
|
470
|
+
this.imageAlt = data.imageAlt ? new SkFile(data.imageAlt) : null;
|
|
471
|
+
this.board = data.board ? new SkBoard(data.board) : null;
|
|
472
|
+
this.category = data.category;
|
|
473
|
+
this.linkedProduct = (data.linkedProduct || []).map(item => new SkProduct(item));
|
|
474
|
+
this.attachment = (data.attachment || []).map(item => new SkDocumentAttachment(item));
|
|
475
|
+
this.viewCount = data.viewCount;
|
|
476
|
+
this.listOrder = data.listOrder || 0;
|
|
477
|
+
this.opengraph = Object.assign({}, { ogTitle: '', ogAutoFill: true, ogDesc: '', ogImage: null }, data.opengraph);
|
|
478
|
+
}
|
|
479
|
+
isEmpty() {
|
|
480
|
+
return !this.id;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
class SkCartOption {
|
|
485
|
+
constructor(data = {}) {
|
|
486
|
+
this.id = data.id || null;
|
|
487
|
+
this.option = data.option;
|
|
488
|
+
this.value = data.value;
|
|
489
|
+
this.amount = data.amount || 1;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
class SkCart {
|
|
493
|
+
constructor(data = {}) {
|
|
494
|
+
this.id = data.id || null;
|
|
495
|
+
this.product = data.product;
|
|
496
|
+
this.amount = data.amount || 1;
|
|
497
|
+
this.options = (data.options || []).map(item => new SkCartOption(item));
|
|
498
|
+
this.gifts = data.gifts || [];
|
|
499
|
+
}
|
|
500
|
+
getSinglePrice() {
|
|
501
|
+
const basePrice = Math.min(this.product.priceOriginal, this.product.priceDiscounted);
|
|
502
|
+
const optionPrice = (this.options || []).map(item => item.value.addedPrice * item.amount).reduce((previousValue, currentValue) => previousValue + currentValue, 0);
|
|
503
|
+
return basePrice + optionPrice;
|
|
504
|
+
}
|
|
505
|
+
getTotalPrice() {
|
|
506
|
+
return this.getSinglePrice() * this.amount;
|
|
507
|
+
}
|
|
508
|
+
checkOptionExists() {
|
|
509
|
+
return this.options.filter(option => !!option.value).length > 0;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
var SkValueType;
|
|
514
|
+
(function (SkValueType) {
|
|
515
|
+
SkValueType["Amount"] = "AMOUNT";
|
|
516
|
+
SkValueType["Percent"] = "PERCENT";
|
|
517
|
+
SkValueType["Fixed"] = "FIXED";
|
|
518
|
+
SkValueType["Custom"] = "CUSTOM";
|
|
519
|
+
})(SkValueType || (SkValueType = {}));
|
|
520
|
+
var SkGiftType;
|
|
521
|
+
(function (SkGiftType) {
|
|
522
|
+
SkGiftType["Real"] = "REAL";
|
|
523
|
+
SkGiftType["Custom"] = "CUSTOM";
|
|
524
|
+
})(SkGiftType || (SkGiftType = {}));
|
|
525
|
+
var SkCategoryType;
|
|
526
|
+
(function (SkCategoryType) {
|
|
527
|
+
SkCategoryType["Product"] = "PRODUCT";
|
|
528
|
+
SkCategoryType["Promotion"] = "PROMOTION";
|
|
529
|
+
SkCategoryType["Editorial"] = "EDITORIAL";
|
|
530
|
+
SkCategoryType["Studio"] = "STUDIO";
|
|
531
|
+
SkCategoryType["Board"] = "BOARD";
|
|
532
|
+
})(SkCategoryType || (SkCategoryType = {}));
|
|
533
|
+
class SkStore {
|
|
534
|
+
constructor(data = {}) {
|
|
535
|
+
Object.assign(this, {
|
|
536
|
+
name: '',
|
|
537
|
+
url: '',
|
|
538
|
+
address: '',
|
|
539
|
+
phone: '',
|
|
540
|
+
email: '',
|
|
541
|
+
mapKakaoUrl: '',
|
|
542
|
+
mapNaverUrl: '',
|
|
543
|
+
mapGoogleUrl: '',
|
|
544
|
+
mapEmbedUrl: '',
|
|
545
|
+
showDistribution: false,
|
|
546
|
+
brands: []
|
|
547
|
+
}, data);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
var SkAffiliateRequestStatus;
|
|
551
|
+
(function (SkAffiliateRequestStatus) {
|
|
552
|
+
SkAffiliateRequestStatus["Wait"] = "WAIT";
|
|
553
|
+
SkAffiliateRequestStatus["Approve"] = "APPROVE";
|
|
554
|
+
SkAffiliateRequestStatus["Deny"] = "DENY";
|
|
555
|
+
})(SkAffiliateRequestStatus || (SkAffiliateRequestStatus = {}));
|
|
556
|
+
var SkAffiliateTargetType;
|
|
557
|
+
(function (SkAffiliateTargetType) {
|
|
558
|
+
SkAffiliateTargetType["None"] = "NONE";
|
|
559
|
+
SkAffiliateTargetType["All"] = "ALL";
|
|
560
|
+
SkAffiliateTargetType["Brand"] = "BRAND";
|
|
561
|
+
SkAffiliateTargetType["Category"] = "CATEGORY";
|
|
562
|
+
SkAffiliateTargetType["Product"] = "PRODUCT";
|
|
563
|
+
})(SkAffiliateTargetType || (SkAffiliateTargetType = {}));
|
|
564
|
+
var SkAffiliateTargetApply;
|
|
565
|
+
(function (SkAffiliateTargetApply) {
|
|
566
|
+
SkAffiliateTargetApply["Include"] = "INCLUDE";
|
|
567
|
+
SkAffiliateTargetApply["Exclude"] = "EXCLUDE";
|
|
568
|
+
})(SkAffiliateTargetApply || (SkAffiliateTargetApply = {}));
|
|
569
|
+
|
|
570
|
+
var SkPromotionAccessPolicy;
|
|
571
|
+
(function (SkPromotionAccessPolicy) {
|
|
572
|
+
SkPromotionAccessPolicy["Public"] = "PUBLIC";
|
|
573
|
+
SkPromotionAccessPolicy["Hidden"] = "HIDDEN";
|
|
574
|
+
})(SkPromotionAccessPolicy || (SkPromotionAccessPolicy = {}));
|
|
575
|
+
var SkPromotionGiftServeType;
|
|
576
|
+
(function (SkPromotionGiftServeType) {
|
|
577
|
+
SkPromotionGiftServeType["All"] = "ALL";
|
|
578
|
+
SkPromotionGiftServeType["Select"] = "SELECT";
|
|
579
|
+
})(SkPromotionGiftServeType || (SkPromotionGiftServeType = {}));
|
|
580
|
+
class SkPromotionGift {
|
|
581
|
+
constructor(data = {}) {
|
|
582
|
+
this.id = data.id;
|
|
583
|
+
this.product = data.product ? new SkProduct(data.product) : null;
|
|
584
|
+
this.amount = data.amount || 1;
|
|
585
|
+
this.type = data.type || SkGiftType.Real;
|
|
586
|
+
this.optionTitle = data.optionTitle || '';
|
|
587
|
+
this.optionValueTitle = data.optionValueTitle || '';
|
|
588
|
+
this.optionAddedPrice = data.optionAddedPrice || 0;
|
|
589
|
+
this.customTitle = data.customTitle || '';
|
|
590
|
+
this.customImage = new SkFile(data.customImage || {});
|
|
591
|
+
this.customBrandName = data.customBrandName || '';
|
|
592
|
+
this.customPrice = data.customPrice || 0;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
class SkPromotionGiftGroup {
|
|
596
|
+
constructor(data = {}) {
|
|
597
|
+
this.id = data.id;
|
|
598
|
+
this.serveType = data.serveType || SkPromotionGiftServeType.All;
|
|
599
|
+
this.gifts = (data.gifts || []).map(item => new SkPromotionGift(item));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
class SkPromotionTarget {
|
|
603
|
+
constructor(data = {}) {
|
|
604
|
+
this.id = data.id;
|
|
605
|
+
this.promotion = data.promotion ? new SkPromotion(data.promotion) : null;
|
|
606
|
+
this.product = data.product ? new SkProduct(data.product) : null;
|
|
607
|
+
this.isLimited = data.isLimited || false;
|
|
608
|
+
this.stockAmount = data.stockAmount || 0;
|
|
609
|
+
this.discountType = data.discountType;
|
|
610
|
+
this.discountValue = data.discountValue || 0;
|
|
611
|
+
this.giftGroups = (data.giftGroups || []).map(item => new SkPromotionGiftGroup(item));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
class SkPromotionCategory {
|
|
615
|
+
constructor(data = {}) {
|
|
616
|
+
this.id = data.id;
|
|
617
|
+
this.category = data.category;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
class SkPromotion extends Audit {
|
|
621
|
+
constructor(data = {}) {
|
|
622
|
+
super(data);
|
|
623
|
+
this.id = data.id;
|
|
624
|
+
this.title = data.title || '';
|
|
625
|
+
this.startDate = data.startDate;
|
|
626
|
+
this.endDate = data.endDate;
|
|
627
|
+
this.endDateString = data.endDateString || '';
|
|
628
|
+
this.rebateString = data.rebateString || '';
|
|
629
|
+
this.accessPolicy = data.accessPolicy || SkPromotionAccessPolicy.Public;
|
|
630
|
+
this.categories = (data.categories || []).map(item => new SkPromotionCategory(item));
|
|
631
|
+
this.image = data.image ? new SkFile(data.image) : null;
|
|
632
|
+
this.imageAlt = data.imageAlt ? new SkFile(data.imageAlt) : null;
|
|
633
|
+
this.article = data.article ? new SkArticle(data.article) : null;
|
|
634
|
+
this.benefit = data.benefit ? new SkArticle(data.benefit) : null;
|
|
635
|
+
this.targets = (data.targets || []).map(item => new SkPromotionTarget(item));
|
|
636
|
+
this.opengraph = Object.assign({}, { ogTitle: '', ogAutoFill: true, ogDesc: '', ogImage: null }, data.opengraph);
|
|
637
|
+
this.listOrder = data.listOrder;
|
|
638
|
+
this.activated = data.activated;
|
|
639
|
+
}
|
|
640
|
+
isEmpty() {
|
|
641
|
+
return !this.id;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
var SkOrderType;
|
|
646
|
+
(function (SkOrderType) {
|
|
647
|
+
SkOrderType["Normal"] = "NORMAL";
|
|
648
|
+
SkOrderType["Admin"] = "ADMIN";
|
|
649
|
+
SkOrderType["DEALER"] = "DEALER";
|
|
650
|
+
})(SkOrderType || (SkOrderType = {}));
|
|
651
|
+
var SkOrderStatus;
|
|
652
|
+
(function (SkOrderStatus) {
|
|
653
|
+
SkOrderStatus["Prepare"] = "PREPARE";
|
|
654
|
+
SkOrderStatus["Progress"] = "PROGRESS";
|
|
655
|
+
SkOrderStatus["Wait"] = "WAIT";
|
|
656
|
+
SkOrderStatus["Paid"] = "PAID";
|
|
657
|
+
SkOrderStatus["ProcessStart"] = "PROCESS_START";
|
|
658
|
+
SkOrderStatus["ProcessPartial"] = "PROCESS_PARTIAL";
|
|
659
|
+
SkOrderStatus["Process"] = "PROCESS";
|
|
660
|
+
SkOrderStatus["Complete"] = "COMPLETE";
|
|
661
|
+
SkOrderStatus["CancelRequest"] = "CANCEL_REQUEST";
|
|
662
|
+
SkOrderStatus["CancelSystem"] = "CANCEL_SYSTEM";
|
|
663
|
+
SkOrderStatus["Cancel"] = "CANCEL";
|
|
664
|
+
SkOrderStatus["Error"] = "ERROR";
|
|
665
|
+
})(SkOrderStatus || (SkOrderStatus = {}));
|
|
666
|
+
var SkOrderCancelType;
|
|
667
|
+
(function (SkOrderCancelType) {
|
|
668
|
+
SkOrderCancelType["Just"] = "JUST";
|
|
669
|
+
SkOrderCancelType["ModifyOrder"] = "MODIFY_ORDER";
|
|
670
|
+
SkOrderCancelType["Wrong"] = "WRONG";
|
|
671
|
+
SkOrderCancelType["Cheaper"] = "CHEAPER";
|
|
672
|
+
SkOrderCancelType["Error"] = "ERROR"; // 상품 정보 오류
|
|
673
|
+
})(SkOrderCancelType || (SkOrderCancelType = {}));
|
|
674
|
+
function getSkOrderCancelTypeText(type) {
|
|
675
|
+
switch (type) {
|
|
676
|
+
case SkOrderCancelType.Just:
|
|
677
|
+
return '구매 의사 없음 (변심)';
|
|
678
|
+
case SkOrderCancelType.ModifyOrder:
|
|
679
|
+
return '주문 정보 변경';
|
|
680
|
+
case SkOrderCancelType.Wrong:
|
|
681
|
+
return '다른 상품 잘못 주문';
|
|
682
|
+
case SkOrderCancelType.Cheaper:
|
|
683
|
+
return '타 쇼핑몰에서 더 저렴하게 판매';
|
|
684
|
+
case SkOrderCancelType.Error:
|
|
685
|
+
return '상품 정보 오류';
|
|
686
|
+
default:
|
|
687
|
+
return '코드(' + type + ')';
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
function getSkOrderStatusText(status) {
|
|
691
|
+
switch (status) {
|
|
692
|
+
case SkOrderStatus.Prepare:
|
|
693
|
+
return '주문 생성중';
|
|
694
|
+
case SkOrderStatus.Progress:
|
|
695
|
+
return '결제 진행중';
|
|
696
|
+
case SkOrderStatus.Wait:
|
|
697
|
+
return '결제 대기중';
|
|
698
|
+
case SkOrderStatus.Paid:
|
|
699
|
+
return '결제 완료';
|
|
700
|
+
case SkOrderStatus.ProcessStart:
|
|
701
|
+
return '배송 준비중';
|
|
702
|
+
case SkOrderStatus.ProcessPartial:
|
|
703
|
+
return '부분 배송중';
|
|
704
|
+
case SkOrderStatus.Process:
|
|
705
|
+
return '배송중';
|
|
706
|
+
case SkOrderStatus.Complete:
|
|
707
|
+
return '배송 완료';
|
|
708
|
+
case SkOrderStatus.CancelRequest:
|
|
709
|
+
return '주문 취소 요청중';
|
|
710
|
+
case SkOrderStatus.CancelSystem:
|
|
711
|
+
return '시스템 취소';
|
|
712
|
+
case SkOrderStatus.Cancel:
|
|
713
|
+
return '주문 취소';
|
|
714
|
+
case SkOrderStatus.Error:
|
|
715
|
+
return '주문 오류(취소)';
|
|
716
|
+
default:
|
|
717
|
+
return '상태코드(' + status + ')';
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
class SkOrderDetail {
|
|
721
|
+
constructor(data = {}) {
|
|
722
|
+
if (data === null) {
|
|
723
|
+
data = {};
|
|
724
|
+
}
|
|
725
|
+
Object.assign(this, data);
|
|
726
|
+
this.user = data.user ? new SkUser(data.user) : null;
|
|
727
|
+
this.items = (data.items || []).map(item => new SkOrderDetailItem(item));
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
class SkOrderDetailItem {
|
|
731
|
+
constructor(data = {}) {
|
|
732
|
+
if (data === null) {
|
|
733
|
+
data = {};
|
|
734
|
+
}
|
|
735
|
+
Object.assign(this, data);
|
|
736
|
+
}
|
|
737
|
+
getSinglePrice() {
|
|
738
|
+
const basePrice = Math.min(this.product.priceOriginal, this.product.priceDiscounted);
|
|
739
|
+
const optionPrice = (this.options || []).map(option => option.addedPrice * option.amount).reduce((previousValue, currentValue) => previousValue + currentValue, 0);
|
|
740
|
+
return basePrice + optionPrice;
|
|
741
|
+
}
|
|
742
|
+
getTotalPrice() {
|
|
743
|
+
return this.getSinglePrice() * this.amount;
|
|
744
|
+
}
|
|
745
|
+
checkOptionExists() {
|
|
746
|
+
return (this.options || []).length > 0;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
var SkPgType;
|
|
751
|
+
(function (SkPgType) {
|
|
752
|
+
SkPgType["NicePay"] = "NICEPAY";
|
|
753
|
+
SkPgType["TossPayment"] = "TOSS";
|
|
754
|
+
})(SkPgType || (SkPgType = {}));
|
|
755
|
+
var SkPaymentStatus;
|
|
756
|
+
(function (SkPaymentStatus) {
|
|
757
|
+
SkPaymentStatus["Transfer"] = "TRANSFER";
|
|
758
|
+
SkPaymentStatus["Card"] = "CARD";
|
|
759
|
+
SkPaymentStatus["Card2"] = "CARD2";
|
|
760
|
+
SkPaymentStatus["Naver"] = "NAVER";
|
|
761
|
+
SkPaymentStatus["NaverPG"] = "NAVER_PG";
|
|
762
|
+
SkPaymentStatus["Kakao"] = "KAKAO";
|
|
763
|
+
SkPaymentStatus["Payco"] = "PAYCO";
|
|
764
|
+
SkPaymentStatus["Toss"] = "TOSS";
|
|
765
|
+
})(SkPaymentStatus || (SkPaymentStatus = {}));
|
|
766
|
+
function getSkPaymentStatusText(status) {
|
|
767
|
+
switch (status) {
|
|
768
|
+
case SkPaymentStatus.Transfer:
|
|
769
|
+
return '무통장입금';
|
|
770
|
+
case SkPaymentStatus.Card:
|
|
771
|
+
return '카드결제 (일반 무이자)';
|
|
772
|
+
case SkPaymentStatus.Card2:
|
|
773
|
+
return '카드결제 (분담 무이자)';
|
|
774
|
+
case SkPaymentStatus.Kakao:
|
|
775
|
+
return '카카오페이';
|
|
776
|
+
case SkPaymentStatus.Payco:
|
|
777
|
+
return 'PAYCO';
|
|
778
|
+
case SkPaymentStatus.Naver:
|
|
779
|
+
case SkPaymentStatus.NaverPG:
|
|
780
|
+
return '네이버페이';
|
|
781
|
+
default:
|
|
782
|
+
return status;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
var SkShippingStatus;
|
|
787
|
+
(function (SkShippingStatus) {
|
|
788
|
+
SkShippingStatus["Prepare"] = "PREPARE";
|
|
789
|
+
SkShippingStatus["Progress"] = "PROGRESS";
|
|
790
|
+
SkShippingStatus["Done"] = "DONE";
|
|
791
|
+
SkShippingStatus["Fail"] = "FAIL"; // 배송 실패
|
|
792
|
+
})(SkShippingStatus || (SkShippingStatus = {}));
|
|
793
|
+
var SkShippingMethod;
|
|
794
|
+
(function (SkShippingMethod) {
|
|
795
|
+
SkShippingMethod["Normal"] = "NORMAL";
|
|
796
|
+
SkShippingMethod["Normal2"] = "NORMAL2";
|
|
797
|
+
SkShippingMethod["Quick"] = "QUICK";
|
|
798
|
+
SkShippingMethod["Visit"] = "VISIT";
|
|
799
|
+
SkShippingMethod["Software"] = "SOFTWARE";
|
|
800
|
+
SkShippingMethod["SoftwareRealtime"] = "SOFTWARE_REALTIME";
|
|
801
|
+
SkShippingMethod["Howser"] = "HOWSER";
|
|
802
|
+
SkShippingMethod["Howser2"] = "HOWSER2";
|
|
803
|
+
})(SkShippingMethod || (SkShippingMethod = {}));
|
|
804
|
+
function getSkShippingMethodText(method) {
|
|
805
|
+
switch (method) {
|
|
806
|
+
case SkShippingMethod.Normal:
|
|
807
|
+
return '택배 배송';
|
|
808
|
+
case SkShippingMethod.Normal2:
|
|
809
|
+
return '착불 배송';
|
|
810
|
+
case SkShippingMethod.Quick:
|
|
811
|
+
return '퀵 배송 (착불)';
|
|
812
|
+
case SkShippingMethod.Visit:
|
|
813
|
+
return '방문 수령';
|
|
814
|
+
case SkShippingMethod.Software:
|
|
815
|
+
return '전자배송(수동)';
|
|
816
|
+
case SkShippingMethod.SoftwareRealtime:
|
|
817
|
+
return '전자배송(실시간)';
|
|
818
|
+
case SkShippingMethod.Howser:
|
|
819
|
+
return '가구 전문 배송(착불)';
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
var SkNicePayCreditCards;
|
|
824
|
+
(function (SkNicePayCreditCards) {
|
|
825
|
+
SkNicePayCreditCards["BC"] = "01";
|
|
826
|
+
SkNicePayCreditCards["KB"] = "02";
|
|
827
|
+
SkNicePayCreditCards["KEB"] = "03";
|
|
828
|
+
SkNicePayCreditCards["Samsung"] = "04";
|
|
829
|
+
SkNicePayCreditCards["Shinhan"] = "06";
|
|
830
|
+
SkNicePayCreditCards["Hyundae"] = "07";
|
|
831
|
+
SkNicePayCreditCards["Lotte"] = "08";
|
|
832
|
+
SkNicePayCreditCards["Hanmi"] = "09";
|
|
833
|
+
SkNicePayCreditCards["SHanmi"] = "10";
|
|
834
|
+
SkNicePayCreditCards["City"] = "11";
|
|
835
|
+
SkNicePayCreditCards["NH"] = "12";
|
|
836
|
+
SkNicePayCreditCards["SuHyup"] = "13";
|
|
837
|
+
SkNicePayCreditCards["PyungHwa"] = "14";
|
|
838
|
+
SkNicePayCreditCards["Woori"] = "15";
|
|
839
|
+
SkNicePayCreditCards["HanaSK"] = "16";
|
|
840
|
+
SkNicePayCreditCards["DongName"] = "17";
|
|
841
|
+
SkNicePayCreditCards["JuTaek"] = "18";
|
|
842
|
+
SkNicePayCreditCards["ChoHeung"] = "19";
|
|
843
|
+
SkNicePayCreditCards["ChuckHyup"] = "20";
|
|
844
|
+
SkNicePayCreditCards["Gwangju"] = "21";
|
|
845
|
+
SkNicePayCreditCards["Jeonbuk"] = "22";
|
|
846
|
+
SkNicePayCreditCards["Jeju"] = "23";
|
|
847
|
+
SkNicePayCreditCards["KDBC"] = "24";
|
|
848
|
+
SkNicePayCreditCards["VISA"] = "25";
|
|
849
|
+
SkNicePayCreditCards["MASTER"] = "26";
|
|
850
|
+
SkNicePayCreditCards["Diners"] = "27";
|
|
851
|
+
SkNicePayCreditCards["AMX"] = "28";
|
|
852
|
+
SkNicePayCreditCards["JCB"] = "29";
|
|
853
|
+
SkNicePayCreditCards["SKOKCashbag"] = "31";
|
|
854
|
+
SkNicePayCreditCards["ePost"] = "32";
|
|
855
|
+
SkNicePayCreditCards["FSB"] = "33";
|
|
856
|
+
SkNicePayCreditCards["UnionPay"] = "34";
|
|
857
|
+
SkNicePayCreditCards["KFCC"] = "35";
|
|
858
|
+
SkNicePayCreditCards["KDB"] = "36";
|
|
859
|
+
SkNicePayCreditCards["Kakao"] = "37";
|
|
860
|
+
SkNicePayCreditCards["KBank"] = "38"; // 케이뱅크
|
|
861
|
+
})(SkNicePayCreditCards || (SkNicePayCreditCards = {}));
|
|
862
|
+
function getNicePayCreditCardTitle(value) {
|
|
863
|
+
switch (value) {
|
|
864
|
+
case SkNicePayCreditCards.BC: return '비씨카드';
|
|
865
|
+
case SkNicePayCreditCards.KB: return 'KB국민카드';
|
|
866
|
+
case SkNicePayCreditCards.KEB: return '외환카드';
|
|
867
|
+
case SkNicePayCreditCards.Samsung: return '삼성카드';
|
|
868
|
+
case SkNicePayCreditCards.Shinhan: return '신한카드';
|
|
869
|
+
case SkNicePayCreditCards.Hyundae: return '현대카드';
|
|
870
|
+
case SkNicePayCreditCards.Lotte: return '롯데카드';
|
|
871
|
+
case SkNicePayCreditCards.Hanmi: return '한미카드';
|
|
872
|
+
case SkNicePayCreditCards.SHanmi: return '신세계한미카드';
|
|
873
|
+
case SkNicePayCreditCards.City: return '시티카드';
|
|
874
|
+
case SkNicePayCreditCards.NH: return '농협카드';
|
|
875
|
+
case SkNicePayCreditCards.SuHyup: return '수협카드';
|
|
876
|
+
case SkNicePayCreditCards.PyungHwa: return '평화카드';
|
|
877
|
+
case SkNicePayCreditCards.Woori: return '우리카드';
|
|
878
|
+
case SkNicePayCreditCards.HanaSK: return '하나SK카드';
|
|
879
|
+
case SkNicePayCreditCards.DongName: return '동남(주택)카드';
|
|
880
|
+
case SkNicePayCreditCards.JuTaek: return '주택카드';
|
|
881
|
+
case SkNicePayCreditCards.ChoHeung: return '조흥(강원)카드';
|
|
882
|
+
case SkNicePayCreditCards.ChuckHyup: return '축협(농협)카드';
|
|
883
|
+
case SkNicePayCreditCards.Gwangju: return '광주카드';
|
|
884
|
+
case SkNicePayCreditCards.Jeonbuk: return '전북카드';
|
|
885
|
+
case SkNicePayCreditCards.Jeju: return '제주카드';
|
|
886
|
+
case SkNicePayCreditCards.KDBC: return '산은캐피탈카드';
|
|
887
|
+
case SkNicePayCreditCards.VISA: return '해외비자카드';
|
|
888
|
+
case SkNicePayCreditCards.MASTER: return '해외마스터카드';
|
|
889
|
+
case SkNicePayCreditCards.Diners: return '해외다이너스카드';
|
|
890
|
+
case SkNicePayCreditCards.AMX: return '해외AMX카드';
|
|
891
|
+
case SkNicePayCreditCards.JCB: return '해외JCB카드';
|
|
892
|
+
case SkNicePayCreditCards.SKOKCashbag: return 'SK-OKCashBag카드';
|
|
893
|
+
case SkNicePayCreditCards.ePost: return '우체국카드';
|
|
894
|
+
case SkNicePayCreditCards.FSB: return '저축은행카드';
|
|
895
|
+
case SkNicePayCreditCards.UnionPay: return '은련카드';
|
|
896
|
+
case SkNicePayCreditCards.KFCC: return '새마을금고카드';
|
|
897
|
+
case SkNicePayCreditCards.KDB: return 'KDB산업카드';
|
|
898
|
+
case SkNicePayCreditCards.Kakao: return '카카오뱅크카드';
|
|
899
|
+
case SkNicePayCreditCards.KBank: return '케이뱅크카드';
|
|
900
|
+
default: return `알수없음 (code: ${value})`;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
var SkTossPayCreditCards;
|
|
905
|
+
(function (SkTossPayCreditCards) {
|
|
906
|
+
SkTossPayCreditCards["BC"] = "31";
|
|
907
|
+
SkTossPayCreditCards["KB"] = "11";
|
|
908
|
+
SkTossPayCreditCards["Samsung"] = "51";
|
|
909
|
+
SkTossPayCreditCards["Shinhan"] = "41";
|
|
910
|
+
SkTossPayCreditCards["Hyundae"] = "61";
|
|
911
|
+
SkTossPayCreditCards["Lotte"] = "71";
|
|
912
|
+
SkTossPayCreditCards["City"] = "36";
|
|
913
|
+
SkTossPayCreditCards["NH"] = "91";
|
|
914
|
+
SkTossPayCreditCards["SuHyup"] = "34";
|
|
915
|
+
SkTossPayCreditCards["Woori"] = "33";
|
|
916
|
+
SkTossPayCreditCards["HanaSK"] = "21";
|
|
917
|
+
SkTossPayCreditCards["DongName"] = "17";
|
|
918
|
+
SkTossPayCreditCards["Gwangju"] = "46";
|
|
919
|
+
SkTossPayCreditCards["Jeonbuk"] = "35";
|
|
920
|
+
SkTossPayCreditCards["Jeju"] = "42";
|
|
921
|
+
SkTossPayCreditCards["VISA"] = "4V";
|
|
922
|
+
SkTossPayCreditCards["MASTER"] = "4M";
|
|
923
|
+
SkTossPayCreditCards["Diners"] = "6D";
|
|
924
|
+
SkTossPayCreditCards["AMX"] = "7A";
|
|
925
|
+
SkTossPayCreditCards["JCB"] = "4J";
|
|
926
|
+
SkTossPayCreditCards["ePost"] = "37";
|
|
927
|
+
SkTossPayCreditCards["UnionPay"] = "3C";
|
|
928
|
+
SkTossPayCreditCards["KFCC"] = "38";
|
|
929
|
+
SkTossPayCreditCards["KDB"] = "30";
|
|
930
|
+
SkTossPayCreditCards["Kakao"] = "15";
|
|
931
|
+
SkTossPayCreditCards["KBank"] = "3A"; // 케이뱅크
|
|
932
|
+
})(SkTossPayCreditCards || (SkTossPayCreditCards = {}));
|
|
933
|
+
function getTossPayCreditCardTitle(value) {
|
|
934
|
+
switch (value) {
|
|
935
|
+
case SkTossPayCreditCards.BC: return '비씨카드';
|
|
936
|
+
case SkTossPayCreditCards.KB: return 'KB국민카드';
|
|
937
|
+
case SkTossPayCreditCards.Samsung: return '삼성카드';
|
|
938
|
+
case SkTossPayCreditCards.Shinhan: return '신한카드';
|
|
939
|
+
case SkTossPayCreditCards.Hyundae: return '현대카드';
|
|
940
|
+
case SkTossPayCreditCards.Lotte: return '롯데카드';
|
|
941
|
+
case SkTossPayCreditCards.City: return '시티카드';
|
|
942
|
+
case SkTossPayCreditCards.NH: return '농협카드';
|
|
943
|
+
case SkTossPayCreditCards.SuHyup: return '수협카드';
|
|
944
|
+
case SkTossPayCreditCards.Woori: return '우리카드';
|
|
945
|
+
case SkTossPayCreditCards.HanaSK: return '하나SK카드';
|
|
946
|
+
case SkTossPayCreditCards.DongName: return '동남(주택)카드';
|
|
947
|
+
case SkTossPayCreditCards.Gwangju: return '광주카드';
|
|
948
|
+
case SkTossPayCreditCards.Jeonbuk: return '전북카드';
|
|
949
|
+
case SkTossPayCreditCards.Jeju: return '제주카드';
|
|
950
|
+
case SkTossPayCreditCards.VISA: return '해외비자카드';
|
|
951
|
+
case SkTossPayCreditCards.MASTER: return '해외마스터카드';
|
|
952
|
+
case SkTossPayCreditCards.Diners: return '해외다이너스카드';
|
|
953
|
+
case SkTossPayCreditCards.AMX: return '해외AMX카드';
|
|
954
|
+
case SkTossPayCreditCards.JCB: return '해외JCB카드';
|
|
955
|
+
case SkTossPayCreditCards.ePost: return '우체국카드';
|
|
956
|
+
case SkTossPayCreditCards.UnionPay: return '은련카드';
|
|
957
|
+
case SkTossPayCreditCards.KFCC: return '새마을금고카드';
|
|
958
|
+
case SkTossPayCreditCards.KDB: return 'KDB산업카드';
|
|
959
|
+
case SkTossPayCreditCards.Kakao: return '카카오뱅크카드';
|
|
960
|
+
case SkTossPayCreditCards.KBank: return '케이뱅크카드';
|
|
961
|
+
default: return `알수없음 (code: ${value})`;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
var SkPointType;
|
|
966
|
+
(function (SkPointType) {
|
|
967
|
+
SkPointType["Add"] = "ADD";
|
|
968
|
+
SkPointType["Subtract"] = "SUBTRACT";
|
|
969
|
+
})(SkPointType || (SkPointType = {}));
|
|
970
|
+
class SkPoint extends Audit {
|
|
971
|
+
constructor(data = {}) {
|
|
972
|
+
super(data);
|
|
973
|
+
Object.assign(this, data);
|
|
974
|
+
}
|
|
975
|
+
causeText() {
|
|
976
|
+
let text = '';
|
|
977
|
+
if (this.cause === 'ADMIN') {
|
|
978
|
+
text = '어드민에 의해';
|
|
979
|
+
if (this.type === SkPointType.Add) {
|
|
980
|
+
text = text + ' 추가됨';
|
|
981
|
+
}
|
|
982
|
+
else if (this.type === SkPointType.Subtract) {
|
|
983
|
+
text = text + ' 차감됨';
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
else if (this.cause.startsWith('ORDER-')) {
|
|
987
|
+
text = '주문(' + this.cause.replace('ORDER-', '') + ') 에 의해';
|
|
988
|
+
if (this.type === SkPointType.Add) {
|
|
989
|
+
text = text + ' 적립됨';
|
|
990
|
+
}
|
|
991
|
+
else if (this.type === SkPointType.Subtract) {
|
|
992
|
+
text = text + ' 사용됨';
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
else if (this.cause.startsWith('CANCEL-')) {
|
|
996
|
+
text = '주문(' + this.cause.replace('CANCEL-', '') + ') 취소에 의해';
|
|
997
|
+
if (this.type === SkPointType.Add) {
|
|
998
|
+
text = text + ' 추가됨';
|
|
999
|
+
}
|
|
1000
|
+
else if (this.type === SkPointType.Subtract) {
|
|
1001
|
+
text = text + ' 차감됨';
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
else {
|
|
1005
|
+
text = this.cause;
|
|
1006
|
+
}
|
|
1007
|
+
return text;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
var SkCouponType;
|
|
1012
|
+
(function (SkCouponType) {
|
|
1013
|
+
SkCouponType["Code"] = "CODE";
|
|
1014
|
+
SkCouponType["Inject"] = "INJECT";
|
|
1015
|
+
})(SkCouponType || (SkCouponType = {}));
|
|
1016
|
+
var SkCouponTarget;
|
|
1017
|
+
(function (SkCouponTarget) {
|
|
1018
|
+
SkCouponTarget["All"] = "ALL";
|
|
1019
|
+
SkCouponTarget["Brand"] = "BRAND";
|
|
1020
|
+
SkCouponTarget["Category"] = "CATEGORY";
|
|
1021
|
+
SkCouponTarget["SubCategory"] = "SUBCATEGORY";
|
|
1022
|
+
SkCouponTarget["Product"] = "PRODUCT";
|
|
1023
|
+
})(SkCouponTarget || (SkCouponTarget = {}));
|
|
1024
|
+
var SkCouponTrigger;
|
|
1025
|
+
(function (SkCouponTrigger) {
|
|
1026
|
+
SkCouponTrigger["None"] = "NONE";
|
|
1027
|
+
SkCouponTrigger["All"] = "ALL";
|
|
1028
|
+
SkCouponTrigger["Brand"] = "BRAND";
|
|
1029
|
+
SkCouponTrigger["Category"] = "CATEGORY";
|
|
1030
|
+
SkCouponTrigger["SubCategory"] = "SUBCATEGORY";
|
|
1031
|
+
SkCouponTrigger["Product"] = "PRODUCT";
|
|
1032
|
+
})(SkCouponTrigger || (SkCouponTrigger = {}));
|
|
1033
|
+
|
|
1034
|
+
class SkComment extends Audit {
|
|
1035
|
+
constructor(data = {}) {
|
|
1036
|
+
super(data);
|
|
1037
|
+
this.id = data.id || null;
|
|
1038
|
+
this.author = new SkUser(data.author);
|
|
1039
|
+
this.content = data.content || '';
|
|
1040
|
+
this.secret = data.secret || false;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
class SkDocumentCommentParent extends SkComment {
|
|
1044
|
+
constructor(data) {
|
|
1045
|
+
super(data);
|
|
1046
|
+
this.document = data.document;
|
|
1047
|
+
this.childrens = (data.childrens || []).map(item => new SkDocumentCommentChild(item));
|
|
1048
|
+
this.childrenCount = data.childrenCount || 0;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
class SkDocumentCommentChild extends SkComment {
|
|
1052
|
+
constructor(data) {
|
|
1053
|
+
super(data);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
var SkContactStatus;
|
|
1058
|
+
(function (SkContactStatus) {
|
|
1059
|
+
SkContactStatus["Open"] = "OPEN";
|
|
1060
|
+
SkContactStatus["Close"] = "CLOSE";
|
|
1061
|
+
})(SkContactStatus || (SkContactStatus = {}));
|
|
1062
|
+
var SkContactType;
|
|
1063
|
+
(function (SkContactType) {
|
|
1064
|
+
SkContactType["Normal"] = "NORMAL";
|
|
1065
|
+
SkContactType["BeforeBuy"] = "BEFOREBUY";
|
|
1066
|
+
SkContactType["Technical"] = "TECHNICAL";
|
|
1067
|
+
SkContactType["Software"] = "SOFTWARE";
|
|
1068
|
+
SkContactType["AS"] = "AS";
|
|
1069
|
+
})(SkContactType || (SkContactType = {}));
|
|
1070
|
+
function getSkContactTypeText(type) {
|
|
1071
|
+
switch (type) {
|
|
1072
|
+
case SkContactType.Normal:
|
|
1073
|
+
return '1:1 문의';
|
|
1074
|
+
case SkContactType.BeforeBuy:
|
|
1075
|
+
return '구매전 상담';
|
|
1076
|
+
case SkContactType.Technical:
|
|
1077
|
+
return '기술지원';
|
|
1078
|
+
case SkContactType.Software:
|
|
1079
|
+
return '전자배송상품';
|
|
1080
|
+
case SkContactType.AS:
|
|
1081
|
+
return 'AS 문의';
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
var SkGridItemType;
|
|
1086
|
+
(function (SkGridItemType) {
|
|
1087
|
+
SkGridItemType["Icon"] = "Icon";
|
|
1088
|
+
SkGridItemType["Image"] = "Image";
|
|
1089
|
+
SkGridItemType["SlidePromotion"] = "SlidePromotion";
|
|
1090
|
+
SkGridItemType["SlideShop"] = "SlideShop";
|
|
1091
|
+
SkGridItemType["SlideEditorial"] = "SlideEditorial";
|
|
1092
|
+
SkGridItemType["SlideStudio"] = "SlideStudio";
|
|
1093
|
+
SkGridItemType["SlideCustom"] = "SlideCustom";
|
|
1094
|
+
})(SkGridItemType || (SkGridItemType = {}));
|
|
1095
|
+
class SkGridItemIconData {
|
|
1096
|
+
constructor(data = {}) {
|
|
1097
|
+
this.iconType = data.iconType || 'material';
|
|
1098
|
+
this.icon = data.icon || 'error_outline';
|
|
1099
|
+
this.url = data.url || '';
|
|
1100
|
+
this.title = data.title || '';
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
class SkGridItemImageData {
|
|
1104
|
+
constructor(data = {}) {
|
|
1105
|
+
this.src = data.src || '';
|
|
1106
|
+
this.title = data.title || '';
|
|
1107
|
+
this.url = data.url;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
class SkGridItemSlideData {
|
|
1111
|
+
constructor(data = {}) {
|
|
1112
|
+
this.target = data.target || 'latest';
|
|
1113
|
+
this.count = data.count || 5;
|
|
1114
|
+
this.list = data.list || [];
|
|
1115
|
+
this.lastImageId = data.lastImageId;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
class SkGridItem {
|
|
1119
|
+
constructor(data = {}) {
|
|
1120
|
+
this.rowspan = data.rowspan || 1;
|
|
1121
|
+
this.colspan = data.colspan || 1;
|
|
1122
|
+
this.type = data.type || SkGridItemType.SlideEditorial;
|
|
1123
|
+
switch (this.type) {
|
|
1124
|
+
case SkGridItemType.Icon:
|
|
1125
|
+
this.value = new SkGridItemIconData(data.value);
|
|
1126
|
+
break;
|
|
1127
|
+
case SkGridItemType.Image:
|
|
1128
|
+
this.value = new SkGridItemImageData(data.value);
|
|
1129
|
+
break;
|
|
1130
|
+
case SkGridItemType.SlidePromotion:
|
|
1131
|
+
case SkGridItemType.SlideShop:
|
|
1132
|
+
case SkGridItemType.SlideEditorial:
|
|
1133
|
+
case SkGridItemType.SlideStudio:
|
|
1134
|
+
case SkGridItemType.SlideCustom:
|
|
1135
|
+
this.value = new SkGridItemSlideData(data.value);
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
class SkGridData {
|
|
1140
|
+
constructor(data = {}) {
|
|
1141
|
+
this.cols = data.cols || 4;
|
|
1142
|
+
this.gutterSize = data.gutterSize || 0;
|
|
1143
|
+
this.aspect = data.aspect || '1:1';
|
|
1144
|
+
this.items = (data.items || []).map(item => new SkGridItem(item));
|
|
1145
|
+
}
|
|
1146
|
+
setItems(items) {
|
|
1147
|
+
this.items = (items || []).map(item => new SkGridItem(item));
|
|
1148
|
+
}
|
|
1149
|
+
setItem(item) {
|
|
1150
|
+
this.items.push(new SkGridItem(item));
|
|
1151
|
+
}
|
|
1152
|
+
updateItem(index, item) {
|
|
1153
|
+
this.items[index] = new SkGridItem(item);
|
|
1154
|
+
}
|
|
1155
|
+
removeItem(index) {
|
|
1156
|
+
this.items.splice(index, 1);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
class SkMobileMainData {
|
|
1160
|
+
constructor(data = {}) {
|
|
1161
|
+
this.editorials = new SkGridItemSlideData(data.editorials);
|
|
1162
|
+
this.studios = new SkGridItemSlideData(data.studios);
|
|
1163
|
+
this.promotions = new SkGridItemSlideData(data.promotions);
|
|
1164
|
+
this.products = new SkGridItemSlideData(data.products);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Generated bundle index. Do not edit.
|
|
1170
|
+
*/
|
|
1171
|
+
|
|
1172
|
+
export { Audit, FileType, SkAffiliateRequestStatus, SkAffiliateTargetApply, SkAffiliateTargetType, SkArticle, SkBoard, SkCart, SkCartOption, SkCategoryType, SkComment, SkContactStatus, SkContactType, SkCouponTarget, SkCouponTrigger, SkCouponType, SkDocument, SkDocumentAttachment, SkDocumentCommentChild, SkDocumentCommentParent, SkDocumentType, SkFile, SkGiftType, SkGridData, SkGridItem, SkGridItemIconData, SkGridItemImageData, SkGridItemSlideData, SkGridItemType, SkMobileMainData, SkNicePayCreditCards, SkOrderCancelType, SkOrderDetail, SkOrderDetailItem, SkOrderStatus, SkOrderType, SkPaymentStatus, SkPgType, SkPoint, SkPointType, SkProduct, SkProductAccessPolicy, SkProductBrand, SkProductCategory, SkProductImage, SkProductOptionType, SkProductPackage, SkProductStatus, SkProductStuffType, SkProductType, SkPromotion, SkPromotionAccessPolicy, SkPromotionCategory, SkPromotionGift, SkPromotionGiftGroup, SkPromotionGiftServeType, SkPromotionTarget, SkShippingMethod, SkShippingStatus, SkStore, SkTossPayCreditCards, SkUser, SkUserRoleName, SkValueType, getNicePayCreditCardTitle, getSkContactTypeText, getSkOrderCancelTypeText, getSkOrderStatusText, getSkPaymentStatusText, getSkProductAccessPolicyText, getSkProductStatusText, getSkShippingMethodText, getTossPayCreditCardTitle };
|
|
1173
|
+
//# sourceMappingURL=sk-front-lib-model.mjs.map
|