ngx-axis-appforge 0.0.2 → 0.0.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 (580) hide show
  1. package/axis-components/badge/design/index.d.ts +5 -0
  2. package/axis-components/badge/index.d.ts +27 -0
  3. package/axis-components/button/design/index.d.ts +5 -0
  4. package/axis-components/button/index.d.ts +32 -0
  5. package/axis-components/desc/design/index.d.ts +5 -0
  6. package/axis-components/desc/index.d.ts +30 -0
  7. package/axis-components/design/design/index.d.ts +5 -0
  8. package/axis-components/design/index.d.ts +246 -0
  9. package/axis-components/dynamic-container/design/index.d.ts +5 -0
  10. package/axis-components/dynamic-container/index.d.ts +14 -0
  11. package/axis-components/editor/index.d.ts +33 -0
  12. package/axis-components/flex/design/index.d.ts +5 -0
  13. package/axis-components/flex/index.d.ts +20 -0
  14. package/axis-components/form/design/index.d.ts +5 -0
  15. package/axis-components/form/index.d.ts +30 -0
  16. package/axis-components/form-item/design/index.d.ts +5 -0
  17. package/axis-components/form-item/index.d.ts +34 -0
  18. package/axis-components/icon/design/index.d.ts +5 -0
  19. package/axis-components/icon/index.d.ts +16 -0
  20. package/axis-components/image/design/index.d.ts +5 -0
  21. package/axis-components/image/index.d.ts +16 -0
  22. package/axis-components/index.d.ts +5 -0
  23. package/axis-components/input/design/index.d.ts +5 -0
  24. package/axis-components/input/index.d.ts +27 -0
  25. package/axis-components/input-component/design/index.d.ts +5 -0
  26. package/axis-components/input-component/index.d.ts +33 -0
  27. package/axis-components/input-icon/design/index.d.ts +5 -0
  28. package/axis-components/input-icon/index.d.ts +24 -0
  29. package/axis-components/input-json/design/index.d.ts +5 -0
  30. package/axis-components/input-json/index.d.ts +24 -0
  31. package/axis-components/input-number/design/index.d.ts +5 -0
  32. package/axis-components/input-number/index.d.ts +25 -0
  33. package/axis-components/modal/design/index.d.ts +5 -0
  34. package/axis-components/modal/index.d.ts +33 -0
  35. package/axis-components/scope/design/index.d.ts +5 -0
  36. package/axis-components/scope/index.d.ts +24 -0
  37. package/axis-components/single-selector/design/index.d.ts +5 -0
  38. package/axis-components/single-selector/index.d.ts +37 -0
  39. package/axis-components/splitter/design/index.d.ts +5 -0
  40. package/axis-components/splitter/index.d.ts +28 -0
  41. package/axis-components/table/design/index.d.ts +5 -0
  42. package/axis-components/table/index.d.ts +183 -0
  43. package/axis-components/text/design/index.d.ts +5 -0
  44. package/axis-components/text/index.d.ts +24 -0
  45. package/axis-components/textarea/design/index.d.ts +5 -0
  46. package/axis-components/textarea/index.d.ts +25 -0
  47. package/axis-components/tree-selector/design/index.d.ts +5 -0
  48. package/axis-components/tree-selector/index.d.ts +76 -0
  49. package/axis-components/upload/design/index.d.ts +5 -0
  50. package/axis-components/upload/index.d.ts +51 -0
  51. package/core/index.d.ts +773 -0
  52. package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs +191 -0
  53. package/fesm2022/ngx-axis-appforge-axis-components-badge-design.mjs.map +1 -0
  54. package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs +39 -0
  55. package/fesm2022/ngx-axis-appforge-axis-components-badge.mjs.map +1 -0
  56. package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs +116 -0
  57. package/fesm2022/ngx-axis-appforge-axis-components-button-design.mjs.map +1 -0
  58. package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +78 -0
  59. package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +1 -0
  60. package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs +224 -0
  61. package/fesm2022/ngx-axis-appforge-axis-components-desc-design.mjs.map +1 -0
  62. package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs +51 -0
  63. package/fesm2022/ngx-axis-appforge-axis-components-desc.mjs.map +1 -0
  64. package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs +69 -0
  65. package/fesm2022/ngx-axis-appforge-axis-components-design-design.mjs.map +1 -0
  66. package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +1746 -0
  67. package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -0
  68. package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs +65 -0
  69. package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container-design.mjs.map +1 -0
  70. package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs +26 -0
  71. package/fesm2022/ngx-axis-appforge-axis-components-dynamic-container.mjs.map +1 -0
  72. package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs +99 -0
  73. package/fesm2022/ngx-axis-appforge-axis-components-editor.mjs.map +1 -0
  74. package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs +98 -0
  75. package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs.map +1 -0
  76. package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +31 -0
  77. package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +1 -0
  78. package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs +108 -0
  79. package/fesm2022/ngx-axis-appforge-axis-components-form-design.mjs.map +1 -0
  80. package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs +242 -0
  81. package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs.map +1 -0
  82. package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +144 -0
  83. package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -0
  84. package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +132 -0
  85. package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -0
  86. package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs +88 -0
  87. package/fesm2022/ngx-axis-appforge-axis-components-icon-design.mjs.map +1 -0
  88. package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs +28 -0
  89. package/fesm2022/ngx-axis-appforge-axis-components-icon.mjs.map +1 -0
  90. package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs +75 -0
  91. package/fesm2022/ngx-axis-appforge-axis-components-image-design.mjs.map +1 -0
  92. package/fesm2022/ngx-axis-appforge-axis-components-image.mjs +43 -0
  93. package/fesm2022/ngx-axis-appforge-axis-components-image.mjs.map +1 -0
  94. package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs +70 -0
  95. package/fesm2022/ngx-axis-appforge-axis-components-input-component-design.mjs.map +1 -0
  96. package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs +61 -0
  97. package/fesm2022/ngx-axis-appforge-axis-components-input-component.mjs.map +1 -0
  98. package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs +142 -0
  99. package/fesm2022/ngx-axis-appforge-axis-components-input-design.mjs.map +1 -0
  100. package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs +71 -0
  101. package/fesm2022/ngx-axis-appforge-axis-components-input-icon-design.mjs.map +1 -0
  102. package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs +64 -0
  103. package/fesm2022/ngx-axis-appforge-axis-components-input-icon.mjs.map +1 -0
  104. package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs +60 -0
  105. package/fesm2022/ngx-axis-appforge-axis-components-input-json-design.mjs.map +1 -0
  106. package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs +70 -0
  107. package/fesm2022/ngx-axis-appforge-axis-components-input-json.mjs.map +1 -0
  108. package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs +107 -0
  109. package/fesm2022/ngx-axis-appforge-axis-components-input-number-design.mjs.map +1 -0
  110. package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs +48 -0
  111. package/fesm2022/ngx-axis-appforge-axis-components-input-number.mjs.map +1 -0
  112. package/fesm2022/ngx-axis-appforge-axis-components-input.mjs +68 -0
  113. package/fesm2022/ngx-axis-appforge-axis-components-input.mjs.map +1 -0
  114. package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs +181 -0
  115. package/fesm2022/ngx-axis-appforge-axis-components-modal-design.mjs.map +1 -0
  116. package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs +74 -0
  117. package/fesm2022/ngx-axis-appforge-axis-components-modal.mjs.map +1 -0
  118. package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs +330 -0
  119. package/fesm2022/ngx-axis-appforge-axis-components-scope-design.mjs.map +1 -0
  120. package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +55 -0
  121. package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -0
  122. package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs +120 -0
  123. package/fesm2022/ngx-axis-appforge-axis-components-single-selector-design.mjs.map +1 -0
  124. package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs +102 -0
  125. package/fesm2022/ngx-axis-appforge-axis-components-single-selector.mjs.map +1 -0
  126. package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs +178 -0
  127. package/fesm2022/ngx-axis-appforge-axis-components-splitter-design.mjs.map +1 -0
  128. package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs +49 -0
  129. package/fesm2022/ngx-axis-appforge-axis-components-splitter.mjs.map +1 -0
  130. package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +442 -0
  131. package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -0
  132. package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +452 -0
  133. package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -0
  134. package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs +95 -0
  135. package/fesm2022/ngx-axis-appforge-axis-components-text-design.mjs.map +1 -0
  136. package/fesm2022/ngx-axis-appforge-axis-components-text.mjs +64 -0
  137. package/fesm2022/ngx-axis-appforge-axis-components-text.mjs.map +1 -0
  138. package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs +94 -0
  139. package/fesm2022/ngx-axis-appforge-axis-components-textarea-design.mjs.map +1 -0
  140. package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs +64 -0
  141. package/fesm2022/ngx-axis-appforge-axis-components-textarea.mjs.map +1 -0
  142. package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +222 -0
  143. package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -0
  144. package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs +295 -0
  145. package/fesm2022/ngx-axis-appforge-axis-components-tree-selector.mjs.map +1 -0
  146. package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs +146 -0
  147. package/fesm2022/ngx-axis-appforge-axis-components-upload-design.mjs.map +1 -0
  148. package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs +156 -0
  149. package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +1 -0
  150. package/fesm2022/ngx-axis-appforge-axis-components.mjs +988 -0
  151. package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -0
  152. package/fesm2022/ngx-axis-appforge-core.mjs +3169 -0
  153. package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -0
  154. package/{providers/providers.ts → fesm2022/ngx-axis-appforge-providers.mjs} +16 -8
  155. package/fesm2022/ngx-axis-appforge-providers.mjs.map +1 -0
  156. package/fesm2022/ngx-axis-appforge.mjs +6 -0
  157. package/fesm2022/ngx-axis-appforge.mjs.map +1 -0
  158. package/index.d.ts +2 -0
  159. package/package.json +217 -16
  160. package/providers/index.d.ts +13 -0
  161. package/.editorconfig +0 -17
  162. package/angular.json +0 -40
  163. package/axis-components/badge/badge.css +0 -3
  164. package/axis-components/badge/badge.html +0 -20
  165. package/axis-components/badge/badge.options.ts +0 -23
  166. package/axis-components/badge/badge.ts +0 -17
  167. package/axis-components/badge/design/config.ts +0 -52
  168. package/axis-components/badge/design/ng-package.json +0 -5
  169. package/axis-components/badge/design/setting/setting.css +0 -0
  170. package/axis-components/badge/design/setting/setting.html +0 -181
  171. package/axis-components/badge/design/setting/setting.ts +0 -126
  172. package/axis-components/badge/ng-package.json +0 -5
  173. package/axis-components/button/button.css +0 -3
  174. package/axis-components/button/button.html +0 -13
  175. package/axis-components/button/button.options.ts +0 -17
  176. package/axis-components/button/button.ts +0 -56
  177. package/axis-components/button/design/config.ts +0 -30
  178. package/axis-components/button/design/ng-package.json +0 -5
  179. package/axis-components/button/design/setting/setting.css +0 -0
  180. package/axis-components/button/design/setting/setting.html +0 -151
  181. package/axis-components/button/design/setting/setting.ts +0 -76
  182. package/axis-components/button/ng-package.json +0 -5
  183. package/axis-components/cmp-map.ts +0 -52
  184. package/axis-components/cmplib.ts +0 -9
  185. package/axis-components/desc/desc.css +0 -8
  186. package/axis-components/desc/desc.html +0 -19
  187. package/axis-components/desc/desc.options.ts +0 -24
  188. package/axis-components/desc/desc.ts +0 -29
  189. package/axis-components/desc/design/config.ts +0 -113
  190. package/axis-components/desc/design/desc-item-setting/desc-item-setting.css +0 -0
  191. package/axis-components/desc/design/desc-item-setting/desc-item-setting.html +0 -47
  192. package/axis-components/desc/design/desc-item-setting/desc-item-setting.ts +0 -40
  193. package/axis-components/desc/design/desc-items-menu/desc-items-menu.css +0 -0
  194. package/axis-components/desc/design/desc-items-menu/desc-items-menu.html +0 -9
  195. package/axis-components/desc/design/desc-items-menu/desc-items-menu.ts +0 -23
  196. package/axis-components/desc/design/desc-setting/desc-setting.css +0 -0
  197. package/axis-components/desc/design/desc-setting/desc-setting.html +0 -76
  198. package/axis-components/desc/design/desc-setting/desc-setting.ts +0 -51
  199. package/axis-components/desc/design/ng-package.json +0 -5
  200. package/axis-components/desc/ng-package.json +0 -5
  201. package/axis-components/design/cmplib/cmplib.css +0 -5
  202. package/axis-components/design/cmplib/cmplib.html +0 -52
  203. package/axis-components/design/cmplib/cmplib.ts +0 -96
  204. package/axis-components/design/design/config.ts +0 -29
  205. package/axis-components/design/design/ng-package.json +0 -5
  206. package/axis-components/design/design/setting/setting.css +0 -0
  207. package/axis-components/design/design/setting/setting.html +0 -33
  208. package/axis-components/design/design/setting/setting.ts +0 -33
  209. package/axis-components/design/design.css +0 -15
  210. package/axis-components/design/design.html +0 -51
  211. package/axis-components/design/design.options.ts +0 -9
  212. package/axis-components/design/design.ts +0 -509
  213. package/axis-components/design/ng-package.json +0 -5
  214. package/axis-components/design/preview/drag.service.ts +0 -148
  215. package/axis-components/design/preview/drop-handler.ts +0 -56
  216. package/axis-components/design/preview/preview.css +0 -3
  217. package/axis-components/design/preview/preview.html +0 -1
  218. package/axis-components/design/preview/preview.ts +0 -250
  219. package/axis-components/design/preview/select.service.ts +0 -140
  220. package/axis-components/design/shortcut-key.ts +0 -160
  221. package/axis-components/design/toolbar/toolbar.css +0 -24
  222. package/axis-components/design/toolbar/toolbar.html +0 -96
  223. package/axis-components/design/toolbar/toolbar.ts +0 -65
  224. package/axis-components/design/tree/drag-drop.ts +0 -125
  225. package/axis-components/design/tree/tree.css +0 -30
  226. package/axis-components/design/tree/tree.html +0 -49
  227. package/axis-components/design/tree/tree.ts +0 -292
  228. package/axis-components/dynamic-container/design/config.ts +0 -30
  229. package/axis-components/dynamic-container/design/ng-package.json +0 -5
  230. package/axis-components/dynamic-container/design/setting/setting.css +0 -0
  231. package/axis-components/dynamic-container/design/setting/setting.html +0 -20
  232. package/axis-components/dynamic-container/design/setting/setting.ts +0 -30
  233. package/axis-components/dynamic-container/dynamic-container.css +0 -3
  234. package/axis-components/dynamic-container/dynamic-container.html +0 -2
  235. package/axis-components/dynamic-container/dynamic-container.options.ts +0 -6
  236. package/axis-components/dynamic-container/dynamic-container.ts +0 -17
  237. package/axis-components/dynamic-container/ng-package.json +0 -5
  238. package/axis-components/editor/editor.css +0 -47
  239. package/axis-components/editor/editor.html +0 -10
  240. package/axis-components/editor/editor.options.ts +0 -10
  241. package/axis-components/editor/editor.ts +0 -86
  242. package/axis-components/editor/ng-package.json +0 -5
  243. package/axis-components/examples/examples/badge.ts +0 -17
  244. package/axis-components/examples/examples/button.ts +0 -38
  245. package/axis-components/examples/examples/desc.ts +0 -31
  246. package/axis-components/examples/examples/design.ts +0 -15
  247. package/axis-components/examples/examples/dynamic-container.ts +0 -21
  248. package/axis-components/examples/examples/flex.ts +0 -18
  249. package/axis-components/examples/examples/form-item.ts +0 -39
  250. package/axis-components/examples/examples/form.ts +0 -315
  251. package/axis-components/examples/examples/icon.ts +0 -16
  252. package/axis-components/examples/examples/image.ts +0 -15
  253. package/axis-components/examples/examples/input-component.ts +0 -15
  254. package/axis-components/examples/examples/input-icon.ts +0 -15
  255. package/axis-components/examples/examples/input-json.ts +0 -15
  256. package/axis-components/examples/examples/input-number.ts +0 -15
  257. package/axis-components/examples/examples/input.ts +0 -15
  258. package/axis-components/examples/examples/modal.ts +0 -15
  259. package/axis-components/examples/examples/scope.ts +0 -17
  260. package/axis-components/examples/examples/single-selector.ts +0 -25
  261. package/axis-components/examples/examples/splitter.ts +0 -36
  262. package/axis-components/examples/examples/table.ts +0 -126
  263. package/axis-components/examples/examples/text.ts +0 -15
  264. package/axis-components/examples/examples/textarea.ts +0 -15
  265. package/axis-components/examples/examples/tree-selector.ts +0 -35
  266. package/axis-components/examples/examples/upload.ts +0 -15
  267. package/axis-components/examples/examples.ts +0 -73
  268. package/axis-components/flex/design/config.ts +0 -49
  269. package/axis-components/flex/design/ng-package.json +0 -5
  270. package/axis-components/flex/design/setting/setting.css +0 -0
  271. package/axis-components/flex/design/setting/setting.html +0 -72
  272. package/axis-components/flex/design/setting/setting.ts +0 -43
  273. package/axis-components/flex/flex.css +0 -5
  274. package/axis-components/flex/flex.html +0 -6
  275. package/axis-components/flex/flex.options.ts +0 -12
  276. package/axis-components/flex/flex.ts +0 -15
  277. package/axis-components/flex/ng-package.json +0 -5
  278. package/axis-components/form/design/config.ts +0 -71
  279. package/axis-components/form/design/ng-package.json +0 -5
  280. package/axis-components/form/design/setting/setting.css +0 -0
  281. package/axis-components/form/design/setting/setting.html +0 -21
  282. package/axis-components/form/design/setting/setting.ts +0 -31
  283. package/axis-components/form/form.css +0 -3
  284. package/axis-components/form/form.html +0 -3
  285. package/axis-components/form/form.options.ts +0 -9
  286. package/axis-components/form/form.ts +0 -121
  287. package/axis-components/form/ng-package.json +0 -5
  288. package/axis-components/form-item/design/config.ts +0 -43
  289. package/axis-components/form-item/design/ng-package.json +0 -5
  290. package/axis-components/form-item/design/setting/input-validator/input-validator.css +0 -8
  291. package/axis-components/form-item/design/setting/input-validator/input-validator.html +0 -140
  292. package/axis-components/form-item/design/setting/input-validator/input-validator.ts +0 -158
  293. package/axis-components/form-item/design/setting/setting.css +0 -0
  294. package/axis-components/form-item/design/setting/setting.html +0 -39
  295. package/axis-components/form-item/design/setting/setting.ts +0 -40
  296. package/axis-components/form-item/form-item.css +0 -4
  297. package/axis-components/form-item/form-item.html +0 -16
  298. package/axis-components/form-item/form-item.options.ts +0 -12
  299. package/axis-components/form-item/form-item.ts +0 -128
  300. package/axis-components/form-item/ng-package.json +0 -5
  301. package/axis-components/icon/design/config.ts +0 -29
  302. package/axis-components/icon/design/ng-package.json +0 -5
  303. package/axis-components/icon/design/setting/setting.css +0 -0
  304. package/axis-components/icon/design/setting/setting.html +0 -67
  305. package/axis-components/icon/design/setting/setting.ts +0 -48
  306. package/axis-components/icon/icon.css +0 -0
  307. package/axis-components/icon/icon.html +0 -7
  308. package/axis-components/icon/icon.options.ts +0 -10
  309. package/axis-components/icon/icon.ts +0 -17
  310. package/axis-components/icon/ng-package.json +0 -5
  311. package/axis-components/image/design/config.ts +0 -30
  312. package/axis-components/image/design/ng-package.json +0 -5
  313. package/axis-components/image/design/setting/setting.css +0 -0
  314. package/axis-components/image/design/setting/setting.html +0 -42
  315. package/axis-components/image/design/setting/setting.ts +0 -37
  316. package/axis-components/image/image.css +0 -58
  317. package/axis-components/image/image.html +0 -14
  318. package/axis-components/image/image.options.ts +0 -8
  319. package/axis-components/image/image.ts +0 -29
  320. package/axis-components/image/ng-package.json +0 -5
  321. package/axis-components/input/design/config.ts +0 -80
  322. package/axis-components/input/design/ng-package.json +0 -5
  323. package/axis-components/input/design/setting/setting.css +0 -0
  324. package/axis-components/input/design/setting/setting.html +0 -79
  325. package/axis-components/input/design/setting/setting.ts +0 -51
  326. package/axis-components/input/input.css +0 -4
  327. package/axis-components/input/input.html +0 -32
  328. package/axis-components/input/input.options.ts +0 -14
  329. package/axis-components/input/input.ts +0 -53
  330. package/axis-components/input/ng-package.json +0 -5
  331. package/axis-components/input-component/design/config.ts +0 -30
  332. package/axis-components/input-component/design/ng-package.json +0 -5
  333. package/axis-components/input-component/design/setting/setting.css +0 -0
  334. package/axis-components/input-component/design/setting/setting.html +0 -33
  335. package/axis-components/input-component/design/setting/setting.ts +0 -33
  336. package/axis-components/input-component/input-component.css +0 -4
  337. package/axis-components/input-component/input-component.html +0 -25
  338. package/axis-components/input-component/input-component.options.ts +0 -7
  339. package/axis-components/input-component/input-component.ts +0 -50
  340. package/axis-components/input-component/ng-package.json +0 -5
  341. package/axis-components/input-icon/design/config.ts +0 -30
  342. package/axis-components/input-icon/design/ng-package.json +0 -5
  343. package/axis-components/input-icon/design/setting/setting.css +0 -0
  344. package/axis-components/input-icon/design/setting/setting.html +0 -29
  345. package/axis-components/input-icon/design/setting/setting.ts +0 -33
  346. package/axis-components/input-icon/input-icon.css +0 -4
  347. package/axis-components/input-icon/input-icon.html +0 -70
  348. package/axis-components/input-icon/input-icon.options.ts +0 -7
  349. package/axis-components/input-icon/input-icon.ts +0 -51
  350. package/axis-components/input-icon/ng-package.json +0 -5
  351. package/axis-components/input-json/design/config.ts +0 -29
  352. package/axis-components/input-json/design/ng-package.json +0 -5
  353. package/axis-components/input-json/design/setting/setting.css +0 -0
  354. package/axis-components/input-json/design/setting/setting.html +0 -7
  355. package/axis-components/input-json/design/setting/setting.ts +0 -26
  356. package/axis-components/input-json/input-json.css +0 -4
  357. package/axis-components/input-json/input-json.html +0 -19
  358. package/axis-components/input-json/input-json.ts +0 -67
  359. package/axis-components/input-json/ng-package.json +0 -5
  360. package/axis-components/input-number/design/config.ts +0 -30
  361. package/axis-components/input-number/design/ng-package.json +0 -5
  362. package/axis-components/input-number/design/setting/setting.css +0 -0
  363. package/axis-components/input-number/design/setting/setting.html +0 -118
  364. package/axis-components/input-number/design/setting/setting.ts +0 -66
  365. package/axis-components/input-number/input-number.css +0 -22
  366. package/axis-components/input-number/input-number.html +0 -11
  367. package/axis-components/input-number/input-number.options.ts +0 -17
  368. package/axis-components/input-number/input-number.ts +0 -30
  369. package/axis-components/input-number/ng-package.json +0 -5
  370. package/axis-components/modal/design/config.ts +0 -50
  371. package/axis-components/modal/design/ng-package.json +0 -5
  372. package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.css +0 -0
  373. package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.html +0 -15
  374. package/axis-components/modal/design/set-modal-visible-handler/set-modal-visible-handler.ts +0 -34
  375. package/axis-components/modal/design/setting/setting.css +0 -0
  376. package/axis-components/modal/design/setting/setting.html +0 -139
  377. package/axis-components/modal/design/setting/setting.ts +0 -92
  378. package/axis-components/modal/modal.css +0 -0
  379. package/axis-components/modal/modal.html +0 -7
  380. package/axis-components/modal/modal.options.ts +0 -20
  381. package/axis-components/modal/modal.ts +0 -57
  382. package/axis-components/modal/ng-package.json +0 -5
  383. package/axis-components/ng-package.json +0 -5
  384. package/axis-components/scope/design/config.ts +0 -59
  385. package/axis-components/scope/design/ng-package.json +0 -5
  386. package/axis-components/scope/design/setting/datasource-editor/datasource-editor.css +0 -28
  387. package/axis-components/scope/design/setting/datasource-editor/datasource-editor.html +0 -188
  388. package/axis-components/scope/design/setting/datasource-editor/datasource-editor.ts +0 -245
  389. package/axis-components/scope/design/setting/setting.css +0 -0
  390. package/axis-components/scope/design/setting/setting.html +0 -19
  391. package/axis-components/scope/design/setting/setting.ts +0 -30
  392. package/axis-components/scope/ng-package.json +0 -5
  393. package/axis-components/scope/scope.css +0 -6
  394. package/axis-components/scope/scope.html +0 -4
  395. package/axis-components/scope/scope.options.ts +0 -8
  396. package/axis-components/scope/scope.ts +0 -48
  397. package/axis-components/single-selector/design/config.ts +0 -30
  398. package/axis-components/single-selector/design/ng-package.json +0 -5
  399. package/axis-components/single-selector/design/setting/setting.css +0 -0
  400. package/axis-components/single-selector/design/setting/setting.html +0 -164
  401. package/axis-components/single-selector/design/setting/setting.ts +0 -80
  402. package/axis-components/single-selector/ng-package.json +0 -5
  403. package/axis-components/single-selector/single-selector.css +0 -8
  404. package/axis-components/single-selector/single-selector.html +0 -51
  405. package/axis-components/single-selector/single-selector.options.ts +0 -22
  406. package/axis-components/single-selector/single-selector.ts +0 -80
  407. package/axis-components/splitter/design/config.ts +0 -84
  408. package/axis-components/splitter/design/ng-package.json +0 -5
  409. package/axis-components/splitter/design/splitter-menu/splitter-menu.css +0 -0
  410. package/axis-components/splitter/design/splitter-menu/splitter-menu.html +0 -10
  411. package/axis-components/splitter/design/splitter-menu/splitter-menu.ts +0 -22
  412. package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.css +0 -0
  413. package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.html +0 -66
  414. package/axis-components/splitter/design/splitter-panel-setting/splitter-panel-setting.ts +0 -47
  415. package/axis-components/splitter/design/splitter-setting/splitter-setting.css +0 -0
  416. package/axis-components/splitter/design/splitter-setting/splitter-setting.html +0 -28
  417. package/axis-components/splitter/design/splitter-setting/splitter-setting.ts +0 -30
  418. package/axis-components/splitter/ng-package.json +0 -5
  419. package/axis-components/splitter/splitter.css +0 -7
  420. package/axis-components/splitter/splitter.html +0 -12
  421. package/axis-components/splitter/splitter.options.ts +0 -18
  422. package/axis-components/splitter/splitter.ts +0 -29
  423. package/axis-components/table/design/config.ts +0 -147
  424. package/axis-components/table/design/ng-package.json +0 -5
  425. package/axis-components/table/design/table-field-setting/table-field-setting.css +0 -0
  426. package/axis-components/table/design/table-field-setting/table-field-setting.html +0 -259
  427. package/axis-components/table/design/table-field-setting/table-field-setting.ts +0 -105
  428. package/axis-components/table/design/table-fields-menu/table-fields-menu.css +0 -0
  429. package/axis-components/table/design/table-fields-menu/table-fields-menu.html +0 -9
  430. package/axis-components/table/design/table-fields-menu/table-fields-menu.ts +0 -24
  431. package/axis-components/table/design/table-setting/table-setting.css +0 -0
  432. package/axis-components/table/design/table-setting/table-setting.html +0 -417
  433. package/axis-components/table/design/table-setting/table-setting.ts +0 -173
  434. package/axis-components/table/expand.ts +0 -12
  435. package/axis-components/table/ng-package.json +0 -5
  436. package/axis-components/table/select.ts +0 -66
  437. package/axis-components/table/table-setter/table-setter.css +0 -55
  438. package/axis-components/table/table-setter/table-setter.html +0 -38
  439. package/axis-components/table/table-setter/table-setter.ts +0 -121
  440. package/axis-components/table/table.css +0 -5
  441. package/axis-components/table/table.html +0 -191
  442. package/axis-components/table/table.options.ts +0 -72
  443. package/axis-components/table/table.ts +0 -204
  444. package/axis-components/text/design/config.ts +0 -30
  445. package/axis-components/text/design/ng-package.json +0 -5
  446. package/axis-components/text/design/setting/setting.css +0 -0
  447. package/axis-components/text/design/setting/setting.html +0 -84
  448. package/axis-components/text/design/setting/setting.ts +0 -54
  449. package/axis-components/text/ng-package.json +0 -5
  450. package/axis-components/text/text.css +0 -3
  451. package/axis-components/text/text.html +0 -17
  452. package/axis-components/text/text.options.ts +0 -10
  453. package/axis-components/text/text.ts +0 -54
  454. package/axis-components/textarea/design/config.ts +0 -30
  455. package/axis-components/textarea/design/ng-package.json +0 -5
  456. package/axis-components/textarea/design/setting/setting.css +0 -0
  457. package/axis-components/textarea/design/setting/setting.html +0 -76
  458. package/axis-components/textarea/design/setting/setting.ts +0 -55
  459. package/axis-components/textarea/ng-package.json +0 -5
  460. package/axis-components/textarea/textarea.css +0 -4
  461. package/axis-components/textarea/textarea.html +0 -11
  462. package/axis-components/textarea/textarea.options.ts +0 -13
  463. package/axis-components/textarea/textarea.ts +0 -49
  464. package/axis-components/tree-selector/design/config.ts +0 -55
  465. package/axis-components/tree-selector/design/ng-package.json +0 -5
  466. package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.css +0 -0
  467. package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.html +0 -9
  468. package/axis-components/tree-selector/design/tree-selector-menu/tree-selector-menu.ts +0 -26
  469. package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.css +0 -0
  470. package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.html +0 -80
  471. package/axis-components/tree-selector/design/tree-selector-menu-setting/tree-selector-menu-setting.ts +0 -58
  472. package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.css +0 -0
  473. package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.html +0 -235
  474. package/axis-components/tree-selector/design/tree-selector-setting/tree-selector-setting.ts +0 -87
  475. package/axis-components/tree-selector/ng-package.json +0 -5
  476. package/axis-components/tree-selector/tree-selector.css +0 -43
  477. package/axis-components/tree-selector/tree-selector.html +0 -65
  478. package/axis-components/tree-selector/tree-selector.options.ts +0 -50
  479. package/axis-components/tree-selector/tree-selector.ts +0 -252
  480. package/axis-components/upload/design/config.ts +0 -37
  481. package/axis-components/upload/design/ng-package.json +0 -5
  482. package/axis-components/upload/design/setting/setting.css +0 -0
  483. package/axis-components/upload/design/setting/setting.html +0 -288
  484. package/axis-components/upload/design/setting/setting.ts +0 -96
  485. package/axis-components/upload/ng-package.json +0 -5
  486. package/axis-components/upload/upload.css +0 -3
  487. package/axis-components/upload/upload.html +0 -36
  488. package/axis-components/upload/upload.options.ts +0 -29
  489. package/axis-components/upload/upload.ts +0 -130
  490. package/core/base/base-menu.ts +0 -22
  491. package/core/base/base.ts +0 -143
  492. package/core/base/design-builder.ts +0 -8
  493. package/core/base/funfield-base.ts +0 -106
  494. package/core/base/funfield-value-base.ts +0 -53
  495. package/core/base/value-access.ts +0 -70
  496. package/core/directives/dynamic.ts +0 -216
  497. package/core/directives/scope.ts +0 -432
  498. package/core/models/api.options.ts +0 -5
  499. package/core/models/base.options.ts +0 -11
  500. package/core/models/cmplib.ts +0 -7
  501. package/core/models/data-source.options.ts +0 -11
  502. package/core/models/data.options.ts +0 -6
  503. package/core/models/design-build.ts +0 -26
  504. package/core/models/design-config.ts +0 -14
  505. package/core/models/design-tree-node.ts +0 -16
  506. package/core/models/event-desc.ts +0 -28
  507. package/core/models/event-handler.ts +0 -6
  508. package/core/models/event.options.ts +0 -14
  509. package/core/models/examples.ts +0 -21
  510. package/core/models/form-registe.options.ts +0 -12
  511. package/core/models/fun-field.options.ts +0 -6
  512. package/core/models/initobs.ts +0 -8
  513. package/core/models/options-node.ts +0 -149
  514. package/core/models/static-data-source.options.ts +0 -4
  515. package/core/models/trigge-events.options.ts +0 -3
  516. package/core/models/value-access.options.ts +0 -10
  517. package/core/ng-package.json +0 -5
  518. package/core/pipes/how-long.pipe.ts +0 -69
  519. package/core/public-api.ts +0 -39
  520. package/core/share/api-handler/api-handler.css +0 -0
  521. package/core/share/api-handler/api-handler.html +0 -38
  522. package/core/share/api-handler/api-handler.ts +0 -51
  523. package/core/share/array-filter-handler/array-filter-handler.css +0 -0
  524. package/core/share/array-filter-handler/array-filter-handler.html +0 -26
  525. package/core/share/array-filter-handler/array-filter-handler.ts +0 -65
  526. package/core/share/array-filter-handler/input-filter-options/filter-options.css +0 -19
  527. package/core/share/array-filter-handler/input-filter-options/filter-options.html +0 -57
  528. package/core/share/array-filter-handler/input-filter-options/filter-options.ts +0 -100
  529. package/core/share/base-design-setting/base-design-setting.css +0 -0
  530. package/core/share/base-design-setting/base-design-setting.html +0 -50
  531. package/core/share/base-design-setting/base-design-setting.ts +0 -55
  532. package/core/share/base-event-handler-descs.ts +0 -100
  533. package/core/share/common-menu/common-menu.css +0 -0
  534. package/core/share/common-menu/common-menu.html +0 -21
  535. package/core/share/common-menu/common-menu.ts +0 -73
  536. package/core/share/data-handler/data-handler.css +0 -0
  537. package/core/share/data-handler/data-handler.html +0 -13
  538. package/core/share/data-handler/data-handler.ts +0 -39
  539. package/core/share/events-handler.service.ts +0 -185
  540. package/core/share/fun-field/fun-field.css +0 -55
  541. package/core/share/fun-field/fun-field.html +0 -175
  542. package/core/share/fun-field/fun-field.ts +0 -363
  543. package/core/share/input-trigger/input-trigger.css +0 -16
  544. package/core/share/input-trigger/input-trigger.html +0 -114
  545. package/core/share/input-trigger/input-trigger.ts +0 -394
  546. package/core/share/msg-tip-handler/msg-tip-handler.css +0 -0
  547. package/core/share/msg-tip-handler/msg-tip-handler.html +0 -40
  548. package/core/share/msg-tip-handler/msg-tip-handler.ts +0 -46
  549. package/core/share/refresh-data-source-handler/refresh-data-source-handler.css +0 -0
  550. package/core/share/refresh-data-source-handler/refresh-data-source-handler.html +0 -29
  551. package/core/share/refresh-data-source-handler/refresh-data-source-handler.ts +0 -55
  552. package/core/share/route-handler/route-handler.css +0 -0
  553. package/core/share/route-handler/route-handler.html +0 -49
  554. package/core/share/route-handler/route-handler.ts +0 -51
  555. package/core/share/set-data-source-handler/set-data-source-handler.css +0 -0
  556. package/core/share/set-data-source-handler/set-data-source-handler.html +0 -23
  557. package/core/share/set-data-source-handler/set-data-source-handler.ts +0 -44
  558. package/core/share/simple-menu/simple-menu.css +0 -0
  559. package/core/share/simple-menu/simple-menu.html +0 -5
  560. package/core/share/simple-menu/simple-menu.ts +0 -17
  561. package/core/share/tokens.ts +0 -29
  562. package/core/share/value-design-setting/value-design-setting.css +0 -0
  563. package/core/share/value-design-setting/value-design-setting.html +0 -48
  564. package/core/share/value-design-setting/value-design-setting.ts +0 -54
  565. package/core/utils/code-name.utils.ts +0 -19
  566. package/core/utils/components-loader.ts +0 -29
  567. package/core/utils/declaration.utils.ts +0 -38
  568. package/core/utils/dynamic.util.ts +0 -57
  569. package/core/utils/form-validators.ts +0 -160
  570. package/core/utils/form.util.ts +0 -25
  571. package/core/utils/http.utils.ts +0 -8
  572. package/core/utils/object.utils.ts +0 -182
  573. package/core/utils/scripts-loader.ts +0 -25
  574. package/ng-package.json +0 -13
  575. package/providers/ng-package.json +0 -5
  576. package/providers/public-api.ts +0 -1
  577. package/public-api.ts +0 -1
  578. package/tsconfig.json +0 -35
  579. package/tsconfig.lib.json +0 -19
  580. package/tsconfig.lib.prod.json +0 -11
