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.
Files changed (327) hide show
  1. package/api/package.json +5 -6
  2. package/api/sk-api.module.d.ts +7 -0
  3. package/api/sk-api.service.d.ts +3 -0
  4. package/api/sk-front-lib-api.d.ts +1 -0
  5. package/article/package.json +5 -6
  6. package/article/sk-article-editor-server.component.d.ts +3 -0
  7. package/article/sk-article-editor.component.d.ts +3 -0
  8. package/article/sk-article-server.module.d.ts +6 -0
  9. package/article/sk-article.module.d.ts +7 -0
  10. package/article/sk-article.service.d.ts +3 -0
  11. package/article/sk-froala-editor.directive.d.ts +3 -0
  12. package/article/sk-front-lib-article.d.ts +1 -0
  13. package/crud/package.json +5 -6
  14. package/crud/sk-account.service.d.ts +3 -0
  15. package/crud/sk-auth-admin.guard.d.ts +3 -0
  16. package/crud/sk-auth.guard.d.ts +3 -0
  17. package/crud/sk-auth.service.d.ts +3 -0
  18. package/crud/sk-board.service.d.ts +3 -0
  19. package/crud/sk-brand.service.d.ts +3 -0
  20. package/crud/sk-cart.service.d.ts +7 -0
  21. package/crud/sk-category.service.d.ts +3 -0
  22. package/crud/sk-comment.service.d.ts +3 -0
  23. package/crud/sk-config.service.d.ts +3 -0
  24. package/crud/sk-contact.service.d.ts +3 -0
  25. package/crud/sk-coupon.service.d.ts +3 -0
  26. package/crud/sk-document.service.d.ts +3 -0
  27. package/crud/sk-etc.service.d.ts +3 -0
  28. package/crud/sk-file.service.d.ts +3 -0
  29. package/crud/sk-front-lib-crud.d.ts +1 -1
  30. package/crud/sk-keyword.service.d.ts +3 -0
  31. package/crud/sk-order.service.d.ts +3 -0
  32. package/crud/sk-point.service.d.ts +3 -0
  33. package/crud/sk-product.service.d.ts +4 -0
  34. package/crud/sk-promotion.service.d.ts +3 -0
  35. package/crud/sk-search.service.d.ts +3 -0
  36. package/crud/sk-store.service.d.ts +3 -0
  37. package/crud/sk-user.service.d.ts +3 -0
  38. package/{esm2015/api/model/api-config.js → esm2020/api/model/api-config.mjs} +0 -0
  39. package/{esm2015/api/model/api-pageable-param.js → esm2020/api/model/api-pageable-param.mjs} +0 -0
  40. package/{esm2015/api/model/api-pageable.js → esm2020/api/model/api-pageable.mjs} +0 -0
  41. package/{esm2015/api/model/api-response.js → esm2020/api/model/api-response.mjs} +0 -0
  42. package/{esm2015/api/model/index.js → esm2020/api/model/index.mjs} +0 -0
  43. package/{esm2015/api/public_api.js → esm2020/api/public_api.mjs} +0 -0
  44. package/esm2020/api/sk-api.module.mjs +35 -0
  45. package/esm2020/api/sk-api.service.mjs +145 -0
  46. package/{esm2015/api/sk-front-lib-api.js → esm2020/api/sk-front-lib-api.mjs} +0 -0
  47. package/{esm2015/article/public_api.js → esm2020/article/public_api.mjs} +0 -0
  48. package/esm2020/article/sk-article-editor-server.component.mjs +51 -0
  49. package/esm2020/article/sk-article-editor.component.mjs +93 -0
  50. package/esm2020/article/sk-article-server.module.mjs +33 -0
  51. package/esm2020/article/sk-article.module.mjs +32 -0
  52. package/esm2020/article/sk-article.service.mjs +248 -0
  53. package/esm2020/article/sk-froala-editor.directive.mjs +325 -0
  54. package/{esm2015/article/sk-front-lib-article.js → esm2020/article/sk-front-lib-article.mjs} +0 -0
  55. package/{esm2015/crud/public_api.js → esm2020/crud/public_api.mjs} +0 -0
  56. package/esm2020/crud/sk-account.service.mjs +36 -0
  57. package/esm2020/crud/sk-auth-admin.guard.mjs +31 -0
  58. package/esm2020/crud/sk-auth.guard.mjs +31 -0
  59. package/esm2020/crud/sk-auth.service.mjs +67 -0
  60. package/esm2020/crud/sk-board.service.mjs +54 -0
  61. package/esm2020/crud/sk-brand.service.mjs +46 -0
  62. package/esm2020/crud/sk-cart.service.mjs +255 -0
  63. package/esm2020/crud/sk-category.service.mjs +63 -0
  64. package/esm2020/crud/sk-comment.service.mjs +43 -0
  65. package/esm2020/crud/sk-config.service.mjs +31 -0
  66. package/esm2020/crud/sk-contact.service.mjs +39 -0
  67. package/esm2020/crud/sk-coupon.service.mjs +62 -0
  68. package/esm2020/crud/sk-document.service.mjs +95 -0
  69. package/esm2020/crud/sk-etc.service.mjs +25 -0
  70. package/esm2020/crud/sk-file.service.mjs +37 -0
  71. package/esm2020/crud/sk-front-lib-crud.mjs +5 -0
  72. package/esm2020/crud/sk-keyword.service.mjs +46 -0
  73. package/esm2020/crud/sk-order.service.mjs +133 -0
  74. package/esm2020/crud/sk-point.service.mjs +45 -0
  75. package/esm2020/crud/sk-product.service.mjs +156 -0
  76. package/esm2020/crud/sk-promotion.service.mjs +81 -0
  77. package/esm2020/crud/sk-search.service.mjs +25 -0
  78. package/esm2020/crud/sk-store.service.mjs +47 -0
  79. package/esm2020/crud/sk-user.service.mjs +69 -0
  80. package/esm2020/google-analytics/google-analytics-router.module.mjs +30 -0
  81. package/esm2020/google-analytics/google-analytics.module.mjs +40 -0
  82. package/esm2020/google-analytics/initializers/google-analytics-router.initializer.mjs +24 -0
  83. package/esm2020/google-analytics/initializers/google-analytics.initializer.mjs +46 -0
  84. package/{esm2015/google-analytics/interfaces/google-analytics-command.js → esm2020/google-analytics/interfaces/google-analytics-command.mjs} +0 -0
  85. package/{esm2015/google-analytics/interfaces/google-analytics-settings.js → esm2020/google-analytics/interfaces/google-analytics-settings.mjs} +0 -0
  86. package/{esm2015/google-analytics/public_api.js → esm2020/google-analytics/public_api.mjs} +0 -0
  87. package/esm2020/google-analytics/services/google-analytics.service.mjs +200 -0
  88. package/{esm2015/google-analytics/sk-front-lib-google-analytics.js → esm2020/google-analytics/sk-front-lib-google-analytics.mjs} +0 -0
  89. package/{esm2015/google-analytics/tokens/google-analytics-settings-token.js → esm2020/google-analytics/tokens/google-analytics-settings-token.mjs} +0 -0
  90. package/{esm2015/google-analytics/types/ga-action.type.js → esm2020/google-analytics/types/ga-action.type.mjs} +0 -0
  91. package/{esm2015/google-analytics/types/ga-bind.type.js → esm2020/google-analytics/types/ga-bind.type.mjs} +0 -0
  92. package/esm2020/image/public_api.mjs +3 -0
  93. package/esm2020/image/sk-front-lib-image.mjs +5 -0
  94. package/esm2020/image/sk-image.component.mjs +262 -0
  95. package/esm2020/image/sk-image.module.mjs +43 -0
  96. package/{esm2015/lib/sk-animations.js → esm2020/lib/sk-animations.mjs} +0 -0
  97. package/esm2020/lib/sk-byte.pipe.mjs +18 -0
  98. package/esm2020/lib/sk-date-time.pipe.mjs +16 -0
  99. package/esm2020/lib/sk-date.pipe.mjs +16 -0
  100. package/esm2020/lib/sk-front-lib.module.mjs +42 -0
  101. package/esm2020/lib/sk-keys.pipe.mjs +23 -0
  102. package/esm2020/lib/sk-time.pipe.mjs +16 -0
  103. package/{esm2015/lib/sk-utils.js → esm2020/lib/sk-utils.mjs} +0 -0
  104. package/{esm2015/model/lib/article.js → esm2020/model/lib/article.mjs} +0 -0
  105. package/{esm2015/model/lib/audit.js → esm2020/model/lib/audit.mjs} +0 -0
  106. package/{esm2015/model/lib/auth.js → esm2020/model/lib/auth.mjs} +0 -0
  107. package/{esm2015/model/lib/board.js → esm2020/model/lib/board.mjs} +0 -0
  108. package/{esm2015/model/lib/cart.js → esm2020/model/lib/cart.mjs} +0 -0
  109. package/{esm2015/model/lib/comment.js → esm2020/model/lib/comment.mjs} +0 -0
  110. package/{esm2015/model/lib/contact.js → esm2020/model/lib/contact.mjs} +0 -0
  111. package/{esm2015/model/lib/coupon.js → esm2020/model/lib/coupon.mjs} +0 -0
  112. package/{esm2015/model/lib/document.js → esm2020/model/lib/document.mjs} +0 -0
  113. package/{esm2015/model/lib/etc.js → esm2020/model/lib/etc.mjs} +0 -0
  114. package/{esm2015/model/lib/file.js → esm2020/model/lib/file.mjs} +0 -0
  115. package/{esm2015/model/lib/filetype.js → esm2020/model/lib/filetype.mjs} +0 -0
  116. package/{esm2015/model/lib/grid.js → esm2020/model/lib/grid.mjs} +0 -0
  117. package/{esm2015/model/lib/nicepay.js → esm2020/model/lib/nicepay.mjs} +0 -0
  118. package/{esm2015/model/lib/order.js → esm2020/model/lib/order.mjs} +0 -0
  119. package/{esm2015/model/lib/payment.js → esm2020/model/lib/payment.mjs} +0 -0
  120. package/{esm2015/model/lib/point.js → esm2020/model/lib/point.mjs} +0 -0
  121. package/{esm2015/model/lib/product-series.js → esm2020/model/lib/product-series.mjs} +0 -0
  122. package/{esm2015/model/lib/product.js → esm2020/model/lib/product.mjs} +1 -1
  123. package/esm2020/model/lib/promotion.mjs +79 -0
  124. package/{esm2015/model/lib/shipping.js → esm2020/model/lib/shipping.mjs} +0 -0
  125. package/{esm2015/model/lib/user.js → esm2020/model/lib/user.mjs} +0 -0
  126. package/{esm2015/model/public_api.js → esm2020/model/public_api.mjs} +0 -0
  127. package/{esm2015/model/sk-front-lib-model.js → esm2020/model/sk-front-lib-model.mjs} +0 -0
  128. package/{esm2015/public-api.js → esm2020/public-api.mjs} +2 -1
  129. package/esm2020/search-address/dialog/dialog.component.mjs +27 -0
  130. package/{esm2015/search-address/public_api.js → esm2020/search-address/public_api.mjs} +0 -0
  131. package/esm2020/search-address/sk-front-lib-search-address.mjs +5 -0
  132. package/esm2020/search-address/sk-search-address.directive.mjs +41 -0
  133. package/{esm2015/search-address/sk-search-address.model.js → esm2020/search-address/sk-search-address.model.mjs} +0 -0
  134. package/esm2020/search-address/sk-search-address.module.mjs +52 -0
  135. package/{esm2015/search-address/sk-search-address.service.js → esm2020/search-address/sk-search-address.service.mjs} +10 -8
  136. package/esm2020/sk-front-lib.mjs +5 -0
  137. package/{esm2015/uploader/public_api.js → esm2020/uploader/public_api.mjs} +0 -0
  138. package/esm2020/uploader/sk-front-lib-uploader.mjs +5 -0
  139. package/{esm2015/uploader/sk-uploader-file-item.model.js → esm2020/uploader/sk-uploader-file-item.model.mjs} +0 -0
  140. package/{esm2015/uploader/sk-uploader.animation.js → esm2020/uploader/sk-uploader.animation.mjs} +0 -0
  141. package/{esm2015/uploader/sk-uploader.class.js → esm2020/uploader/sk-uploader.class.mjs} +0 -0
  142. package/esm2020/uploader/sk-uploader.component.mjs +120 -0
  143. package/esm2020/uploader/sk-uploader.directive.mjs +44 -0
  144. package/esm2020/uploader/sk-uploader.module.mjs +62 -0
  145. package/fesm2015/sk-front-lib-api.mjs +218 -0
  146. package/fesm2015/sk-front-lib-api.mjs.map +1 -0
  147. package/fesm2015/{sk-front-lib-article.js → sk-front-lib-article.mjs} +183 -158
  148. package/fesm2015/sk-front-lib-article.mjs.map +1 -0
  149. package/fesm2015/sk-front-lib-crud.mjs +1403 -0
  150. package/fesm2015/sk-front-lib-crud.mjs.map +1 -0
  151. package/fesm2015/{sk-front-lib-google-analytics.js → sk-front-lib-google-analytics.mjs} +54 -33
  152. package/fesm2015/sk-front-lib-google-analytics.mjs.map +1 -0
  153. package/fesm2015/{sk-front-lib-image.js → sk-front-lib-image.mjs} +64 -48
  154. package/fesm2015/sk-front-lib-image.mjs.map +1 -0
  155. package/fesm2015/{sk-front-lib-model.js → sk-front-lib-model.mjs} +9 -2
  156. package/fesm2015/sk-front-lib-model.mjs.map +1 -0
  157. package/fesm2015/sk-front-lib-search-address.mjs +188 -0
  158. package/fesm2015/sk-front-lib-search-address.mjs.map +1 -0
  159. package/fesm2015/sk-front-lib-uploader.mjs +551 -0
  160. package/fesm2015/sk-front-lib-uploader.mjs.map +1 -0
  161. package/fesm2015/{sk-front-lib.js → sk-front-lib.mjs} +69 -41
  162. package/fesm2015/sk-front-lib.mjs.map +1 -0
  163. package/{fesm2015/sk-front-lib-api.js → fesm2020/sk-front-lib-api.mjs} +41 -26
  164. package/fesm2020/sk-front-lib-api.mjs.map +1 -0
  165. package/fesm2020/sk-front-lib-article.mjs +771 -0
  166. package/fesm2020/sk-front-lib-article.mjs.map +1 -0
  167. package/{fesm2015/sk-front-lib-crud.js → fesm2020/sk-front-lib-crud.mjs} +213 -236
  168. package/fesm2020/sk-front-lib-crud.mjs.map +1 -0
  169. package/fesm2020/sk-front-lib-google-analytics.mjs +336 -0
  170. package/fesm2020/sk-front-lib-google-analytics.mjs.map +1 -0
  171. package/fesm2020/sk-front-lib-image.mjs +309 -0
  172. package/fesm2020/sk-front-lib-image.mjs.map +1 -0
  173. package/fesm2020/sk-front-lib-model.mjs +1052 -0
  174. package/fesm2020/sk-front-lib-model.mjs.map +1 -0
  175. package/fesm2020/sk-front-lib-search-address.mjs +186 -0
  176. package/fesm2020/sk-front-lib-search-address.mjs.map +1 -0
  177. package/fesm2020/sk-front-lib-uploader.mjs +549 -0
  178. package/fesm2020/sk-front-lib-uploader.mjs.map +1 -0
  179. package/fesm2020/sk-front-lib.mjs +539 -0
  180. package/fesm2020/sk-front-lib.mjs.map +1 -0
  181. package/google-analytics/google-analytics-router.module.d.ts +6 -0
  182. package/google-analytics/google-analytics.module.d.ts +5 -0
  183. package/google-analytics/package.json +5 -6
  184. package/google-analytics/services/google-analytics.service.d.ts +3 -0
  185. package/google-analytics/sk-front-lib-google-analytics.d.ts +1 -0
  186. package/image/package.json +5 -6
  187. package/image/public_api.d.ts +1 -0
  188. package/image/sk-front-lib-image.d.ts +1 -1
  189. package/image/sk-image.component.d.ts +6 -3
  190. package/image/sk-image.module.d.ts +10 -0
  191. package/lib/sk-byte.pipe.d.ts +3 -0
  192. package/lib/sk-date-time.pipe.d.ts +3 -0
  193. package/lib/sk-date.pipe.d.ts +3 -0
  194. package/lib/sk-front-lib.module.d.ts +9 -0
  195. package/lib/sk-keys.pipe.d.ts +3 -0
  196. package/lib/sk-time.pipe.d.ts +3 -0
  197. package/model/lib/product.d.ts +1 -0
  198. package/model/lib/promotion.d.ts +12 -1
  199. package/model/package.json +5 -6
  200. package/model/sk-front-lib-model.d.ts +1 -0
  201. package/package.json +96 -20
  202. package/public-api.d.ts +1 -0
  203. package/search-address/dialog/dialog.component.d.ts +3 -0
  204. package/search-address/package.json +5 -6
  205. package/search-address/sk-front-lib-search-address.d.ts +1 -2
  206. package/search-address/sk-search-address.directive.d.ts +3 -0
  207. package/search-address/sk-search-address.module.d.ts +12 -0
  208. package/search-address/sk-search-address.service.d.ts +3 -0
  209. package/sk-front-lib.d.ts +1 -1
  210. package/uploader/package.json +5 -6
  211. package/uploader/sk-front-lib-uploader.d.ts +1 -1
  212. package/uploader/sk-uploader.component.d.ts +3 -0
  213. package/uploader/sk-uploader.directive.d.ts +3 -0
  214. package/uploader/sk-uploader.module.d.ts +14 -0
  215. package/api/sk-front-lib-api.metadata.json +0 -1
  216. package/article/sk-front-lib-article.metadata.json +0 -1
  217. package/bundles/sk-front-lib-api.umd.js +0 -230
  218. package/bundles/sk-front-lib-api.umd.js.map +0 -1
  219. package/bundles/sk-front-lib-api.umd.min.js +0 -2
  220. package/bundles/sk-front-lib-api.umd.min.js.map +0 -1
  221. package/bundles/sk-front-lib-article.umd.js +0 -772
  222. package/bundles/sk-front-lib-article.umd.js.map +0 -1
  223. package/bundles/sk-front-lib-article.umd.min.js +0 -2
  224. package/bundles/sk-front-lib-article.umd.min.js.map +0 -1
  225. package/bundles/sk-front-lib-crud.umd.js +0 -1846
  226. package/bundles/sk-front-lib-crud.umd.js.map +0 -1
  227. package/bundles/sk-front-lib-crud.umd.min.js +0 -2
  228. package/bundles/sk-front-lib-crud.umd.min.js.map +0 -1
  229. package/bundles/sk-front-lib-google-analytics.umd.js +0 -673
  230. package/bundles/sk-front-lib-google-analytics.umd.js.map +0 -1
  231. package/bundles/sk-front-lib-google-analytics.umd.min.js +0 -16
  232. package/bundles/sk-front-lib-google-analytics.umd.min.js.map +0 -1
  233. package/bundles/sk-front-lib-image.umd.js +0 -312
  234. package/bundles/sk-front-lib-image.umd.js.map +0 -1
  235. package/bundles/sk-front-lib-image.umd.min.js +0 -2
  236. package/bundles/sk-front-lib-image.umd.min.js.map +0 -1
  237. package/bundles/sk-front-lib-model.umd.js +0 -1464
  238. package/bundles/sk-front-lib-model.umd.js.map +0 -1
  239. package/bundles/sk-front-lib-model.umd.min.js +0 -16
  240. package/bundles/sk-front-lib-model.umd.min.js.map +0 -1
  241. package/bundles/sk-front-lib-search-address.umd.js +0 -182
  242. package/bundles/sk-front-lib-search-address.umd.js.map +0 -1
  243. package/bundles/sk-front-lib-search-address.umd.min.js +0 -2
  244. package/bundles/sk-front-lib-search-address.umd.min.js.map +0 -1
  245. package/bundles/sk-front-lib-uploader.umd.js +0 -534
  246. package/bundles/sk-front-lib-uploader.umd.js.map +0 -1
  247. package/bundles/sk-front-lib-uploader.umd.min.js +0 -2
  248. package/bundles/sk-front-lib-uploader.umd.min.js.map +0 -1
  249. package/bundles/sk-front-lib.umd.js +0 -546
  250. package/bundles/sk-front-lib.umd.js.map +0 -1
  251. package/bundles/sk-front-lib.umd.min.js +0 -2
  252. package/bundles/sk-front-lib.umd.min.js.map +0 -1
  253. package/crud/sk-front-lib-crud.metadata.json +0 -1
  254. package/esm2015/api/sk-api.module.js +0 -24
  255. package/esm2015/api/sk-api.service.js +0 -144
  256. package/esm2015/article/sk-article-editor-server.component.js +0 -54
  257. package/esm2015/article/sk-article-editor.component.js +0 -85
  258. package/esm2015/article/sk-article-server.module.js +0 -26
  259. package/esm2015/article/sk-article.module.js +0 -23
  260. package/esm2015/article/sk-article.service.js +0 -235
  261. package/esm2015/article/sk-froala-editor.directive.js +0 -320
  262. package/esm2015/crud/sk-account.service.js +0 -38
  263. package/esm2015/crud/sk-auth-admin.guard.js +0 -35
  264. package/esm2015/crud/sk-auth.guard.js +0 -35
  265. package/esm2015/crud/sk-auth.service.js +0 -71
  266. package/esm2015/crud/sk-board.service.js +0 -55
  267. package/esm2015/crud/sk-brand.service.js +0 -47
  268. package/esm2015/crud/sk-cart.service.js +0 -260
  269. package/esm2015/crud/sk-category.service.js +0 -64
  270. package/esm2015/crud/sk-comment.service.js +0 -44
  271. package/esm2015/crud/sk-config.service.js +0 -33
  272. package/esm2015/crud/sk-contact.service.js +0 -40
  273. package/esm2015/crud/sk-coupon.service.js +0 -63
  274. package/esm2015/crud/sk-document.service.js +0 -96
  275. package/esm2015/crud/sk-etc.service.js +0 -27
  276. package/esm2015/crud/sk-file.service.js +0 -38
  277. package/esm2015/crud/sk-front-lib-crud.js +0 -6
  278. package/esm2015/crud/sk-keyword.service.js +0 -47
  279. package/esm2015/crud/sk-order.service.js +0 -134
  280. package/esm2015/crud/sk-point.service.js +0 -46
  281. package/esm2015/crud/sk-product.service.js +0 -154
  282. package/esm2015/crud/sk-promotion.service.js +0 -82
  283. package/esm2015/crud/sk-search.service.js +0 -26
  284. package/esm2015/crud/sk-store.service.js +0 -48
  285. package/esm2015/crud/sk-user.service.js +0 -70
  286. package/esm2015/google-analytics/google-analytics-router.module.js +0 -19
  287. package/esm2015/google-analytics/google-analytics.module.js +0 -33
  288. package/esm2015/google-analytics/initializers/google-analytics-router.initializer.js +0 -25
  289. package/esm2015/google-analytics/initializers/google-analytics.initializer.js +0 -47
  290. package/esm2015/google-analytics/services/google-analytics.service.js +0 -199
  291. package/esm2015/image/public_api.js +0 -2
  292. package/esm2015/image/sk-front-lib-image.js +0 -6
  293. package/esm2015/image/sk-image.component.js +0 -258
  294. package/esm2015/image/sk-image.module.js +0 -28
  295. package/esm2015/lib/sk-byte.pipe.js +0 -14
  296. package/esm2015/lib/sk-date-time.pipe.js +0 -12
  297. package/esm2015/lib/sk-date.pipe.js +0 -12
  298. package/esm2015/lib/sk-front-lib.module.js +0 -29
  299. package/esm2015/lib/sk-keys.pipe.js +0 -19
  300. package/esm2015/lib/sk-time.pipe.js +0 -12
  301. package/esm2015/model/lib/promotion.js +0 -72
  302. package/esm2015/search-address/dialog/dialog.component.js +0 -28
  303. package/esm2015/search-address/sk-front-lib-search-address.js +0 -7
  304. package/esm2015/search-address/sk-search-address.directive.js +0 -39
  305. package/esm2015/search-address/sk-search-address.module.js +0 -34
  306. package/esm2015/sk-front-lib.js +0 -6
  307. package/esm2015/uploader/sk-front-lib-uploader.js +0 -6
  308. package/esm2015/uploader/sk-uploader.component.js +0 -106
  309. package/esm2015/uploader/sk-uploader.directive.js +0 -40
  310. package/esm2015/uploader/sk-uploader.module.js +0 -39
  311. package/fesm2015/sk-front-lib-api.js.map +0 -1
  312. package/fesm2015/sk-front-lib-article.js.map +0 -1
  313. package/fesm2015/sk-front-lib-crud.js.map +0 -1
  314. package/fesm2015/sk-front-lib-google-analytics.js.map +0 -1
  315. package/fesm2015/sk-front-lib-image.js.map +0 -1
  316. package/fesm2015/sk-front-lib-model.js.map +0 -1
  317. package/fesm2015/sk-front-lib-search-address.js +0 -166
  318. package/fesm2015/sk-front-lib-search-address.js.map +0 -1
  319. package/fesm2015/sk-front-lib-uploader.js +0 -510
  320. package/fesm2015/sk-front-lib-uploader.js.map +0 -1
  321. package/fesm2015/sk-front-lib.js.map +0 -1
  322. package/google-analytics/sk-front-lib-google-analytics.metadata.json +0 -1
  323. package/image/sk-front-lib-image.metadata.json +0 -1
  324. package/model/sk-front-lib-model.metadata.json +0 -1
  325. package/search-address/sk-front-lib-search-address.metadata.json +0 -1
  326. package/sk-front-lib.metadata.json +0 -1
  327. package/uploader/sk-front-lib-uploader.metadata.json +0 -1
