sk-front-lib 0.17.48 → 0.17.49

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 (255) hide show
  1. package/api/model/api-config.d.ts +6 -0
  2. package/api/model/api-pageable-param.d.ts +11 -0
  3. package/api/model/api-pageable.d.ts +11 -0
  4. package/api/model/api-response.d.ts +8 -0
  5. package/api/model/index.d.ts +4 -0
  6. package/api/package.json +10 -0
  7. package/api/public_api.d.ts +3 -0
  8. package/api/sk-api.module.d.ts +12 -0
  9. package/api/sk-api.service.d.ts +34 -0
  10. package/api/sk-front-lib-api.d.ts +5 -0
  11. package/article/package.json +10 -0
  12. package/article/public_api.d.ts +6 -0
  13. package/article/sk-article-editor-server.component.d.ts +23 -0
  14. package/article/sk-article-editor.component.d.ts +27 -0
  15. package/article/sk-article-server.module.d.ts +10 -0
  16. package/article/sk-article.module.d.ts +9 -0
  17. package/article/sk-article.service.d.ts +96 -0
  18. package/article/sk-froala-editor.directive.d.ts +40 -0
  19. package/article/sk-front-lib-article.d.ts +5 -0
  20. package/crud/package.json +10 -0
  21. package/crud/public_api.d.ts +24 -0
  22. package/crud/sk-account.service.d.ts +16 -0
  23. package/crud/sk-affiliate.service.d.ts +38 -0
  24. package/crud/sk-auth-admin.guard.d.ts +13 -0
  25. package/crud/sk-auth.guard.d.ts +13 -0
  26. package/crud/sk-auth.service.d.ts +33 -0
  27. package/crud/sk-board.service.d.ts +21 -0
  28. package/crud/sk-brand.service.d.ts +19 -0
  29. package/crud/sk-cart.service.d.ts +72 -0
  30. package/crud/sk-category.service.d.ts +28 -0
  31. package/crud/sk-comment.service.d.ts +15 -0
  32. package/crud/sk-config.service.d.ts +13 -0
  33. package/crud/sk-contact.service.d.ts +15 -0
  34. package/crud/sk-coupon.service.d.ts +24 -0
  35. package/crud/sk-document.service.d.ts +51 -0
  36. package/crud/sk-etc.service.d.ts +12 -0
  37. package/crud/sk-file.service.d.ts +18 -0
  38. package/crud/sk-front-lib-crud.d.ts +5 -0
  39. package/crud/sk-keyword.service.d.ts +19 -0
  40. package/crud/sk-order.service.d.ts +45 -0
  41. package/crud/sk-point.service.d.ts +17 -0
  42. package/crud/sk-product.service.d.ts +84 -0
  43. package/crud/sk-promotion.service.d.ts +41 -0
  44. package/crud/sk-search.service.d.ts +12 -0
  45. package/crud/sk-store.service.d.ts +17 -0
  46. package/crud/sk-user.service.d.ts +25 -0
  47. package/esm2020/api/model/api-config.mjs +2 -0
  48. package/esm2020/api/model/api-pageable-param.mjs +29 -0
  49. package/esm2020/api/model/api-pageable.mjs +3 -0
  50. package/esm2020/api/model/api-response.mjs +3 -0
  51. package/esm2020/api/model/index.mjs +4 -0
  52. package/esm2020/api/public_api.mjs +4 -0
  53. package/esm2020/api/sk-api.module.mjs +35 -0
  54. package/esm2020/api/sk-api.service.mjs +145 -0
  55. package/esm2020/api/sk-front-lib-api.mjs +5 -0
  56. package/esm2020/article/public_api.mjs +7 -0
  57. package/esm2020/article/sk-article-editor-server.component.mjs +51 -0
  58. package/esm2020/article/sk-article-editor.component.mjs +93 -0
  59. package/esm2020/article/sk-article-server.module.mjs +33 -0
  60. package/esm2020/article/sk-article.module.mjs +32 -0
  61. package/esm2020/article/sk-article.service.mjs +248 -0
  62. package/esm2020/article/sk-froala-editor.directive.mjs +325 -0
  63. package/esm2020/article/sk-front-lib-article.mjs +5 -0
  64. package/esm2020/crud/public_api.mjs +25 -0
  65. package/esm2020/crud/sk-account.service.mjs +36 -0
  66. package/esm2020/crud/sk-affiliate.service.mjs +94 -0
  67. package/esm2020/crud/sk-auth-admin.guard.mjs +31 -0
  68. package/esm2020/crud/sk-auth.guard.mjs +31 -0
  69. package/esm2020/crud/sk-auth.service.mjs +67 -0
  70. package/esm2020/crud/sk-board.service.mjs +54 -0
  71. package/esm2020/crud/sk-brand.service.mjs +46 -0
  72. package/esm2020/crud/sk-cart.service.mjs +256 -0
  73. package/esm2020/crud/sk-category.service.mjs +63 -0
  74. package/esm2020/crud/sk-comment.service.mjs +43 -0
  75. package/esm2020/crud/sk-config.service.mjs +31 -0
  76. package/esm2020/crud/sk-contact.service.mjs +39 -0
  77. package/esm2020/crud/sk-coupon.service.mjs +62 -0
  78. package/esm2020/crud/sk-document.service.mjs +110 -0
  79. package/esm2020/crud/sk-etc.service.mjs +25 -0
  80. package/esm2020/crud/sk-file.service.mjs +37 -0
  81. package/esm2020/crud/sk-front-lib-crud.mjs +5 -0
  82. package/esm2020/crud/sk-keyword.service.mjs +46 -0
  83. package/esm2020/crud/sk-order.service.mjs +133 -0
  84. package/esm2020/crud/sk-point.service.mjs +45 -0
  85. package/esm2020/crud/sk-product.service.mjs +168 -0
  86. package/esm2020/crud/sk-promotion.service.mjs +84 -0
  87. package/esm2020/crud/sk-search.service.mjs +25 -0
  88. package/esm2020/crud/sk-store.service.mjs +47 -0
  89. package/esm2020/crud/sk-user.service.mjs +73 -0
  90. package/esm2020/google-analytics/google-analytics-router.module.mjs +30 -0
  91. package/esm2020/google-analytics/google-analytics.module.mjs +40 -0
  92. package/esm2020/google-analytics/initializers/google-analytics-router.initializer.mjs +24 -0
  93. package/esm2020/google-analytics/initializers/google-analytics.initializer.mjs +46 -0
  94. package/esm2020/google-analytics/interfaces/google-analytics-command.mjs +2 -0
  95. package/esm2020/google-analytics/interfaces/google-analytics-settings.mjs +2 -0
  96. package/esm2020/google-analytics/public_api.mjs +11 -0
  97. package/esm2020/google-analytics/services/google-analytics.service.mjs +223 -0
  98. package/esm2020/google-analytics/sk-front-lib-google-analytics.mjs +5 -0
  99. package/esm2020/google-analytics/tokens/google-analytics-settings-token.mjs +5 -0
  100. package/esm2020/google-analytics/types/ga-action.type.mjs +2 -0
  101. package/esm2020/google-analytics/types/ga-bind.type.mjs +2 -0
  102. package/esm2020/image/public_api.mjs +3 -0
  103. package/esm2020/image/sk-front-lib-image.mjs +5 -0
  104. package/esm2020/image/sk-image.component.mjs +262 -0
  105. package/esm2020/image/sk-image.module.mjs +43 -0
  106. package/esm2020/lib/sk-byte.pipe.mjs +4 -4
  107. package/esm2020/lib/sk-date-time.pipe.mjs +4 -4
  108. package/esm2020/lib/sk-date.pipe.mjs +4 -4
  109. package/esm2020/lib/sk-front-lib.module.mjs +5 -5
  110. package/esm2020/lib/sk-keys.pipe.mjs +4 -4
  111. package/esm2020/lib/sk-time.pipe.mjs +4 -4
  112. package/esm2020/model/lib/article.mjs +11 -0
  113. package/esm2020/model/lib/audit.mjs +12 -0
  114. package/esm2020/model/lib/auth.mjs +2 -0
  115. package/esm2020/model/lib/board.mjs +21 -0
  116. package/esm2020/model/lib/cart.mjs +29 -0
  117. package/esm2020/model/lib/comment.mjs +25 -0
  118. package/esm2020/model/lib/contact.mjs +28 -0
  119. package/esm2020/model/lib/coupon.mjs +23 -0
  120. package/esm2020/model/lib/document.mjs +49 -0
  121. package/esm2020/model/lib/etc.mjs +57 -0
  122. package/esm2020/model/lib/file.mjs +8 -0
  123. package/esm2020/model/lib/filetype.mjs +179 -0
  124. package/esm2020/model/lib/grid.mjs +83 -0
  125. package/esm2020/model/lib/nicepay.mjs +81 -0
  126. package/esm2020/model/lib/order.mjs +106 -0
  127. package/esm2020/model/lib/payment.mjs +35 -0
  128. package/esm2020/model/lib/point.mjs +47 -0
  129. package/esm2020/model/lib/product-series.mjs +2 -0
  130. package/esm2020/model/lib/product.mjs +156 -0
  131. package/esm2020/model/lib/promotion.mjs +80 -0
  132. package/esm2020/model/lib/shipping.mjs +37 -0
  133. package/esm2020/model/lib/tosspay.mjs +61 -0
  134. package/esm2020/model/lib/user.mjs +61 -0
  135. package/esm2020/model/public_api.mjs +24 -0
  136. package/esm2020/model/sk-front-lib-model.mjs +5 -0
  137. package/esm2020/search-address/dialog/dialog.component.mjs +27 -0
  138. package/esm2020/search-address/public_api.mjs +4 -0
  139. package/esm2020/search-address/sk-front-lib-search-address.mjs +5 -0
  140. package/esm2020/search-address/sk-search-address.directive.mjs +41 -0
  141. package/esm2020/search-address/sk-search-address.model.mjs +8 -0
  142. package/esm2020/search-address/sk-search-address.module.mjs +52 -0
  143. package/esm2020/search-address/sk-search-address.service.mjs +65 -0
  144. package/esm2020/uploader/public_api.mjs +4 -0
  145. package/esm2020/uploader/sk-front-lib-uploader.mjs +5 -0
  146. package/esm2020/uploader/sk-uploader-file-item.model.mjs +95 -0
  147. package/esm2020/uploader/sk-uploader.animation.mjs +47 -0
  148. package/esm2020/uploader/sk-uploader.class.mjs +188 -0
  149. package/esm2020/uploader/sk-uploader.component.mjs +120 -0
  150. package/esm2020/uploader/sk-uploader.directive.mjs +44 -0
  151. package/esm2020/uploader/sk-uploader.module.mjs +62 -0
  152. package/fesm2015/sk-front-lib-api.mjs +218 -0
  153. package/fesm2015/sk-front-lib-api.mjs.map +1 -0
  154. package/fesm2015/sk-front-lib-article.mjs +762 -0
  155. package/fesm2015/sk-front-lib-article.mjs.map +1 -0
  156. package/fesm2015/sk-front-lib-crud.mjs +1529 -0
  157. package/fesm2015/sk-front-lib-crud.mjs.map +1 -0
  158. package/fesm2015/sk-front-lib-google-analytics.mjs +361 -0
  159. package/fesm2015/sk-front-lib-google-analytics.mjs.map +1 -0
  160. package/fesm2015/sk-front-lib-image.mjs +306 -0
  161. package/fesm2015/sk-front-lib-image.mjs.map +1 -0
  162. package/fesm2015/sk-front-lib-model.mjs +1171 -0
  163. package/fesm2015/sk-front-lib-model.mjs.map +1 -0
  164. package/fesm2015/sk-front-lib-search-address.mjs +188 -0
  165. package/fesm2015/sk-front-lib-search-address.mjs.map +1 -0
  166. package/fesm2015/sk-front-lib-uploader.mjs +551 -0
  167. package/fesm2015/sk-front-lib-uploader.mjs.map +1 -0
  168. package/fesm2015/sk-front-lib.mjs +19 -19
  169. package/fesm2015/sk-front-lib.mjs.map +1 -1
  170. package/fesm2020/sk-front-lib-api.mjs +216 -0
  171. package/fesm2020/sk-front-lib-api.mjs.map +1 -0
  172. package/fesm2020/sk-front-lib-article.mjs +771 -0
  173. package/fesm2020/sk-front-lib-article.mjs.map +1 -0
  174. package/fesm2020/sk-front-lib-crud.mjs +1525 -0
  175. package/fesm2020/sk-front-lib-crud.mjs.map +1 -0
  176. package/fesm2020/sk-front-lib-google-analytics.mjs +358 -0
  177. package/fesm2020/sk-front-lib-google-analytics.mjs.map +1 -0
  178. package/fesm2020/sk-front-lib-image.mjs +309 -0
  179. package/fesm2020/sk-front-lib-image.mjs.map +1 -0
  180. package/fesm2020/sk-front-lib-model.mjs +1171 -0
  181. package/fesm2020/sk-front-lib-model.mjs.map +1 -0
  182. package/fesm2020/sk-front-lib-search-address.mjs +186 -0
  183. package/fesm2020/sk-front-lib-search-address.mjs.map +1 -0
  184. package/fesm2020/sk-front-lib-uploader.mjs +549 -0
  185. package/fesm2020/sk-front-lib-uploader.mjs.map +1 -0
  186. package/fesm2020/sk-front-lib.mjs +19 -19
  187. package/fesm2020/sk-front-lib.mjs.map +1 -1
  188. package/google-analytics/google-analytics-router.module.d.ts +8 -0
  189. package/google-analytics/google-analytics.module.d.ts +10 -0
  190. package/google-analytics/initializers/google-analytics-router.initializer.d.ts +5 -0
  191. package/google-analytics/initializers/google-analytics.initializer.d.ts +4 -0
  192. package/google-analytics/interfaces/google-analytics-command.d.ts +4 -0
  193. package/google-analytics/interfaces/google-analytics-settings.d.ts +6 -0
  194. package/google-analytics/package.json +10 -0
  195. package/google-analytics/public_api.d.ts +10 -0
  196. package/google-analytics/services/google-analytics.service.d.ts +85 -0
  197. package/google-analytics/sk-front-lib-google-analytics.d.ts +5 -0
  198. package/google-analytics/tokens/google-analytics-settings-token.d.ts +3 -0
  199. package/google-analytics/types/ga-action.type.d.ts +1 -0
  200. package/google-analytics/types/ga-bind.type.d.ts +1 -0
  201. package/image/package.json +10 -0
  202. package/image/public_api.d.ts +3 -0
  203. package/image/sk-front-lib-image.d.ts +5 -0
  204. package/image/sk-image.component.d.ts +112 -0
  205. package/image/sk-image.module.d.ts +12 -0
  206. package/lib/sk-byte.pipe.d.ts +1 -1
  207. package/lib/sk-date-time.pipe.d.ts +1 -1
  208. package/lib/sk-date.pipe.d.ts +1 -1
  209. package/lib/sk-keys.pipe.d.ts +1 -1
  210. package/lib/sk-time.pipe.d.ts +1 -1
  211. package/model/lib/article.d.ts +13 -0
  212. package/model/lib/audit.d.ts +13 -0
  213. package/model/lib/auth.d.ts +8 -0
  214. package/model/lib/board.d.ts +39 -0
  215. package/model/lib/cart.d.ts +45 -0
  216. package/model/lib/comment.d.ts +43 -0
  217. package/model/lib/contact.d.ts +40 -0
  218. package/model/lib/coupon.d.ts +116 -0
  219. package/model/lib/document.d.ts +104 -0
  220. package/model/lib/etc.d.ts +220 -0
  221. package/model/lib/file.d.ts +24 -0
  222. package/model/lib/filetype.d.ts +10 -0
  223. package/model/lib/grid.d.ts +97 -0
  224. package/model/lib/nicepay.d.ts +39 -0
  225. package/model/lib/order.d.ts +163 -0
  226. package/model/lib/payment.d.ts +32 -0
  227. package/model/lib/point.d.ts +30 -0
  228. package/model/lib/product-series.d.ts +25 -0
  229. package/model/lib/product.d.ts +309 -0
  230. package/model/lib/promotion.d.ts +169 -0
  231. package/model/lib/shipping.d.ts +44 -0
  232. package/model/lib/tosspay.d.ts +29 -0
  233. package/model/lib/user.d.ts +54 -0
  234. package/model/package.json +10 -0
  235. package/model/public_api.d.ts +23 -0
  236. package/model/sk-front-lib-model.d.ts +5 -0
  237. package/package.json +67 -3
  238. package/search-address/dialog/dialog.component.d.ts +13 -0
  239. package/search-address/package.json +10 -0
  240. package/search-address/public_api.d.ts +3 -0
  241. package/search-address/sk-front-lib-search-address.d.ts +5 -0
  242. package/search-address/sk-search-address.directive.d.ts +15 -0
  243. package/search-address/sk-search-address.model.d.ts +40 -0
  244. package/search-address/sk-search-address.module.d.ts +14 -0
  245. package/search-address/sk-search-address.service.d.ts +13 -0
  246. package/uploader/package.json +10 -0
  247. package/uploader/public_api.d.ts +4 -0
  248. package/uploader/sk-front-lib-uploader.d.ts +5 -0
  249. package/uploader/sk-uploader-file-item.model.d.ts +29 -0
  250. package/uploader/sk-uploader.animation.d.ts +1 -0
  251. package/uploader/sk-uploader.class.d.ts +47 -0
  252. package/uploader/sk-uploader.component.d.ts +28 -0
  253. package/uploader/sk-uploader.directive.d.ts +15 -0
  254. package/uploader/sk-uploader.module.d.ts +16 -0
  255. /package/{index.d.ts → sk-front-lib.d.ts} +0 -0
