@ibiz-template/vue3-util 0.6.0 → 0.6.1-alpha.2

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 (367) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
  4. package/es/panel-component/nav-pos/nav-pos.controller.mjs +12 -3
  5. package/es/util/overlay-container/overlay-container.mjs +1 -1
  6. package/es/util/router-callback/router-callback.d.ts +1 -1
  7. package/es/util/router-callback/router-callback.d.ts.map +1 -1
  8. package/es/util/router-callback/router-callback.mjs +6 -2
  9. package/lib/_virtual/_commonjsHelpers.cjs +46 -0
  10. package/lib/common/badge/badge.cjs +34 -0
  11. package/lib/common/badge/badge.css +1 -0
  12. package/lib/common/code-list/code-list.cjs +105 -0
  13. package/lib/common/code-list/code-list.css +1 -0
  14. package/lib/common/control-base/control-base.cjs +102 -0
  15. package/lib/common/control-base/control-base.css +1 -0
  16. package/lib/common/control-loading-placeholder/control-loading-placeholder.cjs +32 -0
  17. package/lib/common/control-shell/control-shell.cjs +58 -0
  18. package/lib/common/control-shell/control-shell.css +1 -0
  19. package/lib/common/icon/icon.cjs +103 -0
  20. package/lib/common/index.cjs +21 -0
  21. package/lib/common/router-view/router-view.cjs +77 -0
  22. package/lib/common/view-shell/view-shell.cjs +137 -0
  23. package/lib/common/view-shell/view-shell.css +1 -0
  24. package/lib/control/index.cjs +10 -0
  25. package/lib/control/panel/index.cjs +9 -0
  26. package/lib/control/panel/panel/index.cjs +18 -0
  27. package/lib/control/panel/panel/panel.cjs +142 -0
  28. package/lib/control/panel/panel/panel.css +1 -0
  29. package/lib/control/panel/panel/panel.provider.cjs +10 -0
  30. package/lib/control/panel/view-layout-panel/index.cjs +24 -0
  31. package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +144 -0
  32. package/lib/control/panel/view-layout-panel/view-layout-panel.css +1 -0
  33. package/lib/control/panel/view-layout-panel/view-layout-panel.provider.cjs +10 -0
  34. package/lib/hooks/app/app.hooks.cjs +26 -0
  35. package/lib/hooks/index.cjs +7 -0
  36. package/lib/interface/index.cjs +5 -0
  37. package/lib/interface/util/index.cjs +5 -0
  38. package/lib/interface/util/route/route.cjs +3 -0
  39. package/lib/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.cjs +540 -0
  40. package/lib/panel-component/grid-container/grid-container.cjs +108 -0
  41. package/lib/panel-component/grid-container/grid-container.controller.cjs +14 -0
  42. package/lib/panel-component/grid-container/grid-container.css +1 -0
  43. package/lib/panel-component/grid-container/grid-container.provider.cjs +17 -0
  44. package/lib/panel-component/grid-container/grid-container.state.cjs +9 -0
  45. package/lib/panel-component/grid-container/index.cjs +25 -0
  46. package/lib/panel-component/index.cjs +73 -0
  47. package/lib/panel-component/multi-data-container/index.cjs +28 -0
  48. package/lib/panel-component/multi-data-container/multi-data-container-item.controller.cjs +119 -0
  49. package/lib/panel-component/multi-data-container/multi-data-container-itm.state.cjs +19 -0
  50. package/lib/panel-component/multi-data-container/multi-data-container.cjs +89 -0
  51. package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +262 -0
  52. package/lib/panel-component/multi-data-container/multi-data-container.css +1 -0
  53. package/lib/panel-component/multi-data-container/multi-data-container.provider.cjs +17 -0
  54. package/lib/panel-component/multi-data-container/multi-data-container.state.cjs +19 -0
  55. package/lib/panel-component/nav-pos/index.cjs +22 -0
  56. package/lib/panel-component/nav-pos/nav-pos.cjs +107 -0
  57. package/lib/panel-component/nav-pos/nav-pos.controller.cjs +312 -0
  58. package/lib/panel-component/nav-pos/nav-pos.css +1 -0
  59. package/lib/panel-component/nav-pos/nav-pos.provider.cjs +26 -0
  60. package/lib/panel-component/nav-pos/nav-pos.state.cjs +49 -0
  61. package/lib/panel-component/panel-container/index.cjs +29 -0
  62. package/lib/panel-component/panel-container/panel-container.cjs +72 -0
  63. package/lib/panel-component/panel-container/panel-container.controller.cjs +14 -0
  64. package/lib/panel-component/panel-container/panel-container.css +1 -0
  65. package/lib/panel-component/panel-container/panel-container.provider.cjs +17 -0
  66. package/lib/panel-component/panel-container/panel-container.state.cjs +9 -0
  67. package/lib/panel-component/panel-container-group/index.cjs +28 -0
  68. package/lib/panel-component/panel-container-group/panel-container-group.cjs +110 -0
  69. package/lib/panel-component/panel-container-group/panel-container-group.controller.cjs +37 -0
  70. package/lib/panel-component/panel-container-group/panel-container-group.css +1 -0
  71. package/lib/panel-component/panel-container-group/panel-container-group.provider.cjs +17 -0
  72. package/lib/panel-component/panel-container-group/panel-container-group.state.cjs +9 -0
  73. package/lib/panel-component/panel-container-image/index.cjs +28 -0
  74. package/lib/panel-component/panel-container-image/panel-container-image.cjs +95 -0
  75. package/lib/panel-component/panel-container-image/panel-container-image.controller.cjs +14 -0
  76. package/lib/panel-component/panel-container-image/panel-container-image.css +1 -0
  77. package/lib/panel-component/panel-container-image/panel-container-image.provider.cjs +17 -0
  78. package/lib/panel-component/panel-container-image/panel-container-image.state.cjs +9 -0
  79. package/lib/panel-component/panel-ctrl-pos/index.cjs +20 -0
  80. package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.cjs +47 -0
  81. package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.cjs +25 -0
  82. package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.css +1 -0
  83. package/lib/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.cjs +17 -0
  84. package/lib/panel-component/panel-field/index.cjs +20 -0
  85. package/lib/panel-component/panel-field/panel-field.cjs +78 -0
  86. package/lib/panel-component/panel-field/panel-field.controller.cjs +132 -0
  87. package/lib/panel-component/panel-field/panel-field.css +1 -0
  88. package/lib/panel-component/panel-field/panel-field.provider.cjs +17 -0
  89. package/lib/panel-component/panel-field/panel-field.state.cjs +9 -0
  90. package/lib/panel-component/panel-item-render/index.cjs +24 -0
  91. package/lib/panel-component/panel-item-render/panel-item-render.cjs +49 -0
  92. package/lib/panel-component/panel-item-render/panel-item-render.controller.cjs +31 -0
  93. package/lib/panel-component/panel-item-render/panel-item-render.provider.cjs +17 -0
  94. package/lib/panel-component/panel-rawitem/index.cjs +32 -0
  95. package/lib/panel-component/panel-rawitem/panel-rawitem.cjs +61 -0
  96. package/lib/panel-component/panel-rawitem/panel-rawitem.controller.cjs +30 -0
  97. package/lib/panel-component/panel-rawitem/panel-rawitem.css +1 -0
  98. package/lib/panel-component/panel-rawitem/panel-rawitem.provider.cjs +17 -0
  99. package/lib/panel-component/panel-tab-page/index.cjs +18 -0
  100. package/lib/panel-component/panel-tab-page/panel-tab-page.cjs +65 -0
  101. package/lib/panel-component/panel-tab-page/panel-tab-page.provider.cjs +17 -0
  102. package/lib/panel-component/scroll-container/index.cjs +55 -0
  103. package/lib/panel-component/scroll-container/scroll-container/index.cjs +9 -0
  104. package/lib/panel-component/scroll-container/scroll-container/scroll-container.cjs +114 -0
  105. package/lib/panel-component/scroll-container/scroll-container/scroll-container.controller.cjs +14 -0
  106. package/lib/panel-component/scroll-container/scroll-container/scroll-container.css +1 -0
  107. package/lib/panel-component/scroll-container/scroll-container/scroll-container.provider.cjs +17 -0
  108. package/lib/panel-component/scroll-container/scroll-container-item/index.cjs +9 -0
  109. package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.cjs +66 -0
  110. package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.cjs +9 -0
  111. package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.css +1 -0
  112. package/lib/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.cjs +17 -0
  113. package/lib/panel-component/single-data-container/index.cjs +28 -0
  114. package/lib/panel-component/single-data-container/single-data-container.cjs +79 -0
  115. package/lib/panel-component/single-data-container/single-data-container.controller.cjs +287 -0
  116. package/lib/panel-component/single-data-container/single-data-container.css +1 -0
  117. package/lib/panel-component/single-data-container/single-data-container.provider.cjs +17 -0
  118. package/lib/panel-component/single-data-container/single-data-container.state.cjs +19 -0
  119. package/lib/plugin/index.cjs +7 -0
  120. package/{src/plugin/plugin-factory/plugin-factory.ts → lib/plugin/plugin-factory/plugin-factory.cjs} +137 -182
  121. package/lib/props/common.cjs +17 -0
  122. package/lib/props/editor/array.cjs +14 -0
  123. package/lib/props/editor/autocomplete.cjs +14 -0
  124. package/lib/props/editor/cascader.cjs +14 -0
  125. package/lib/props/editor/check-box-list.cjs +14 -0
  126. package/lib/props/editor/check-box.cjs +14 -0
  127. package/lib/props/editor/code.cjs +23 -0
  128. package/lib/props/editor/color-picker.cjs +14 -0
  129. package/lib/props/editor/common.cjs +62 -0
  130. package/lib/props/editor/data-picker.cjs +14 -0
  131. package/lib/props/editor/date-picker.cjs +14 -0
  132. package/lib/props/editor/date-range.cjs +14 -0
  133. package/lib/props/editor/dropdown-list.cjs +14 -0
  134. package/lib/props/editor/html.cjs +14 -0
  135. package/lib/props/editor/index.cjs +86 -0
  136. package/lib/props/editor/list-box.cjs +14 -0
  137. package/lib/props/editor/markdown.cjs +22 -0
  138. package/lib/props/editor/number-range.cjs +14 -0
  139. package/lib/props/editor/radio-button-list.cjs +14 -0
  140. package/lib/props/editor/rate.cjs +14 -0
  141. package/lib/props/editor/raw.cjs +14 -0
  142. package/lib/props/editor/slider.cjs +14 -0
  143. package/lib/props/editor/span.cjs +14 -0
  144. package/lib/props/editor/stepper.cjs +14 -0
  145. package/lib/props/editor/switch.cjs +14 -0
  146. package/lib/props/editor/text-box.cjs +30 -0
  147. package/lib/props/editor/upload.cjs +14 -0
  148. package/lib/props/index.cjs +89 -0
  149. package/lib/use/click-outside/click-outside.cjs +50 -0
  150. package/lib/use/control/index.cjs +7 -0
  151. package/lib/use/control/use-control-controller/use-control-controller.cjs +78 -0
  152. package/lib/use/event/event.cjs +39 -0
  153. package/lib/use/focus-blur/focus-blur.cjs +48 -0
  154. package/lib/use/index.cjs +34 -0
  155. package/lib/use/namespace/namespace.cjs +10 -0
  156. package/lib/use/route/route.cjs +31 -0
  157. package/lib/use/util/index.cjs +14 -0
  158. package/lib/use/view/index.cjs +7 -0
  159. package/lib/use/view/use-view-controller/use-view-controller.cjs +86 -0
  160. package/lib/use/vue/vue.cjs +64 -0
  161. package/lib/util/control/prepare-control.cjs +24 -0
  162. package/lib/util/index.cjs +43 -0
  163. package/lib/util/install.cjs +11 -0
  164. package/lib/util/overlay-container/overlay-container.cjs +116 -0
  165. package/lib/util/overlay-popover-container/overlay-popover-container.cjs +12 -0
  166. package/lib/util/overlay-view-util/overlay-view-util.cjs +70 -0
  167. package/lib/util/render/render.cjs +22 -0
  168. package/lib/util/route/route-listener.cjs +75 -0
  169. package/lib/util/route/route.cjs +302 -0
  170. package/lib/util/router-callback/router-callback-item.cjs +74 -0
  171. package/{src/util/router-callback/router-callback.ts → lib/util/router-callback/router-callback.cjs} +33 -37
  172. package/lib/util/store/app-store/app-store.cjs +12 -0
  173. package/lib/util/store/index.cjs +12 -0
  174. package/lib/util/store/ui-store/ui-store.cjs +17 -0
  175. package/lib/util/store/ui-store/z-index.cjs +20 -0
  176. package/lib/view/app-redirect-view/app-redirect-view.cjs +29 -0
  177. package/lib/view/common/index.cjs +15 -0
  178. package/lib/view/common/view.cjs +129 -0
  179. package/lib/view/common/view.css +1 -0
  180. package/lib/view/common/view.provider.cjs +10 -0
  181. package/lib/view/de-redirect-view/de-redirect-view.cjs +64 -0
  182. package/lib/view/de-redirect-view/de-redirect-view.provider.cjs +10 -0
  183. package/lib/view/de-redirect-view/index.cjs +22 -0
  184. package/lib/view/index.cjs +15 -0
  185. package/lib/view/portal-view/index.cjs +23 -0
  186. package/lib/view/portal-view/portal-view.cjs +95 -0
  187. package/lib/view/portal-view/portal-view.provider.cjs +10 -0
  188. package/lib/view/todo-redirect/todo-redirect.cjs +54 -0
  189. package/package.json +14 -10
  190. package/src/common/badge/badge.scss +0 -29
  191. package/src/common/badge/badge.tsx +0 -26
  192. package/src/common/code-list/code-list.scss +0 -15
  193. package/src/common/code-list/code-list.tsx +0 -127
  194. package/src/common/control-base/control-base.scss +0 -4
  195. package/src/common/control-base/control-base.tsx +0 -130
  196. package/src/common/control-loading-placeholder/control-loading-placeholder.tsx +0 -22
  197. package/src/common/control-shell/control-shell.scss +0 -5
  198. package/src/common/control-shell/control-shell.tsx +0 -70
  199. package/src/common/icon/icon.tsx +0 -82
  200. package/src/common/index.ts +0 -8
  201. package/src/common/router-view/router-view.tsx +0 -74
  202. package/src/common/view-shell/view-shell.scss +0 -5
  203. package/src/common/view-shell/view-shell.tsx +0 -163
  204. package/src/control/index.ts +0 -1
  205. package/src/control/panel/index.ts +0 -2
  206. package/src/control/panel/panel/index.ts +0 -12
  207. package/src/control/panel/panel/panel.provider.ts +0 -14
  208. package/src/control/panel/panel/panel.scss +0 -9
  209. package/src/control/panel/panel/panel.tsx +0 -166
  210. package/src/control/panel/view-layout-panel/index.ts +0 -18
  211. package/src/control/panel/view-layout-panel/view-layout-panel.provider.ts +0 -14
  212. package/src/control/panel/view-layout-panel/view-layout-panel.scss +0 -9
  213. package/src/control/panel/view-layout-panel/view-layout-panel.tsx +0 -178
  214. package/src/hooks/app/app.hooks.ts +0 -31
  215. package/src/hooks/index.ts +0 -1
  216. package/src/index.ts +0 -18
  217. package/src/interface/index.ts +0 -1
  218. package/src/interface/util/index.ts +0 -1
  219. package/src/interface/util/route/route.ts +0 -116
  220. package/src/panel-component/grid-container/grid-container.controller.ts +0 -18
  221. package/src/panel-component/grid-container/grid-container.provider.ts +0 -30
  222. package/src/panel-component/grid-container/grid-container.scss +0 -17
  223. package/src/panel-component/grid-container/grid-container.state.ts +0 -12
  224. package/src/panel-component/grid-container/grid-container.tsx +0 -119
  225. package/src/panel-component/grid-container/index.ts +0 -19
  226. package/src/panel-component/index.ts +0 -13
  227. package/src/panel-component/multi-data-container/index.ts +0 -22
  228. package/src/panel-component/multi-data-container/multi-data-container-item.controller.ts +0 -166
  229. package/src/panel-component/multi-data-container/multi-data-container-itm.state.ts +0 -20
  230. package/src/panel-component/multi-data-container/multi-data-container.controller.ts +0 -308
  231. package/src/panel-component/multi-data-container/multi-data-container.provider.ts +0 -30
  232. package/src/panel-component/multi-data-container/multi-data-container.scss +0 -10
  233. package/src/panel-component/multi-data-container/multi-data-container.state.ts +0 -20
  234. package/src/panel-component/multi-data-container/multi-data-container.tsx +0 -109
  235. package/src/panel-component/nav-pos/index.ts +0 -16
  236. package/src/panel-component/nav-pos/nav-pos.controller.ts +0 -393
  237. package/src/panel-component/nav-pos/nav-pos.provider.ts +0 -38
  238. package/src/panel-component/nav-pos/nav-pos.scss +0 -4
  239. package/src/panel-component/nav-pos/nav-pos.state.ts +0 -52
  240. package/src/panel-component/nav-pos/nav-pos.tsx +0 -121
  241. package/src/panel-component/panel-container/index.ts +0 -27
  242. package/src/panel-component/panel-container/panel-container.controller.ts +0 -18
  243. package/src/panel-component/panel-container/panel-container.provider.ts +0 -30
  244. package/src/panel-component/panel-container/panel-container.scss +0 -15
  245. package/src/panel-component/panel-container/panel-container.state.ts +0 -12
  246. package/src/panel-component/panel-container/panel-container.tsx +0 -72
  247. package/src/panel-component/panel-container-group/index.ts +0 -22
  248. package/src/panel-component/panel-container-group/panel-container-group.controller.ts +0 -43
  249. package/src/panel-component/panel-container-group/panel-container-group.provider.ts +0 -30
  250. package/src/panel-component/panel-container-group/panel-container-group.scss +0 -91
  251. package/src/panel-component/panel-container-group/panel-container-group.state.ts +0 -12
  252. package/src/panel-component/panel-container-group/panel-container-group.tsx +0 -112
  253. package/src/panel-component/panel-container-image/index.ts +0 -22
  254. package/src/panel-component/panel-container-image/panel-container-image.controller.ts +0 -18
  255. package/src/panel-component/panel-container-image/panel-container-image.provider.ts +0 -30
  256. package/src/panel-component/panel-container-image/panel-container-image.scss +0 -18
  257. package/src/panel-component/panel-container-image/panel-container-image.state.ts +0 -12
  258. package/src/panel-component/panel-container-image/panel-container-image.tsx +0 -95
  259. package/src/panel-component/panel-ctrl-pos/index.ts +0 -14
  260. package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.controller.ts +0 -53
  261. package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.provider.ts +0 -30
  262. package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.scss +0 -8
  263. package/src/panel-component/panel-ctrl-pos/panel-ctrl-pos.tsx +0 -53
  264. package/src/panel-component/panel-field/index.ts +0 -14
  265. package/src/panel-component/panel-field/panel-field.controller.ts +0 -174
  266. package/src/panel-component/panel-field/panel-field.provider.ts +0 -28
  267. package/src/panel-component/panel-field/panel-field.scss +0 -36
  268. package/src/panel-component/panel-field/panel-field.state.ts +0 -12
  269. package/src/panel-component/panel-field/panel-field.tsx +0 -81
  270. package/src/panel-component/panel-item-render/index.ts +0 -18
  271. package/src/panel-component/panel-item-render/panel-item-render.controller.ts +0 -52
  272. package/src/panel-component/panel-item-render/panel-item-render.provider.ts +0 -30
  273. package/src/panel-component/panel-item-render/panel-item-render.tsx +0 -50
  274. package/src/panel-component/panel-rawitem/index.ts +0 -26
  275. package/src/panel-component/panel-rawitem/panel-rawitem.controller.ts +0 -34
  276. package/src/panel-component/panel-rawitem/panel-rawitem.provider.ts +0 -28
  277. package/src/panel-component/panel-rawitem/panel-rawitem.scss +0 -8
  278. package/src/panel-component/panel-rawitem/panel-rawitem.tsx +0 -61
  279. package/src/panel-component/panel-tab-page/index.ts +0 -12
  280. package/src/panel-component/panel-tab-page/panel-tab-page.provider.ts +0 -27
  281. package/src/panel-component/panel-tab-page/panel-tab-page.tsx +0 -55
  282. package/src/panel-component/scroll-container/index.ts +0 -44
  283. package/src/panel-component/scroll-container/scroll-container/index.ts +0 -2
  284. package/src/panel-component/scroll-container/scroll-container/scroll-container.controller.ts +0 -32
  285. package/src/panel-component/scroll-container/scroll-container/scroll-container.provider.ts +0 -30
  286. package/src/panel-component/scroll-container/scroll-container/scroll-container.scss +0 -34
  287. package/src/panel-component/scroll-container/scroll-container/scroll-container.tsx +0 -110
  288. package/src/panel-component/scroll-container/scroll-container-item/index.ts +0 -2
  289. package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.controller.ts +0 -25
  290. package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.provider.ts +0 -30
  291. package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.scss +0 -9
  292. package/src/panel-component/scroll-container/scroll-container-item/scroll-container-item.tsx +0 -60
  293. package/src/panel-component/single-data-container/index.ts +0 -22
  294. package/src/panel-component/single-data-container/single-data-container.controller.ts +0 -345
  295. package/src/panel-component/single-data-container/single-data-container.provider.ts +0 -30
  296. package/src/panel-component/single-data-container/single-data-container.scss +0 -10
  297. package/src/panel-component/single-data-container/single-data-container.state.ts +0 -20
  298. package/src/panel-component/single-data-container/single-data-container.tsx +0 -95
  299. package/src/plugin/index.ts +0 -1
  300. package/src/props/common.ts +0 -30
  301. package/src/props/editor/array.ts +0 -27
  302. package/src/props/editor/autocomplete.ts +0 -27
  303. package/src/props/editor/cascader.ts +0 -27
  304. package/src/props/editor/check-box-list.ts +0 -27
  305. package/src/props/editor/check-box.ts +0 -27
  306. package/src/props/editor/code.ts +0 -36
  307. package/src/props/editor/color-picker.ts +0 -27
  308. package/src/props/editor/common.ts +0 -94
  309. package/src/props/editor/data-picker.ts +0 -27
  310. package/src/props/editor/date-picker.ts +0 -27
  311. package/src/props/editor/date-range.ts +0 -23
  312. package/src/props/editor/dropdown-list.ts +0 -27
  313. package/src/props/editor/html.ts +0 -27
  314. package/src/props/editor/index.ts +0 -25
  315. package/src/props/editor/list-box.ts +0 -27
  316. package/src/props/editor/markdown.ts +0 -35
  317. package/src/props/editor/number-range.ts +0 -23
  318. package/src/props/editor/radio-button-list.ts +0 -27
  319. package/src/props/editor/rate.ts +0 -23
  320. package/src/props/editor/raw.ts +0 -23
  321. package/src/props/editor/slider.ts +0 -23
  322. package/src/props/editor/span.ts +0 -27
  323. package/src/props/editor/stepper.ts +0 -23
  324. package/src/props/editor/switch.ts +0 -23
  325. package/src/props/editor/text-box.ts +0 -79
  326. package/src/props/editor/upload.ts +0 -27
  327. package/src/props/index.ts +0 -2
  328. package/src/types/index.d.ts +0 -8
  329. package/src/use/click-outside/click-outside.ts +0 -72
  330. package/src/use/control/index.ts +0 -1
  331. package/src/use/control/use-control-controller/use-control-controller.ts +0 -153
  332. package/src/use/event/event.ts +0 -57
  333. package/src/use/focus-blur/focus-blur.ts +0 -83
  334. package/src/use/index.ts +0 -9
  335. package/src/use/namespace/namespace.ts +0 -14
  336. package/src/use/route/route.ts +0 -47
  337. package/src/use/util/index.ts +0 -26
  338. package/src/use/view/index.ts +0 -1
  339. package/src/use/view/use-view-controller/use-view-controller.ts +0 -153
  340. package/src/use/vue/vue.ts +0 -142
  341. package/src/util/control/prepare-control.ts +0 -33
  342. package/src/util/index.ts +0 -10
  343. package/src/util/install.ts +0 -14
  344. package/src/util/overlay-container/overlay-container.ts +0 -155
  345. package/src/util/overlay-popover-container/overlay-popover-container.ts +0 -30
  346. package/src/util/overlay-view-util/overlay-view-util.ts +0 -89
  347. package/src/util/render/render.ts +0 -28
  348. package/src/util/route/route-listener.ts +0 -91
  349. package/src/util/route/route.ts +0 -520
  350. package/src/util/router-callback/router-callback-item.ts +0 -98
  351. package/src/util/store/app-store/app-store.ts +0 -10
  352. package/src/util/store/index.ts +0 -6
  353. package/src/util/store/ui-store/ui-store.ts +0 -27
  354. package/src/util/store/ui-store/z-index.ts +0 -53
  355. package/src/view/app-redirect-view/app-redirect-view.tsx +0 -26
  356. package/src/view/common/index.ts +0 -10
  357. package/src/view/common/view.provider.ts +0 -14
  358. package/src/view/common/view.scss +0 -38
  359. package/src/view/common/view.tsx +0 -152
  360. package/src/view/de-redirect-view/de-redirect-view.provider.ts +0 -14
  361. package/src/view/de-redirect-view/de-redirect-view.tsx +0 -62
  362. package/src/view/de-redirect-view/index.ts +0 -17
  363. package/src/view/index.ts +0 -5
  364. package/src/view/portal-view/index.ts +0 -18
  365. package/src/view/portal-view/portal-view.provider.ts +0 -14
  366. package/src/view/portal-view/portal-view.tsx +0 -79
  367. package/src/view/todo-redirect/todo-redirect.tsx +0 -51
