@ibiz-template/vue3-components 0.5.7-alpha.9 → 0.6.0-alpha.0

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 (287) hide show
  1. package/dist/index-V5mBTTSl.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{xlsx-util-gM6xqNsx.js → xlsx-util-GpIzYBZB.js} +1 -1
  5. package/es/_virtual/nprogress.mjs +3 -0
  6. package/es/common/action-toolbar/action-toolbar.d.ts +9 -0
  7. package/es/common/action-toolbar/action-toolbar.mjs +8 -1
  8. package/es/control/context-menu/context-menu.css +1 -1
  9. package/es/control/context-menu/context-menu.mjs +8 -2
  10. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +26 -0
  11. package/es/control/dashboard/portlet/chart-portlet/chart-portlet.mjs +1 -1
  12. package/es/control/dashboard/portlet/list-portlet/list-portlet.mjs +1 -1
  13. package/es/control/form/form-detail/form-item/form-item.css +1 -1
  14. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -1
  15. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +220 -0
  16. package/es/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
  17. package/es/control/form/form-detail/form-rawitem/form-rawitem.d.ts +1 -0
  18. package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +11 -4
  19. package/es/control/form/form-detail/form-rawitem/index.d.ts +1 -0
  20. package/es/control/grid/grid/grid.mjs +9 -2
  21. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +1 -0
  22. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +5 -2
  23. package/es/control/grid/grid-column/grid-field-column/index.d.ts +1 -0
  24. package/es/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
  25. package/es/control/search-bar/filter-tree/filter-tree.mjs +8 -10
  26. package/es/editor/array/ibiz-array/ibiz-array.d.ts +1 -0
  27. package/es/editor/array/ibiz-array/ibiz-array.mjs +10 -3
  28. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
  29. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.css +1 -1
  30. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.css +1 -0
  31. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +2 -0
  32. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.mjs +10 -2
  33. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  34. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +1 -0
  35. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +10 -3
  36. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.css +1 -1
  37. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -0
  38. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.mjs +10 -3
  39. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  40. package/es/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
  41. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.css +1 -1
  42. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.css +1 -1
  43. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.d.ts +1 -0
  44. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +10 -3
  45. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  46. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.css +1 -1
  47. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  48. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
  49. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.css +1 -1
  50. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +1 -0
  51. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +10 -3
  52. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  53. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +1 -0
  54. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +9 -2
  55. package/es/editor/rate/ibiz-rate/ibiz-rate.css +1 -0
  56. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +2 -0
  57. package/es/editor/rate/ibiz-rate/ibiz-rate.mjs +11 -3
  58. package/es/editor/raw/ibiz-raw/ibiz-raw.css +1 -1
  59. package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +1 -0
  60. package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +10 -3
  61. package/es/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
  62. package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +1 -0
  63. package/es/editor/slider/ibiz-slider/ibiz-slider.mjs +10 -3
  64. package/es/editor/span/span/span.css +1 -1
  65. package/es/editor/span/span/span.d.ts +1 -0
  66. package/es/editor/span/span/span.mjs +10 -3
  67. package/es/editor/span/span-link/span-link.css +1 -1
  68. package/es/editor/span/span-link/span-link.d.ts +1 -0
  69. package/es/editor/span/span-link/span-link.mjs +10 -3
  70. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -0
  71. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +2 -0
  72. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.mjs +11 -3
  73. package/es/editor/switch/ibiz-switch/ibiz-switch.css +1 -0
  74. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +2 -0
  75. package/es/editor/switch/ibiz-switch/ibiz-switch.mjs +11 -3
  76. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
  77. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +1 -0
  78. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +10 -3
  79. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
  80. package/es/editor/text-box/input/input.css +1 -1
  81. package/es/editor/text-box/input/input.mjs +1 -1
  82. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
  83. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
  84. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +9 -2
  85. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.css +1 -1
  86. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +1 -0
  87. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.mjs +10 -3
  88. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  89. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
  90. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +9 -2
  91. package/es/ibiz-vue3.d.ts +5 -0
  92. package/es/ibiz-vue3.mjs +99 -0
  93. package/es/index.d.ts +1 -5
  94. package/es/index.mjs +43 -96
  95. package/es/node_modules/.pnpm/element-plus@2.4.2_vue@3.3.8/node_modules/element-plus/dist/locale/zh-cn.mjs +131 -0
  96. package/es/node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.mjs +486 -0
  97. package/es/panel-component/user-message/index.mjs +3 -16
  98. package/es/panel-component/user-message/internal-message/common/index.d.ts +3 -0
  99. package/es/panel-component/user-message/internal-message/common/index.mjs +5 -0
  100. package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.css +1 -0
  101. package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.d.ts +104 -0
  102. package/es/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.mjs +99 -0
  103. package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.css +1 -0
  104. package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.d.ts +29 -0
  105. package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.mjs +81 -0
  106. package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.d.ts +19 -0
  107. package/es/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.mjs +66 -0
  108. package/es/panel-component/user-message/internal-message/index.d.ts +2 -4
  109. package/es/panel-component/user-message/internal-message/index.mjs +35 -4
  110. package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.css +1 -0
  111. package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.d.ts +29 -0
  112. package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.mjs +42 -0
  113. package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.provider.d.ts +30 -0
  114. package/es/panel-component/user-message/internal-message/internal-message-html/internal-message-html.provider.mjs +30 -0
  115. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -1
  116. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.d.ts +10 -5
  117. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.mjs +38 -28
  118. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.d.ts +12 -11
  119. package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +10 -35
  120. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
  121. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.d.ts +4 -0
  122. package/es/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.mjs +41 -6
  123. package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.css +1 -0
  124. package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.d.ts +29 -0
  125. package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.mjs +50 -0
  126. package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.provider.d.ts +28 -0
  127. package/es/panel-component/user-message/internal-message/internal-message-text/internal-message-text.provider.mjs +19 -0
  128. package/es/panel-component/user-message/user-message.css +1 -1
  129. package/es/panel-component/user-message/user-message.mjs +9 -2
  130. package/es/util/notification-util/notification-util.mjs +1 -0
  131. package/es/util/open-view-util/open-view-util.mjs +4 -2
  132. package/es/view/404-view/404-view.css +1 -1
  133. package/es/view/404-view/404-view.d.ts +1 -1
  134. package/es/view/404-view/404-view.mjs +6 -5
  135. package/es/view/login-view/login-view.css +1 -1
  136. package/es/view/login-view/login-view.mjs +9 -1
  137. package/es/web-app/App.css +1 -0
  138. package/es/web-app/App.d.ts +6 -0
  139. package/es/web-app/App.mjs +34 -0
  140. package/es/web-app/attach-environment-config.d.ts +1 -0
  141. package/es/web-app/attach-environment-config.mjs +51 -0
  142. package/es/web-app/components/index.d.ts +2 -0
  143. package/es/web-app/components/index.mjs +4 -0
  144. package/es/web-app/components/modal-router-shell/modal-router-shell.d.ts +13 -0
  145. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +119 -0
  146. package/es/web-app/components/router-shell/router-shell.d.ts +3864 -0
  147. package/es/web-app/components/router-shell/router-shell.mjs +106 -0
  148. package/es/web-app/create-vue-app.d.ts +13 -0
  149. package/es/web-app/create-vue-app.mjs +37 -0
  150. package/es/web-app/guard/auth-guard/auth-guard.d.ts +9 -0
  151. package/es/web-app/guard/auth-guard/auth-guard.mjs +169 -0
  152. package/es/web-app/guard/index.d.ts +1 -0
  153. package/es/web-app/guard/index.mjs +3 -0
  154. package/es/web-app/index.d.ts +1 -0
  155. package/es/web-app/index.mjs +3 -0
  156. package/es/web-app/main.d.ts +2 -0
  157. package/es/web-app/main.mjs +63 -0
  158. package/es/web-app/router/index.d.ts +6 -0
  159. package/es/web-app/router/index.mjs +200 -0
  160. package/es/web-app/util/index.d.ts +1 -0
  161. package/es/web-app/util/index.mjs +3 -0
  162. package/es/web-app/util/unauthorized-handler/unauthorized-handler.d.ts +46 -0
  163. package/es/web-app/util/unauthorized-handler/unauthorized-handler.mjs +107 -0
  164. package/lib/_virtual/nprogress.cjs +5 -0
  165. package/lib/common/action-toolbar/action-toolbar.cjs +8 -1
  166. package/lib/control/context-menu/context-menu.cjs +8 -2
  167. package/lib/control/context-menu/context-menu.css +1 -1
  168. package/lib/control/dashboard/portlet/chart-portlet/chart-portlet.cjs +1 -1
  169. package/lib/control/dashboard/portlet/list-portlet/list-portlet.cjs +1 -1
  170. package/lib/control/form/form-detail/form-item/form-item.css +1 -1
  171. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -1
  172. package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +10 -3
  173. package/lib/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
  174. package/lib/control/grid/grid/grid.cjs +7 -0
  175. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +5 -2
  176. package/lib/control/grid/grid-column/grid-field-edit-column/grid-edit-item/grid-edit-item.css +1 -1
  177. package/lib/control/search-bar/filter-tree/filter-tree.cjs +8 -10
  178. package/lib/control/search-bar/search-groups/search-groups.cjs +2 -2
  179. package/lib/editor/array/ibiz-array/ibiz-array.cjs +9 -2
  180. package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.css +1 -1
  181. package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.css +1 -1
  182. package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.cjs +10 -2
  183. package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.css +1 -0
  184. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +9 -2
  185. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  186. package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.cjs +9 -2
  187. package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.css +1 -1
  188. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  189. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
  190. package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.css +1 -1
  191. package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +9 -2
  192. package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.css +1 -1
  193. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  194. package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.css +1 -1
  195. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
  196. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  197. package/lib/editor/html/wang-editor/wang-editor.cjs +2 -2
  198. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +9 -2
  199. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.css +1 -1
  200. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +9 -2
  201. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  202. package/lib/editor/rate/ibiz-rate/ibiz-rate.cjs +10 -2
  203. package/lib/editor/rate/ibiz-rate/ibiz-rate.css +1 -0
  204. package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +9 -2
  205. package/lib/editor/raw/ibiz-raw/ibiz-raw.css +1 -1
  206. package/lib/editor/slider/ibiz-slider/ibiz-slider.cjs +9 -2
  207. package/lib/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
  208. package/lib/editor/span/span/span.cjs +9 -2
  209. package/lib/editor/span/span/span.css +1 -1
  210. package/lib/editor/span/span-link/span-link.cjs +9 -2
  211. package/lib/editor/span/span-link/span-link.css +1 -1
  212. package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.cjs +10 -2
  213. package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -0
  214. package/lib/editor/switch/ibiz-switch/ibiz-switch.cjs +10 -2
  215. package/lib/editor/switch/ibiz-switch/ibiz-switch.css +1 -0
  216. package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +9 -2
  217. package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.css +1 -1
  218. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
  219. package/lib/editor/text-box/input/input.cjs +1 -1
  220. package/lib/editor/text-box/input/input.css +1 -1
  221. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +9 -2
  222. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
  223. package/lib/editor/upload/ibiz-image-preview/ibiz-image-preview.cjs +9 -2
  224. package/lib/editor/upload/ibiz-image-preview/ibiz-image-preview.css +1 -1
  225. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +9 -2
  226. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  227. package/lib/ibiz-vue3.cjs +103 -0
  228. package/lib/index.cjs +143 -195
  229. package/lib/node_modules/.pnpm/element-plus@2.4.2_vue@3.3.8/node_modules/element-plus/dist/locale/zh-cn.cjs +135 -0
  230. package/lib/node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.cjs +490 -0
  231. package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +2 -2
  232. package/lib/panel-component/user-message/index.cjs +2 -15
  233. package/lib/panel-component/user-message/internal-message/common/index.cjs +11 -0
  234. package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.cjs +101 -0
  235. package/lib/panel-component/user-message/internal-message/common/internal-message-container/internal-message-container.css +1 -0
  236. package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.cjs +83 -0
  237. package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.css +1 -0
  238. package/lib/panel-component/user-message/internal-message/common/internal-message-default/internal-message-default.provider.cjs +68 -0
  239. package/lib/panel-component/user-message/internal-message/index.cjs +33 -7
  240. package/lib/panel-component/user-message/internal-message/internal-message-html/internal-message-html.cjs +44 -0
  241. package/lib/panel-component/user-message/internal-message/internal-message-html/internal-message-html.css +1 -0
  242. package/lib/panel-component/user-message/internal-message/internal-message-html/internal-message-html.provider.cjs +32 -0
  243. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.cjs +37 -27
  244. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.css +1 -1
  245. package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +10 -35
  246. package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.cjs +40 -5
  247. package/lib/panel-component/user-message/internal-message/internal-message-tab/internal-message-tab.css +1 -1
  248. package/lib/panel-component/user-message/internal-message/internal-message-text/internal-message-text.cjs +52 -0
  249. package/lib/panel-component/user-message/internal-message/internal-message-text/internal-message-text.css +1 -0
  250. package/lib/panel-component/user-message/internal-message/internal-message-text/internal-message-text.provider.cjs +21 -0
  251. package/lib/panel-component/user-message/user-message.cjs +8 -1
  252. package/lib/panel-component/user-message/user-message.css +1 -1
  253. package/lib/util/confirm-util/confirm-util.cjs +5 -5
  254. package/lib/util/loading-util/loading-util.cjs +2 -2
  255. package/lib/util/message-util/message-util.cjs +5 -5
  256. package/lib/util/modal-util/modal-util.cjs +6 -6
  257. package/lib/util/notice-util/notice-util.cjs +3 -3
  258. package/lib/util/notification-util/notification-util.cjs +3 -2
  259. package/lib/util/open-view-util/open-view-util.cjs +4 -2
  260. package/lib/view/404-view/404-view.cjs +6 -5
  261. package/lib/view/404-view/404-view.css +1 -1
  262. package/lib/view/login-view/login-view.cjs +9 -1
  263. package/lib/view/login-view/login-view.css +1 -1
  264. package/lib/web-app/App.cjs +38 -0
  265. package/lib/web-app/App.css +1 -0
  266. package/lib/web-app/attach-environment-config.cjs +53 -0
  267. package/lib/web-app/components/index.cjs +9 -0
  268. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +121 -0
  269. package/lib/web-app/components/router-shell/router-shell.cjs +108 -0
  270. package/lib/web-app/create-vue-app.cjs +39 -0
  271. package/lib/web-app/guard/auth-guard/auth-guard.cjs +171 -0
  272. package/lib/web-app/guard/index.cjs +7 -0
  273. package/lib/web-app/index.cjs +7 -0
  274. package/lib/web-app/main.cjs +65 -0
  275. package/lib/web-app/router/index.cjs +202 -0
  276. package/lib/web-app/util/index.cjs +7 -0
  277. package/lib/web-app/util/unauthorized-handler/unauthorized-handler.cjs +109 -0
  278. package/package.json +10 -6
  279. package/dist/index-vJ69ZIJV.js +0 -1
  280. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +0 -1
  281. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.d.ts +0 -17
  282. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.mjs +0 -83
  283. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.d.ts +0 -22
  284. package/es/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.mjs +0 -23
  285. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.cjs +0 -85
  286. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.css +0 -1
  287. package/lib/panel-component/user-message/internal-message/internal-message-default/internal-message-default.provider.cjs +0 -25