package/core/base/base.ts DELETED
@@ -1,143 +0,0 @@
1
- import { AfterViewInit, Directive, HostBinding, inject, Injector, isSignal, OnDestroy, WritableSignal } from "@angular/core";
2
- import { merge, Observable, of, Subscription } from "rxjs";
3
- import { ScopeDirective } from "../directives/scope";
4
- import { EventsHandlerService } from "../share/events-handler.service";
5
- import { BaseOptions } from "../models/base.options";
6
- import { EventHandlerOptions } from "../models/event.options";
7
- import { TriggeEventsOptions } from "../models/trigge-events.options";
8
- import { loadScripts } from "../utils/scripts-loader";
9
-
10
- @Directive()
11
- export abstract class Base<T extends BaseOptions> implements OnDestroy, AfterViewInit {
12
-
13
- onAfterViewInit?: Function;
14
- injector = inject(Injector);
15
- isDesign = false;
16
- protected options!: T;
17
- private eventsService = inject(EventsHandlerService)
18
- private scope: ScopeDirective | null = inject(ScopeDirective, { optional: true });
19
- private _sub: { [tag: string]: Subscription[] } = { "default": [] };
20
-
21
- @HostBinding('style')
22
- get style() {
23
- return this.options.style()
24
- }
25
-
26
- ngAfterViewInit(): void {
27
- this.onAfterViewInit?.();
28
- }
29
-
30
- async preloadImports(optionsConfig: any): Promise<void> {
31
- const imports = new Set<string>();
32
- Object.entries(optionsConfig).forEach(([key, value]) => {
33
- if (key.startsWith("$")) {
34
- ((value as any).imports as any[]).forEach(i => imports.add(i));
35
- }
36
- });
37
- await Promise.all(Array.from(imports.values()).map(i => loadScripts(i)));
38
- }
39
-
40
- bindWithConfig(optionsConfig: any, config?: { options?: any, snapshot?: boolean, tag?: string, tempDataSource?: any }): void {
41
- let options = config?.options ?? this.options;
42
- let snapshot = config?.snapshot ?? false;
43
- if (!snapshot) {
44
- this.unsubscribe([options?.tag]);
45
- }
46
- if (this.scope && !snapshot) {
47
- this.addAllSubscribe(this.scope.bindOptions(optionsConfig, options!, config?.tempDataSource), options?.tag ?? "bindWithConfig");
48
- } else {
49
- if (this.scope && snapshot) {
50
- optionsConfig = this.scope.snapshotOptions(optionsConfig, config?.tempDataSource);
51
- }
52
- for (const en of Object.entries(options!)) {
53
- const value = optionsConfig[en[0]];
54
- if (value !== undefined) {
55
- if (isSignal(en[1])) {
56
- (en[1] as WritableSignal<any>).set(value);
57
- } else {
58
- (options as any)[en[0]] = value;
59
- }
60
- }
61
- }
62
- }
63
- }
64
-
65
- unsubscribeAll() {
66
- Object.values(this._sub).forEach(srr => srr.forEach(s => s.unsubscribe()));
67
- this._sub = { "default": [] };
68
- }
69
-
70
- unsubscribe(tags: string[]) {
71
- Object.keys(this._sub)
72
- .filter(tag => tags.includes(tag))
73
- .forEach(tag => {
74
- this._sub[tag].forEach(s => s.unsubscribe());
75
- delete this._sub[tag];
76
- });
77
- }
78
-
79
- addSubscribe(sub: Subscription, tag: string = "default") {
80
- if (!this._sub[tag]) {
81
- this._sub[tag] = [];
82
- }
83
- this._sub[tag].push(sub);
84
- }
85
-
86
- addAllSubscribe(subs: Subscription[], tag: string = "default") {
87
- if (!this._sub[tag]) {
88
- this._sub[tag] = [];
89
- }
90
- this._sub[tag] = this._sub[tag].concat(subs);
91
- }
92
-
93
- onEvents?(e: EventHandlerOptions<any>): Observable<boolean> | undefined;
94
-
95
- hasEventHandler(trigger: string, triggeEvents?: TriggeEventsOptions): boolean {
96
- const te = triggeEvents ?? this.options.triggeEvents();
97
- return !!te?.[trigger]?.length;
98
- }
99
-
100
- triggeEvents(trigger: string, tempDataSource?: any, triggeEvents?: TriggeEventsOptions, scope?: ScopeDirective): Observable<boolean> {
101
- scope ??= this.scope ?? undefined;
102
- const te = triggeEvents ?? this.options.triggeEvents();
103
- if (te && te[trigger]) {
104
- return merge(...te[trigger].filter(e => !scope?.snapshotField(e, "disabled", tempDataSource)).map(e => {
105
- if (scope) {
106
- e = scope.snapshotOptions(e, tempDataSource);
107
- }
108
- e.tempDataSource = tempDataSource;
109
- return this.triggeEvent(e, scope);
110
- }));
111
- }
112
- return of(true);
113
- }
114
-
115
- triggeEvent(e: EventHandlerOptions<unknown>, scope?: ScopeDirective): Observable<boolean> {
116
- scope ??= this.scope ?? undefined;
117
- console.log("triggeEvent", e);
118
- e.ref = this;
119
- let obs: Observable<boolean> | undefined;
120
- switch (e.target) {
121
- case "component":
122
- if (e.id) {
123
- obs = (scope)?.findInstance(e.id)?.onEvents?.(e);
124
- }
125
- break;
126
- case "service":
127
- obs = this.eventsService.onEvents(e);
128
- break;
129
- case "scope":
130
- obs = scope?.onEvents(e);
131
- break;
132
- }
133
- return obs ?? of(true);
134
- }
135
-
136
- getScope(): ScopeDirective | null {
137
- return this.scope;
138
- }
139
-
140
- ngOnDestroy(): void {
141
- this.unsubscribeAll();
142
- }
143
- }
@@ -1,8 +0,0 @@
1
- import { ComponentRef } from "@angular/core";
2
- import { ScopeDirective } from "../directives/scope";
3
-
4
- export class DesignBuilder {
5
-
6
- constructor(public buildElement: (ref: ComponentRef<any>, options: any) => void, public buildScope: (scope: ScopeDirective) => void) { }
7
-
8
- }
@@ -1,106 +0,0 @@
1
- import { inject } from "@angular/core";
2
- import { FormBuilder, UntypedFormGroup } from "@angular/forms";
3
- import { FunFieldValue } from "../share/fun-field/fun-field";
4
- import { copy } from "../utils/object.utils";
5
- import { FunFieldOptions } from "../models/fun-field.options";
6
- import { updateAndValidAll } from "../utils/form.util";
7
-
8
- export abstract class FunFieldBase {
9
-
10
- private orivalue: any;
11
- protected readonly fb = inject(FormBuilder);
12
- abstract fg: UntypedFormGroup;
13
- protected funFields: FunFieldOptions = {};
14
-
15
- reset(value?: any) {
16
- this.orivalue = value;
17
- this.fg.patchValue(this.buildFunField(value), { emitEvent: false });
18
- }
19
-
20
- getValue(): any {
21
- return this.recoverFunField(this.fg.value);
22
- }
23
-
24
- valid(): boolean {
25
- return updateAndValidAll(this.fg);
26
- }
27
-
28
- buildFunField(obj: any, funFields?: FunFieldOptions): any {
29
- funFields ??= this.funFields;
30
- const cloneObj = obj ? copy(obj) : {};
31
- if (funFields) {
32
- Object.keys(funFields).forEach(f => {
33
- let value;
34
- if (funFields[f].child) {
35
- if (Array.isArray(cloneObj[f])) {
36
- value = cloneObj[f].map(item => this.buildFunField(item, funFields[f].child));
37
- } else {
38
- value = this.buildFunField(cloneObj[f], funFields[f].child);
39
- }
40
- } else {
41
- value = {
42
- funMode: cloneObj.hasOwnProperty(`$${f}`),
43
- originValue: undefined,
44
- fnValue: {
45
- fn: "return undefined;"
46
- }
47
- };
48
- if (value.funMode) {
49
- value.fnValue = cloneObj[`$${f}`];
50
- if (typeof (cloneObj[`$${f}`]) == "string") {
51
- value.fnValue = {
52
- fn: cloneObj[`$${f}`]
53
- }
54
- }
55
- delete cloneObj[`$${f}`];
56
- } else {
57
- if (cloneObj[f] !== undefined) {
58
- value.originValue = cloneObj[f];
59
- } else {
60
- value.originValue = funFields[f].defaultValue;
61
- }
62
- value.fnValue = {
63
- fn: `return ${JSON.stringify(value.originValue)}`
64
- };
65
- }
66
- }
67
- cloneObj[f] = value;
68
- });
69
- }
70
- return cloneObj;
71
- }
72
-
73
- recoverFunField(obj: any, funFields?: FunFieldOptions, oriObj?: any) {
74
- funFields ??= this.funFields;
75
- oriObj ??= this.orivalue ?? {};
76
- const cloneObj = obj ? copy(obj) : {};
77
- const cloneOriObj = copy(oriObj);
78
- if (obj && funFields) {
79
- Object.keys(funFields).forEach(k => {
80
- const f: FunFieldValue = cloneObj[k];
81
- if (f) {
82
- if (funFields[k].child) {
83
- if (Array.isArray(cloneObj[k])) {
84
- cloneObj[k] = cloneObj[k].map((item, i) => this.recoverFunField(item, funFields[k].child, cloneOriObj[k][i]));
85
- } else {
86
- cloneObj[k] = this.recoverFunField(cloneObj[k], funFields[k].child, cloneOriObj[k] ?? {});
87
- }
88
- delete cloneObj[`$${k}`];
89
- } else {
90
- if (f.funMode) {
91
- cloneObj[`$${k}`] = f.fnValue;
92
- delete cloneObj[k];
93
- } else {
94
- cloneObj[k] = f.originValue;
95
- delete cloneObj[`$${k}`];
96
- }
97
- }
98
- delete cloneOriObj[k];
99
- delete cloneOriObj[`$${k}`];
100
- }
101
- });
102
- }
103
- return Object.assign({}, cloneOriObj, cloneObj)
104
- }
105
-
106
- }
@@ -1,53 +0,0 @@
1
- import { Directive, model, OnDestroy, OnInit } from "@angular/core";
2
- import { ControlValueAccessor } from "@angular/forms";
3
- import { Subscription } from "rxjs";
4
- import { FunFieldBase } from "./funfield-base";
5
- import { updateAndValidAll } from "../utils/form.util";
6
-
7
- @Directive()
8
- export abstract class FunFieldValueBase extends FunFieldBase implements OnInit, OnDestroy, ControlValueAccessor {
9
-
10
- public onChange: any;
11
- protected readonly value = model<any>();
12
- protected readonly formValue = model<any>();
13
- private sub!: Subscription;
14
- protected sendInitValue = false;
15
-
16
- writeValue(value: any): void {
17
- this.value.set(value);
18
- this.reset(value);
19
- }
20
-
21
- registerOnChange(fn: any): void {
22
- this.onChange = fn;
23
- }
24
- registerOnTouched(fn: any): void {
25
- }
26
-
27
- override reset(value?: any): void {
28
- super.reset(value);
29
- this.formValue.set(this.fg.value);
30
- }
31
-
32
- ngOnInit(): void {
33
- this.formValue.set(this.fg.value);
34
- if (this.sendInitValue) {
35
- this.value.set(this.recoverFunField(this.fg.value));
36
- this.onChange?.(this.value());
37
- }
38
- this.sub = this.fg.valueChanges.subscribe(v => {
39
- this.formValue.set(v);
40
- if (updateAndValidAll(this.fg)) {
41
- this.value.set(this.recoverFunField(v));
42
- this.onChange?.(this.value());
43
- } else {
44
- console.log("invalid", v)
45
- }
46
- });
47
- }
48
-
49
- ngOnDestroy(): void {
50
- this.sub.unsubscribe();
51
- }
52
-
53
- }
@@ -1,70 +0,0 @@
1
- import { ControlValueAccessor } from "@angular/forms";
2
- import { Base } from "./base";
3
- import { Directive, effect, inject, model } from "@angular/core";
4
- import { Observable, of } from "rxjs";
5
- import { EventHandlerOptions } from "../models/event.options";
6
- import { ValueAccessOptions } from "../models/value-access.options";
7
- import { AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN } from "../share/tokens";
8
- import { RegisteValueAccessOptions } from "../models/form-registe.options";
9
-
10
- @Directive()
11
- export abstract class ValueAccess<T extends ValueAccessOptions> extends Base<T> implements ControlValueAccessor {
12
-
13
- constructor() {
14
- super();
15
- effect(() => {
16
- if (this.options.initValue() !== undefined) {
17
- this.setInitValue(this.options.initValue());
18
- }
19
- })
20
- }
21
-
22
- protected readonly value = model<any>(undefined);
23
- private readonly registe = inject(AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN, { optional: true });
24
-
25
- setInitValue(value: any) {
26
- this.registValueAccess({
27
- initValue: value,
28
- });
29
- this.value.set(value);
30
- if (value !== undefined && this.options.emitInitEvent()) {
31
- this.triggeEvents("valueChange", { value: value });
32
- }
33
- }
34
-
35
- onChange?: (value: any) => void;
36
- onTouched?: (value: any) => {};
37
- writeValue(value: any): void {
38
- this.value.set(value);
39
- if (value !== undefined) {
40
- this.triggeEvents("valueChange", { value: value });
41
- }
42
- }
43
- registerOnChange(fn: any): void {
44
- this.onChange = (value) => {
45
- this.triggeEvents("valueChange", { value: value });
46
- fn?.(value);
47
- };
48
- }
49
- registerOnTouched(fn: any): void {
50
- this.onTouched = fn;
51
- }
52
-
53
- override onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined {
54
- const obs = super.onEvents?.(e);
55
- if (obs) {
56
- return obs;
57
- }
58
- switch (e.name) {
59
- case "setValue":
60
- this.writeValue(e.data?.data);
61
- return of(true);
62
- }
63
- return undefined;
64
- }
65
-
66
- protected registValueAccess(opt: RegisteValueAccessOptions): void {
67
- this.registe?.(opt);
68
- }
69
-
70
- }
@@ -1,216 +0,0 @@
1
- import { Directive, effect, forwardRef, input, OnDestroy, Type, ViewContainerRef, inject, ComponentRef, Injector } from '@angular/core';
2
- import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { ScopeDirective } from './scope';
4
- import { Observable, Subscription } from 'rxjs';
5
- import { Base } from '../base/base';
6
- import { ValueAccess } from '../base/value-access';
7
- import { BaseOptions } from '../models/base.options';
8
- import { ValueAccessOptions } from '../models/value-access.options';
9
- import { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN } from '../share/tokens';
10
- import { DesignBuilder } from '../base/design-builder';
11
- import { EventHandlerOptions } from '../models/event.options';
12
-
13
- const DynamicComponentsMap = new Map<string, Type<any>>();
14
-
15
- @Directive({
16
- selector: '[axisDynamic]',
17
- exportAs: 'axisDynamic',
18
- providers: [
19
- {
20
- provide: NG_VALUE_ACCESSOR,
21
- useExisting: forwardRef(() => DynamicDirective),
22
- multi: true
23
- },
24
- ]
25
- })
26
- export class DynamicDirective implements ControlValueAccessor, OnDestroy {
27
-
28
- readonly axisDynamic = input.required<any>();
29
- readonly standalone = input(false);
30
- readonly isDesign = input(false);
31
-
32
- private component?: string;
33
- private sub?: Subscription;
34
- private id?: string;
35
- private readonly injector = inject(Injector);
36
- private _designBuilder = inject(DesignBuilder, { optional: true });
37
- private loader = inject(AXIS_COMPONENTS_LOADER_TOKEN);
38
- readonly currentUserPermissions = inject(AXIS_CURRENT_USER_PERMISSIONS_TOKEN, { optional: true });
39
- private container = inject(ViewContainerRef);
40
- private _scope = inject(ScopeDirective, { optional: true });
41
- private ref?: ComponentRef<Base<BaseOptions>>;
42
-
43
- private get scope(): ScopeDirective | null {
44
- return this.standalone() ? null : this._scope;
45
- }
46
-
47
- private get designBuilder(): DesignBuilder | null {
48
- return !this.standalone() || this.isDesign() ? this._designBuilder : null;
49
- }
50
-
51
- private get valueInstance(): ValueAccess<ValueAccessOptions> | undefined {
52
- if (this.ref?.instance && this.ref.instance instanceof ValueAccess) {
53
- return this.ref.instance;
54
- }
55
- return undefined;
56
- }
57
-
58
- onChange?: (value: any) => {};
59
- onTouched?: (value: any) => {};
60
- triggeEvent?: (e: EventHandlerOptions<any>) => Observable<boolean>;
61
- onEvents?: (e: EventHandlerOptions<any>) => Observable<boolean> | undefined;
62
- value: any;
63
-
64
- constructor() {
65
- effect(() => {
66
- if (!this.axisDynamic()?.component) {
67
- this.destoryInstance();
68
- return;
69
- }
70
- this.sub?.unsubscribe();
71
- if (!this.hasPermission() && !this.designBuilder) {
72
- return;
73
- }
74
- let inuse = this.axisDynamic().inuse;
75
- if (this.scope) {
76
- const io = this.scope.dynamicField(this.axisDynamic(), "inuse");
77
- if (io.init !== undefined) {
78
- inuse = io.init;
79
- }
80
- if (io.obs) {
81
- this.sub = io.obs.subscribe(inuse => {
82
- if (inuse) {
83
- if (this.id != this.axisDynamic().id) {
84
- if (this.id) {
85
- this.scope!.unRegistInstance(this.id);
86
- }
87
- this.id = this.axisDynamic().id;
88
- }
89
- this.render();
90
- } else {
91
- this.destoryInstance();
92
- }
93
- });
94
- }
95
- }
96
- if (inuse) {
97
- if (this.id != this.axisDynamic().id) {
98
- this.id = this.axisDynamic().id;
99
- }
100
- this.render();
101
- } else {
102
- this.destoryInstance();
103
- }
104
- })
105
- }
106
-
107
- private hasPermission(): boolean {
108
- const { requiredPermissions } = this.axisDynamic();
109
- if (!requiredPermissions?.length) {
110
- return true;
111
- }
112
- return (requiredPermissions as string[]).every(permission => this.currentUserPermissions?.includes(permission));
113
- }
114
-
115
- private async render() {
116
- if (this.axisDynamic()?.component && (!this.component || this.component != this.axisDynamic().component)) {
117
- this.component = this.axisDynamic().component;
118
- let componentType: Type<any> | undefined;
119
- if (DynamicComponentsMap.has(this.component!)) {
120
- componentType = DynamicComponentsMap.get(this.component!);
121
- } else {
122
- try {
123
- componentType = await this.loader.loadComponent(this.component!);
124
- DynamicComponentsMap.set(this.component!, componentType!);
125
- } catch (error) {
126
- console.error(error);
127
- }
128
- }
129
- await this.scope?.preloadImports(this.axisDynamic());
130
- this.container.clear();
131
- this.ref = this.container.createComponent<Base<BaseOptions>>(componentType!, { injector: this.buildInjector() });
132
- this.onEvents = this.ref.instance.onEvents?.bind(this.ref.instance);
133
- this.triggeEvent = this.ref.instance.triggeEvent?.bind(this.ref.instance);
134
- this.scope?.registInstance(this.axisDynamic().id, this.ref.instance)
135
- this.ref.instance?.bindWithConfig(this.axisDynamic());
136
- this.valueInstance?.registerOnChange(this.onChange);
137
- this.valueInstance?.registerOnTouched(this.onTouched);
138
- if (this.value !== undefined) {
139
- this.valueInstance?.writeValue(this.value);
140
- }
141
- if (this.designBuilder) {
142
- this.ref.instance.isDesign = true;
143
- this.ref.instance!.onAfterViewInit = () => {
144
- this.designBuilder!.buildElement(this.ref!, this.axisDynamic());
145
- }
146
- }
147
- } else {
148
- this.ref?.instance?.bindWithConfig(this.axisDynamic());
149
- this.designBuilder?.buildElement(this.ref!, this.axisDynamic());
150
- }
151
- }
152
-
153
- private buildInjector(): Injector | undefined {
154
- if (this.standalone()) {
155
- return Injector.create({
156
- providers: [
157
- {
158
- provide: ScopeDirective,
159
- useValue: null
160
- },
161
- {
162
- provide: DynamicDirective,
163
- useValue: null
164
- },
165
- {
166
- provide: DesignBuilder,
167
- useValue: this.isDesign() ? this.designBuilder : null
168
- }, {
169
- provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,
170
- useValue: null
171
- }, {
172
- provide: AXIS_FORMITEM_REGISTE_VALUE_ACCESS_TOKEN,
173
- useValue: null
174
- }
175
- ],
176
- parent: this.injector
177
- });
178
- }
179
- return this.injector;
180
- }
181
-
182
- forceRender(): void {
183
- this.component = undefined;
184
- this.id = undefined;
185
- this.render();
186
- }
187
-
188
- writeValue(value: any): void {
189
- this.valueInstance?.writeValue(value);
190
- this.value = value;
191
- }
192
-
193
- registerOnChange(fn: any): void {
194
- this.onChange = fn;
195
- this.valueInstance?.registerOnChange(fn);
196
- }
197
- registerOnTouched(fn: any): void {
198
- this.onTouched = fn;
199
- this.valueInstance?.registerOnTouched(fn);
200
- }
201
-
202
- destoryInstance() {
203
- if (this.id) {
204
- this.scope?.unRegistInstance(this.id);
205
- this.id = undefined;
206
- }
207
- this.component = undefined;
208
- this.container.clear();
209
- }
210
-
211
- ngOnDestroy(): void {
212
- this.sub?.unsubscribe();
213
- this.destoryInstance();
214
- }
215
-
216
- }