@@ -1,153 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import {
3
- CTX,
4
- IViewController,
5
- IViewProvider,
6
- ViewController,
7
- } from '@ibiz-template/runtime';
8
- import { clearAll } from 'qx-util';
9
- import {
10
- getCurrentInstance,
11
- inject,
12
- onActivated,
13
- onBeforeUnmount,
14
- onDeactivated,
15
- provide,
16
- reactive,
17
- watch,
18
- } from 'vue';
19
- import { useForce, useProps } from '../../vue/vue';
20
-
21
- /**
22
- * 监听并更新上下文和视图参数(引用不变)
23
- * @author lxm
24
- * @date 2023-05-25 01:48:14
25
- * @param {IData} props
26
- * @param {IViewController} view
27
- */
28
- function watchAndUpdateContextParams(
29
- props: IData,
30
- view: IViewController,
31
- ): void {
32
- watch(
33
- () => ({ context: props.context, params: props.params }),
34
- newVal => {
35
- // 不改变引用的情况下,重置控制器里的上下文和视图参数。
36
- view.context.reset({}, newVal.context);
37
- clearAll(view.params);
38
- Object.assign(view.params, newVal.params);
39
- // 重新计算上下文和视图参数
40
- view.handleContextParams();
41
- ibiz.log.debug(`${view.model.id}的上下文或视图参数变更:`, newVal);
42
- },
43
- );
44
- }
45
-
46
- /**
47
- * 监听并更新state
48
- * @author lxm
49
- * @date 2023-05-26 03:43:23
50
- * @param {IData} props
51
- * @param {IViewController} view
52
- */
53
- function watchAndUpdateState(props: IData, view: IViewController): void {
54
- watch(
55
- () => {
56
- return props.state ? { ...props.state } : {};
57
- },
58
- (newVal, oldVal) => {
59
- const changeProps: IData = {};
60
- Object.keys(newVal).forEach(key => {
61
- if (newVal[key] !== (oldVal || {})[key]) {
62
- changeProps[key] = newVal[key];
63
- }
64
- });
65
- ibiz.log.debug(`视图 [${view.model.name}] state 变更`, changeProps);
66
- Object.keys(changeProps).forEach(key => {
67
- (view.state as any)[key] = changeProps[key];
68
- });
69
- },
70
- { immediate: true },
71
- );
72
- }
73
-
74
- /**
75
- * 初始化视图控制器
76
- *
77
- * @description 此视图暂时控制器实例化只用于路由一级视图
78
- * @author chitanda
79
- * @date 2022-08-15 15:08:04
80
- * @export
81
- * @template T
82
- * @param {(context: IContext, params: IParams, ctx?: CTX) => T} fn
83
- * @return {*} {T}
84
- */
85
- export function useViewController<T extends IViewController>(
86
- fn: (...args: ConstructorParameters<typeof ViewController>) => T,
87
- ): T {
88
- // 获取 props
89
- const props = useProps();
90
- // 获取上层组件的ctx
91
- const ctx = inject<CTX | undefined>('ctx', undefined);
92
- // 上下文里提前预告部件
93
- ctx?.evt.emit('onForecast', props.modelData.name!);
94
-
95
- // 实例化视图控制器
96
- const provider = props.provider as IViewProvider | undefined;
97
- let c: IViewController;
98
- if (provider?.createController) {
99
- // 如果适配器给了创建方法使用适配器的方法
100
- c = provider.createController(
101
- props.modelData,
102
- props.context,
103
- props.params,
104
- ctx,
105
- ) as T;
106
- } else {
107
- c = fn(props.modelData, props.context, props.params, ctx) as T;
108
- }
109
-
110
- ibiz.util.viewStack.add(c.id, c);
111
-
112
- watchAndUpdateContextParams(props, c);
113
- watchAndUpdateState(props, c);
114
-
115
- // 提供自身的ctx给下层组件
116
- provide('ctx', (c as any).ctx);
117
- // 让state 响应式
118
- c.state = reactive(c.state) as any;
119
-
120
- // 让state 响应式
121
- c.slotProps = reactive(c.slotProps) as any;
122
-
123
- // 从props赋值modal,如果存在的话。
124
- if (props.modal) {
125
- c.modal = props.modal;
126
- }
127
-
128
- onActivated(() => {
129
- c.onActivated();
130
- ibiz.util.viewStack.active(c.id);
131
- });
132
-
133
- onDeactivated(() => {
134
- c.onDeactivated();
135
- ibiz.util.viewStack.deactivate(c.id);
136
- });
137
-
138
- c.force = useForce();
139
-
140
- const vue = getCurrentInstance()!.proxy!;
141
- c.evt.onAll((eventName, event) => {
142
- vue.$emit(eventName.slice(2), event);
143
- });
144
-
145
- c.created();
146
-
147
- // 卸载时销毁
148
- onBeforeUnmount(() => {
149
- c.destroyed();
150
- ibiz.util.viewStack.remove(c.id);
151
- });
152
- return c as T;
153
- }
@@ -1,142 +0,0 @@
1
- import { isFunc } from 'qx-util';
2
- import {
3
- ComponentPublicInstance,
4
- createCommentVNode,
5
- getCurrentInstance,
6
- isReactive,
7
- toRaw,
8
- VNode,
9
- watch,
10
- WatchOptions,
11
- } from 'vue';
12
-
13
- /**
14
- * 获取组件的props,只能在setup里使用
15
- *
16
- * @author chitanda
17
- * @date 2022-08-14 16:08:19
18
- * @export
19
- * @return {*}
20
- */
21
- export function useProps(): IData {
22
- const vue = getCurrentInstance()!.proxy!;
23
- return vue.$props;
24
- }
25
-
26
- /**
27
- * 如果是reactive代理过的对象,返回原始对象
28
- *
29
- * @author lxm
30
- * @date 2023-02-15 10:56:00
31
- * @export
32
- * @param {*} val
33
- * @returns {*}
34
- */
35
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
- export function getOrigin<T = any>(val: T): T {
37
- return isReactive(val) ? toRaw<T>(val) : val;
38
- }
39
-
40
- /**
41
- * 监听props的属性
42
- *
43
- * @author lxm
44
- * @date 2022-08-22 22:08:11
45
- * @export
46
- * @param {string} key props的属性名
47
- * @param {(newVal: T, oldVal: T) => void} callback 监听回调
48
- * @param {(WatchOptions | undefined)} [options] 监听参数
49
- */
50
- export function usePropsWatch<T = unknown>(
51
- key: string,
52
- callback: (newVal?: T, oldVal?: T) => void,
53
- options?: WatchOptions | undefined,
54
- ): void {
55
- const props = useProps();
56
- if (Object.prototype.hasOwnProperty.call(props, key)) {
57
- watch(
58
- () => props[key],
59
- (newVal, oldVal) => {
60
- callback(getOrigin(newVal), getOrigin(oldVal));
61
- },
62
- options,
63
- );
64
- // immediate无效,模拟第一次赋值
65
- callback(getOrigin(props[key]), undefined);
66
- }
67
- }
68
-
69
- /**
70
- * 获取force方法
71
- *
72
- * @author lxm
73
- * @date 2022-08-24 11:08:56
74
- * @export
75
- * @returns {*} {(callback?: () => void) => void} callback回调会在这次更新渲染完成之后执行
76
- */
77
- export function useForce(): (callback?: () => void) => void {
78
- const vue = getCurrentInstance()!.proxy!;
79
- return (callback?: () => void) => {
80
- vue.$forceUpdate();
81
- if (callback && isFunc(callback)) {
82
- vue.$nextTick(() => {
83
- callback();
84
- });
85
- }
86
- };
87
- }
88
-
89
- /**
90
- * controller的force执行时,一起执行自己的force
91
- *
92
- * @author lxm
93
- * @date 2022-08-22 23:08:36
94
- * @export
95
- * @param {{
96
- * force: (callback?: () => void) => void;
97
- * }} controller
98
- */
99
- export function useForceTogether(
100
- vue: ComponentPublicInstance,
101
- controller: {
102
- force: (callback?: () => void) => void;
103
- },
104
- ): void {
105
- const orignForce = controller.force;
106
- const selfForce = useForce();
107
- controller.force = (callback?: () => void): void => {
108
- orignForce(callback);
109
- selfForce();
110
- };
111
- }
112
-
113
- /**
114
- * 控制器通用的vue实例能力绑定
115
- *
116
- * @author lxm
117
- * @date 2022-09-15 09:09:06
118
- * @export
119
- * @param {Vue} vue
120
- * @param {IData} controller
121
- */
122
- export function useController(controller: IData): void {
123
- controller.force = useForce();
124
- }
125
-
126
- /** 全局唯一的空节点 */
127
- export const EmptyVNode = createCommentVNode('EmptyVNode');
128
-
129
- /**
130
- * 配合EmptyVNode,判断是否是空节点
131
- * @author lxm
132
- * @date 2023-03-28 02:20:06
133
- * @export
134
- * @param {(VNode[] | VNode)} nodes
135
- * @return {*} {boolean}
136
- */
137
- export function isEmptyVNode(nodes: VNode[] | VNode): boolean {
138
- if (!Array.isArray(nodes)) {
139
- return nodes === EmptyVNode;
140
- }
141
- return nodes.length === 1 && nodes[0] === EmptyVNode;
142
- }
@@ -1,33 +0,0 @@
1
- import { Namespace } from '@ibiz-template/core';
2
- import { IControlController } from '@ibiz-template/runtime';
3
- import { useNamespace } from '../../use';
4
-
5
- /**
6
- * 部件UI组件准备参数
7
- * @author lxm
8
- * @date 2023-06-15 09:51:23
9
- * @export
10
- * @param {IControlController} c
11
- * @return {*}
12
- */
13
- export function prepareControl(c: IControlController): {
14
- controlClass: string[];
15
- ns: Namespace;
16
- } {
17
- const commonNs = useNamespace('control');
18
- const { controlType, sysCss, codeName } = c.model;
19
- const typeClass = controlType!.toLowerCase();
20
- const sysCssName = sysCss?.cssName;
21
- const ns = useNamespace(`control-${typeClass}`);
22
-
23
- const controlClass = [
24
- commonNs.b(),
25
- commonNs.b(typeClass),
26
- commonNs.m(codeName),
27
- ];
28
- if (sysCssName) {
29
- controlClass.push(sysCssName);
30
- }
31
-
32
- return { controlClass, ns };
33
- }
package/src/util/index.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from './route/route';
2
- export * from './route/route-listener';
3
- export * from './install';
4
- export * from './control/prepare-control';
5
- export * from './render/render';
6
- export { OverlayContainer } from './overlay-container/overlay-container';
7
- export { OverlayPopoverContainer } from './overlay-popover-container/overlay-popover-container';
8
- export * from './overlay-view-util/overlay-view-util';
9
- export { routerCallback } from './router-callback/router-callback';
10
- export * from './store';
@@ -1,14 +0,0 @@
1
- /* eslint-disable no-param-reassign */
2
- import type { App, Plugin } from 'vue';
3
-
4
- export type TypeWithInstall<T> = T & Plugin;
5
-
6
- export const withInstall = <T>(
7
- main: T,
8
- install: (_v: App) => void,
9
- ): TypeWithInstall<T> => {
10
- (main as TypeWithInstall<T>).install = (app): void => {
11
- install(app);
12
- };
13
- return main as TypeWithInstall<T>;
14
- };
@@ -1,155 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- import { QXEvent } from 'qx-util';
4
- import { IOverlayContainer } from '@ibiz-template/runtime';
5
- import { App, Component, h, VNode } from 'vue';
6
- import { RuntimeError } from '@ibiz-template/core';
7
-
8
- /**
9
- * 全局弹出承载组件
10
- *
11
- * @author chitanda
12
- * @date 2022-11-09 12:11:09
13
- * @export
14
- * @class OverlayContainer
15
- */
16
- export class OverlayContainer<O> implements IOverlayContainer {
17
- protected vm?: App;
18
-
19
- /**
20
- * 具体模态组件
21
- *
22
- * @author chitanda
23
- * @date 2022-11-09 12:11:34
24
- * @protected
25
- * @type {*}
26
- */
27
- protected modal: any;
28
-
29
- /**
30
- * 外面调用dismiss时传的result结果
31
- *
32
- * @author lxm
33
- * @date 2022-11-09 20:11:06
34
- * @protected
35
- * @type {unknown}
36
- */
37
- protected result?: unknown;
38
-
39
- /**
40
- * 内部事件
41
- *
42
- * @author chitanda
43
- * @date 2022-11-09 12:11:42
44
- * @protected
45
- */
46
- protected evt: QXEvent<{ dismiss: (data?: unknown) => void }> = new QXEvent();
47
-
48
- /**
49
- * 创建全局呈现
50
- *
51
- * @author chitanda
52
- * @date 2022-11-09 14:11:52
53
- * @param {unknown} component
54
- * @param {(h: CreateElement) => VNode} render
55
- * @param {IPopoverOptions} [opts]
56
- */
57
- constructor(
58
- protected component: unknown,
59
- protected render: (...args: any[]) => VNode,
60
- protected opts?: O,
61
- ) {
62
- this.init();
63
- }
64
-
65
- static createVueApp(
66
- _rootComponent: Component,
67
- _rootProps?: IData,
68
- ): App<Element> {
69
- throw new RuntimeError('没有注入createVueApp方法');
70
- }
71
-
72
- /**
73
- * 初始化飘窗
74
- *
75
- * @author chitanda
76
- * @date 2022-11-09 12:11:55
77
- * @protected
78
- * @return {*} {void}
79
- */
80
- protected init(): void {
81
- // eslint-disable-next-line @typescript-eslint/no-this-alias
82
- const self = this;
83
- const { render, opts } = this;
84
- const container = document.createElement('div');
85
- document.body.appendChild(container);
86
- const vm = OverlayContainer.createVueApp({
87
- mounted() {
88
- self.modal = this.$refs.root;
89
- },
90
- unmounted() {
91
- document.body.removeChild(container);
92
- self.evt.emit('dismiss', self.result);
93
- },
94
- render() {
95
- return h(
96
- self.component as string,
97
- {
98
- ref: 'root',
99
- opts,
100
- onDismiss(data: IData) {
101
- self.result = data;
102
- vm.unmount();
103
- },
104
- },
105
- { default: render },
106
- );
107
- },
108
- });
109
- ibiz.plugin.register(vm);
110
- vm.mount(container);
111
- this.vm = vm;
112
- }
113
-
114
- /**
115
- * 打开飘窗
116
- *
117
- * @author chitanda
118
- * @date 2022-11-09 12:11:52
119
- * @param {HTMLElement} target
120
- * @return {*} {Promise<void>}
121
- */
122
- async present(): Promise<void> {
123
- return this.modal.present();
124
- }
125
-
126
- /**
127
- * 手动调用关闭飘窗
128
- *
129
- * @author chitanda
130
- * @date 2022-11-09 12:11:39
131
- * @param {unknown} [data]
132
- * @return {*} {Promise<void>}
133
- */
134
- async dismiss(data?: unknown): Promise<void> {
135
- this.modal.dismiss(data);
136
- }
137
-
138
- /**
139
- * 订阅窗口关闭
140
- *
141
- * @author chitanda
142
- * @date 2022-11-09 12:11:20
143
- * @template T
144
- * @return {*} {Promise<T>}
145
- */
146
- async onWillDismiss<T = unknown>(): Promise<T> {
147
- return new Promise<T>(resolve => {
148
- const callback = (data: unknown) => {
149
- resolve(data as T);
150
- this.evt.off('dismiss', callback);
151
- };
152
- this.evt.on('dismiss', callback);
153
- });
154
- }
155
- }
@@ -1,30 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- /* eslint-disable no-dupe-class-members */
3
- import {
4
- IPopoverOptions,
5
- IOverlayPopoverContainer,
6
- } from '@ibiz-template/runtime';
7
- import { OverlayContainer } from '../overlay-container/overlay-container';
8
-
9
- /**
10
- * 飘窗组件呈现容器
11
- *
12
- * @author chitanda
13
- * @date 2022-11-09 14:11:46
14
- * @export
15
- * @class OverlayPopoverContainer
16
- * @extends {OverlayContainer<IPopoverOptions>}
17
- * @implements {IOverlayPopoverContainer}
18
- */
19
- export class OverlayPopoverContainer
20
- extends OverlayContainer<IPopoverOptions>
21
- implements IOverlayPopoverContainer
22
- {
23
- present(): Promise<void>;
24
-
25
- present(target: HTMLElement): Promise<void>;
26
-
27
- present(target?: HTMLElement): Promise<void> {
28
- return this.modal.present(target);
29
- }
30
- }
@@ -1,89 +0,0 @@
1
- import {
2
- IDrawerOptions,
3
- IFloatWindowOptions,
4
- IModal,
5
- IModalData,
6
- IModalOptions,
7
- IPopoverOptions,
8
- } from '@ibiz-template/runtime';
9
- import { h, resolveComponent, VNode } from 'vue';
10
-
11
- export function createOverlayView(props?: IParams): (modal: IModal) => VNode {
12
- return (modal: IModal) => {
13
- const viewShell = resolveComponent('IBizViewShell');
14
- return h(viewShell, {
15
- ...props,
16
- modal,
17
- });
18
- };
19
- }
20
-
21
- export async function openViewModal(
22
- props?: IParams,
23
- opts?: IModalOptions,
24
- ): Promise<IModalData> {
25
- const overlay = ibiz.overlay.createModal(
26
- createOverlayView(props),
27
- undefined,
28
- opts,
29
- );
30
- overlay.present();
31
- const result: IModalData = await overlay.onWillDismiss();
32
- return result || { ok: false };
33
- }
34
-
35
- export async function openViewFloatWindow(
36
- props?: IParams,
37
- opts?: IFloatWindowOptions,
38
- ): Promise<IModalData> {
39
- const overlay = ibiz.overlay.createFloatWindow(
40
- createOverlayView(props),
41
- undefined,
42
- opts,
43
- );
44
- overlay.present();
45
- const result: IModalData = await overlay.onWillDismiss();
46
- return result || { ok: false };
47
- }
48
-
49
- export async function openViewDrawer(
50
- props?: IParams,
51
- opts?: IDrawerOptions,
52
- ): Promise<IModalData> {
53
- const overlay = ibiz.overlay.createDrawer(
54
- createOverlayView(props),
55
- undefined,
56
- opts,
57
- );
58
- await overlay.present();
59
- const result: IModalData = await overlay.onWillDismiss();
60
- return result || { ok: false };
61
- }
62
-
63
- export async function openViewPopover(
64
- event: MouseEvent,
65
- props?: IParams,
66
- opts?: IPopoverOptions,
67
- ): Promise<IModalData> {
68
- const overlay = ibiz.overlay.createPopover(
69
- createOverlayView(props),
70
- undefined,
71
- opts,
72
- );
73
- overlay.present(event.target as HTMLElement);
74
- const result: IModalData = await overlay.onWillDismiss();
75
- return result || { ok: false };
76
- }
77
-
78
- const PlacementMap: IData = {
79
- DRAWER_LEFT: 'left',
80
- DRAWER_RIGHT: 'right',
81
- DRAWER_TOP: 'top',
82
- DRAWER_BOTTOM: 'bottom',
83
- };
84
-
85
- export function getDrawerPlacement(
86
- openMode: string,
87
- ): IDrawerOptions['placement'] {
88
- return PlacementMap[openMode] || 'right';
89
- }
@@ -1,28 +0,0 @@
1
- import { isNil } from 'ramda';
2
-
3
- /**
4
- * 把未知格式的值绘制成字符串
5
- * - 空值输出空字符串
6
- * - 对象,数组输出成JSON字符串
7
- * - 其他类型转成字符串输出
8
- * @author lxm
9
- * @date 2023-10-09 02:29:13
10
- * @export
11
- * @param {unknown} value
12
- * @return {*} {string}
13
- */
14
- export function renderString(value: unknown): string {
15
- if (isNil(value)) {
16
- return '';
17
- }
18
- if (typeof value === 'string') {
19
- return value;
20
- }
21
- try {
22
- const str = (value as IData).toString();
23
- return str;
24
- } catch (error) {
25
- ibiz.log.error(value, '转换成字符串失败', error);
26
- }
27
- return '';
28
- }