@@ -0,0 +1,771 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Inject, EventEmitter, forwardRef, Directive, Input, Output, Component, NgModule } from '@angular/core';
3
+ import { SkFile } from 'sk-front-lib/model';
4
+ import * as i1 from 'sk-front-lib/api';
5
+ import FroalaEditor from 'froala-editor';
6
+ import 'froala-editor/js/plugins.pkgd.min.js';
7
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
+ import { CommonModule } from '@angular/common';
9
+
10
+ class SkArticleService {
11
+ constructor(environment) {
12
+ this.environment = environment;
13
+ this.initializeFroala();
14
+ }
15
+ initializeFroala() {
16
+ FroalaEditor.DefineIconTemplate('material_design', '<i class="material-icons">[NAME]</i>');
17
+ this.loadFontWeight();
18
+ this.registerShortcuts();
19
+ }
20
+ loadFontWeight() {
21
+ // Define an icon.
22
+ FroalaEditor.DefineIcon('font-weight', { NAME: 'format_size', template: 'material_design' });
23
+ // Define a dropdown button.
24
+ FroalaEditor.RegisterCommand('font-weight-drop', {
25
+ // Button title.
26
+ title: 'Font Weight',
27
+ // Mark the button as a dropdown.
28
+ type: 'dropdown',
29
+ // Specify the icon for the button.
30
+ // If this option is not specified, the button name will be used.
31
+ icon: 'font-weight',
32
+ // Options for the dropdown.
33
+ options: {
34
+ 100: 'Thin',
35
+ 300: 'Light',
36
+ 400: 'Regular',
37
+ 500: 'Medium',
38
+ 700: 'Bold',
39
+ 900: 'Black'
40
+ },
41
+ // If present, the options property will be ignored.
42
+ // It can be used to define a custom HTML for the dropdown.
43
+ // html: function () {
44
+ // // The current context is the editor instance.
45
+ // return '';
46
+ // },
47
+ // Save the dropdown action into undo stack.
48
+ undo: true,
49
+ // Focus inside the editor before callback.
50
+ focus: true,
51
+ // Refresh the button state after the callback.
52
+ refreshAfterCallback: true,
53
+ // Callback.
54
+ callback(cmd, val, params) {
55
+ this.format.removeStyle('font-weight');
56
+ this.format.applyStyle('font-weight', val);
57
+ },
58
+ // Called when the dropdown button state might have changed.
59
+ // refresh: function ($btn) {
60
+ // // The current context is the editor instance.
61
+ // console.log (this.selection.element());
62
+ // console.log(this);
63
+ // },
64
+ // Called when the dropdown is shown.
65
+ // refreshOnShow: function ($btn, $dropdown) {
66
+ // // The current context is the editor instance.
67
+ // console.log (this.selection.element());
68
+ // }
69
+ });
70
+ }
71
+ registerShortcuts() {
72
+ FroalaEditor.RegisterShortcut(49, 'paragraphFormat', 'H1', '1', false);
73
+ FroalaEditor.RegisterShortcut(50, 'paragraphFormat', 'H2', '2', false);
74
+ FroalaEditor.RegisterShortcut(51, 'paragraphFormat', 'H3', '3', false);
75
+ FroalaEditor.RegisterShortcut(52, 'paragraphFormat', 'N', '4', false);
76
+ FroalaEditor.RegisterShortcut(66, 'font-weight-drop', '700');
77
+ }
78
+ getBaseConfig() {
79
+ return {
80
+ key: 'Ig1A7vB2D2E2E1F1B4muvugzxmwA-7I-7A5B-21qrC-11A2B2C2A1C9B3B3C6E2C1==',
81
+ editorClass: 'sk-custom',
82
+ fontFamily: {
83
+ 'Noto Sans KR, Noto Sans, Arial,Helvetica,sans-serif': 'Noto Sans',
84
+ 'Roboto, Arial,Helvetica,sans-serif': 'Roboto',
85
+ 'Georgia,serif': 'Georgia',
86
+ 'Impact,Charcoal,sans-serif': 'Impact',
87
+ 'Tahoma,Geneva,sans-serif': 'Tahoma',
88
+ '\'Times New Roman\',Times,serif': 'Times New Roman',
89
+ 'Verdana,Geneva,sans-serif': 'Verdana'
90
+ },
91
+ imageDefaultWidth: 0,
92
+ // remove image manager
93
+ // imageInsertButtons: ['imageBack', '|', 'imageUpload', 'imageByURL', 'imageManager'],
94
+ imageInsertButtons: ['imageBack', '|', 'imageUpload', 'imageByURL'],
95
+ imageEditButtons: ['imageAlign', 'imageCaption', 'imageRemove', '|', 'imageLink', 'linkOpen', 'linkEdit', 'linkRemove', '-', 'imageDisplay', 'imageStyle', 'imageAlt', 'imageSize'],
96
+ imageAllowedTypes: ['jpeg', 'jpg', 'png', 'gif'],
97
+ // remove video upload
98
+ // ['videoBack', '|', 'videoByURL', 'videoEmbed', 'videoUpload']
99
+ videoInsertButtons: ['videoBack', '|', 'videoByURL', 'videoEmbed'],
100
+ videoUpload: false,
101
+ videoResponsive: true,
102
+ pastePlain: true,
103
+ pasteDeniedAttrs: ['class', 'id', 'style'],
104
+ pasteDeniedTags: ['div'],
105
+ wordPasteKeepFormatting: false,
106
+ imagePaste: false,
107
+ quickInsertEnabled: false,
108
+ paragraphFormat: {
109
+ H1: '대제목',
110
+ H2: '소제목',
111
+ H3: '문단 제목',
112
+ N: '본문'
113
+ },
114
+ // toolbarContainer: '.sk-custom-editor-toolbar',
115
+ toolbarSticky: false,
116
+ toolbarBottom: false,
117
+ attribution: false,
118
+ helpSets: [
119
+ {
120
+ title: 'Gearlounge Custom',
121
+ commands: [
122
+ { val: 'OSkey1', desc: '대제목' },
123
+ { val: 'OSkey2', desc: '소제목' },
124
+ { val: 'OSkey3', desc: '문단 제목' },
125
+ { val: 'OSkey4', desc: '본문' }
126
+ ]
127
+ },
128
+ {
129
+ title: 'Inline Editor',
130
+ commands: [
131
+ { val: 'OSkeyE', desc: 'Show the editor' }
132
+ ]
133
+ },
134
+ {
135
+ title: 'Common actions',
136
+ commands: [
137
+ { val: 'OSkeyC', desc: 'Copy' },
138
+ { val: 'OSkeyX', desc: 'Cut' },
139
+ { val: 'OSkeyV', desc: 'Paste' },
140
+ { val: 'OSkeyZ', desc: 'Undo' },
141
+ { val: 'OSkeyShift+Z', desc: 'Redo' },
142
+ { val: 'OSkeyK', desc: 'Insert Link' },
143
+ { val: 'OSkeyP', desc: 'Insert Image' }
144
+ ]
145
+ },
146
+ {
147
+ title: 'Basic Formatting',
148
+ commands: [
149
+ { val: 'OSkeyA', desc: 'Select All' },
150
+ { val: 'OSkeyB', desc: 'Bold' },
151
+ { val: 'OSkeyI', desc: 'Italic' },
152
+ { val: 'OSkeyU', desc: 'Underline' },
153
+ { val: 'OSkeyS', desc: 'Strikethrough' },
154
+ { val: 'OSkey]', desc: 'Increase Indent' },
155
+ { val: 'OSkey[', desc: 'Decrease Indent' }
156
+ ]
157
+ },
158
+ {
159
+ title: 'Quote',
160
+ commands: [
161
+ { val: 'OSkey\'', desc: 'Increase quote level' },
162
+ { val: 'OSkeyShift+\'', desc: 'Decrease quote level' }
163
+ ]
164
+ },
165
+ {
166
+ title: 'Image / Video',
167
+ commands: [
168
+ { val: 'OSkey+', desc: 'Resize larger' },
169
+ { val: 'OSkey-', desc: 'Resize smaller' }
170
+ ]
171
+ },
172
+ {
173
+ title: 'Table',
174
+ commands: [
175
+ { val: 'Alt+Space', desc: 'Select table cell' },
176
+ { val: 'Shift+Left/Right arrow', desc: 'Extend selection one cell' },
177
+ { val: 'Shift+Up/Down arrow', desc: 'Extend selection one row' }
178
+ ]
179
+ },
180
+ {
181
+ title: 'Navigation',
182
+ commands: [
183
+ { val: 'OSkey/', desc: 'Shortcuts' },
184
+ { val: 'Alt+F10', desc: 'Focus popup / toolbar' },
185
+ { val: 'Esc', desc: 'Return focus to previous position' }
186
+ ]
187
+ }
188
+ ],
189
+ };
190
+ }
191
+ getToolbar(type = 'default') {
192
+ if (type === 'default') {
193
+ return {
194
+ toolbarButtons: {
195
+ moreText: {
196
+ buttons: ['font-weight-drop', 'fontFamily', 'fontSize', 'textColor', 'clearFormatting', 'italic', 'strikeThrough', 'subscript', 'superscript', 'backgroundColor', 'inlineClass', 'inlineStyle'],
197
+ buttonsVisible: 5
198
+ },
199
+ moreParagraph: {
200
+ buttons: ['paragraphFormat', 'alignLeft', 'alignCenter', 'formatUL', 'quote', 'alignRight', 'alignJustify', 'formatOLSimple', 'formatOL', 'paragraphStyle', 'lineHeight', 'outdent', 'indent'],
201
+ buttonsVisible: 5
202
+ },
203
+ moreRich: {
204
+ buttons: ['insertLink', 'insertImage', 'insertVideo', 'insertHR', 'insertTable', 'emoticons', 'fontAwesome', 'specialCharacters', 'embedly', 'insertFile'],
205
+ buttonsVisible: 4
206
+ },
207
+ moreMisc: {
208
+ buttons: ['undo', 'redo', 'fullscreen', 'print', 'getPDF', 'spellChecker', 'selectAll', 'html', 'help'],
209
+ align: 'right',
210
+ buttonsVisible: 3
211
+ }
212
+ },
213
+ toolbarButtonsSm: {
214
+ moreText: {
215
+ buttons: ['font-weight-drop', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle', 'clearFormatting'],
216
+ buttonsVisible: 2
217
+ },
218
+ moreParagraph: {
219
+ buttons: ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify', 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote'],
220
+ buttonsVisible: 2
221
+ },
222
+ moreRich: {
223
+ buttons: ['insertLink', 'insertImage', 'insertVideo', 'insertTable', 'emoticons', 'fontAwesome', 'specialCharacters', 'embedly', 'insertFile', 'insertHR'],
224
+ buttonsVisible: 2
225
+ },
226
+ moreMisc: {
227
+ buttons: ['undo', 'redo', 'fullscreen', 'print', 'getPDF', 'spellChecker', 'selectAll', 'html', 'help'],
228
+ align: 'right',
229
+ buttonsVisible: 2
230
+ }
231
+ },
232
+ };
233
+ }
234
+ else if (type === 'simple') {
235
+ return {
236
+ toolbarButtons: [['font-weight-drop', 'fontFamily', 'fontSize', 'textColor', 'clearFormatting'], ['paragraphFormat', 'alignLeft', 'alignCenter', 'formatUL', 'quote'], ['insertLink']],
237
+ toolbarButtonsSm: [['font-weight-drop', 'fontFamily', 'fontSize', 'textColor', 'clearFormatting'], ['paragraphFormat', 'alignLeft', 'alignCenter', 'formatUL', 'quote'], ['insertLink']],
238
+ };
239
+ }
240
+ }
241
+ }
242
+ SkArticleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
243
+ SkArticleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleService, providedIn: 'root' });
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleService, decorators: [{
245
+ type: Injectable,
246
+ args: [{
247
+ providedIn: 'root'
248
+ }]
249
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
250
+ type: Inject,
251
+ args: ['environment']
252
+ }] }]; } });
253
+
254
+ class SkFroalaEditorDirective {
255
+ constructor(el, zone) {
256
+ this.zone = zone;
257
+ // editor options
258
+ this._opts = {
259
+ immediateAngularModelUpdate: false,
260
+ angularIgnoreAttrs: null
261
+ };
262
+ this.SPECIAL_TAGS = ['img', 'button', 'input', 'a'];
263
+ this.INNER_HTML_ATTR = 'innerHTML';
264
+ this._hasSpecialTag = false;
265
+ this._editorInitialized = false;
266
+ this._oldModel = null;
267
+ // froalaModel directive as output: update model if editor contentChanged
268
+ this.froalaModelChange = new EventEmitter();
269
+ // froalaInit directive as output: send manual editor initialization
270
+ this.froalaInit = new EventEmitter();
271
+ // Begin ControlValueAccesor methods.
272
+ this.onChange = (_) => {
273
+ };
274
+ this.onTouched = () => {
275
+ };
276
+ const element = el.nativeElement;
277
+ // check if the element is a special tag
278
+ if (this.SPECIAL_TAGS.indexOf(element.tagName.toLowerCase()) != -1) {
279
+ this._hasSpecialTag = true;
280
+ }
281
+ this._element = element;
282
+ this.zone = zone;
283
+ }
284
+ // End ControlValueAccesor methods.
285
+ // froalaEditor directive as input: store the editor options
286
+ set froalaEditor(opts) {
287
+ this._opts = this.clone(opts || this._opts);
288
+ this._opts = { ...this._opts };
289
+ }
290
+ // froalaModel directive as input: store initial editor content
291
+ set froalaModel(content) {
292
+ this.updateEditor(content);
293
+ }
294
+ // Form model content changed.
295
+ writeValue(content) {
296
+ this.updateEditor(content);
297
+ }
298
+ registerOnChange(fn) {
299
+ this.onChange = fn;
300
+ }
301
+ registerOnTouched(fn) {
302
+ this.onTouched = fn;
303
+ }
304
+ // TODO: replace clone method with better possible alternate
305
+ clone(item) {
306
+ const me = this;
307
+ if (!item) {
308
+ return item;
309
+ } // null, undefined values check
310
+ let types = [Number, String, Boolean], result;
311
+ // normalizing primitives if someone did new String('aaa'), or new Number('444');
312
+ types.forEach(function (type) {
313
+ if (item instanceof type) {
314
+ result = type(item);
315
+ }
316
+ });
317
+ if (typeof result == 'undefined') {
318
+ if (Object.prototype.toString.call(item) === '[object Array]') {
319
+ result = [];
320
+ item.forEach(function (child, index, array) {
321
+ result[index] = me.clone(child);
322
+ });
323
+ }
324
+ else if (typeof item == 'object') {
325
+ // testing that this is DOM
326
+ if (item.nodeType && typeof item.cloneNode == 'function') {
327
+ result = item.cloneNode(true);
328
+ }
329
+ else if (!item.prototype) { // check that this is a literal
330
+ if (item instanceof Date) {
331
+ result = new Date(item);
332
+ }
333
+ else {
334
+ // it is an object literal
335
+ result = {};
336
+ for (const i in item) {
337
+ result[i] = me.clone(item[i]);
338
+ }
339
+ }
340
+ }
341
+ else {
342
+ if (false && item.constructor) {
343
+ result = new item.constructor();
344
+ }
345
+ else {
346
+ result = item;
347
+ }
348
+ }
349
+ }
350
+ else {
351
+ result = item;
352
+ }
353
+ }
354
+ return result;
355
+ }
356
+ // Update editor with model contents.
357
+ updateEditor(content) {
358
+ if (JSON.stringify(this._oldModel) == JSON.stringify(content)) {
359
+ return;
360
+ }
361
+ if (!this._hasSpecialTag) {
362
+ this._oldModel = content;
363
+ }
364
+ else {
365
+ this._model = content;
366
+ }
367
+ if (this._editorInitialized) {
368
+ if (!this._hasSpecialTag) {
369
+ this._editor.html.set(content);
370
+ }
371
+ else {
372
+ this.setContent();
373
+ }
374
+ }
375
+ else {
376
+ if (!this._hasSpecialTag) {
377
+ this._element.innerHTML = content || '';
378
+ }
379
+ else {
380
+ this.setContent();
381
+ }
382
+ }
383
+ }
384
+ // update model if editor contentChanged
385
+ updateModel() {
386
+ this.zone.run(() => {
387
+ let modelContent = null;
388
+ if (this._hasSpecialTag) {
389
+ const attributeNodes = this._element.attributes;
390
+ const attrs = {};
391
+ for (let i = 0; i < attributeNodes.length; i++) {
392
+ const attrName = attributeNodes[i].name;
393
+ if (this._opts.angularIgnoreAttrs && this._opts.angularIgnoreAttrs.indexOf(attrName) != -1) {
394
+ continue;
395
+ }
396
+ attrs[attrName] = attributeNodes[i].value;
397
+ }
398
+ if (this._element.innerHTML) {
399
+ attrs[this.INNER_HTML_ATTR] = this._element.innerHTML;
400
+ }
401
+ modelContent = attrs;
402
+ }
403
+ else {
404
+ const returnedHtml = this._editor.html.get();
405
+ if (typeof returnedHtml === 'string') {
406
+ modelContent = returnedHtml;
407
+ }
408
+ }
409
+ if (this._oldModel !== modelContent) {
410
+ this._oldModel = modelContent;
411
+ // Update froalaModel.
412
+ this.froalaModelChange.emit(modelContent);
413
+ // Update form model.
414
+ this.onChange(modelContent);
415
+ }
416
+ });
417
+ }
418
+ registerEvent(eventName, callback) {
419
+ if (!eventName || !callback) {
420
+ return;
421
+ }
422
+ if (!this._opts.events) {
423
+ this._opts.events = {};
424
+ }
425
+ this._opts.events[eventName] = callback;
426
+ }
427
+ initListeners() {
428
+ const self = this;
429
+ // Check if we have events on the editor.
430
+ if (this._editor.events) {
431
+ // bind contentChange and keyup event to froalaModel
432
+ this._editor.events.on('contentChanged', function () {
433
+ setTimeout(function () {
434
+ self.updateModel();
435
+ }, 0);
436
+ });
437
+ this._editor.events.on('mousedown', function () {
438
+ setTimeout(function () {
439
+ self.onTouched();
440
+ }, 0);
441
+ });
442
+ if (this._opts.immediateAngularModelUpdate) {
443
+ this._editor.events.on('keyup', function () {
444
+ setTimeout(function () {
445
+ self.updateModel();
446
+ }, 0);
447
+ });
448
+ }
449
+ }
450
+ this._editorInitialized = true;
451
+ }
452
+ createEditor() {
453
+ if (this._editorInitialized) {
454
+ return;
455
+ }
456
+ this.setContent(true);
457
+ // init editor
458
+ this.zone.runOutsideAngular(() => {
459
+ // Add listeners on initialized event.
460
+ if (!this._opts.events) {
461
+ this._opts.events = {};
462
+ }
463
+ // Register initialized event.
464
+ this.registerEvent('initialized', this._opts.events && this._opts.events.initialized);
465
+ const existingInitCallback = this._opts.events.initialized;
466
+ // Default initialized event.
467
+ if (!this._opts.events.initialized || !this._opts.events.initialized.overridden) {
468
+ this._opts.events.initialized = () => {
469
+ this.initListeners();
470
+ existingInitCallback && existingInitCallback.call(this._editor, this);
471
+ };
472
+ this._opts.events.initialized.overridden = true;
473
+ }
474
+ // Initialize the Froala Editor.
475
+ this._editor = new FroalaEditor(this._element, this._opts);
476
+ });
477
+ }
478
+ setHtml() {
479
+ this._editor.html.set(this._model || '');
480
+ // This will reset the undo stack everytime the model changes externally. Can we fix this?
481
+ this._editor.undo.reset();
482
+ this._editor.undo.saveStep();
483
+ }
484
+ setContent(firstTime = false) {
485
+ const self = this;
486
+ // Set initial content
487
+ if (this._model || this._model == '') {
488
+ this._oldModel = this._model;
489
+ if (this._hasSpecialTag) {
490
+ const tags = this._model;
491
+ // add tags on element
492
+ if (tags) {
493
+ for (const attr in tags) {
494
+ if (tags.hasOwnProperty(attr) && attr != this.INNER_HTML_ATTR) {
495
+ this._element.setAttribute(attr, tags[attr]);
496
+ }
497
+ }
498
+ if (tags.hasOwnProperty(this.INNER_HTML_ATTR)) {
499
+ this._element.innerHTML = tags[this.INNER_HTML_ATTR];
500
+ }
501
+ }
502
+ }
503
+ else {
504
+ if (firstTime) {
505
+ this.registerEvent('initialized', function () {
506
+ self.setHtml();
507
+ });
508
+ }
509
+ else {
510
+ self.setHtml();
511
+ }
512
+ }
513
+ }
514
+ }
515
+ destroyEditor() {
516
+ if (this._editorInitialized) {
517
+ this._editor.destroy();
518
+ this._editorInitialized = false;
519
+ }
520
+ }
521
+ getEditor() {
522
+ if (this._element) {
523
+ return this._editor;
524
+ }
525
+ return null;
526
+ }
527
+ // send manual editor initialization
528
+ generateManualController() {
529
+ const controls = {
530
+ initialize: this.createEditor.bind(this),
531
+ destroy: this.destroyEditor.bind(this),
532
+ getEditor: this.getEditor.bind(this),
533
+ };
534
+ this.froalaInit.emit(controls);
535
+ }
536
+ // TODO not sure if ngOnInit is executed after @inputs
537
+ ngAfterViewInit() {
538
+ // check if output froalaInit is present. Maybe observers is private and should not be used?? TODO how to better test that an output directive is present.
539
+ if (!this.froalaInit.observers.length) {
540
+ this.createEditor();
541
+ }
542
+ else {
543
+ this.generateManualController();
544
+ }
545
+ }
546
+ ngOnDestroy() {
547
+ this.destroyEditor();
548
+ }
549
+ }
550
+ SkFroalaEditorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkFroalaEditorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
551
+ SkFroalaEditorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.2", type: SkFroalaEditorDirective, selector: "[froalaEditor]", inputs: { froalaEditor: "froalaEditor", froalaModel: "froalaModel" }, outputs: { froalaModelChange: "froalaModelChange", froalaInit: "froalaInit" }, providers: [{
552
+ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SkFroalaEditorDirective),
553
+ multi: true
554
+ }], exportAs: ["froalaEditor"], ngImport: i0 });
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkFroalaEditorDirective, decorators: [{
556
+ type: Directive,
557
+ args: [{
558
+ selector: '[froalaEditor]',
559
+ exportAs: 'froalaEditor',
560
+ providers: [{
561
+ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SkFroalaEditorDirective),
562
+ multi: true
563
+ }]
564
+ }]
565
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { froalaEditor: [{
566
+ type: Input
567
+ }], froalaModel: [{
568
+ type: Input
569
+ }], froalaModelChange: [{
570
+ type: Output
571
+ }], froalaInit: [{
572
+ type: Output
573
+ }] } });
574
+
575
+ class SkArticleEditorComponent {
576
+ constructor(_apiService, _articleService) {
577
+ this._apiService = _apiService;
578
+ this._articleService = _articleService;
579
+ this.toolbarType = 'default';
580
+ this._initOptions();
581
+ }
582
+ // -----------------------------------------------------------------------------------------------------
583
+ // @ Accessors
584
+ // ------------------------------------------1-----------------------------------------------------------
585
+ // -----------------------------------------------------------------------------------------------------
586
+ // @ Lifecycle hooks
587
+ // -----------------------------------------------------------------------------------------------------
588
+ ngOnInit() {
589
+ }
590
+ ngOnChanges(changes) {
591
+ this._initData();
592
+ this._initOptions();
593
+ }
594
+ // -----------------------------------------------------------------------------------------------------
595
+ // @ Public methods
596
+ // -----------------------------------------------------------------------------------------------------
597
+ getData() {
598
+ return { content: this.content, images: this.images };
599
+ }
600
+ // -----------------------------------------------------------------------------------------------------
601
+ // @ Private methods
602
+ // -----------------------------------------------------------------------------------------------------
603
+ _initData() {
604
+ if (!this.article) {
605
+ return;
606
+ }
607
+ this.content = this.article.content;
608
+ this.images = this.article.images || [];
609
+ }
610
+ _initOptions() {
611
+ this.editorConfig = Object.assign({}, this._articleService.getBaseConfig(), {
612
+ requestHeaders: {
613
+ 'Authorization': 'Bearer ' + this._apiService.getToken(),
614
+ 'ngsw-bypass': 'true'
615
+ },
616
+ imageUploadParams: {
617
+ imageUrl: this._articleService.environment.apiServer + '/api/public/images/'
618
+ },
619
+ imageUploadParam: 'file',
620
+ imageUploadRemoteUrls: true,
621
+ imageUploadURL: this._articleService.environment.apiServer + '/external/froala/upload',
622
+ fileUploadParams: {
623
+ imageUrl: this._articleService.environment.apiServer + '/api/public/files/'
624
+ },
625
+ fileUploadParam: 'file',
626
+ fileUploadURL: this._articleService.environment.apiServer + '/external/froala/upload',
627
+ events: {
628
+ 'image.inserted': ($img, response) => {
629
+ this._addImage(JSON.parse(response).file);
630
+ },
631
+ 'image.removed': ($img) => {
632
+ console.log($img, $img.dataset);
633
+ for (let i = 0; i < $img.length; i++) {
634
+ this._removeImage(Number($img[i].dataset.id));
635
+ }
636
+ }
637
+ },
638
+ ...this._articleService.getToolbar(this.toolbarType)
639
+ });
640
+ }
641
+ _addImage(file) {
642
+ this.images.push(new SkFile(file));
643
+ }
644
+ _removeImage(id) {
645
+ const index = this.images.findIndex(value => value.id === id);
646
+ if (index > -1) {
647
+ this.images.splice(index, 1);
648
+ }
649
+ }
650
+ }
651
+ SkArticleEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleEditorComponent, deps: [{ token: i1.SkApiService }, { token: SkArticleService }], target: i0.ɵɵFactoryTarget.Component });
652
+ SkArticleEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: SkArticleEditorComponent, selector: "sk-article-editor", inputs: { article: "article", toolbarType: "toolbarType" }, usesOnChanges: true, ngImport: i0, template: "<div [froalaEditor]=\"editorConfig\" [(froalaModel)]=\"content\"></div>\n", styles: [":host{position:relative;display:block}\n"], directives: [{ type: SkFroalaEditorDirective, selector: "[froalaEditor]", inputs: ["froalaEditor", "froalaModel"], outputs: ["froalaModelChange", "froalaInit"], exportAs: ["froalaEditor"] }] });
653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleEditorComponent, decorators: [{
654
+ type: Component,
655
+ args: [{ selector: 'sk-article-editor', template: "<div [froalaEditor]=\"editorConfig\" [(froalaModel)]=\"content\"></div>\n", styles: [":host{position:relative;display:block}\n"] }]
656
+ }], ctorParameters: function () { return [{ type: i1.SkApiService }, { type: SkArticleService }]; }, propDecorators: { article: [{
657
+ type: Input
658
+ }], toolbarType: [{
659
+ type: Input
660
+ }] } });
661
+
662
+ class SkArticleModule {
663
+ }
664
+ SkArticleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
665
+ SkArticleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleModule, declarations: [SkArticleEditorComponent,
666
+ SkFroalaEditorDirective], imports: [CommonModule], exports: [SkArticleEditorComponent,
667
+ SkFroalaEditorDirective] });
668
+ SkArticleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleModule, providers: [], imports: [[
669
+ CommonModule
670
+ ]] });
671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleModule, decorators: [{
672
+ type: NgModule,
673
+ args: [{
674
+ declarations: [
675
+ SkArticleEditorComponent,
676
+ SkFroalaEditorDirective
677
+ ],
678
+ imports: [
679
+ CommonModule
680
+ ],
681
+ exports: [
682
+ SkArticleEditorComponent,
683
+ SkFroalaEditorDirective
684
+ ],
685
+ providers: []
686
+ }]
687
+ }] });
688
+
689
+ class SkArticleEditorServerComponent {
690
+ constructor(_apiService) {
691
+ this._apiService = _apiService;
692
+ this.toolbarType = 'default';
693
+ this._initOptions();
694
+ }
695
+ // -----------------------------------------------------------------------------------------------------
696
+ // @ Accessors
697
+ // ------------------------------------------1-----------------------------------------------------------
698
+ // -----------------------------------------------------------------------------------------------------
699
+ // @ Lifecycle hooks
700
+ // -----------------------------------------------------------------------------------------------------
701
+ ngOnInit() {
702
+ }
703
+ ngOnChanges(changes) {
704
+ this._initData();
705
+ this._initOptions();
706
+ }
707
+ // -----------------------------------------------------------------------------------------------------
708
+ // @ Public methods
709
+ // -----------------------------------------------------------------------------------------------------
710
+ getData() {
711
+ return { content: this.content, images: this.images };
712
+ }
713
+ // -----------------------------------------------------------------------------------------------------
714
+ // @ Private methods
715
+ // -----------------------------------------------------------------------------------------------------
716
+ _initData() {
717
+ if (!this.article) {
718
+ return;
719
+ }
720
+ this.content = this.article.content;
721
+ this.images = this.article.images || [];
722
+ }
723
+ _initOptions() {
724
+ }
725
+ }
726
+ SkArticleEditorServerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleEditorServerComponent, deps: [{ token: i1.SkApiService }], target: i0.ɵɵFactoryTarget.Component });
727
+ SkArticleEditorServerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: SkArticleEditorServerComponent, selector: "sk-article-editor", inputs: { article: "article", toolbarType: "toolbarType" }, usesOnChanges: true, ngImport: i0, template: "<div>Server</div>\n", styles: [":host{position:relative;display:block}\n"] });
728
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleEditorServerComponent, decorators: [{
729
+ type: Component,
730
+ args: [{ selector: 'sk-article-editor', template: "<div>Server</div>\n", styles: [":host{position:relative;display:block}\n"] }]
731
+ }], ctorParameters: function () { return [{ type: i1.SkApiService }]; }, propDecorators: { article: [{
732
+ type: Input
733
+ }], toolbarType: [{
734
+ type: Input
735
+ }] } });
736
+
737
+ class SkArticleServerModule {
738
+ static forRoot(environment) {
739
+ return {
740
+ ngModule: SkArticleServerModule,
741
+ providers: []
742
+ };
743
+ }
744
+ }
745
+ SkArticleServerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
746
+ SkArticleServerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleServerModule, declarations: [SkArticleEditorServerComponent], imports: [CommonModule], exports: [SkArticleEditorServerComponent] });
747
+ SkArticleServerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleServerModule, providers: [], imports: [[
748
+ CommonModule
749
+ ]] });
750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: SkArticleServerModule, decorators: [{
751
+ type: NgModule,
752
+ args: [{
753
+ declarations: [
754
+ SkArticleEditorServerComponent,
755
+ ],
756
+ imports: [
757
+ CommonModule
758
+ ],
759
+ exports: [
760
+ SkArticleEditorServerComponent,
761
+ ],
762
+ providers: []
763
+ }]
764
+ }] });
765
+
766
+ /**
767
+ * Generated bundle index. Do not edit.
768
+ */
769
+
770
+ export { SkArticleEditorComponent, SkArticleEditorServerComponent, SkArticleModule, SkArticleServerModule, SkArticleService, SkFroalaEditorDirective };
771
+ //# sourceMappingURL=sk-front-lib-article.mjs.map