@@ -0,0 +1,106 @@
1
+ import { ref, toRaw, onUnmounted, watch, onActivated, onDeactivated, Fragment, resolveComponent, h, createVNode, defineComponent } from 'vue';
2
+ import { parseRouteViewData } from '@ibiz-template/vue3-util';
3
+ import { useRoute, useRouter } from 'vue-router';
4
+ import { ViewMode, Modal, RouteConst } from '@ibiz-template/runtime';
5
+ import { IBizContext } from '@ibiz-template/core';
6
+ import { mergeDeepLeft } from 'ramda';
7
+
8
+ "use strict";
9
+ const RouterShell = /* @__PURE__ */ defineComponent({
10
+ name: "RouterShell",
11
+ props: {
12
+ modal: {
13
+ type: Object,
14
+ required: true
15
+ }
16
+ },
17
+ setup(props) {
18
+ const route = useRoute();
19
+ const router = useRouter();
20
+ const viewData = ref({});
21
+ const isLoaded = ref(false);
22
+ const isActivated = ref(true);
23
+ const destroyContext = () => {
24
+ if (viewData.value.context) {
25
+ const {
26
+ context
27
+ } = toRaw(viewData.value);
28
+ if (context)
29
+ context.destroy();
30
+ }
31
+ };
32
+ const routeDepth = props.modal.routeDepth;
33
+ onUnmounted(() => {
34
+ destroyContext();
35
+ });
36
+ const calcViewData = async () => {
37
+ try {
38
+ const _viewData = await parseRouteViewData(route, routeDepth);
39
+ const _context = IBizContext.create(_viewData.context);
40
+ viewData.value = {
41
+ ..._viewData,
42
+ context: _context
43
+ };
44
+ isLoaded.value = true;
45
+ } catch (error) {
46
+ router.push({
47
+ name: "404View".concat(routeDepth)
48
+ });
49
+ }
50
+ };
51
+ calcViewData();
52
+ watch(() => route.params.view1, () => {
53
+ if (routeDepth === 1) {
54
+ destroyContext();
55
+ calcViewData();
56
+ }
57
+ });
58
+ const routeModal = new Modal({
59
+ mode: ViewMode.ROUTE,
60
+ routeDepth: routeDepth + 1
61
+ });
62
+ onActivated(() => {
63
+ isActivated.value = true;
64
+ });
65
+ onDeactivated(() => {
66
+ isActivated.value = false;
67
+ });
68
+ return {
69
+ routeModal,
70
+ route,
71
+ viewData,
72
+ isLoaded,
73
+ isActivated
74
+ };
75
+ },
76
+ render() {
77
+ if (!this.isLoaded) {
78
+ return null;
79
+ }
80
+ const {
81
+ context,
82
+ params,
83
+ srfnav,
84
+ viewModel
85
+ } = this.viewData;
86
+ const props = mergeDeepLeft({
87
+ ...this.$props,
88
+ ...this.$attrs,
89
+ context,
90
+ params,
91
+ modelData: viewModel,
92
+ key: viewModel.codeName
93
+ }, {
94
+ state: {
95
+ srfnav
96
+ }
97
+ });
98
+ return createVNode(Fragment, null, [h(resolveComponent("IBizViewShell"), props, this.$slots), this.isActivated && createVNode(resolveComponent("router-view"), {
99
+ "key": viewModel.codeName,
100
+ "name": RouteConst.ROUTE_MODAL_TAG,
101
+ "modal": this.routeModal
102
+ }, null)]);
103
+ }
104
+ });
105
+
106
+ export { RouterShell };
@@ -0,0 +1,13 @@
1
+ import { App, Component } from 'vue';
2
+ /**
3
+ * 创建 vue3 实例,避免多实例情况下全局方法未成功挂载
4
+ *
5
+ * @author chitanda
6
+ * @date 2024-02-04 15:02:54
7
+ * @export
8
+ * @param {Component} rootComponent
9
+ * @param {IData} [rootProps]
10
+ * @param {Plugin[]} [plugins]
11
+ * @return {*} {App<Element>}
12
+ */
13
+ export declare function createVueApp(rootComponent: Component, rootProps?: IData): App<Element>;
@@ -0,0 +1,37 @@
1
+ import { createApp, KeepAlive } from 'vue';
2
+ import ElementPlus from 'element-plus';
3
+ import zhCn from '../node_modules/.pnpm/element-plus@2.4.2_vue@3.3.8/node_modules/element-plus/dist/locale/zh-cn.mjs';
4
+ import { AppHooks, piniaInstance } from '@ibiz-template/vue3-util';
5
+ import IBizVue3 from '../ibiz-vue3.mjs';
6
+ import { i18n } from '../locale/index.mjs';
7
+
8
+ "use strict";
9
+ function createVueApp(rootComponent, rootProps) {
10
+ const app = createApp(rootComponent, rootProps);
11
+ app.component("KeepAlive", KeepAlive);
12
+ app.config.errorHandler = function(err) {
13
+ ibiz.util.error.handle(err);
14
+ };
15
+ const installPlugin = (_, plugin) => {
16
+ app.use(plugin);
17
+ };
18
+ AppHooks.useComponent.tap(installPlugin);
19
+ if (rootProps) {
20
+ const oldUnMounted = rootProps.unmounted;
21
+ rootProps.unmounted = () => {
22
+ oldUnMounted();
23
+ AppHooks.useComponent.removeTap(installPlugin);
24
+ };
25
+ }
26
+ app.use(i18n);
27
+ app.use(ElementPlus, {
28
+ locale: zhCn
29
+ });
30
+ app.use(piniaInstance);
31
+ app.use(IBizVue3);
32
+ AppHooks.createApp.callSync(null, app);
33
+ ibiz.plugin.register(app);
34
+ return app;
35
+ }
36
+
37
+ export { createVueApp };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 应用权限守卫
3
+ *
4
+ * @author chitanda
5
+ * @date 2022-10-28 10:10:29
6
+ * @export
7
+ * @return {*} {Promise<boolean>}
8
+ */
9
+ export declare function AuthGuard(notLogin?: boolean): Promise<boolean>;
@@ -0,0 +1,169 @@
1
+ import { HttpError, RuntimeError } from '@ibiz-template/core';
2
+ import { ModelHelper } from '@ibiz-template/model-helper';
3
+ import { mergeDeepRight } from 'ramda';
4
+ import { AppHooks } from '@ibiz-template/vue3-util';
5
+ import { i18n } from '../../../locale/index.mjs';
6
+
7
+ "use strict";
8
+ async function loadAppData() {
9
+ const res = await ibiz.net.get("/appdata");
10
+ if (res.ok) {
11
+ ibiz.appData = res.data;
12
+ }
13
+ }
14
+ async function loadOrgData() {
15
+ const res = await ibiz.net.get("/uaa/getbydcsystem/".concat(ibiz.env.dcSystem));
16
+ if (res.ok) {
17
+ const orgDataItems = res.data;
18
+ if (orgDataItems) {
19
+ const [data] = orgDataItems;
20
+ ibiz.orgData = data;
21
+ }
22
+ }
23
+ }
24
+ async function loadTheme() {
25
+ const app = ibiz.hub.getApp();
26
+ const uiThemes = app.model.appUIThemes || [];
27
+ if (uiThemes.length > 0) {
28
+ const theme = uiThemes[0];
29
+ await ibiz.util.theme.loadTheme(theme);
30
+ }
31
+ }
32
+ async function initEnvironment(helper) {
33
+ if (helper) {
34
+ const app = await helper.getAppModel();
35
+ const userParam = app.userParam;
36
+ if (userParam) {
37
+ Object.keys(userParam).forEach((key) => {
38
+ const value = ibiz.util.rawValue.format(userParam[key]);
39
+ const keys = key.split(".");
40
+ let currentObj = ibiz.env;
41
+ for (let i = 0; i < keys.length; i++) {
42
+ const k = keys[i];
43
+ if (i === keys.length - 1) {
44
+ currentObj[k] = value;
45
+ } else {
46
+ currentObj[k] = currentObj[k] || {};
47
+ currentObj = currentObj[k];
48
+ }
49
+ }
50
+ });
51
+ if (ibiz.env.globalConfig) {
52
+ ibiz.config = mergeDeepRight(ibiz.config, ibiz.env.globalConfig);
53
+ }
54
+ ibiz.log.setLevel(ibiz.env.logLevel);
55
+ }
56
+ }
57
+ }
58
+ let hasModelInit = false;
59
+ let noPermissionModel = false;
60
+ async function initModel(permission = true) {
61
+ if (!hasModelInit || hasModelInit && noPermissionModel !== permission) {
62
+ ibiz.hub.reset();
63
+ const helper = new ModelHelper(
64
+ async (url, params) => {
65
+ const res = await ibiz.net.get(
66
+ "".concat(ibiz.env.remoteModelUrl).concat(url),
67
+ params,
68
+ permission ? {} : { srfdcsystem: ibiz.env.dcSystem }
69
+ );
70
+ return res.data;
71
+ },
72
+ ibiz.env.appId,
73
+ permission
74
+ );
75
+ await initEnvironment(helper);
76
+ const app = await ibiz.hub.getAppAsync(ibiz.env.appId);
77
+ const appModel = app.model;
78
+ ibiz.env.isMob = appModel.mobileApp === true;
79
+ if (ibiz.env.isEnableMultiLan) {
80
+ const lang = ibiz.i18n.getLang();
81
+ const m = await helper.getPSAppLang(lang.replace("-", "_").toUpperCase());
82
+ const items = m.languageItems || [];
83
+ const data = {};
84
+ items.forEach((item) => {
85
+ data[item.lanResTag] = item.content;
86
+ });
87
+ i18n.global.mergeLocaleMessage(lang, data);
88
+ }
89
+ if (!appModel.appUIThemes) {
90
+ const module = await import('@ibiz-template/web-theme');
91
+ const theme = module.default || module;
92
+ AppHooks.useComponent.callSync(null, theme);
93
+ } else {
94
+ await loadTheme();
95
+ }
96
+ }
97
+ noPermissionModel = permission;
98
+ hasModelInit = true;
99
+ }
100
+ async function appInit() {
101
+ if (ibiz.env.isSaaSMode === true) {
102
+ await loadOrgData();
103
+ }
104
+ await loadAppData();
105
+ await initModel();
106
+ await ibiz.auth.extendLogin();
107
+ await ibiz.hub.notice.init();
108
+ }
109
+ function throw401() {
110
+ throw new HttpError({
111
+ response: {
112
+ status: 401,
113
+ statusText: "\u65E0\u6743\u9650\u8BBF\u95EE\uFF01"
114
+ }
115
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
+ });
117
+ }
118
+ async function anonymousValidate() {
119
+ const authInfo = ibiz.auth.getAuthInfo();
120
+ if (authInfo && !authInfo.isAnonymous) {
121
+ return;
122
+ }
123
+ await initModel(false);
124
+ const urlPaths = window.location.hash.split("/");
125
+ const viewName = urlPaths[urlPaths.length - 2];
126
+ let viewModel;
127
+ if (viewName !== "#") {
128
+ try {
129
+ viewModel = await ibiz.hub.getAppView(viewName);
130
+ } catch (error) {
131
+ ibiz.log.error(error);
132
+ }
133
+ }
134
+ if (!viewModel) {
135
+ ibiz.log.error(
136
+ "\u627E\u4E0D\u5230\u89C6\u56FE\u6A21\u578B".concat(viewName, ",\u8BF7\u786E\u4FDD\u8BE5\u89C6\u56FE\u914D\u7F6E\u4E86\u533F\u540D\u8BBF\u95EE\u548C\u7528\u6237\u5F15\u7528")
137
+ );
138
+ throw401();
139
+ return;
140
+ }
141
+ if (viewModel.accUserMode !== 3) {
142
+ throw401();
143
+ }
144
+ if (!authInfo) {
145
+ const loginResult = await ibiz.auth.anonymousLogin();
146
+ if (!loginResult) {
147
+ throw new RuntimeError("\u533F\u540D\u7528\u6237\u767B\u5F55\u5931\u8D25");
148
+ }
149
+ }
150
+ }
151
+ async function AuthGuard(notLogin = true) {
152
+ if (notLogin) {
153
+ let result = true;
154
+ try {
155
+ if (ibiz.env.enableAnonymous) {
156
+ await anonymousValidate();
157
+ }
158
+ await appInit();
159
+ } catch (error) {
160
+ result = false;
161
+ ibiz.util.error.handle(error);
162
+ }
163
+ return result;
164
+ }
165
+ await initModel(false);
166
+ return true;
167
+ }
168
+
169
+ export { AuthGuard };
@@ -0,0 +1 @@
1
+ export { AuthGuard } from './auth-guard/auth-guard';
@@ -0,0 +1,3 @@
1
+ export { AuthGuard } from './auth-guard/auth-guard.mjs';
2
+
3
+ "use strict";
@@ -0,0 +1 @@
1
+ export { runApp } from './main';
@@ -0,0 +1,3 @@
1
+ export { runApp } from './main.mjs';
2
+
3
+ "use strict";
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vue';
2
+ export declare function runApp(plugins?: Plugin[]): Promise<void>;
@@ -0,0 +1,63 @@
1
+ import { install } from '@ibiz-template/core';
2
+ import { install as install$1 } from '@ibiz-template/runtime';
3
+ import { AppHooks, PluginFactory, OverlayContainer } from '@ibiz-template/vue3-util';
4
+ import { createVueApp } from './create-vue-app.mjs';
5
+ import { attachEnvironmentConfig } from './attach-environment-config.mjs';
6
+ import App from './App.mjs';
7
+ import './util/index.mjs';
8
+ import { AppRouter } from './router/index.mjs';
9
+ import '../util/index.mjs';
10
+ import { OpenViewUtil } from '../util/open-view-util/open-view-util.mjs';
11
+ import { MessageUtil } from '../util/message-util/message-util.mjs';
12
+ import { ModalUtil } from '../util/modal-util/modal-util.mjs';
13
+ import { ConfirmUtil } from '../util/confirm-util/confirm-util.mjs';
14
+ import { NotificationUtil } from '../util/notification-util/notification-util.mjs';
15
+ import { LoadingUtil } from '../util/loading-util/loading-util.mjs';
16
+ import { NoticeUtil } from '../util/notice-util/notice-util.mjs';
17
+ import { OverlayController } from '../util/overlay-controller/overlay-controller.mjs';
18
+ import { UnauthorizedHandler } from './util/unauthorized-handler/unauthorized-handler.mjs';
19
+
20
+ "use strict";
21
+ async function runApp(plugins) {
22
+ AppHooks.createApp.tap((_, app2) => {
23
+ if (plugins) {
24
+ plugins.forEach((plugin) => {
25
+ app2.use(plugin);
26
+ });
27
+ }
28
+ });
29
+ install();
30
+ install$1();
31
+ ibiz.plugin = new PluginFactory();
32
+ const app = createVueApp(App);
33
+ OverlayContainer.createVueApp = createVueApp;
34
+ window.onerror = function(_event, _source, _lineno, _colno, error) {
35
+ if (error) {
36
+ ibiz.util.error.handle(error);
37
+ }
38
+ };
39
+ window.addEventListener("unhandledrejection", function(event) {
40
+ event.preventDefault();
41
+ event.promise.catch((err) => {
42
+ ibiz.util.error.handle(err);
43
+ });
44
+ });
45
+ await attachEnvironmentConfig();
46
+ app.use(AppRouter.getRouter());
47
+ ibiz.openView = new OpenViewUtil(AppRouter.getRouter());
48
+ ibiz.message = new MessageUtil();
49
+ ibiz.modal = new ModalUtil();
50
+ ibiz.confirm = new ConfirmUtil();
51
+ ibiz.notification = new NotificationUtil();
52
+ ibiz.loading = new LoadingUtil();
53
+ ibiz.notice = new NoticeUtil();
54
+ ibiz.overlay = new OverlayController();
55
+ ibiz.util.text.format = (value, code) => {
56
+ return app.config.globalProperties.$textFormat(value, code);
57
+ };
58
+ ibiz.util.error.register(new UnauthorizedHandler());
59
+ await ibiz.i18n.init();
60
+ app.mount("#app");
61
+ }
62
+
63
+ export { runApp };
@@ -0,0 +1,6 @@
1
+ import { Router } from 'vue-router';
2
+ import 'nprogress/nprogress.css';
3
+ export declare class AppRouter {
4
+ private static router?;
5
+ static getRouter(): Router;
6
+ }
@@ -0,0 +1,200 @@
1
+ import { createWebHashHistory, createRouter } from 'vue-router';
2
+ import { AppRedirectView } from '@ibiz-template/vue3-util';
3
+ import { RouteConst } from '@ibiz-template/runtime';
4
+ import NProgress from '../../node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.mjs';
5
+ import '../guard/index.mjs';
6
+ import '../../view/index.mjs';
7
+ import '../components/index.mjs';
8
+ import 'nprogress/nprogress.css';
9
+ import { AuthGuard } from '../guard/auth-guard/auth-guard.mjs';
10
+ import { LoginView } from '../../view/login-view/login-view.mjs';
11
+ import { View404 } from '../../view/404-view/404-view.mjs';
12
+ import { RouterShell } from '../components/router-shell/router-shell.mjs';
13
+ import { ModalRouterShell } from '../components/modal-router-shell/modal-router-shell.mjs';
14
+
15
+ "use strict";
16
+ var __defProp = Object.defineProperty;
17
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
+ var __publicField = (obj, key, value) => {
19
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
20
+ return value;
21
+ };
22
+ class AppRouter {
23
+ static getRouter() {
24
+ const placeholder = ibiz.env.routePlaceholder;
25
+ const paramReg = "[^/]+=[^/]+|".concat(placeholder);
26
+ const viewReg = "[^=/]+";
27
+ if (!this.router) {
28
+ this.router = createRouter({
29
+ // 4. 内部提供了 history 模式的实现。为了简单起见,我们在这里使用 hash 模式。
30
+ history: createWebHashHistory(),
31
+ routes: [
32
+ {
33
+ path: "/",
34
+ redirect: "/".concat(placeholder, "/index/").concat(placeholder)
35
+ },
36
+ {
37
+ path: "/login",
38
+ name: "loginView",
39
+ beforeEnter: async (_to, _from, next) => {
40
+ await AuthGuard(false);
41
+ next();
42
+ },
43
+ component: LoginView
44
+ },
45
+ {
46
+ path: "/404",
47
+ name: "404View1",
48
+ component: View404
49
+ },
50
+ {
51
+ path: "/appredirectview",
52
+ name: "appRedirectView",
53
+ beforeEnter: async (_to, _from, next) => {
54
+ const authority = await AuthGuard();
55
+ if (authority) {
56
+ next();
57
+ } else {
58
+ next(false);
59
+ }
60
+ },
61
+ component: AppRedirectView
62
+ },
63
+ {
64
+ path: "/:appContext(".concat(paramReg, ")/:view1(").concat(viewReg, ")/:params1(").concat(paramReg, ")"),
65
+ beforeEnter: async (_to, _from, next) => {
66
+ const authority = await AuthGuard();
67
+ if (authority) {
68
+ next();
69
+ } else {
70
+ next(false);
71
+ }
72
+ },
73
+ component: RouterShell,
74
+ children: [
75
+ {
76
+ path: "404",
77
+ name: "404View2",
78
+ component: View404
79
+ },
80
+ {
81
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
82
+ components: {
83
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
84
+ }
85
+ },
86
+ {
87
+ path: ":view2(".concat(viewReg, ")/:params2(").concat(paramReg, ")"),
88
+ component: RouterShell,
89
+ children: [
90
+ {
91
+ path: "404",
92
+ name: "404View3",
93
+ component: View404
94
+ },
95
+ {
96
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
97
+ components: {
98
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
99
+ }
100
+ },
101
+ {
102
+ path: ":view3(".concat(viewReg, ")/:params3(").concat(paramReg, ")"),
103
+ component: RouterShell,
104
+ children: [
105
+ {
106
+ path: "404",
107
+ name: "404View4",
108
+ component: View404
109
+ },
110
+ {
111
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
112
+ components: {
113
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
114
+ }
115
+ },
116
+ {
117
+ path: ":view4(".concat(viewReg, ")/:params4(").concat(paramReg, ")"),
118
+ component: RouterShell,
119
+ children: [
120
+ {
121
+ path: "404",
122
+ name: "404View5",
123
+ component: View404
124
+ },
125
+ {
126
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
127
+ components: {
128
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
129
+ }
130
+ },
131
+ {
132
+ path: ":view5(".concat(viewReg, ")/:params5(").concat(paramReg, ")"),
133
+ component: RouterShell,
134
+ children: [
135
+ {
136
+ path: "404",
137
+ name: "404View6",
138
+ component: View404
139
+ },
140
+ {
141
+ path: "".concat(RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
142
+ components: {
143
+ [RouteConst.ROUTE_MODAL_TAG]: ModalRouterShell
144
+ }
145
+ },
146
+ {
147
+ path: ":view6(".concat(viewReg, ")/:params6(").concat(paramReg, ")"),
148
+ component: RouterShell
149
+ },
150
+ {
151
+ path: ":pathMatch(.*)*",
152
+ redirect: { name: "404View6" }
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ path: ":pathMatch(.*)*",
158
+ redirect: { name: "404View6" }
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ path: ":pathMatch(.*)*",
164
+ redirect: { name: "404View4" }
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ path: ":pathMatch(.*)*",
170
+ redirect: { name: "404View3" }
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ path: ":pathMatch(.*)*",
176
+ redirect: { name: "404View2" }
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ path: "/:pathMatch(.*)*",
182
+ redirect: { name: "404View1" }
183
+ }
184
+ ]
185
+ });
186
+ this.router.beforeEach((_to, _from, next) => {
187
+ NProgress.configure({ showSpinner: false });
188
+ NProgress.start();
189
+ next();
190
+ });
191
+ this.router.afterEach(() => {
192
+ NProgress.done();
193
+ });
194
+ }
195
+ return this.router;
196
+ }
197
+ }
198
+ __publicField(AppRouter, "router");
199
+
200
+ export { AppRouter };
@@ -0,0 +1 @@
1
+ export { UnauthorizedHandler } from './unauthorized-handler/unauthorized-handler';
@@ -0,0 +1,3 @@
1
+ export { UnauthorizedHandler } from './unauthorized-handler/unauthorized-handler.mjs';
2
+
3
+ "use strict";
@@ -0,0 +1,46 @@
1
+ import { IErrorHandler } from '@ibiz-template/runtime';
2
+ /**
3
+ * 没有权限的错误处理器
4
+ *
5
+ * @author lxm
6
+ * @date 2022-10-11 14:10:10
7
+ * @export
8
+ * @class UnauthorizedHandler
9
+ */
10
+ export declare class UnauthorizedHandler implements IErrorHandler {
11
+ match(error: unknown): boolean;
12
+ /**
13
+ * cas登录处理
14
+ *
15
+ * @author lxm
16
+ * @date 2022-10-11 14:10:35
17
+ * @protected
18
+ * @returns {*} {Promise<void>}
19
+ */
20
+ protected casLogin(): Promise<void>;
21
+ /**
22
+ * 普通登录处理
23
+ *
24
+ * @author lxm
25
+ * @date 2022-10-11 14:10:24
26
+ * @protected
27
+ * @returns {*} {Promise<void>}
28
+ */
29
+ protected normalLogin(): Promise<void>;
30
+ /**
31
+ * 处理403
32
+ * @author lxm
33
+ * @date 2023-12-06 10:19:12
34
+ * @protected
35
+ * @return {*} {Promise<void>}
36
+ */
37
+ protected handle403(): Promise<void>;
38
+ /**
39
+ * 没有权限处理
40
+ *
41
+ * @author lxm
42
+ * @date 2022-10-11 14:10:50
43
+ * @returns {*} {Promise<void>}
44
+ */
45
+ handle(error: unknown): boolean | undefined;
46
+ }