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