@@ -1,1846 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('sk-front-lib/api'), require('sk-front-lib/model'), require('@angular/router'), require('rxjs'), require('@angular/common/http'), require('sk-front-lib'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('sk-front-lib/crud', ['exports', '@angular/core', 'rxjs/operators', 'sk-front-lib/api', 'sk-front-lib/model', '@angular/router', 'rxjs', '@angular/common/http', 'sk-front-lib', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sk-front-lib'] = global['sk-front-lib'] || {}, global['sk-front-lib'].crud = {}), global.ng.core, global.rxjs.operators, global['sk-front-lib'].api, global['sk-front-lib'].model, global.ng.router, global.rxjs, global.ng.common.http, global['sk-front-lib'], global.ng.common));
5
- }(this, (function (exports, i0, operators, i1, model, i2, rxjs, http, skFrontLib, common) { 'use strict';
6
-
7
- var SkFileService = /** @class */ (function () {
8
- function SkFileService(_apiService) {
9
- this._apiService = _apiService;
10
- this.apiServer = _apiService.apiServer;
11
- }
12
- SkFileService.prototype.getFile = function (id) {
13
- return this._apiService.get("/api/admin/files/" + id)
14
- .pipe(operators.map(function (result) { return new model.SkFile(result.data); }));
15
- };
16
- SkFileService.prototype.getAdminFiles = function (params) {
17
- if (params === void 0) { params = new i1.ApiPageableParam(); }
18
- return this._apiService.getPageable("/api/admin/files", params.buildHttpParams()).pipe(operators.map(function (response) {
19
- response.data.content = (response.data.content || []).map(function (item) { return new model.SkFile(item); });
20
- return response.data;
21
- }));
22
- };
23
- SkFileService.prototype.deleteAdminFile = function (id) {
24
- return this._apiService.delete("/api/admin/files/" + id);
25
- };
26
- SkFileService.prototype.updateAdminFile = function (id, data) {
27
- return this._apiService.put("/api/admin/files/" + id, data).pipe(operators.map(function (result) { return new model.SkFile(result.data); }));
28
- };
29
- return SkFileService;
30
- }());
31
- SkFileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkFileService_Factory() { return new SkFileService(i0.ɵɵinject(i1.SkApiService)); }, token: SkFileService, providedIn: "root" });
32
- SkFileService.decorators = [
33
- { type: i0.Injectable, args: [{
34
- providedIn: 'root'
35
- },] }
36
- ];
37
- SkFileService.ctorParameters = function () { return [
38
- { type: i1.SkApiService }
39
- ]; };
40
-
41
- var SkAuthService = /** @class */ (function () {
42
- function SkAuthService(_router, apiService) {
43
- this._router = _router;
44
- this.apiService = apiService;
45
- this.baseUrl = '/api/auth';
46
- this._userinfo$ = new rxjs.BehaviorSubject(new model.SkUser());
47
- }
48
- Object.defineProperty(SkAuthService.prototype, "userinfo$", {
49
- get: function () {
50
- return this._userinfo$.asObservable();
51
- },
52
- enumerable: false,
53
- configurable: true
54
- });
55
- SkAuthService.prototype.moveLoginPage = function () {
56
- return this._router.navigate([this.apiService.loginUrl, { returnUrl: this._router.url }]);
57
- };
58
- SkAuthService.prototype.login = function (data) {
59
- var _this = this;
60
- return this.apiService.post(this.baseUrl + '/signin', data).pipe(operators.tap(function (response) {
61
- if (response.status === 200) {
62
- _this.apiService.setToken(response.data.token);
63
- }
64
- }), operators.map(function (response) { return response.data; }));
65
- };
66
- SkAuthService.prototype.logout = function () {
67
- this._userinfo$.next(new model.SkUser());
68
- this.apiService.clearToken();
69
- };
70
- SkAuthService.prototype.loadMyInfo = function (refresh) {
71
- var _this = this;
72
- if (refresh === void 0) { refresh = false; }
73
- if (this.apiService.getToken()) {
74
- if (this._userinfo$.getValue().isAnonymous() || refresh) {
75
- return this.apiService.get(this.baseUrl + '/me').pipe(operators.map(function (result) { return !!result.data ? new model.SkUser(result.data) : new model.SkUser(); }), operators.catchError(function (err) { return rxjs.of(new model.SkUser()); }), operators.tap(function (user) { return _this._userinfo$.next(user); }), operators.switchMap(function () { return rxjs.of(_this._userinfo$.getValue()); }));
76
- }
77
- }
78
- return rxjs.of(this._userinfo$.getValue());
79
- };
80
- SkAuthService.prototype.checkAdminAccessable = function () {
81
- return this.loadMyInfo().pipe(operators.map(function (result) { return result.isAdminAccessable(); }));
82
- };
83
- SkAuthService.prototype.checkLogin = function () {
84
- return this.loadMyInfo().pipe(operators.map(function (result) { return !result.isAnonymous(); }));
85
- };
86
- SkAuthService.prototype.sendMailForActivateAccount = function (email) {
87
- return this.apiService.post(this.baseUrl + '/activate-account', { email: email }).pipe(operators.map(function (response) { return response.data; }));
88
- };
89
- SkAuthService.prototype.sendMailForResetPassword = function (email) {
90
- return this.apiService.post(this.baseUrl + '/reset-password', { email: email }).pipe(operators.map(function (response) { return response.data; }));
91
- };
92
- SkAuthService.prototype.requestActivateAccount = function (data) {
93
- return this.apiService.post(this.baseUrl + '/activate-account-complete', data).pipe(operators.map(function (response) { return response.data; }));
94
- };
95
- SkAuthService.prototype.updatePassword = function (data) {
96
- return this.apiService.post(this.baseUrl + '/update-password', data).pipe(operators.map(function (response) { return response.data; }));
97
- };
98
- return SkAuthService;
99
- }());
100
- SkAuthService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkAuthService_Factory() { return new SkAuthService(i0.ɵɵinject(i2.Router), i0.ɵɵinject(i1.SkApiService)); }, token: SkAuthService, providedIn: "root" });
101
- SkAuthService.decorators = [
102
- { type: i0.Injectable, args: [{
103
- providedIn: 'root'
104
- },] }
105
- ];
106
- SkAuthService.ctorParameters = function () { return [
107
- { type: i2.Router },
108
- { type: i1.SkApiService }
109
- ]; };
110
-
111
- var SkAuthGuard = /** @class */ (function () {
112
- function SkAuthGuard(authService, router) {
113
- this.authService = authService;
114
- this.router = router;
115
- }
116
- SkAuthGuard.prototype.canActivate = function (route, state) {
117
- var _this = this;
118
- return this.authService.checkLogin()
119
- .pipe(operators.tap(function (logged) {
120
- if (!logged) {
121
- _this.router.navigate(['/login', { returnUrl: state.url }]);
122
- }
123
- }));
124
- };
125
- SkAuthGuard.prototype.canActivateChild = function (route, state) {
126
- return this.canActivate(route, state);
127
- };
128
- return SkAuthGuard;
129
- }());
130
- SkAuthGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkAuthGuard_Factory() { return new SkAuthGuard(i0.ɵɵinject(SkAuthService), i0.ɵɵinject(i2.Router)); }, token: SkAuthGuard, providedIn: "root" });
131
- SkAuthGuard.decorators = [
132
- { type: i0.Injectable, args: [{
133
- providedIn: 'root'
134
- },] }
135
- ];
136
- SkAuthGuard.ctorParameters = function () { return [
137
- { type: SkAuthService },
138
- { type: i2.Router }
139
- ]; };
140
-
141
- var SkAuthAdminGuard = /** @class */ (function () {
142
- function SkAuthAdminGuard(authService, router) {
143
- this.authService = authService;
144
- this.router = router;
145
- }
146
- SkAuthAdminGuard.prototype.canActivate = function (route, state) {
147
- var _this = this;
148
- return this.authService.checkAdminAccessable()
149
- .pipe(operators.tap(function (logged) {
150
- if (!logged) {
151
- _this.router.navigate(['/login', { returnUrl: state.url }]);
152
- }
153
- }));
154
- };
155
- SkAuthAdminGuard.prototype.canActivateChild = function (route, state) {
156
- return this.canActivate(route, state);
157
- };
158
- return SkAuthAdminGuard;
159
- }());
160
- SkAuthAdminGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkAuthAdminGuard_Factory() { return new SkAuthAdminGuard(i0.ɵɵinject(SkAuthService), i0.ɵɵinject(i2.Router)); }, token: SkAuthAdminGuard, providedIn: "root" });
161
- SkAuthAdminGuard.decorators = [
162
- { type: i0.Injectable, args: [{
163
- providedIn: 'root'
164
- },] }
165
- ];
166
- SkAuthAdminGuard.ctorParameters = function () { return [
167
- { type: SkAuthService },
168
- { type: i2.Router }
169
- ]; };
170
-
171
- var SkUserService = /** @class */ (function () {
172
- function SkUserService(_apiService) {
173
- this._apiService = _apiService;
174
- }
175
- SkUserService.prototype.getUser = function (id) {
176
- return this._apiService.get("/api/public/users/" + id).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
177
- };
178
- SkUserService.prototype.getAdminUser = function (id) {
179
- return this._apiService.get("/api/admin/users/" + id).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
180
- };
181
- SkUserService.prototype.getAdminUserByEmail = function (email) {
182
- return this._apiService.get("/api/admin/users/email/" + email).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
183
- };
184
- SkUserService.prototype.getUsers = function (params) {
185
- if (params === void 0) { params = new i1.ApiPageableParam(); }
186
- return this._apiService.getPageable("/api/public/users", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
187
- };
188
- SkUserService.prototype.getAdminUsers = function (params) {
189
- if (params === void 0) { params = new i1.ApiPageableParam(); }
190
- return this._apiService.getPageable("/api/admin/users", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
191
- };
192
- SkUserService.prototype.createAdminUser = function (data) {
193
- return this._apiService.post("/api/admin/users", data).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
194
- };
195
- SkUserService.prototype.updateUser = function (data) {
196
- return this._apiService.put("/api/public/users/me", data).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
197
- };
198
- SkUserService.prototype.updateAdminUser = function (id, data) {
199
- return this._apiService.put("/api/admin/users/" + id, data).pipe(operators.map(function (response) { return new model.SkUser(response.data); }));
200
- };
201
- SkUserService.prototype.activateAdminUsers = function (users) {
202
- return this._apiService.put("/api/admin/users/activate/" + users.map(function (user) { return user.id; }).join(','), null);
203
- };
204
- SkUserService.prototype.deactivateAdminUsers = function (users) {
205
- return this._apiService.put("/api/admin/users/deactivate/" + users.map(function (user) { return user.id; }).join(','), null);
206
- };
207
- SkUserService.prototype.deleteAdminUsers = function (users) {
208
- return this._apiService.delete("/api/admin/users/delete/" + users.map(function (user) { return user.id; }).join(','));
209
- };
210
- SkUserService.prototype.getAdminUsersCount = function () {
211
- return this._apiService.get('/api/admin/users/count')
212
- .pipe(operators.map(function (response) { return response.data; }));
213
- };
214
- SkUserService.prototype.signup = function (data) {
215
- var _this = this;
216
- return this._apiService.post('/api/auth/signup', data)
217
- .pipe(operators.tap(function (response) {
218
- if (response.status === 200) {
219
- _this._apiService.setToken(response.data.token);
220
- }
221
- }), operators.map(function (response) { return response.data; }));
222
- };
223
- SkUserService.prototype.isEmailExists = function (email) {
224
- return this._apiService.get('/api/public/users/exists/email', new http.HttpParams().append('email', email)).pipe(operators.map(function (response) { return response.data; }));
225
- };
226
- return SkUserService;
227
- }());
228
- SkUserService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkUserService_Factory() { return new SkUserService(i0.ɵɵinject(i1.SkApiService)); }, token: SkUserService, providedIn: "root" });
229
- SkUserService.decorators = [
230
- { type: i0.Injectable, args: [{
231
- providedIn: 'root'
232
- },] }
233
- ];
234
- SkUserService.ctorParameters = function () { return [
235
- { type: i1.SkApiService }
236
- ]; };
237
-
238
- var SkDocumentService = /** @class */ (function () {
239
- function SkDocumentService(_apiService) {
240
- this._apiService = _apiService;
241
- }
242
- SkDocumentService.prototype.getDocument = function (id) {
243
- return this._apiService.get("/api/public/documents/" + id).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
244
- };
245
- SkDocumentService.prototype.getDocumentByUrl = function (url) {
246
- return this._apiService.get("/api/public/documents/url/" + url).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
247
- };
248
- SkDocumentService.prototype.getAdminDocument = function (id) {
249
- return this._apiService.get("/api/admin/documents/" + id).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
250
- };
251
- SkDocumentService.prototype.getDocumentProduct = function (id) {
252
- return this._apiService.get("/api/public/documents/" + id + "/product").pipe(operators.map(function (response) { return response.data; }));
253
- };
254
- SkDocumentService.prototype.getAdminDocumentProduct = function (id) {
255
- return this._apiService.get("/api/admin/documents/" + id + "/product").pipe(operators.map(function (response) { return response.data; }));
256
- };
257
- SkDocumentService.prototype.getDocuments = function (params) {
258
- if (params === void 0) { params = new i1.ApiPageableParam(); }
259
- return this._apiService.getPageable("/api/public/documents", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
260
- };
261
- SkDocumentService.prototype.getAdminDocuments = function (params) {
262
- if (params === void 0) { params = new i1.ApiPageableParam(); }
263
- return this._apiService.getPageable("/api/admin/documents", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
264
- };
265
- SkDocumentService.prototype.getDocumentsArray = function (ids) {
266
- return this._apiService.get("/api/public/documents/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
267
- };
268
- SkDocumentService.prototype.getAdminDocumentsArray = function (ids) {
269
- return this._apiService.get("/api/admin/documents/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
270
- };
271
- SkDocumentService.prototype.createAdminDocument = function (data) {
272
- return this._apiService.post("/api/admin/documents", data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
273
- };
274
- SkDocumentService.prototype.writePost = function (data) {
275
- return this._apiService.post("/api/public/documents", data).pipe(operators.map(function (response) { return response.data; }));
276
- };
277
- SkDocumentService.prototype.deletePost = function (id) {
278
- return this._apiService.delete("/api/public/documents/" + id).pipe(operators.map(function (response) { return response.data; }));
279
- };
280
- SkDocumentService.prototype.updateDocument = function (id, data) {
281
- return this._apiService.put("/api/public/documents/" + id, data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
282
- };
283
- SkDocumentService.prototype.updateAdminDocument = function (id, data) {
284
- return this._apiService.put("/api/admin/documents/" + id, data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
285
- };
286
- SkDocumentService.prototype.updateAdminDocumentArticle = function (id, data) {
287
- return this._apiService.put("/api/admin/documents/" + id + "/article", data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
288
- };
289
- SkDocumentService.prototype.updateAdminDocumentImage = function (id, data) {
290
- return this._apiService.put("/api/admin/documents/" + id + "/image", data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
291
- };
292
- SkDocumentService.prototype.updateAdminDocumentProduct = function (id, data) {
293
- return this._apiService.put("/api/admin/documents/" + id + "/product", data).pipe(operators.map(function (response) { return response.data; }));
294
- };
295
- SkDocumentService.prototype.updateAdminDocumentOpengraph = function (id, data) {
296
- return this._apiService.put("/api/admin/documents/" + id + "/opengraph", data).pipe(operators.map(function (response) { return new model.SkDocument(response.data); }));
297
- };
298
- SkDocumentService.prototype.activateAdminDocuments = function (documents) {
299
- return this._apiService.put("/api/admin/documents/activate/" + documents.map(function (document) { return document.id; }).join(','), null);
300
- };
301
- SkDocumentService.prototype.deactivateAdminDocuments = function (documents) {
302
- return this._apiService.put("/api/admin/documents/deactivate/" + documents.map(function (document) { return document.id; }).join(','), null);
303
- };
304
- SkDocumentService.prototype.deleteAdminDocuments = function (documents) {
305
- return this._apiService.delete("/api/admin/documents/delete/" + documents.map(function (document) { return document.id; }).join(','));
306
- };
307
- SkDocumentService.prototype.getAdminDocumentsCount = function () {
308
- return this._apiService.get('/api/admin/documents/count')
309
- .pipe(operators.map(function (response) { return response.data; }));
310
- };
311
- SkDocumentService.prototype.getNextDocumentId = function (id) {
312
- return this._apiService.get("/api/public/documents/" + id + "/next")
313
- .pipe(operators.map(function (response) { return response.data; }));
314
- };
315
- SkDocumentService.prototype.getPrevDocumentId = function (id) {
316
- return this._apiService.get("/api/public/documents/" + id + "/prev")
317
- .pipe(operators.map(function (response) { return response.data; }));
318
- };
319
- return SkDocumentService;
320
- }());
321
- SkDocumentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkDocumentService_Factory() { return new SkDocumentService(i0.ɵɵinject(i1.SkApiService)); }, token: SkDocumentService, providedIn: "root" });
322
- SkDocumentService.decorators = [
323
- { type: i0.Injectable, args: [{
324
- providedIn: 'root'
325
- },] }
326
- ];
327
- SkDocumentService.ctorParameters = function () { return [
328
- { type: i1.SkApiService }
329
- ]; };
330
-
331
- var SkBoardService = /** @class */ (function () {
332
- function SkBoardService(_apiService) {
333
- this._apiService = _apiService;
334
- }
335
- SkBoardService.prototype.getBoard = function (url, params) {
336
- if (params === void 0) { params = new i1.ApiPageableParam(); }
337
- return this._apiService.get("/api/public/boards/" + url, params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
338
- };
339
- SkBoardService.prototype.getAdminBoard = function (id) {
340
- return this._apiService.get("/api/admin/boards/" + id).pipe(operators.map(function (response) { return new model.SkBoard(response.data); }));
341
- };
342
- SkBoardService.prototype.getBoards = function (showSupport) {
343
- if (showSupport === void 0) { showSupport = false; }
344
- return this._apiService.get("/api/public/boards", new http.HttpParams().append('showSupport', String(showSupport))).pipe(operators.map(function (response) { return response.data; }));
345
- };
346
- SkBoardService.prototype.getAdminBoards = function (params) {
347
- if (params === void 0) { params = new i1.ApiPageableParam(); }
348
- return this._apiService.getPageable("/api/admin/boards", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
349
- };
350
- SkBoardService.prototype.createAdminBoard = function (data) {
351
- return this._apiService.post("/api/admin/boards", data).pipe(operators.map(function (response) { return new model.SkBoard(response.data); }));
352
- };
353
- SkBoardService.prototype.updateBoard = function (id, data) {
354
- return this._apiService.put("/api/public/boards/" + id, data).pipe(operators.map(function (response) { return new model.SkBoard(response.data); }));
355
- };
356
- SkBoardService.prototype.updateAdminBoard = function (id, data) {
357
- return this._apiService.put("/api/admin/boards/" + id, data).pipe(operators.map(function (response) { return new model.SkBoard(response.data); }));
358
- };
359
- SkBoardService.prototype.getAllNoticeDocuments = function () {
360
- return this._apiService.get("/api/public/boards/notices").pipe(operators.map(function (response) { return (response.data || []); }));
361
- };
362
- SkBoardService.prototype.activateAdminBoards = function (boards) {
363
- return this._apiService.put("/api/admin/boards/activate/" + boards.map(function (board) { return board.id; }).join(','), null);
364
- };
365
- SkBoardService.prototype.deactivateAdminBoards = function (boards) {
366
- return this._apiService.put("/api/admin/boards/deactivate/" + boards.map(function (board) { return board.id; }).join(','), null);
367
- };
368
- SkBoardService.prototype.deleteAdminBoards = function (boards) {
369
- return this._apiService.delete("/api/admin/boards/delete/" + boards.map(function (board) { return board.id; }).join(','));
370
- };
371
- return SkBoardService;
372
- }());
373
- SkBoardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkBoardService_Factory() { return new SkBoardService(i0.ɵɵinject(i1.SkApiService)); }, token: SkBoardService, providedIn: "root" });
374
- SkBoardService.decorators = [
375
- { type: i0.Injectable, args: [{
376
- providedIn: 'root'
377
- },] }
378
- ];
379
- SkBoardService.ctorParameters = function () { return [
380
- { type: i1.SkApiService }
381
- ]; };
382
-
383
- var SkBrandService = /** @class */ (function () {
384
- function SkBrandService(_apiService) {
385
- this._apiService = _apiService;
386
- }
387
- SkBrandService.prototype.getBrand = function (id) {
388
- return this._apiService.get("/api/public/brands/" + id).pipe(operators.map(function (response) { return response.data; }));
389
- };
390
- SkBrandService.prototype.getAdminBrand = function (id) {
391
- return this._apiService.get("/api/admin/brands/" + id).pipe(operators.map(function (response) { return response.data; }));
392
- };
393
- SkBrandService.prototype.getBrands = function (params) {
394
- if (params === void 0) { params = new i1.ApiPageableParam(); }
395
- return this._apiService.getPageable("/api/public/brands", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
396
- };
397
- SkBrandService.prototype.getAllBrands = function (params) {
398
- if (params === void 0) { params = new i1.ApiPageableParam(); }
399
- return this._apiService.get("/api/public/brands/all", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
400
- };
401
- SkBrandService.prototype.getAdminBrands = function (params) {
402
- if (params === void 0) { params = new i1.ApiPageableParam(); }
403
- return this._apiService.getPageable("/api/admin/brands", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
404
- };
405
- SkBrandService.prototype.getAdminAllBrands = function () {
406
- return this._apiService.get("/api/admin/brands/all").pipe(operators.map(function (response) { return response.data; }));
407
- };
408
- SkBrandService.prototype.createAdminBrand = function (data) {
409
- return this._apiService.post("/api/admin/brands", data).pipe(operators.map(function (response) { return response.data; }));
410
- };
411
- SkBrandService.prototype.updateAdminBrand = function (id, data) {
412
- return this._apiService.put("/api/admin/brands/" + id, data).pipe(operators.map(function (response) { return response.data; }));
413
- };
414
- SkBrandService.prototype.deleteAdminBrands = function (brands) {
415
- return this._apiService.delete("/api/admin/brands/delete/" + brands.map(function (brand) { return brand.id; }).join(','));
416
- };
417
- return SkBrandService;
418
- }());
419
- SkBrandService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkBrandService_Factory() { return new SkBrandService(i0.ɵɵinject(i1.SkApiService)); }, token: SkBrandService, providedIn: "root" });
420
- SkBrandService.decorators = [
421
- { type: i0.Injectable, args: [{
422
- providedIn: 'root'
423
- },] }
424
- ];
425
- SkBrandService.ctorParameters = function () { return [
426
- { type: i1.SkApiService }
427
- ]; };
428
-
429
- var SkCategoryService = /** @class */ (function () {
430
- function SkCategoryService(_apiService) {
431
- this._apiService = _apiService;
432
- }
433
- SkCategoryService.prototype.getCategory = function (id) {
434
- return this._apiService.get("/api/public/categories/" + id).pipe(operators.map(function (response) { return response.data; }));
435
- };
436
- SkCategoryService.prototype.getAdminCategory = function (id) {
437
- return this._apiService.get("/api/admin/categories/" + id).pipe(operators.map(function (response) { return response.data; }));
438
- };
439
- SkCategoryService.prototype.getCategories = function (type) {
440
- return this._apiService.get("/api/public/categories").pipe(operators.map(function (response) { return response.data.filter(function (item) { return item.type === type; }); }));
441
- };
442
- SkCategoryService.prototype.getAdminAllCategories = function () {
443
- return this._apiService.get("/api/admin/categories/all").pipe(operators.map(function (response) { return response.data; }));
444
- };
445
- SkCategoryService.prototype.getAdminCategories = function (params) {
446
- if (params === void 0) { params = new i1.ApiPageableParam(); }
447
- return this._apiService.getPageable("/api/admin/categories", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
448
- };
449
- SkCategoryService.prototype.getAdminSsubCategoryItems = function (params) {
450
- if (params === void 0) { params = new i1.ApiPageableParam(); }
451
- return this._apiService.getPageable("/api/admin/categories/subitems", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
452
- };
453
- SkCategoryService.prototype.getAdminCategoriesDetail = function (idArray) {
454
- return this._apiService.get("/api/admin/categories/detail/" + idArray.join(',')).pipe(operators.map(function (response) { return (response.data || []).map(function (value) {
455
- return Object.assign({}, { subCategories: [] }, value);
456
- }); }));
457
- };
458
- SkCategoryService.prototype.createAdminCategory = function (data) {
459
- return this._apiService.post("/api/admin/categories", data).pipe(operators.map(function (response) { return response.data; }));
460
- };
461
- SkCategoryService.prototype.updateAdminCategory = function (id, data) {
462
- return this._apiService.put("/api/admin/categories/" + id, data).pipe(operators.map(function (response) { return response.data; }));
463
- };
464
- SkCategoryService.prototype.deleteAdminCategories = function (categories) {
465
- return this._apiService.delete("/api/admin/categories/delete/" + categories.map(function (category) { return category.id; }).join(','));
466
- };
467
- SkCategoryService.prototype.createAdminSubCategory = function (categoryId, data) {
468
- return this._apiService.post("/api/admin/categories/" + categoryId + "/sub", data).pipe(operators.map(function (response) { return response.data; }));
469
- };
470
- SkCategoryService.prototype.createAdminSubCategoryItem = function (categoryId, subCategoryId, data) {
471
- return this._apiService.post("/api/admin/categories/" + categoryId + "/sub/" + subCategoryId, data).pipe(operators.map(function (response) { return response.data; }));
472
- };
473
- SkCategoryService.prototype.deleteAdminSubCategory = function (categoryId, subCategoryId) {
474
- return this._apiService.delete("/api/admin/categories/" + categoryId + "/sub/" + subCategoryId).pipe(operators.map(function (response) { return response.data; }));
475
- };
476
- SkCategoryService.prototype.deleteAdminSubCategoryItem = function (categoryId, subCategoryId, subCategoryItemId) {
477
- return this._apiService.delete("/api/admin/categories/" + categoryId + "/sub/" + subCategoryId + "/" + subCategoryItemId).pipe(operators.map(function (response) { return response.data; }));
478
- };
479
- return SkCategoryService;
480
- }());
481
- SkCategoryService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCategoryService_Factory() { return new SkCategoryService(i0.ɵɵinject(i1.SkApiService)); }, token: SkCategoryService, providedIn: "root" });
482
- SkCategoryService.decorators = [
483
- { type: i0.Injectable, args: [{
484
- providedIn: 'root'
485
- },] }
486
- ];
487
- SkCategoryService.ctorParameters = function () { return [
488
- { type: i1.SkApiService }
489
- ]; };
490
-
491
- var SkProductService = /** @class */ (function () {
492
- function SkProductService(_apiService) {
493
- this._apiService = _apiService;
494
- }
495
- SkProductService.prototype.getProduct = function (url) {
496
- return this._apiService.get("/api/public/products/" + url).pipe(operators.map(function (response) { return response.data; }));
497
- };
498
- SkProductService.prototype.getAdminProduct = function (id) {
499
- return this._apiService.get("/api/admin/products/" + id).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
500
- };
501
- SkProductService.prototype.getProducts = function (params) {
502
- if (params === void 0) { params = new i1.ApiPageableParam(); }
503
- return this._apiService.getPageable("/api/public/products", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
504
- };
505
- SkProductService.prototype.getAdminProducts = function (params) {
506
- if (params === void 0) { params = new i1.ApiPageableParam(); }
507
- return this._apiService.getPageable("/api/admin/products", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
508
- };
509
- SkProductService.prototype.getProductsArray = function (ids) {
510
- return this._apiService.get("/api/public/products/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
511
- };
512
- SkProductService.prototype.getAdminProductsArray = function (ids) {
513
- return this._apiService.get("/api/admin/products/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
514
- };
515
- SkProductService.prototype.createAdminProduct = function (data) {
516
- return this._apiService.post("/api/admin/products", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
517
- };
518
- SkProductService.prototype.updateProduct = function (id, data) {
519
- return this._apiService.put("/api/public/products/" + id, data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
520
- };
521
- SkProductService.prototype.updateAdminProduct = function (id, data) {
522
- return this._apiService.put("/api/admin/products/" + id, data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
523
- };
524
- SkProductService.prototype.updateAdminProductPrice = function (id, data) {
525
- return this._apiService.put("/api/admin/products/" + id + "/price", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
526
- };
527
- SkProductService.prototype.updateAdminProductOpengraph = function (id, data) {
528
- return this._apiService.put("/api/admin/products/" + id + "/opengraph", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
529
- };
530
- SkProductService.prototype.updateAdminProductNaverEP = function (id, data) {
531
- return this._apiService.put("/api/admin/products/" + id + "/naverep", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
532
- };
533
- SkProductService.prototype.updateAdminProductCatalog = function (id, data) {
534
- return this._apiService.put("/api/admin/products/" + id + "/catalog", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
535
- };
536
- SkProductService.prototype.updateAdminProductOption = function (id, data) {
537
- return this._apiService.put("/api/admin/products/" + id + "/option", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
538
- };
539
- SkProductService.prototype.updateAdminProductPackage = function (id, data) {
540
- return this._apiService.put("/api/admin/products/" + id + "/package", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
541
- };
542
- SkProductService.prototype.getAdminPackageChildrenOptions = function (id) {
543
- return this._apiService.get("/api/admin/products/" + id + "/package/children-options").pipe(operators.map(function (response) { return response.data; }));
544
- };
545
- SkProductService.prototype.getAdminPackageChildrenImages = function (id) {
546
- return this._apiService.get("/api/admin/products/" + id + "/package/children-images").pipe(operators.map(function (response) { return (response.data || []).map(function (item) { return new model.SkFile(item); }); }));
547
- };
548
- SkProductService.prototype.updateAdminProductArticleDesc = function (id, data) {
549
- return this._apiService.put("/api/admin/products/" + id + "/article-desc", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
550
- };
551
- SkProductService.prototype.updateAdminProductArticleSpec = function (id, data) {
552
- return this._apiService.put("/api/admin/products/" + id + "/article-spec", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
553
- };
554
- SkProductService.prototype.updateAdminProductImage = function (id, data) {
555
- return this._apiService.put("/api/admin/products/" + id + "/image", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
556
- };
557
- SkProductService.prototype.updateAdminProductEDelivery = function (id, data) {
558
- return this._apiService.put("/api/admin/products/" + id + "/edelivery", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
559
- };
560
- SkProductService.prototype.updateAdminProductFurnitureDelivery = function (id, data) {
561
- return this._apiService.put("/api/admin/products/" + id + "/furniture-delivery", data).pipe(operators.map(function (response) { return new model.SkProduct(response.data); }));
562
- };
563
- SkProductService.prototype.activateAdminProducts = function (products) {
564
- return this._apiService.put("/api/admin/products/activate/" + products.map(function (product) { return product.id; }).join(','), null);
565
- };
566
- SkProductService.prototype.deactivateAdminProducts = function (products) {
567
- return this._apiService.put("/api/admin/products/deactivate/" + products.map(function (product) { return product.id; }).join(','), null);
568
- };
569
- SkProductService.prototype.deleteAdminProducts = function (products) {
570
- return this._apiService.delete("/api/admin/products/delete/" + products.map(function (product) { return product.id; }).join(','));
571
- };
572
- SkProductService.prototype.getAdminProductsCount = function () {
573
- return this._apiService.get('/api/admin/products/count')
574
- .pipe(operators.map(function (response) { return response.data; }));
575
- };
576
- SkProductService.prototype.updateWishlist = function (id) {
577
- return this._apiService.put("/api/public/products/" + id + "/wishlist", {}).pipe(operators.map(function (response) { return response.data; }));
578
- };
579
- SkProductService.prototype.getWishlist = function (id) {
580
- return this._apiService.get("/api/public/products/" + id + "/wishlist").pipe(operators.map(function (response) { return response.data; }));
581
- };
582
- SkProductService.prototype.getProductOptions = function (id) {
583
- return this._apiService.get("/api/public/products/" + id + "/options").pipe(operators.map(function (response) { return response.data; }));
584
- };
585
- SkProductService.prototype.getAdminProductSubCategoryItem = function (id) {
586
- return this._apiService.get("/api/admin/products/" + id + "/categories").pipe(operators.map(function (response) { return response.data || []; }));
587
- };
588
- SkProductService.prototype.updateAdminProductSubCategoryItems = function (id, idArr) {
589
- return this._apiService.put("/api/admin/products/" + id + "/categories", { subCategoryItems: idArr }).pipe(operators.map(function (response) { return response.data || []; }));
590
- };
591
- SkProductService.prototype.getProductsFilterData = function (params) {
592
- if (params === void 0) { params = new i1.ApiPageableParam(); }
593
- return this._apiService.get("/api/public/products/filter-data", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
594
- };
595
- SkProductService.prototype.getIncludedPackages = function (id) {
596
- return this._apiService.get("/api/public/products/" + id + "/included-packages").pipe(operators.map(function (response) { return response.data || []; }));
597
- };
598
- SkProductService.prototype.updateAdminStockConfig = function (id, data) {
599
- return this._apiService.put("/api/admin/products/" + id + "/stocks", data).pipe(operators.map(function (response) { return response.data; }));
600
- };
601
- SkProductService.prototype.getAdminStockCount = function (id) {
602
- return this._apiService.get("/api/admin/products/" + id + "/stocks/count").pipe(operators.map(function (response) { return Object.assign({ totalIn: 0, totalOut: 0, current: 0 }, response.data); }));
603
- };
604
- SkProductService.prototype.getAdminStocks = function (id, params) {
605
- if (params === void 0) { params = new i1.ApiPageableParam(); }
606
- return this._apiService.getPageable("/api/admin/products/" + id + "/stocks", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
607
- };
608
- SkProductService.prototype.addAdminStock = function (id, data) {
609
- return this._apiService.post("/api/admin/products/" + id + "/stocks", data).pipe(operators.map(function (response) { return Object.assign({ totalIn: 0, totalOut: 0, current: 0 }, response.data); }));
610
- };
611
- SkProductService.prototype.updateAdminStock = function (productId, stockId, data) {
612
- return this._apiService.put("/api/admin/products/" + productId + "/stocks/" + stockId, data).pipe(operators.map(function (response) { return response.data; }));
613
- };
614
- SkProductService.prototype.deleteAdminStock = function (productId, stockId) {
615
- return this._apiService.delete("/api/admin/products/" + productId + "/stocks/" + stockId).pipe(operators.map(function (response) { return response.data; }));
616
- };
617
- SkProductService.prototype.getAdminSeriesList = function (params) {
618
- if (params === void 0) { params = new i1.ApiPageableParam(); }
619
- return this._apiService.getPageable("/api/admin/product-series", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
620
- };
621
- SkProductService.prototype.getAdminSeries = function (id) {
622
- return this._apiService.get("/api/admin/product-series/" + id).pipe(operators.map(function (response) { return response.data; }));
623
- };
624
- SkProductService.prototype.createAdminSeries = function (data) {
625
- return this._apiService.post("/api/admin/product-series", data).pipe(operators.map(function (response) { return response.data; }));
626
- };
627
- SkProductService.prototype.updateAdminSeries = function (id, data) {
628
- return this._apiService.put("/api/admin/product-series/" + id, data).pipe(operators.map(function (response) { return response.data; }));
629
- };
630
- SkProductService.prototype.deleteAdminSeries = function (id) {
631
- return this._apiService.delete("/api/admin/product-series/" + id).pipe(operators.map(function (response) { return response.data; }));
632
- };
633
- return SkProductService;
634
- }());
635
- SkProductService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkProductService_Factory() { return new SkProductService(i0.ɵɵinject(i1.SkApiService)); }, token: SkProductService, providedIn: "root" });
636
- SkProductService.decorators = [
637
- { type: i0.Injectable, args: [{
638
- providedIn: 'root'
639
- },] }
640
- ];
641
- SkProductService.ctorParameters = function () { return [
642
- { type: i1.SkApiService }
643
- ]; };
644
-
645
- var SkPromotionService = /** @class */ (function () {
646
- function SkPromotionService(_apiService) {
647
- this._apiService = _apiService;
648
- }
649
- SkPromotionService.prototype.getPromotion = function (id) {
650
- return this._apiService.get("/api/public/promotions/" + id).pipe(operators.map(function (response) { return response.data; }));
651
- };
652
- SkPromotionService.prototype.getAdminPromotion = function (id) {
653
- return this._apiService.get("/api/admin/promotions/" + id).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
654
- };
655
- SkPromotionService.prototype.getAdminPromotionTarget = function (id) {
656
- return this._apiService.get("/api/admin/promotions/" + id + "/target").pipe(operators.map(function (response) { return response.data; }));
657
- };
658
- SkPromotionService.prototype.getPromotions = function (params) {
659
- if (params === void 0) { params = new i1.ApiPageableParam(); }
660
- return this._apiService.getPageable("/api/public/promotions", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
661
- };
662
- SkPromotionService.prototype.getAdminPromotions = function (params) {
663
- if (params === void 0) { params = new i1.ApiPageableParam(); }
664
- return this._apiService.getPageable("/api/admin/promotions", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
665
- };
666
- SkPromotionService.prototype.getPromotionsArray = function (ids) {
667
- return this._apiService.get("/api/public/promotions/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
668
- };
669
- SkPromotionService.prototype.getAdminPromotionsArray = function (ids) {
670
- return this._apiService.get("/api/admin/promotions/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
671
- };
672
- SkPromotionService.prototype.createAdminPromotion = function (data) {
673
- return this._apiService.post("/api/admin/promotions", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
674
- };
675
- SkPromotionService.prototype.updatePromotion = function (id, data) {
676
- return this._apiService.put("/api/public/promotions/" + id, data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
677
- };
678
- SkPromotionService.prototype.updateAdminPromotion = function (id, data) {
679
- return this._apiService.put("/api/admin/promotions/" + id, data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
680
- };
681
- SkPromotionService.prototype.updateAdminPromotionTarget = function (id, data) {
682
- return this._apiService.put("/api/admin/promotions/" + id + "/target", data).pipe(operators.map(function (response) { return response.data; }));
683
- };
684
- SkPromotionService.prototype.updateAdminPromotionGift = function (id, data) {
685
- return this._apiService.put("/api/admin/promotions/" + id + "/gift", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
686
- };
687
- SkPromotionService.prototype.updateAdminPromotionContent = function (id, data) {
688
- return this._apiService.put("/api/admin/promotions/" + id + "/content", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
689
- };
690
- SkPromotionService.prototype.updateAdminPromotionBenefit = function (id, data) {
691
- return this._apiService.put("/api/admin/promotions/" + id + "/benefit", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
692
- };
693
- SkPromotionService.prototype.updateAdminPromotionImage = function (id, data) {
694
- return this._apiService.put("/api/admin/promotions/" + id + "/image", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
695
- };
696
- SkPromotionService.prototype.updateAdminPromotionOpengraph = function (id, data) {
697
- return this._apiService.put("/api/admin/promotions/" + id + "/opengraph", data).pipe(operators.map(function (response) { return new model.SkPromotion(response.data); }));
698
- };
699
- SkPromotionService.prototype.activateAdminPromotions = function (promotions) {
700
- return this._apiService.put("/api/admin/promotions/activate/" + promotions.map(function (promotion) { return promotion.id; }).join(','), null);
701
- };
702
- SkPromotionService.prototype.deactivateAdminPromotions = function (promotions) {
703
- return this._apiService.put("/api/admin/promotions/deactivate/" + promotions.map(function (promotion) { return promotion.id; }).join(','), null);
704
- };
705
- SkPromotionService.prototype.deleteAdminPromotions = function (promotions) {
706
- return this._apiService.delete("/api/admin/promotions/delete/" + promotions.map(function (promotion) { return promotion.id; }).join(','));
707
- };
708
- SkPromotionService.prototype.getAdminPromotionsCount = function () {
709
- return this._apiService.get('/api/admin/promotions/count')
710
- .pipe(operators.map(function (response) { return response.data; }));
711
- };
712
- return SkPromotionService;
713
- }());
714
- SkPromotionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkPromotionService_Factory() { return new SkPromotionService(i0.ɵɵinject(i1.SkApiService)); }, token: SkPromotionService, providedIn: "root" });
715
- SkPromotionService.decorators = [
716
- { type: i0.Injectable, args: [{
717
- providedIn: 'root'
718
- },] }
719
- ];
720
- SkPromotionService.ctorParameters = function () { return [
721
- { type: i1.SkApiService }
722
- ]; };
723
-
724
- var SkConfigService = /** @class */ (function () {
725
- function SkConfigService(_apiService) {
726
- this._apiService = _apiService;
727
- }
728
- SkConfigService.prototype.getConfig = function (key, nullValue) {
729
- if (nullValue === void 0) { nullValue = null; }
730
- return this._apiService.get("/api/public/config/" + key)
731
- .pipe(operators.map(function (result) { return result.data ? skFrontLib.SkUtils.decodeBase64(result.data.value, nullValue) : nullValue; }));
732
- };
733
- SkConfigService.prototype.setConfig = function (key, data, nullValue) {
734
- if (nullValue === void 0) { nullValue = []; }
735
- return this._apiService.put("/api/admin/config/" + key, { value: skFrontLib.SkUtils.encodeBase64(data) })
736
- .pipe(operators.map(function (result) { return result.data ? skFrontLib.SkUtils.decodeBase64(result.data.value, nullValue) : nullValue; }));
737
- };
738
- SkConfigService.prototype.getBankList = function () {
739
- return this._apiService.get('/api/public/bank-list')
740
- .pipe(operators.map(function (result) { return result.data || []; }));
741
- };
742
- return SkConfigService;
743
- }());
744
- SkConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkConfigService_Factory() { return new SkConfigService(i0.ɵɵinject(i1.SkApiService)); }, token: SkConfigService, providedIn: "root" });
745
- SkConfigService.decorators = [
746
- { type: i0.Injectable, args: [{
747
- providedIn: 'root'
748
- },] }
749
- ];
750
- SkConfigService.ctorParameters = function () { return [
751
- { type: i1.SkApiService }
752
- ]; };
753
-
754
- /*! *****************************************************************************
755
- Copyright (c) Microsoft Corporation.
756
-
757
- Permission to use, copy, modify, and/or distribute this software for any
758
- purpose with or without fee is hereby granted.
759
-
760
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
761
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
762
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
763
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
764
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
765
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
766
- PERFORMANCE OF THIS SOFTWARE.
767
- ***************************************************************************** */
768
- /* global Reflect, Promise */
769
- var extendStatics = function (d, b) {
770
- extendStatics = Object.setPrototypeOf ||
771
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
772
- function (d, b) { for (var p in b)
773
- if (Object.prototype.hasOwnProperty.call(b, p))
774
- d[p] = b[p]; };
775
- return extendStatics(d, b);
776
- };
777
- function __extends(d, b) {
778
- if (typeof b !== "function" && b !== null)
779
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
780
- extendStatics(d, b);
781
- function __() { this.constructor = d; }
782
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
783
- }
784
- var __assign = function () {
785
- __assign = Object.assign || function __assign(t) {
786
- for (var s, i = 1, n = arguments.length; i < n; i++) {
787
- s = arguments[i];
788
- for (var p in s)
789
- if (Object.prototype.hasOwnProperty.call(s, p))
790
- t[p] = s[p];
791
- }
792
- return t;
793
- };
794
- return __assign.apply(this, arguments);
795
- };
796
- function __rest(s, e) {
797
- var t = {};
798
- for (var p in s)
799
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
800
- t[p] = s[p];
801
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
802
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
803
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
804
- t[p[i]] = s[p[i]];
805
- }
806
- return t;
807
- }
808
- function __decorate(decorators, target, key, desc) {
809
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
810
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
811
- r = Reflect.decorate(decorators, target, key, desc);
812
- else
813
- for (var i = decorators.length - 1; i >= 0; i--)
814
- if (d = decorators[i])
815
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
816
- return c > 3 && r && Object.defineProperty(target, key, r), r;
817
- }
818
- function __param(paramIndex, decorator) {
819
- return function (target, key) { decorator(target, key, paramIndex); };
820
- }
821
- function __metadata(metadataKey, metadataValue) {
822
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
823
- return Reflect.metadata(metadataKey, metadataValue);
824
- }
825
- function __awaiter(thisArg, _arguments, P, generator) {
826
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
827
- return new (P || (P = Promise))(function (resolve, reject) {
828
- function fulfilled(value) { try {
829
- step(generator.next(value));
830
- }
831
- catch (e) {
832
- reject(e);
833
- } }
834
- function rejected(value) { try {
835
- step(generator["throw"](value));
836
- }
837
- catch (e) {
838
- reject(e);
839
- } }
840
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
841
- step((generator = generator.apply(thisArg, _arguments || [])).next());
842
- });
843
- }
844
- function __generator(thisArg, body) {
845
- var _ = { label: 0, sent: function () { if (t[0] & 1)
846
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
847
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
848
- function verb(n) { return function (v) { return step([n, v]); }; }
849
- function step(op) {
850
- if (f)
851
- throw new TypeError("Generator is already executing.");
852
- while (_)
853
- try {
854
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
855
- return t;
856
- if (y = 0, t)
857
- op = [op[0] & 2, t.value];
858
- switch (op[0]) {
859
- case 0:
860
- case 1:
861
- t = op;
862
- break;
863
- case 4:
864
- _.label++;
865
- return { value: op[1], done: false };
866
- case 5:
867
- _.label++;
868
- y = op[1];
869
- op = [0];
870
- continue;
871
- case 7:
872
- op = _.ops.pop();
873
- _.trys.pop();
874
- continue;
875
- default:
876
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
877
- _ = 0;
878
- continue;
879
- }
880
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
881
- _.label = op[1];
882
- break;
883
- }
884
- if (op[0] === 6 && _.label < t[1]) {
885
- _.label = t[1];
886
- t = op;
887
- break;
888
- }
889
- if (t && _.label < t[2]) {
890
- _.label = t[2];
891
- _.ops.push(op);
892
- break;
893
- }
894
- if (t[2])
895
- _.ops.pop();
896
- _.trys.pop();
897
- continue;
898
- }
899
- op = body.call(thisArg, _);
900
- }
901
- catch (e) {
902
- op = [6, e];
903
- y = 0;
904
- }
905
- finally {
906
- f = t = 0;
907
- }
908
- if (op[0] & 5)
909
- throw op[1];
910
- return { value: op[0] ? op[1] : void 0, done: true };
911
- }
912
- }
913
- var __createBinding = Object.create ? (function (o, m, k, k2) {
914
- if (k2 === undefined)
915
- k2 = k;
916
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
917
- }) : (function (o, m, k, k2) {
918
- if (k2 === undefined)
919
- k2 = k;
920
- o[k2] = m[k];
921
- });
922
- function __exportStar(m, o) {
923
- for (var p in m)
924
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
925
- __createBinding(o, m, p);
926
- }
927
- function __values(o) {
928
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
929
- if (m)
930
- return m.call(o);
931
- if (o && typeof o.length === "number")
932
- return {
933
- next: function () {
934
- if (o && i >= o.length)
935
- o = void 0;
936
- return { value: o && o[i++], done: !o };
937
- }
938
- };
939
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
940
- }
941
- function __read(o, n) {
942
- var m = typeof Symbol === "function" && o[Symbol.iterator];
943
- if (!m)
944
- return o;
945
- var i = m.call(o), r, ar = [], e;
946
- try {
947
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
948
- ar.push(r.value);
949
- }
950
- catch (error) {
951
- e = { error: error };
952
- }
953
- finally {
954
- try {
955
- if (r && !r.done && (m = i["return"]))
956
- m.call(i);
957
- }
958
- finally {
959
- if (e)
960
- throw e.error;
961
- }
962
- }
963
- return ar;
964
- }
965
- /** @deprecated */
966
- function __spread() {
967
- for (var ar = [], i = 0; i < arguments.length; i++)
968
- ar = ar.concat(__read(arguments[i]));
969
- return ar;
970
- }
971
- /** @deprecated */
972
- function __spreadArrays() {
973
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
974
- s += arguments[i].length;
975
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
976
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
977
- r[k] = a[j];
978
- return r;
979
- }
980
- function __spreadArray(to, from) {
981
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
982
- to[j] = from[i];
983
- return to;
984
- }
985
- function __await(v) {
986
- return this instanceof __await ? (this.v = v, this) : new __await(v);
987
- }
988
- function __asyncGenerator(thisArg, _arguments, generator) {
989
- if (!Symbol.asyncIterator)
990
- throw new TypeError("Symbol.asyncIterator is not defined.");
991
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
992
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
993
- function verb(n) { if (g[n])
994
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
995
- function resume(n, v) { try {
996
- step(g[n](v));
997
- }
998
- catch (e) {
999
- settle(q[0][3], e);
1000
- } }
1001
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1002
- function fulfill(value) { resume("next", value); }
1003
- function reject(value) { resume("throw", value); }
1004
- function settle(f, v) { if (f(v), q.shift(), q.length)
1005
- resume(q[0][0], q[0][1]); }
1006
- }
1007
- function __asyncDelegator(o) {
1008
- var i, p;
1009
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1010
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
1011
- }
1012
- function __asyncValues(o) {
1013
- if (!Symbol.asyncIterator)
1014
- throw new TypeError("Symbol.asyncIterator is not defined.");
1015
- var m = o[Symbol.asyncIterator], i;
1016
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1017
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1018
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
1019
- }
1020
- function __makeTemplateObject(cooked, raw) {
1021
- if (Object.defineProperty) {
1022
- Object.defineProperty(cooked, "raw", { value: raw });
1023
- }
1024
- else {
1025
- cooked.raw = raw;
1026
- }
1027
- return cooked;
1028
- }
1029
- ;
1030
- var __setModuleDefault = Object.create ? (function (o, v) {
1031
- Object.defineProperty(o, "default", { enumerable: true, value: v });
1032
- }) : function (o, v) {
1033
- o["default"] = v;
1034
- };
1035
- function __importStar(mod) {
1036
- if (mod && mod.__esModule)
1037
- return mod;
1038
- var result = {};
1039
- if (mod != null)
1040
- for (var k in mod)
1041
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
1042
- __createBinding(result, mod, k);
1043
- __setModuleDefault(result, mod);
1044
- return result;
1045
- }
1046
- function __importDefault(mod) {
1047
- return (mod && mod.__esModule) ? mod : { default: mod };
1048
- }
1049
- function __classPrivateFieldGet(receiver, state, kind, f) {
1050
- if (kind === "a" && !f)
1051
- throw new TypeError("Private accessor was defined without a getter");
1052
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1053
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
1054
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1055
- }
1056
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1057
- if (kind === "m")
1058
- throw new TypeError("Private method is not writable");
1059
- if (kind === "a" && !f)
1060
- throw new TypeError("Private accessor was defined without a setter");
1061
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
1062
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
1063
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1064
- }
1065
-
1066
- var SkCartApiService = /** @class */ (function () {
1067
- function SkCartApiService(_apiService) {
1068
- this._apiService = _apiService;
1069
- }
1070
- SkCartApiService.prototype.load = function () {
1071
- return this._apiService.get("/api/public/carts").pipe(operators.map(function (response) { return (response.data || []).map(function (item) { return new model.SkCart(item); }); }));
1072
- };
1073
- SkCartApiService.prototype.add = function (cart) {
1074
- var data = {
1075
- product: cart.product.id,
1076
- selectedOptions: cart.options.map(function (item) { return ({
1077
- value: item.value.id,
1078
- option: item.option.id,
1079
- amount: item.amount
1080
- }); }),
1081
- amount: cart.amount,
1082
- selectedGifts: (cart.gifts || []).map(function (item) { return ({ id: item.id }); })
1083
- };
1084
- return this._apiService.post("/api/public/carts", data).pipe(operators.map(function (response) { return (response.data || []).map(function (item) { return new model.SkCart(item); }); }));
1085
- };
1086
- SkCartApiService.prototype.clear = function () {
1087
- return undefined;
1088
- };
1089
- SkCartApiService.prototype.remove = function (carts) {
1090
- return this.removeByIdArray(carts.map(function (cart) { return cart.id; }));
1091
- };
1092
- SkCartApiService.prototype.removeByIdArray = function (idArray) {
1093
- var ids = idArray.filter(function (id) { return Number(id) >= 1; });
1094
- return this._apiService.delete("/api/public/carts", new http.HttpParams().append('target', ids.join(','))).pipe(operators.map(function (response) { return (response.data || []).map(function (item) { return new model.SkCart(item); }); }));
1095
- };
1096
- SkCartApiService.prototype.update = function (cart) {
1097
- return this._apiService.put("/api/public/carts/" + cart.id, { amount: cart.amount }).pipe(operators.map(function (response) { return (response.data || []).map(function (item) { return new model.SkCart(item); }); }));
1098
- };
1099
- return SkCartApiService;
1100
- }());
1101
- SkCartApiService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCartApiService_Factory() { return new SkCartApiService(i0.ɵɵinject(i1.SkApiService)); }, token: SkCartApiService, providedIn: "root" });
1102
- SkCartApiService.decorators = [
1103
- { type: i0.Injectable, args: [{
1104
- providedIn: 'root'
1105
- },] }
1106
- ];
1107
- SkCartApiService.ctorParameters = function () { return [
1108
- { type: i1.SkApiService }
1109
- ]; };
1110
- var SkCartLocalService = /** @class */ (function () {
1111
- function SkCartLocalService(platformId) {
1112
- this.platformId = platformId;
1113
- this.isPlatformBrowser = common.isPlatformBrowser(this.platformId);
1114
- }
1115
- SkCartLocalService.prototype.loadRaw = function () {
1116
- var data = [];
1117
- try {
1118
- if (this.isPlatformBrowser) {
1119
- data = (skFrontLib.SkUtils.decodeBase64(localStorage.getItem('cartData')) || []).map(function (item) { return new model.SkCart(item); });
1120
- }
1121
- }
1122
- catch (e) {
1123
- data = [];
1124
- }
1125
- return data;
1126
- };
1127
- SkCartLocalService.prototype.load = function () {
1128
- return rxjs.of(this.loadRaw());
1129
- };
1130
- SkCartLocalService.prototype.add = function (cart) {
1131
- cart.id = Math.random();
1132
- var cartList = __spread([cart], this.loadRaw());
1133
- localStorage.setItem('cartData', skFrontLib.SkUtils.encodeBase64(cartList));
1134
- return rxjs.of(cartList);
1135
- };
1136
- SkCartLocalService.prototype.clear = function () {
1137
- var cartList = [];
1138
- localStorage.setItem('cartData', skFrontLib.SkUtils.encodeBase64(cartList));
1139
- return rxjs.of(cartList);
1140
- };
1141
- SkCartLocalService.prototype.remove = function (carts) {
1142
- return this.removeByIdArray(carts.map(function (cart) { return cart.id; }));
1143
- };
1144
- SkCartLocalService.prototype.removeByIdArray = function (idArray) {
1145
- var removedItems = this.loadRaw().filter(function (item) { return idArray.findIndex(function (id) { return id === item.id; }) < 0; });
1146
- localStorage.setItem('cartData', skFrontLib.SkUtils.encodeBase64(removedItems));
1147
- return rxjs.of(removedItems);
1148
- };
1149
- SkCartLocalService.prototype.update = function (cart) {
1150
- var cartList = this.loadRaw();
1151
- var index = this.loadRaw().findIndex(function (item) { return item.id === cart.id; });
1152
- if (index > -1) {
1153
- cartList[index] = cart;
1154
- localStorage.setItem('cartData', skFrontLib.SkUtils.encodeBase64(cartList));
1155
- }
1156
- return rxjs.of(cartList);
1157
- };
1158
- return SkCartLocalService;
1159
- }());
1160
- SkCartLocalService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCartLocalService_Factory() { return new SkCartLocalService(i0.ɵɵinject(i0.PLATFORM_ID)); }, token: SkCartLocalService, providedIn: "root" });
1161
- SkCartLocalService.decorators = [
1162
- { type: i0.Injectable, args: [{
1163
- providedIn: 'root'
1164
- },] }
1165
- ];
1166
- SkCartLocalService.ctorParameters = function () { return [
1167
- { type: Object, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] }
1168
- ]; };
1169
- var SkCartService = /** @class */ (function () {
1170
- function SkCartService(_authService, _apiService, _apiCartService, _apiLocalService) {
1171
- this._authService = _authService;
1172
- this._apiService = _apiService;
1173
- this._apiCartService = _apiCartService;
1174
- this._apiLocalService = _apiLocalService;
1175
- this._cartItems$ = new rxjs.BehaviorSubject([]);
1176
- this.cartItems$ = this._cartItems$.asObservable();
1177
- this._selectedItems$ = new rxjs.BehaviorSubject([]);
1178
- this.selectedItems$ = this._selectedItems$.asObservable();
1179
- // this._myInfoSubscription = this._authService.userinfo$.subscribe(() => {
1180
- // this.load();
1181
- // });
1182
- }
1183
- Object.defineProperty(SkCartService.prototype, "cartItems", {
1184
- get: function () {
1185
- return this._cartItems$.getValue();
1186
- },
1187
- set: function (value) {
1188
- this._cartItems$.next(value);
1189
- },
1190
- enumerable: false,
1191
- configurable: true
1192
- });
1193
- Object.defineProperty(SkCartService.prototype, "selectedItems", {
1194
- get: function () {
1195
- return this._selectedItems$.getValue();
1196
- },
1197
- set: function (value) {
1198
- this._selectedItems$.next(value);
1199
- },
1200
- enumerable: false,
1201
- configurable: true
1202
- });
1203
- SkCartService.prototype.load = function () {
1204
- var _this = this;
1205
- this._authService.checkLogin()
1206
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.load() : _this._apiLocalService.load(); }))
1207
- .subscribe(function (result) { return _this._cartItems$.next(result); });
1208
- };
1209
- SkCartService.prototype.clear = function () {
1210
- var _this = this;
1211
- this._authService.checkLogin()
1212
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.clear() : _this._apiLocalService.clear(); }))
1213
- .subscribe(function (result) { return _this._cartItems$.next(result); });
1214
- };
1215
- SkCartService.prototype.add = function (cart) {
1216
- var _this = this;
1217
- return this._authService.checkLogin()
1218
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.add(cart) : _this._apiLocalService.add(cart); }), operators.tap(function (result) { return _this._cartItems$.next(result); }));
1219
- };
1220
- SkCartService.prototype.remove = function (carts) {
1221
- var _this = this;
1222
- this._authService.checkLogin()
1223
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.remove(carts) : _this._apiLocalService.remove(carts); }))
1224
- .subscribe(function (result) {
1225
- _this._cartItems$.next(result);
1226
- _this.checkSelectedItems();
1227
- });
1228
- };
1229
- SkCartService.prototype.removeByIdArray = function (idArray) {
1230
- var _this = this;
1231
- this._authService.checkLogin()
1232
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.removeByIdArray(idArray) : _this._apiLocalService.removeByIdArray(idArray); }))
1233
- .subscribe(function (result) {
1234
- _this._cartItems$.next(result);
1235
- _this.checkSelectedItems();
1236
- });
1237
- };
1238
- SkCartService.prototype.update = function (cart) {
1239
- var _this = this;
1240
- this._authService.checkLogin()
1241
- .pipe(operators.switchMap(function (result) { return result ? _this._apiCartService.update(cart) : _this._apiLocalService.update(cart); }))
1242
- .subscribe(function (result) { return _this._cartItems$.next(result); });
1243
- };
1244
- SkCartService.prototype.getCart = function (id) {
1245
- return this._cartItems$.getValue().find(function (value) { return value.id === id; });
1246
- };
1247
- SkCartService.prototype.checkSelectedItems = function () {
1248
- var _this = this;
1249
- this.selectedItems = this.selectedItems.filter(function (value) { return !!_this.getCart(value); });
1250
- };
1251
- SkCartService.prototype.selectAll = function () {
1252
- this.selectedItems = this._cartItems$.getValue().map(function (item) { return item.id; });
1253
- };
1254
- SkCartService.prototype.deSelectAll = function () {
1255
- this.selectedItems = [];
1256
- };
1257
- SkCartService.prototype.toggleSelectAll = function () {
1258
- if (this.selectedItems.length === this._cartItems$.getValue().length) {
1259
- this.deSelectAll();
1260
- }
1261
- else {
1262
- this.selectAll();
1263
- }
1264
- };
1265
- SkCartService.prototype.toggleSelect = function (cart) {
1266
- var targetIndex = this.selectedItems.findIndex(function (item) { return item === cart.id; });
1267
- if (targetIndex === -1) {
1268
- this.selectedItems = __spread(this.selectedItems, [cart.id]);
1269
- }
1270
- else {
1271
- var target = this.selectedItems;
1272
- target.splice(targetIndex, 1);
1273
- this.selectedItems = target;
1274
- }
1275
- };
1276
- SkCartService.prototype.isSelected = function (cart) {
1277
- return this.selectedItems.findIndex(function (item) { return item === cart.id; }) > -1;
1278
- };
1279
- SkCartService.prototype.isSelectedAll = function () {
1280
- return this.selectedItems.length > 0 && this.selectedItems.length === this._cartItems$.getValue().length;
1281
- };
1282
- SkCartService.prototype.isIntermediate = function () {
1283
- return this.selectedItems.length > 0 && this.selectedItems.length !== this._cartItems$.getValue().length;
1284
- };
1285
- SkCartService.prototype.createOrder = function (paymentType) {
1286
- var _this = this;
1287
- return this._authService.checkLogin()
1288
- .pipe(operators.take(1), operators.map(function (result) {
1289
- if (result) {
1290
- return {
1291
- apiUrl: "/api/public/orders/from-cart",
1292
- items: _this.selectedItems
1293
- };
1294
- }
1295
- else {
1296
- return {
1297
- apiUrl: "/api/public/orders/from-data",
1298
- items: _this.selectedItems
1299
- .map(function (id) { return _this.getCart(id); })
1300
- .map(function (cart) { return ({
1301
- id: cart.id,
1302
- productId: cart.product.id,
1303
- amount: cart.amount,
1304
- options: (cart.options || []).map(function (option) { return ({
1305
- optionId: option.option.id,
1306
- valueId: option.value.id,
1307
- amount: option.amount || 1
1308
- }); }),
1309
- gifts: (cart.gifts || []).map(function (item) { return ({ id: item.id }); })
1310
- }); })
1311
- };
1312
- }
1313
- }), operators.switchMap(function (result) { return _this._apiService.post(result.apiUrl, {
1314
- items: result.items,
1315
- paymentType: paymentType
1316
- }); }), operators.map(function (result) { return result.data; }));
1317
- };
1318
- return SkCartService;
1319
- }());
1320
- SkCartService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCartService_Factory() { return new SkCartService(i0.ɵɵinject(SkAuthService), i0.ɵɵinject(i1.SkApiService), i0.ɵɵinject(SkCartApiService), i0.ɵɵinject(SkCartLocalService)); }, token: SkCartService, providedIn: "root" });
1321
- SkCartService.decorators = [
1322
- { type: i0.Injectable, args: [{
1323
- providedIn: 'root'
1324
- },] }
1325
- ];
1326
- SkCartService.ctorParameters = function () { return [
1327
- { type: SkAuthService },
1328
- { type: i1.SkApiService },
1329
- { type: SkCartApiService },
1330
- { type: SkCartLocalService }
1331
- ]; };
1332
-
1333
- var SkOrderService = /** @class */ (function () {
1334
- function SkOrderService(_apiService) {
1335
- this._apiService = _apiService;
1336
- }
1337
- SkOrderService.prototype.getAdminOrders = function (params) {
1338
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1339
- return this._apiService.getPageable("/api/admin/orders", params.buildHttpParams())
1340
- .pipe(operators.map(function (result) { return result.data; }));
1341
- };
1342
- SkOrderService.prototype.getAdminOrdersCount = function () {
1343
- return this._apiService.get("/api/admin/orders/count")
1344
- .pipe(operators.map(function (result) { return result.data; }));
1345
- };
1346
- SkOrderService.prototype.getAdminOrder = function (id) {
1347
- return this._apiService.get("/api/admin/orders/" + id)
1348
- .pipe(operators.map(function (result) { return new model.SkOrderDetail(result.data); }));
1349
- };
1350
- SkOrderService.prototype.getMyOrders = function () {
1351
- return this._apiService.get("/api/public/orders/me")
1352
- .pipe(operators.map(function (result) { return result.data; }));
1353
- };
1354
- SkOrderService.prototype.getMyLatestOrders = function () {
1355
- return this._apiService.get("/api/public/orders/me/latest")
1356
- .pipe(operators.map(function (result) { return result.data; }));
1357
- };
1358
- SkOrderService.prototype.getOrderDetail = function (id) {
1359
- return this._apiService.get("/api/public/orders/" + id)
1360
- .pipe(operators.map(function (result) { return new model.SkOrderDetail(result.data); }));
1361
- };
1362
- SkOrderService.prototype.getOrderStatus = function (id) {
1363
- return this._apiService.get("/api/public/orders/" + id + "/status")
1364
- .pipe(operators.map(function (result) { return result.data; }));
1365
- };
1366
- SkOrderService.prototype.getOrderLogs = function (id) {
1367
- return this._apiService.get("/api/admin/orders/" + id + "/logs")
1368
- .pipe(operators.map(function (result) { return result.data || []; }));
1369
- };
1370
- SkOrderService.prototype.createAdminOrder = function (data) {
1371
- return this._apiService.post("/api/admin/orders", data)
1372
- .pipe(operators.map(function (result) { return new model.SkOrderDetail(result.data); }));
1373
- };
1374
- SkOrderService.prototype.addOrderLog = function (id, message) {
1375
- return this._apiService.post("/api/admin/orders/" + id + "/logs", { message: message })
1376
- .pipe(operators.map(function (result) { return result.data || []; }));
1377
- };
1378
- SkOrderService.prototype.updateAdminOrderBaseInfo = function (id, data) {
1379
- return this._apiService.put("/api/admin/orders/" + id + "/info", data)
1380
- .pipe(operators.map(function (result) { return result.data; }));
1381
- };
1382
- SkOrderService.prototype.updateAdminConfirmTransferPayment = function (id) {
1383
- return this._apiService.put("/api/admin/orders/" + id + "/confirm-payment/transfer", null)
1384
- .pipe(operators.map(function (result) { return result.data; }));
1385
- };
1386
- SkOrderService.prototype.updateAdminCancel = function (id) {
1387
- return this._apiService.put("/api/admin/orders/" + id + "/cancel", {})
1388
- .pipe(operators.map(function (result) { return result.data; }));
1389
- };
1390
- SkOrderService.prototype.updateAdminCancelForce = function (id) {
1391
- return this._apiService.put("/api/admin/orders/" + id + "/cancel/force", {})
1392
- .pipe(operators.map(function (result) { return result.data; }));
1393
- };
1394
- SkOrderService.prototype.updateAdminProcessStart = function (id) {
1395
- return this._apiService.put("/api/admin/orders/" + id + "/process-start", {})
1396
- .pipe(operators.map(function (result) { return result.data; }));
1397
- };
1398
- SkOrderService.prototype.updateAdminComplete = function (id) {
1399
- return this._apiService.put("/api/admin/orders/" + id + "/complete", {})
1400
- .pipe(operators.map(function (result) { return result.data; }));
1401
- };
1402
- SkOrderService.prototype.updateAdminPayment = function (id, data) {
1403
- return this._apiService.put("/api/admin/orders/" + id + "/update-payment", data)
1404
- .pipe(operators.map(function (result) { return result.data; }));
1405
- };
1406
- SkOrderService.prototype.updateAdminShippingStatus = function (id, data) {
1407
- return this._apiService.put("/api/admin/orders/" + id + "/update-shipping-status", data)
1408
- .pipe(operators.map(function (result) { return result.data; }));
1409
- };
1410
- SkOrderService.prototype.deleteAdminOrders = function (orders) {
1411
- return this._apiService.delete("/api/admin/orders/" + orders.map(function (order) { return order.id; }).join(','));
1412
- };
1413
- SkOrderService.prototype.cancelOrder = function (id, data) {
1414
- return this._apiService.put("/api/public/orders/" + id + "/cancel", data)
1415
- .pipe(operators.map(function (result) { return result.data; }));
1416
- };
1417
- SkOrderService.prototype.startProgress = function (id, data) {
1418
- return this._apiService.put("/api/public/orders/" + id + "/progress", data)
1419
- .pipe(operators.map(function (result) { return result.data; }));
1420
- };
1421
- SkOrderService.prototype.moveToMyOrder = function (id) {
1422
- return this._apiService.put("/api/public/orders/" + id + "/move", {})
1423
- .pipe(operators.map(function (result) { return result.data; }));
1424
- };
1425
- SkOrderService.prototype.getAdminShippingFeeList = function () {
1426
- return this._apiService.get("/api/admin/orders/shipping-fees")
1427
- .pipe(operators.map(function (result) { return result.data; }));
1428
- };
1429
- SkOrderService.prototype.createAdminShippingFee = function (data) {
1430
- return this._apiService.post("/api/admin/orders/shipping-fees", data)
1431
- .pipe(operators.map(function (result) { return result.data; }));
1432
- };
1433
- SkOrderService.prototype.updateAdminShippingFee = function (id, data) {
1434
- return this._apiService.put("/api/admin/orders/shipping-fees/" + id, data)
1435
- .pipe(operators.map(function (result) { return result.data; }));
1436
- };
1437
- SkOrderService.prototype.deleteAdminShippingFee = function (id) {
1438
- return this._apiService.delete("/api/admin/orders/shipping-fees/" + id)
1439
- .pipe(operators.map(function (result) { return result.data; }));
1440
- };
1441
- SkOrderService.prototype.calculateShippingFee = function (id, method, zipCode) {
1442
- return this._apiService.get("/api/public/orders/" + id + "/calculate-shipping-fee", new http.HttpParams().append('method', method).append('zipCode', zipCode))
1443
- .pipe(operators.map(function (result) { return result.data || 0; }));
1444
- };
1445
- SkOrderService.prototype.validateCoupon = function (id, serials) {
1446
- return this._apiService.post("/api/public/orders/" + id + "/check-coupon", {
1447
- couponSerials: serials
1448
- }).pipe(operators.map(function (result) { return result.data || { discountAmount: 0, couponData: [] }; }));
1449
- };
1450
- return SkOrderService;
1451
- }());
1452
- SkOrderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkOrderService_Factory() { return new SkOrderService(i0.ɵɵinject(i1.SkApiService)); }, token: SkOrderService, providedIn: "root" });
1453
- SkOrderService.decorators = [
1454
- { type: i0.Injectable, args: [{
1455
- providedIn: 'root'
1456
- },] }
1457
- ];
1458
- SkOrderService.ctorParameters = function () { return [
1459
- { type: i1.SkApiService }
1460
- ]; };
1461
-
1462
- var SkAccountService = /** @class */ (function () {
1463
- function SkAccountService(_apiService) {
1464
- this._apiService = _apiService;
1465
- }
1466
- SkAccountService.prototype.getDefaultAddress = function () {
1467
- return this._apiService.get("/api/public/users/me/address/default").pipe(operators.map(function (response) { return response.data; }));
1468
- };
1469
- SkAccountService.prototype.getAddressList = function () {
1470
- return this._apiService.get("/api/public/users/me/address").pipe(operators.map(function (response) { return response.data || []; }));
1471
- };
1472
- SkAccountService.prototype.updateAddress = function (id, data) {
1473
- return this._apiService.put("/api/public/users/me/address/" + id, data).pipe(operators.map(function (response) { return response.data; }));
1474
- };
1475
- SkAccountService.prototype.deleteAddress = function (id) {
1476
- return this._apiService.delete("/api/public/users/me/address/" + id);
1477
- };
1478
- SkAccountService.prototype.getWishList = function () {
1479
- return this._apiService.get("/api/public/users/me/wishlist").pipe(operators.map(function (response) { return response.data || []; }));
1480
- };
1481
- SkAccountService.prototype.getWishListShowBadge = function () {
1482
- return this._apiService.get("/api/public/users/me/wishlist/badge").pipe(operators.map(function (response) { return response.data || false; }));
1483
- };
1484
- return SkAccountService;
1485
- }());
1486
- SkAccountService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkAccountService_Factory() { return new SkAccountService(i0.ɵɵinject(i1.SkApiService)); }, token: SkAccountService, providedIn: "root" });
1487
- SkAccountService.decorators = [
1488
- { type: i0.Injectable, args: [{
1489
- providedIn: 'root'
1490
- },] }
1491
- ];
1492
- SkAccountService.ctorParameters = function () { return [
1493
- { type: i1.SkApiService }
1494
- ]; };
1495
-
1496
- var SkSearchService = /** @class */ (function () {
1497
- function SkSearchService(_apiService) {
1498
- this._apiService = _apiService;
1499
- }
1500
- SkSearchService.prototype.getSearchResults = function (params) {
1501
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1502
- return this._apiService.get("/api/public/search", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1503
- };
1504
- SkSearchService.prototype.getSearchKeywords = function () {
1505
- return this._apiService.get("/api/public/search/keywords").pipe(operators.map(function (response) { return response.data; }));
1506
- };
1507
- return SkSearchService;
1508
- }());
1509
- SkSearchService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkSearchService_Factory() { return new SkSearchService(i0.ɵɵinject(i1.SkApiService)); }, token: SkSearchService, providedIn: "root" });
1510
- SkSearchService.decorators = [
1511
- { type: i0.Injectable, args: [{
1512
- providedIn: 'root'
1513
- },] }
1514
- ];
1515
- SkSearchService.ctorParameters = function () { return [
1516
- { type: i1.SkApiService }
1517
- ]; };
1518
-
1519
- var SkPointService = /** @class */ (function () {
1520
- function SkPointService(_apiService) {
1521
- this._apiService = _apiService;
1522
- this.apiServer = _apiService.apiServer;
1523
- }
1524
- SkPointService.prototype.getMyCurrentPoint = function () {
1525
- return this._apiService.get("/api/public/points/me").pipe(operators.map(function (response) { return Number(response.data || 0); }));
1526
- };
1527
- SkPointService.prototype.getMyPointHistory = function (params) {
1528
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1529
- return this._apiService.getPageable("/api/public/points/me/history", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }), operators.map(function (value) {
1530
- value.content = (value.content || []).map(function (item) { return new model.SkPoint(item); });
1531
- return value;
1532
- }));
1533
- };
1534
- SkPointService.prototype.getUserCurrentPoint = function (userId) {
1535
- return this._apiService.get("/api/admin/points/" + userId).pipe(operators.map(function (response) { return Number(response.data || 0); }));
1536
- };
1537
- SkPointService.prototype.getUserPointHistory = function (userId, params) {
1538
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1539
- return this._apiService.getPageable("/api/admin/points/" + userId + "/history", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }), operators.map(function (value) {
1540
- value.content = (value.content || []).map(function (item) { return new model.SkPoint(item); });
1541
- return value;
1542
- }));
1543
- };
1544
- SkPointService.prototype.addPointToUser = function (data) {
1545
- return this._apiService.put("/api/admin/points/add", data).pipe(operators.map(function (response) { return Number(response.data || 0); }));
1546
- };
1547
- SkPointService.prototype.usePointToUser = function (data) {
1548
- return this._apiService.put("/api/admin/points/use", data).pipe(operators.map(function (response) { return Number(response.data || 0); }));
1549
- };
1550
- return SkPointService;
1551
- }());
1552
- SkPointService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkPointService_Factory() { return new SkPointService(i0.ɵɵinject(i1.SkApiService)); }, token: SkPointService, providedIn: "root" });
1553
- SkPointService.decorators = [
1554
- { type: i0.Injectable, args: [{
1555
- providedIn: 'root'
1556
- },] }
1557
- ];
1558
- SkPointService.ctorParameters = function () { return [
1559
- { type: i1.SkApiService }
1560
- ]; };
1561
-
1562
- var SkCouponService = /** @class */ (function () {
1563
- function SkCouponService(_apiService) {
1564
- this._apiService = _apiService;
1565
- }
1566
- SkCouponService.prototype.getCoupon = function (code) {
1567
- return this._apiService.get("/api/public/coupons/" + code).pipe(operators.map(function (response) { return response.data; }));
1568
- };
1569
- SkCouponService.prototype.getAdminCoupon = function (id) {
1570
- return this._apiService.get("/api/admin/coupons/" + id).pipe(operators.map(function (response) { return response.data; }));
1571
- };
1572
- SkCouponService.prototype.getCoupons = function (params) {
1573
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1574
- return this._apiService.getPageable("/api/public/coupons", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1575
- };
1576
- SkCouponService.prototype.getCouponTickets = function (id) {
1577
- return this._apiService.get("/api/admin/coupons/" + id + "/list").pipe(operators.map(function (response) { return response.data || []; }));
1578
- };
1579
- SkCouponService.prototype.getAdminCoupons = function (params) {
1580
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1581
- return this._apiService.getPageable("/api/admin/coupons", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1582
- };
1583
- SkCouponService.prototype.getCouponsArray = function (ids) {
1584
- return this._apiService.get("/api/public/coupons/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
1585
- };
1586
- SkCouponService.prototype.getAdminCouponsArray = function (ids) {
1587
- return this._apiService.get("/api/admin/coupons/array/" + ids.join(',')).pipe(operators.map(function (response) { return response.data; }));
1588
- };
1589
- SkCouponService.prototype.createAdminCoupon = function (data) {
1590
- return this._apiService.post("/api/admin/coupons", data).pipe(operators.map(function (response) { return response.data; }));
1591
- };
1592
- SkCouponService.prototype.updateAdminCoupon = function (id, data) {
1593
- return this._apiService.put("/api/admin/coupons/" + id, data).pipe(operators.map(function (response) { return response.data; }));
1594
- };
1595
- SkCouponService.prototype.updateAdminCouponTrigger = function (id, data) {
1596
- return this._apiService.put("/api/admin/coupons/" + id + "/trigger", data).pipe(operators.map(function (response) { return response.data; }));
1597
- };
1598
- SkCouponService.prototype.activateAdminCoupons = function (coupons) {
1599
- return this._apiService.put("/api/admin/coupons/activate/" + coupons.map(function (coupon) { return coupon.id; }).join(','), null);
1600
- };
1601
- SkCouponService.prototype.deactivateAdminCoupons = function (coupons) {
1602
- return this._apiService.put("/api/admin/coupons/deactivate/" + coupons.map(function (coupon) { return coupon.id; }).join(','), null);
1603
- };
1604
- SkCouponService.prototype.deleteAdminCoupons = function (coupons) {
1605
- return this._apiService.delete("/api/admin/coupons/delete/" + coupons.map(function (coupon) { return coupon.id; }).join(','));
1606
- };
1607
- SkCouponService.prototype.getAdminCouponsCount = function () {
1608
- return this._apiService.get('/api/admin/coupons/count')
1609
- .pipe(operators.map(function (response) { return response.data; }));
1610
- };
1611
- return SkCouponService;
1612
- }());
1613
- SkCouponService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCouponService_Factory() { return new SkCouponService(i0.ɵɵinject(i1.SkApiService)); }, token: SkCouponService, providedIn: "root" });
1614
- SkCouponService.decorators = [
1615
- { type: i0.Injectable, args: [{
1616
- providedIn: 'root'
1617
- },] }
1618
- ];
1619
- SkCouponService.ctorParameters = function () { return [
1620
- { type: i1.SkApiService }
1621
- ]; };
1622
-
1623
- var SkCommentService = /** @class */ (function () {
1624
- function SkCommentService(_apiService) {
1625
- this._apiService = _apiService;
1626
- }
1627
- SkCommentService.prototype.getDocumentComments = function (param) {
1628
- if (param === void 0) { param = new i1.ApiPageableParam(); }
1629
- return this._apiService.getPageable("/api/public/document-comments", param.buildHttpParams())
1630
- .pipe(operators.map(function (response) {
1631
- response.data.content = response.data.content.map(function (item) { return new model.SkDocumentCommentParent(item); });
1632
- return response.data;
1633
- }));
1634
- };
1635
- SkCommentService.prototype.getDocumentComment = function (id) {
1636
- return this._apiService.get("/api/public/document-comments/" + id)
1637
- .pipe(operators.map(function (response) { return new model.SkDocumentCommentParent(response.data); }));
1638
- };
1639
- SkCommentService.prototype.writeDocumentComment = function (data) {
1640
- return this._apiService.post("/api/public/document-comments", data)
1641
- .pipe(operators.map(function (response) { return response.data; }));
1642
- };
1643
- SkCommentService.prototype.updateDocumentComment = function (id, data) {
1644
- return this._apiService.put("/api/public/document-comments/" + id, data)
1645
- .pipe(operators.map(function (response) { return response.data; }));
1646
- };
1647
- SkCommentService.prototype.deleteDocumentComment = function (id) {
1648
- return this._apiService.delete("/api/public/document-comments/" + id)
1649
- .pipe(operators.map(function (response) { return response.data; }));
1650
- };
1651
- return SkCommentService;
1652
- }());
1653
- SkCommentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkCommentService_Factory() { return new SkCommentService(i0.ɵɵinject(i1.SkApiService)); }, token: SkCommentService, providedIn: "root" });
1654
- SkCommentService.decorators = [
1655
- { type: i0.Injectable, args: [{
1656
- providedIn: 'root'
1657
- },] }
1658
- ];
1659
- SkCommentService.ctorParameters = function () { return [
1660
- { type: i1.SkApiService }
1661
- ]; };
1662
-
1663
- var SkContactService = /** @class */ (function () {
1664
- function SkContactService(_apiService) {
1665
- this._apiService = _apiService;
1666
- }
1667
- SkContactService.prototype.writeContact = function (data) {
1668
- return this._apiService.post("/api/public/contacts", data)
1669
- .pipe(operators.map(function (response) { return response.data; }));
1670
- };
1671
- SkContactService.prototype.getContacts = function (params) {
1672
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1673
- return this._apiService.getPageable("/api/admin/contacts", params.buildHttpParams())
1674
- .pipe(operators.map(function (response) { return response.data; }));
1675
- };
1676
- SkContactService.prototype.getContact = function (id) {
1677
- return this._apiService.get("/api/admin/contacts/" + id)
1678
- .pipe(operators.map(function (response) { return response.data; }));
1679
- };
1680
- SkContactService.prototype.writeAnswerAdmin = function (id, data) {
1681
- return this._apiService.post("/api/admin/contacts/" + id + "/answer", data)
1682
- .pipe(operators.map(function (response) { return response.data; }));
1683
- };
1684
- SkContactService.prototype.closeContact = function (id) {
1685
- return this._apiService.put("/api/admin/contacts/" + id + "/close", null)
1686
- .pipe(operators.map(function (response) { return response.data; }));
1687
- };
1688
- return SkContactService;
1689
- }());
1690
- SkContactService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkContactService_Factory() { return new SkContactService(i0.ɵɵinject(i1.SkApiService)); }, token: SkContactService, providedIn: "root" });
1691
- SkContactService.decorators = [
1692
- { type: i0.Injectable, args: [{
1693
- providedIn: 'root'
1694
- },] }
1695
- ];
1696
- SkContactService.ctorParameters = function () { return [
1697
- { type: i1.SkApiService }
1698
- ]; };
1699
-
1700
- var SkEtcService = /** @class */ (function () {
1701
- function SkEtcService(_apiService) {
1702
- this._apiService = _apiService;
1703
- }
1704
- SkEtcService.prototype.sendTestEmail = function (key, params) {
1705
- return this._apiService.get("/api/admin/notifications/email/" + key, params).pipe(operators.map(function (response) { return response.data; }));
1706
- };
1707
- SkEtcService.prototype.sendTestSms = function (key, to) {
1708
- return this._apiService.get("/api/admin/notifications/sms/" + key, new http.HttpParams().append('to', to)).pipe(operators.map(function (response) { return response.data; }));
1709
- };
1710
- return SkEtcService;
1711
- }());
1712
- SkEtcService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkEtcService_Factory() { return new SkEtcService(i0.ɵɵinject(i1.SkApiService)); }, token: SkEtcService, providedIn: "root" });
1713
- SkEtcService.decorators = [
1714
- { type: i0.Injectable, args: [{
1715
- providedIn: 'root'
1716
- },] }
1717
- ];
1718
- SkEtcService.ctorParameters = function () { return [
1719
- { type: i1.SkApiService }
1720
- ]; };
1721
-
1722
- var SkStoreService = /** @class */ (function () {
1723
- function SkStoreService(_apiService) {
1724
- this._apiService = _apiService;
1725
- }
1726
- SkStoreService.prototype.getStore = function (id) {
1727
- return this._apiService.get("/api/public/stores/" + id).pipe(operators.map(function (response) { return new model.SkStore(response.data); }));
1728
- };
1729
- SkStoreService.prototype.getAdminStore = function (id) {
1730
- return this._apiService.get("/api/admin/stores/" + id).pipe(operators.map(function (response) { return new model.SkStore(response.data); }));
1731
- };
1732
- SkStoreService.prototype.getStores = function (params) {
1733
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1734
- return this._apiService.getPageable("/api/public/stores", params.buildHttpParams()).pipe(operators.map(function (response) {
1735
- response.data.content = (response.data.content || []).map(function (item) { return new model.SkStore(item); });
1736
- return response.data;
1737
- }));
1738
- };
1739
- SkStoreService.prototype.getAdminStores = function (params) {
1740
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1741
- return this._apiService.getPageable("/api/admin/stores", params.buildHttpParams()).pipe(operators.map(function (response) {
1742
- response.data.content = (response.data.content || []).map(function (item) { return new model.SkStore(item); });
1743
- return response.data;
1744
- }));
1745
- };
1746
- SkStoreService.prototype.createAdminStore = function (data) {
1747
- return this._apiService.post("/api/admin/stores", data).pipe(operators.map(function (response) { return response.data; }));
1748
- };
1749
- SkStoreService.prototype.updateAdminStore = function (id, data) {
1750
- return this._apiService.put("/api/admin/stores/" + id, data).pipe(operators.map(function (response) { return response.data; }));
1751
- };
1752
- SkStoreService.prototype.deleteAdminStores = function (stores) {
1753
- return this._apiService.delete("/api/admin/stores/delete/" + stores.map(function (store) { return store.id; }).join(','));
1754
- };
1755
- return SkStoreService;
1756
- }());
1757
- SkStoreService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkStoreService_Factory() { return new SkStoreService(i0.ɵɵinject(i1.SkApiService)); }, token: SkStoreService, providedIn: "root" });
1758
- SkStoreService.decorators = [
1759
- { type: i0.Injectable, args: [{
1760
- providedIn: 'root'
1761
- },] }
1762
- ];
1763
- SkStoreService.ctorParameters = function () { return [
1764
- { type: i1.SkApiService }
1765
- ]; };
1766
-
1767
- var SkKeywordService = /** @class */ (function () {
1768
- function SkKeywordService(_apiService) {
1769
- this._apiService = _apiService;
1770
- }
1771
- SkKeywordService.prototype.getKeyword = function (id) {
1772
- return this._apiService.get("/api/public/keywords/" + id).pipe(operators.map(function (response) { return response.data; }));
1773
- };
1774
- SkKeywordService.prototype.getAdminKeyword = function (id) {
1775
- return this._apiService.get("/api/admin/keywords/" + id).pipe(operators.map(function (response) { return response.data; }));
1776
- };
1777
- SkKeywordService.prototype.getKeywords = function (params) {
1778
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1779
- return this._apiService.getPageable("/api/public/keywords", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1780
- };
1781
- SkKeywordService.prototype.getAllKeywords = function (params) {
1782
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1783
- return this._apiService.get("/api/public/keywords/all", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1784
- };
1785
- SkKeywordService.prototype.getAdminKeywords = function (params) {
1786
- if (params === void 0) { params = new i1.ApiPageableParam(); }
1787
- return this._apiService.getPageable("/api/admin/keywords", params.buildHttpParams()).pipe(operators.map(function (response) { return response.data; }));
1788
- };
1789
- SkKeywordService.prototype.getAdminAllKeywords = function () {
1790
- return this._apiService.get("/api/admin/keywords/all").pipe(operators.map(function (response) { return response.data; }));
1791
- };
1792
- SkKeywordService.prototype.createAdminKeyword = function (data) {
1793
- return this._apiService.post("/api/admin/keywords", data).pipe(operators.map(function (response) { return response.data; }));
1794
- };
1795
- SkKeywordService.prototype.updateAdminKeyword = function (id, data) {
1796
- return this._apiService.put("/api/admin/keywords/" + id, data).pipe(operators.map(function (response) { return response.data; }));
1797
- };
1798
- SkKeywordService.prototype.deleteAdminKeywords = function (keywords) {
1799
- return this._apiService.delete("/api/admin/keywords/delete/" + keywords.map(function (keyword) { return keyword.id; }).join(','));
1800
- };
1801
- return SkKeywordService;
1802
- }());
1803
- SkKeywordService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SkKeywordService_Factory() { return new SkKeywordService(i0.ɵɵinject(i1.SkApiService)); }, token: SkKeywordService, providedIn: "root" });
1804
- SkKeywordService.decorators = [
1805
- { type: i0.Injectable, args: [{
1806
- providedIn: 'root'
1807
- },] }
1808
- ];
1809
- SkKeywordService.ctorParameters = function () { return [
1810
- { type: i1.SkApiService }
1811
- ]; };
1812
-
1813
- /**
1814
- * Generated bundle index. Do not edit.
1815
- */
1816
-
1817
- exports.SkAccountService = SkAccountService;
1818
- exports.SkAuthAdminGuard = SkAuthAdminGuard;
1819
- exports.SkAuthGuard = SkAuthGuard;
1820
- exports.SkAuthService = SkAuthService;
1821
- exports.SkBoardService = SkBoardService;
1822
- exports.SkBrandService = SkBrandService;
1823
- exports.SkCartService = SkCartService;
1824
- exports.SkCategoryService = SkCategoryService;
1825
- exports.SkCommentService = SkCommentService;
1826
- exports.SkConfigService = SkConfigService;
1827
- exports.SkContactService = SkContactService;
1828
- exports.SkCouponService = SkCouponService;
1829
- exports.SkDocumentService = SkDocumentService;
1830
- exports.SkEtcService = SkEtcService;
1831
- exports.SkFileService = SkFileService;
1832
- exports.SkKeywordService = SkKeywordService;
1833
- exports.SkOrderService = SkOrderService;
1834
- exports.SkPointService = SkPointService;
1835
- exports.SkProductService = SkProductService;
1836
- exports.SkPromotionService = SkPromotionService;
1837
- exports.SkSearchService = SkSearchService;
1838
- exports.SkStoreService = SkStoreService;
1839
- exports.SkUserService = SkUserService;
1840
- exports.ɵa = SkCartApiService;
1841
- exports.ɵb = SkCartLocalService;
1842
-
1843
- Object.defineProperty(exports, '__esModule', { value: true });
1844
-
1845
- })));
1846
- //# sourceMappingURL=sk-front-lib-crud.umd.js.map