@ibiz-template/mob-vue3-components 0.7.41-alpha.20 → 0.7.41-alpha.22

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 (397) hide show
  1. package/dist/ibiz-markdown-editor-COU_MxNu.js +2 -0
  2. package/dist/ibiz-markdown-editor-COU_MxNu.js.map +1 -0
  3. package/dist/index-Bn7VkqJp.js +76 -0
  4. package/dist/index-Bn7VkqJp.js.map +1 -0
  5. package/dist/index-ChdHGLJI.js +2 -0
  6. package/dist/index-ChdHGLJI.js.map +1 -0
  7. package/dist/index-Dd7yiMzY.js +2 -0
  8. package/dist/index-Dd7yiMzY.js.map +1 -0
  9. package/dist/index.es-D0mZvSDS.js +14 -0
  10. package/dist/index.es-D0mZvSDS.js.map +1 -0
  11. package/dist/index.min.css +2 -2
  12. package/dist/index.system.min.js +1 -1
  13. package/dist/{quill-COWm2ioZ.js → quill-BOA7ZLOz.js} +2 -2
  14. package/dist/{quill-COWm2ioZ.js.map → quill-BOA7ZLOz.js.map} +1 -1
  15. package/dist/{quill-editor-BwfQqajZ.js → quill-editor-DcZd_lqh.js} +2 -2
  16. package/dist/{quill-editor-BwfQqajZ.js.map → quill-editor-DcZd_lqh.js.map} +1 -1
  17. package/dist/quill-editor-preview-DghpeKpg.js +2 -0
  18. package/dist/quill-editor-preview-DghpeKpg.js.map +1 -0
  19. package/dist/{tree-CgxZzCGY.js → tree-BTa0bMPr.js} +2 -2
  20. package/dist/{tree-CgxZzCGY.js.map → tree-BTa0bMPr.js.map} +1 -1
  21. package/dist/xlsx-util-CQaOn5OK.js +105 -0
  22. package/dist/xlsx-util-CQaOn5OK.js.map +1 -0
  23. package/es/_virtual/FileSaver.min.mjs +3 -0
  24. package/es/_virtual/index12.mjs +2 -2
  25. package/es/_virtual/index14.mjs +2 -2
  26. package/es/common/action-group/action-group.css +1 -1
  27. package/es/common/action-toolbar/action-toolbar.css +1 -1
  28. package/es/common/add-btn/add-btn.css +1 -1
  29. package/es/common/button-list/button-list.css +1 -1
  30. package/es/common/cropping/cropping.css +1 -1
  31. package/es/common/date-range-picker/components/range-picker/range-picker.css +1 -1
  32. package/es/common/date-range-picker/components/single-picker/single-picker.css +1 -1
  33. package/es/common/date-range-picker/date-range-picker.css +1 -1
  34. package/es/common/emoji-select/components/categories/categories.css +1 -1
  35. package/es/common/emoji-select/components/category-label/category-label.css +1 -1
  36. package/es/common/emoji-select/components/emoji-item/emoji-item.css +1 -1
  37. package/es/common/emoji-select/components/emoji-list/emoji-list.css +1 -1
  38. package/es/common/emoji-select/emoji-select.css +1 -1
  39. package/es/common/fullscreen-header/fullscreen-header.css +1 -1
  40. package/es/common/md-advaned-searchform/md-advaned-searchform.css +1 -1
  41. package/es/common/md-sort-setting/md-sort-setting.css +1 -1
  42. package/es/common/preset-view-back/preset-view-back.css +1 -1
  43. package/es/common/rawitem/rawitem.css +1 -1
  44. package/es/common/split/split.css +1 -1
  45. package/es/common/split-trigger/split-trigger.css +1 -1
  46. package/es/common/tab-layout/tab-default-layout/tab-default-layout.css +1 -1
  47. package/es/common/tab-layout/tab-default-layout/tab-default-layout.mjs +1 -0
  48. package/es/common/tab-layout/tab-dropdown/tab-dropdown-list-content.css +1 -1
  49. package/es/common/tab-layout/tab-dropdown/tab-dropdown.css +1 -1
  50. package/es/common/tab-layout/tab-flow-layout/tab-flow-layout.css +1 -1
  51. package/es/common/tab-layout/tab-layout.css +1 -1
  52. package/es/common/tab-layout/tab-sidebar-layout/tab-sidebar-layout.css +1 -1
  53. package/es/common/view-message/view-message.mjs +1 -1
  54. package/es/control/app-menu/app-menu.css +1 -1
  55. package/es/control/app-menu/app-menu.mjs +2 -2
  56. package/es/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
  57. package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +2 -2
  58. package/es/control/app-menu-list-view/app-menu-list-view.css +1 -1
  59. package/es/control/calendar/calendar.css +1 -1
  60. package/es/control/calendar/calendar.mjs +1 -1
  61. package/es/control/caption-bar/caption-bar.css +1 -1
  62. package/es/control/dashboard/custom-dashboard-design/custom-dashboard-design.css +1 -1
  63. package/es/control/dashboard/dashboard.css +1 -1
  64. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  65. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +4 -1
  66. package/es/control/data-view/data-view.css +1 -1
  67. package/es/control/drbar/drbar.css +1 -1
  68. package/es/control/drtab/drtab.controller.mjs +1 -1
  69. package/es/control/drtab/drtab.css +1 -1
  70. package/es/control/form/edit-form/edit-form.css +1 -1
  71. package/es/control/form/form/form.css +1 -1
  72. package/es/control/form/form-detail/form-button/form-button.css +1 -1
  73. package/es/control/form/form-detail/form-button-list/form-button-list.css +1 -1
  74. package/es/control/form/form-detail/form-druipart/form-druipart.css +1 -1
  75. package/es/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  76. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  77. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +3 -3
  78. package/es/control/form/form-detail/form-item/form-item.css +1 -1
  79. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +0 -1
  80. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +2 -19
  81. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -1
  82. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +7 -0
  83. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -0
  84. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +239 -0
  85. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -1
  86. package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
  87. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
  88. package/es/control/form/form-detail/form-page/form-page-item/form-page-item.css +1 -1
  89. package/es/control/form/form-detail/form-page/form-page.css +1 -1
  90. package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  91. package/es/control/list/list/list.css +0 -1
  92. package/es/control/list/list/list.mjs +20 -121
  93. package/es/control/list/md-ctrl/md-ctrl.css +1 -1
  94. package/es/control/search-bar/filter-tree/filter-tree.css +1 -1
  95. package/es/control/search-bar/search-bar.css +1 -1
  96. package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
  97. package/es/control/toolbar/toolbar-render-util.mjs +4 -0
  98. package/es/control/toolbar/toolbar.css +1 -1
  99. package/es/control/tree/tree.css +1 -1
  100. package/es/control/wizard-panel/wizard-panel.css +1 -1
  101. package/es/editor/array/ibiz-array/ibiz-array.css +1 -1
  102. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.css +1 -1
  103. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.css +1 -1
  104. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  105. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.css +1 -1
  106. package/es/editor/common/data-mpicker/ibiz-data-mpicker.css +1 -1
  107. package/es/editor/common/right-icon/right-icon.css +1 -1
  108. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  109. package/es/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
  110. package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +2 -2
  111. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  112. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +1 -1
  113. package/es/editor/data-picker/picker-editor.controller.mjs +1 -1
  114. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.css +1 -1
  115. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
  116. package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.css +1 -1
  117. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  118. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +18 -9
  119. package/es/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.css +1 -1
  120. package/es/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.mjs +8 -1
  121. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
  122. package/es/editor/html/quill-editor/quill-editor.css +1 -1
  123. package/es/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
  124. package/es/editor/html/quill-editor-preview/quill-editor-preview.mjs +4 -3
  125. package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.css +1 -1
  126. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  127. package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +3 -1
  128. package/es/editor/not-supported-editor/not-supported-editor.css +1 -1
  129. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.css +1 -1
  130. package/es/editor/qrcode/ibiz-qrcode/ibiz-qrcode.css +1 -1
  131. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  132. package/es/editor/rate/ibiz-rate/ibiz-rate.css +1 -1
  133. package/es/editor/raw/ibiz-raw/ibiz-raw.css +1 -1
  134. package/es/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
  135. package/es/editor/span/span/span.css +1 -1
  136. package/es/editor/span/span-link/span-link.css +1 -1
  137. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -1
  138. package/es/editor/switch/ibiz-switch/ibiz-switch.css +1 -1
  139. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
  140. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +1 -1
  141. package/es/editor/text-box/input/input.css +1 -1
  142. package/es/editor/text-box/input/input.mjs +33 -2
  143. package/es/editor/text-box/signature/signature.css +1 -1
  144. package/es/editor/text-box/signature/signature.mjs +1 -1
  145. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
  146. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.mjs +1 -1
  147. package/es/editor/upload/ibiz-image-cropping/ibiz-image-cropping.css +1 -1
  148. package/es/editor/upload/ibiz-image-select/ibiz-image-select.css +1 -1
  149. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  150. package/es/ibiz-vue3.mjs +1 -0
  151. package/es/index.mjs +3 -0
  152. package/es/locale/en/index.mjs +32 -0
  153. package/es/locale/zh-CN/index.mjs +35 -1
  154. package/es/mob-app/components/modal-router-shell/modal-router-shell.mjs +2 -2
  155. package/es/mob-app/guard/auth-guard/auth-guard.mjs +206 -194
  156. package/es/mob-app/guard/auth-guard/dyna-auth-guard.mjs +65 -0
  157. package/es/mob-app/guard/index.mjs +1 -0
  158. package/es/mob-app/index.mjs +1 -0
  159. package/es/mob-app/main.mjs +14 -1
  160. package/es/mob-app/router/index.mjs +6 -4
  161. package/es/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.mjs +1 -1
  162. package/es/node_modules/.pnpm/@ibiz-template-plugin_ibiz-mob-ai-chat@0.0.1_cherry-markdown@0.8.58_interactjs@1.10.27_qx-uti_xgmgjpxet4ghyc7txs4jkjxilq/node_modules/@ibiz-template-plugin/ibiz-mob-ai-chat/dist/index.es.mjs +4425 -0
  163. package/es/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
  164. package/es/node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.mjs +15 -0
  165. package/es/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.mjs +24580 -0
  166. package/es/panel-component/async-action/async-action/async-action.css +1 -1
  167. package/es/panel-component/async-action/async-action-preview/async-action-preview.css +1 -1
  168. package/es/panel-component/async-action/async-action-tab/async-action-tab.css +1 -1
  169. package/es/panel-component/async-action/mob-async-action.css +1 -1
  170. package/es/panel-component/auth-sso/auth-sso.css +1 -1
  171. package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  172. package/es/panel-component/index.mjs +2 -0
  173. package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
  174. package/es/panel-component/panel-button/panel-button.css +1 -1
  175. package/es/panel-component/panel-tab-panel/panel-tab-panel.css +1 -1
  176. package/es/panel-component/setting-container/setting-container.css +1 -1
  177. package/es/panel-component/theme-toggling/index.mjs +15 -0
  178. package/es/panel-component/theme-toggling/theme-toggling.controller.mjs +90 -0
  179. package/es/panel-component/theme-toggling/theme-toggling.css +1 -0
  180. package/es/panel-component/theme-toggling/theme-toggling.mjs +72 -0
  181. package/es/panel-component/theme-toggling/theme-toggling.provider.mjs +21 -0
  182. package/es/panel-component/theme-toggling/theme-toggling.state.mjs +22 -0
  183. package/es/panel-component/user-message/common/internal-message-container/internal-message-container.css +1 -1
  184. package/es/panel-component/user-message/common/internal-message-default/internal-message-default.css +1 -1
  185. package/es/panel-component/user-message/internal-message-text/internal-message-text.css +1 -1
  186. package/es/panel-component/user-message/user-message.css +1 -1
  187. package/es/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
  188. package/es/panel-component/view-content-panel-container/view-content-panel-container.mjs +18 -4
  189. package/es/panel-component/view-header-panel-container/view-header-panel-container.css +1 -1
  190. package/es/panel-component/wf-action-button/wf-action-button.css +1 -1
  191. package/es/panel-component/wf-step-trace/wf-step-trace.css +1 -1
  192. package/es/util/ai-chat-util/ai-chat-util.mjs +932 -0
  193. package/es/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  194. package/es/util/ai-chat-util/ai-feedback/ai-feedback.mjs +140 -0
  195. package/es/util/app-drawer/app-drawer-component.mjs +7 -17
  196. package/es/util/app-modal/app-modal-component.mjs +4 -2
  197. package/es/util/app-util/app-util.mjs +76 -6
  198. package/es/util/index.mjs +2 -0
  199. package/es/util/list-util/list-render-util.mjs +1 -2
  200. package/es/util/user-route-util/user-route-util.mjs +55 -0
  201. package/es/util/xlsx-util/xlsx-util.mjs +163 -0
  202. package/es/view/portal-view/portal-view.mjs +3 -2
  203. package/es/view-engine/mob-calendar-view.engine.mjs +4 -0
  204. package/es/view-engine/mob-pickup-md-view.engine.mjs +1 -0
  205. package/lib/_virtual/FileSaver.min.cjs +5 -0
  206. package/lib/_virtual/index12.cjs +2 -2
  207. package/lib/_virtual/index14.cjs +2 -2
  208. package/lib/common/action-group/action-group.css +1 -1
  209. package/lib/common/action-toolbar/action-toolbar.css +1 -1
  210. package/lib/common/add-btn/add-btn.css +1 -1
  211. package/lib/common/button-list/button-list.css +1 -1
  212. package/lib/common/cropping/cropping.css +1 -1
  213. package/lib/common/date-range-picker/components/range-picker/range-picker.css +1 -1
  214. package/lib/common/date-range-picker/components/single-picker/single-picker.css +1 -1
  215. package/lib/common/date-range-picker/date-range-picker.css +1 -1
  216. package/lib/common/emoji-select/components/categories/categories.css +1 -1
  217. package/lib/common/emoji-select/components/category-label/category-label.css +1 -1
  218. package/lib/common/emoji-select/components/emoji-item/emoji-item.css +1 -1
  219. package/lib/common/emoji-select/components/emoji-list/emoji-list.css +1 -1
  220. package/lib/common/emoji-select/emoji-select.css +1 -1
  221. package/lib/common/fullscreen-header/fullscreen-header.css +1 -1
  222. package/lib/common/md-advaned-searchform/md-advaned-searchform.css +1 -1
  223. package/lib/common/md-sort-setting/md-sort-setting.css +1 -1
  224. package/lib/common/preset-view-back/preset-view-back.css +1 -1
  225. package/lib/common/rawitem/rawitem.css +1 -1
  226. package/lib/common/split/split.css +1 -1
  227. package/lib/common/split-trigger/split-trigger.css +1 -1
  228. package/lib/common/tab-layout/tab-default-layout/tab-default-layout.cjs +1 -0
  229. package/lib/common/tab-layout/tab-default-layout/tab-default-layout.css +1 -1
  230. package/lib/common/tab-layout/tab-dropdown/tab-dropdown-list-content.css +1 -1
  231. package/lib/common/tab-layout/tab-dropdown/tab-dropdown.css +1 -1
  232. package/lib/common/tab-layout/tab-flow-layout/tab-flow-layout.css +1 -1
  233. package/lib/common/tab-layout/tab-layout.css +1 -1
  234. package/lib/common/tab-layout/tab-sidebar-layout/tab-sidebar-layout.css +1 -1
  235. package/lib/common/view-message/view-message.cjs +1 -1
  236. package/lib/control/app-menu/app-menu.cjs +2 -2
  237. package/lib/control/app-menu/app-menu.css +1 -1
  238. package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +2 -2
  239. package/lib/control/app-menu-icon-view/app-menu-icon-view.css +1 -1
  240. package/lib/control/app-menu-list-view/app-menu-list-view.css +1 -1
  241. package/lib/control/calendar/calendar.cjs +1 -1
  242. package/lib/control/calendar/calendar.css +1 -1
  243. package/lib/control/caption-bar/caption-bar.css +1 -1
  244. package/lib/control/dashboard/custom-dashboard-design/custom-dashboard-design.css +1 -1
  245. package/lib/control/dashboard/dashboard.css +1 -1
  246. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +4 -1
  247. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  248. package/lib/control/data-view/data-view.css +1 -1
  249. package/lib/control/drbar/drbar.css +1 -1
  250. package/lib/control/drtab/drtab.controller.cjs +1 -1
  251. package/lib/control/drtab/drtab.css +1 -1
  252. package/lib/control/form/edit-form/edit-form.css +1 -1
  253. package/lib/control/form/form/form.css +1 -1
  254. package/lib/control/form/form-detail/form-button/form-button.css +1 -1
  255. package/lib/control/form/form-detail/form-button-list/form-button-list.css +1 -1
  256. package/lib/control/form/form-detail/form-druipart/form-druipart.css +1 -1
  257. package/lib/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  258. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +3 -3
  259. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  260. package/lib/control/form/form-detail/form-item/form-item.css +1 -1
  261. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +1 -18
  262. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +0 -1
  263. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -1
  264. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +7 -0
  265. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +241 -0
  266. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -0
  267. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -1
  268. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -1
  269. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
  270. package/lib/control/form/form-detail/form-page/form-page-item/form-page-item.css +1 -1
  271. package/lib/control/form/form-detail/form-page/form-page.css +1 -1
  272. package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
  273. package/lib/control/list/list/list.cjs +19 -120
  274. package/lib/control/list/list/list.css +0 -1
  275. package/lib/control/list/md-ctrl/md-ctrl.css +1 -1
  276. package/lib/control/search-bar/filter-tree/filter-tree.css +1 -1
  277. package/lib/control/search-bar/search-bar.css +1 -1
  278. package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
  279. package/lib/control/toolbar/toolbar-render-util.cjs +4 -0
  280. package/lib/control/toolbar/toolbar.css +1 -1
  281. package/lib/control/tree/tree.css +1 -1
  282. package/lib/control/wizard-panel/wizard-panel.css +1 -1
  283. package/lib/editor/array/ibiz-array/ibiz-array.css +1 -1
  284. package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.css +1 -1
  285. package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.css +1 -1
  286. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  287. package/lib/editor/color-picker/ibiz-color-picker/ibiz-color-picker.css +1 -1
  288. package/lib/editor/common/data-mpicker/ibiz-data-mpicker.css +1 -1
  289. package/lib/editor/common/right-icon/right-icon.css +1 -1
  290. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.css +1 -1
  291. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +2 -2
  292. package/lib/editor/data-picker/ibiz-picker/ibiz-picker.css +1 -1
  293. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +1 -1
  294. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  295. package/lib/editor/data-picker/picker-editor.controller.cjs +1 -1
  296. package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.css +1 -1
  297. package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.css +1 -1
  298. package/lib/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.css +1 -1
  299. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +18 -9
  300. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
  301. package/lib/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.cjs +8 -1
  302. package/lib/editor/dropdown-list/ibiz-dropdown-list/ibiz-dropdown-list.css +1 -1
  303. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -1
  304. package/lib/editor/html/quill-editor/quill-editor.css +1 -1
  305. package/lib/editor/html/quill-editor-preview/quill-editor-preview.cjs +4 -3
  306. package/lib/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
  307. package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.css +1 -1
  308. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +3 -1
  309. package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
  310. package/lib/editor/not-supported-editor/not-supported-editor.css +1 -1
  311. package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.css +1 -1
  312. package/lib/editor/qrcode/ibiz-qrcode/ibiz-qrcode.css +1 -1
  313. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  314. package/lib/editor/rate/ibiz-rate/ibiz-rate.css +1 -1
  315. package/lib/editor/raw/ibiz-raw/ibiz-raw.css +1 -1
  316. package/lib/editor/slider/ibiz-slider/ibiz-slider.css +1 -1
  317. package/lib/editor/span/span/span.css +1 -1
  318. package/lib/editor/span/span-link/span-link.css +1 -1
  319. package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.css +1 -1
  320. package/lib/editor/switch/ibiz-switch/ibiz-switch.css +1 -1
  321. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +1 -1
  322. package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
  323. package/lib/editor/text-box/input/input.cjs +32 -1
  324. package/lib/editor/text-box/input/input.css +1 -1
  325. package/lib/editor/text-box/signature/signature.cjs +1 -1
  326. package/lib/editor/text-box/signature/signature.css +1 -1
  327. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.cjs +1 -1
  328. package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
  329. package/lib/editor/upload/ibiz-image-cropping/ibiz-image-cropping.css +1 -1
  330. package/lib/editor/upload/ibiz-image-select/ibiz-image-select.css +1 -1
  331. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.css +1 -1
  332. package/lib/ibiz-vue3.cjs +1 -0
  333. package/lib/index.cjs +7 -0
  334. package/lib/locale/en/index.cjs +32 -0
  335. package/lib/locale/zh-CN/index.cjs +35 -1
  336. package/lib/mob-app/components/modal-router-shell/modal-router-shell.cjs +2 -2
  337. package/lib/mob-app/guard/auth-guard/auth-guard.cjs +206 -194
  338. package/lib/mob-app/guard/auth-guard/dyna-auth-guard.cjs +67 -0
  339. package/lib/mob-app/guard/index.cjs +2 -0
  340. package/lib/mob-app/index.cjs +2 -0
  341. package/lib/mob-app/main.cjs +14 -1
  342. package/lib/mob-app/router/index.cjs +6 -4
  343. package/lib/node_modules/.pnpm/@amap_amap-jsapi-loader@1.0.1_patch_hash_73bpcwbs2m5ip4qppmz6a7epsa/node_modules/@amap/amap-jsapi-loader/dist/index.cjs +1 -1
  344. package/lib/node_modules/.pnpm/@ibiz-template-plugin_ibiz-mob-ai-chat@0.0.1_cherry-markdown@0.8.58_interactjs@1.10.27_qx-uti_xgmgjpxet4ghyc7txs4jkjxilq/node_modules/@ibiz-template-plugin/ibiz-mob-ai-chat/dist/index.es.cjs +4427 -0
  345. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.2.0/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
  346. package/lib/node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.cjs +20 -0
  347. package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.cjs +24599 -0
  348. package/lib/panel-component/async-action/async-action/async-action.css +1 -1
  349. package/lib/panel-component/async-action/async-action-preview/async-action-preview.css +1 -1
  350. package/lib/panel-component/async-action/async-action-tab/async-action-tab.css +1 -1
  351. package/lib/panel-component/async-action/mob-async-action.css +1 -1
  352. package/lib/panel-component/auth-sso/auth-sso.css +1 -1
  353. package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  354. package/lib/panel-component/index.cjs +44 -42
  355. package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
  356. package/lib/panel-component/panel-button/panel-button.css +1 -1
  357. package/lib/panel-component/panel-tab-panel/panel-tab-panel.css +1 -1
  358. package/lib/panel-component/setting-container/setting-container.css +1 -1
  359. package/lib/panel-component/theme-toggling/index.cjs +20 -0
  360. package/lib/panel-component/theme-toggling/theme-toggling.cjs +74 -0
  361. package/lib/panel-component/theme-toggling/theme-toggling.controller.cjs +92 -0
  362. package/lib/panel-component/theme-toggling/theme-toggling.css +1 -0
  363. package/lib/panel-component/theme-toggling/theme-toggling.provider.cjs +23 -0
  364. package/lib/panel-component/theme-toggling/theme-toggling.state.cjs +24 -0
  365. package/lib/panel-component/user-message/common/internal-message-container/internal-message-container.css +1 -1
  366. package/lib/panel-component/user-message/common/internal-message-default/internal-message-default.css +1 -1
  367. package/lib/panel-component/user-message/internal-message-text/internal-message-text.css +1 -1
  368. package/lib/panel-component/user-message/user-message.css +1 -1
  369. package/lib/panel-component/view-content-panel-container/view-content-panel-container.cjs +18 -4
  370. package/lib/panel-component/view-content-panel-container/view-content-panel-container.css +1 -1
  371. package/lib/panel-component/view-header-panel-container/view-header-panel-container.css +1 -1
  372. package/lib/panel-component/wf-action-button/wf-action-button.css +1 -1
  373. package/lib/panel-component/wf-step-trace/wf-step-trace.css +1 -1
  374. package/lib/util/ai-chat-util/ai-chat-util.cjs +934 -0
  375. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.cjs +142 -0
  376. package/lib/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
  377. package/lib/util/app-drawer/app-drawer-component.cjs +7 -17
  378. package/lib/util/app-modal/app-modal-component.cjs +4 -2
  379. package/lib/util/app-util/app-util.cjs +75 -5
  380. package/lib/util/index.cjs +5 -0
  381. package/lib/util/list-util/list-render-util.cjs +1 -2
  382. package/lib/util/user-route-util/user-route-util.cjs +58 -0
  383. package/lib/util/xlsx-util/xlsx-util.cjs +166 -0
  384. package/lib/view/portal-view/portal-view.cjs +3 -2
  385. package/lib/view-engine/mob-calendar-view.engine.cjs +4 -0
  386. package/lib/view-engine/mob-pickup-md-view.engine.cjs +1 -0
  387. package/package.json +12 -9
  388. package/dist/ibiz-markdown-editor-DMe7ZdYW.js +0 -2
  389. package/dist/ibiz-markdown-editor-DMe7ZdYW.js.map +0 -1
  390. package/dist/index-B0eDJ8A4.js +0 -2
  391. package/dist/index-B0eDJ8A4.js.map +0 -1
  392. package/dist/index-FB2X3Nyy.js +0 -76
  393. package/dist/index-FB2X3Nyy.js.map +0 -1
  394. package/dist/index-nqcMxJEO.js +0 -2
  395. package/dist/index-nqcMxJEO.js.map +0 -1
  396. package/dist/quill-editor-preview-Bj3EE5LD.js +0 -2
  397. package/dist/quill-editor-preview-Bj3EE5LD.js.map +0 -1
@@ -0,0 +1,934 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var qxUtil = require('qx-util');
5
+ var runtime = require('@ibiz-template/runtime');
6
+ var core = require('@ibiz-template/core');
7
+ var aiFeedback = require('./ai-feedback/ai-feedback.cjs');
8
+
9
+ "use strict";
10
+ var __defProp = Object.defineProperty;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __publicField = (obj, key, value) => {
13
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
14
+ return value;
15
+ };
16
+ class AIChatUtil {
17
+ constructor() {
18
+ __publicField(this, "TOPIC_CHAT_PREFIX", "topic");
19
+ __publicField(this, "INLINE_CHAT_SUFFIX", "inline");
20
+ __publicField(this, "TEMP_CHAT_SUFFIX", "temp");
21
+ __publicField(this, "UNKOWN_CHAT_SUFFIX", "unknow");
22
+ }
23
+ /**
24
+ * 获取AI聊天对象
25
+ */
26
+ async getAIChat() {
27
+ const module = await Promise.resolve().then(function () { return require('../../node_modules/.pnpm/@ibiz-template-plugin_ibiz-mob-ai-chat@0.0.1_cherry-markdown@0.8.58_interactjs@1.10.27_qx-uti_xgmgjpxet4ghyc7txs4jkjxilq/node_modules/@ibiz-template-plugin/ibiz-mob-ai-chat/dist/index.es.cjs'); });
28
+ const chatInstance = module.chat || module.default.chat;
29
+ return chatInstance;
30
+ }
31
+ /**
32
+ * 获取编辑器扩展AI聊天参数
33
+ * @param editorParams
34
+ * @param context
35
+ * @param params
36
+ * @param data
37
+ */
38
+ async getEditorExAIChatParams(editorParams, context, params, data, deACMode, args) {
39
+ const containerOptions = {};
40
+ if (editorParams.autoclose) {
41
+ try {
42
+ containerOptions.autoClose = JSON.parse(editorParams.autoclose);
43
+ } catch (error) {
44
+ ibiz.log.error(error);
45
+ }
46
+ }
47
+ if (editorParams.openmode)
48
+ containerOptions.openMode = editorParams.openmode;
49
+ const topicOptions = {};
50
+ const chatOptions = {};
51
+ if (editorParams.srfaiappendcurdata) {
52
+ chatOptions.appendCurData = editorParams.srfaiappendcurdata === "true" ? data : void 0;
53
+ }
54
+ chatOptions.appendCurContent = editorParams.srfaiappendcurcontent ? core.StringUtil.fill(
55
+ editorParams.srfaiappendcurcontent,
56
+ context,
57
+ params,
58
+ data
59
+ ) : void 0;
60
+ chatOptions.autoQuestion = editorParams.autoquestion !== "false";
61
+ chatOptions.autoFill = editorParams.autofill === "true";
62
+ chatOptions.appendCurResource = editorParams.srfaiappendresource ? core.StringUtil.fill(editorParams.srfaiappendresource, context, params, data) : void 0;
63
+ if (editorParams.srfmode) {
64
+ chatOptions.srfMode = editorParams.srfmode;
65
+ }
66
+ let enableAIAgentChange = ibiz.config.common.enableAIAgentChange;
67
+ if (editorParams.srfenableaiagentchange) {
68
+ enableAIAgentChange = editorParams.srfenableaiagentchange === "true";
69
+ }
70
+ chatOptions.enableAIAgentChange = enableAIAgentChange;
71
+ if (editorParams.srfaiagent) {
72
+ chatOptions.activeAIAgentID = editorParams.srfaiagent;
73
+ }
74
+ const aiAgentlist = await this.getAIAgentList(
75
+ context,
76
+ params,
77
+ editorParams
78
+ );
79
+ chatOptions.aiAgentlist = aiAgentlist;
80
+ if (deACMode) {
81
+ const {
82
+ contentToolbarItems,
83
+ footerToolbarItems,
84
+ questionToolbarItems,
85
+ otherToolbarItems
86
+ } = this.calcAiToolbarItemsByAc(deACMode);
87
+ chatOptions.contentToolbarItems = contentToolbarItems;
88
+ chatOptions.footerToolbarItems = footerToolbarItems;
89
+ chatOptions.questionToolbarItems = questionToolbarItems;
90
+ chatOptions.otherToolbarItems = otherToolbarItems;
91
+ }
92
+ const sessionid = this.getChatSessionId("TEMP");
93
+ chatOptions.sessionid = sessionid;
94
+ let id = "";
95
+ let abortController;
96
+ let asyncacitonid = "";
97
+ const { chatInstance, view, ctrl } = args;
98
+ chatOptions.history = async (ctx, param, other) => {
99
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
100
+ const historyRequestData = {};
101
+ if (other.appendCurData) {
102
+ Object.assign(historyRequestData, {
103
+ ...other.appendCurData
104
+ });
105
+ }
106
+ if (other.sessionid) {
107
+ Object.assign(historyRequestData, {
108
+ sessionid: other.sessionid
109
+ });
110
+ }
111
+ if (other.srfaiagent) {
112
+ Object.assign(historyRequestData, {
113
+ srfaiagent: other.srfaiagent
114
+ });
115
+ }
116
+ if (other.srfmode) {
117
+ Object.assign(historyRequestData, {
118
+ mode: other.srfmode
119
+ });
120
+ }
121
+ const result = await deService.aiChatHistory(
122
+ ctx,
123
+ param,
124
+ historyRequestData
125
+ );
126
+ if (result.data && Array.isArray(result.data)) {
127
+ let preMsg;
128
+ result.data.forEach((item) => {
129
+ if (item.role === "TOOL") {
130
+ if (preMsg && item.content) {
131
+ chatInstance.aiChat.updateRecommendPrompt(
132
+ preMsg,
133
+ item.content
134
+ );
135
+ }
136
+ } else {
137
+ const msg = {
138
+ messageid: qxUtil.createUUID(),
139
+ state: 30,
140
+ type: "DEFAULT",
141
+ role: item.role,
142
+ content: item.content,
143
+ completed: true
144
+ };
145
+ preMsg = msg;
146
+ chatInstance.aiChat.addMessage(msg);
147
+ }
148
+ });
149
+ }
150
+ return true;
151
+ };
152
+ chatOptions.question = async (aiChat, ctx, param, other, arr, sessionid2, srfaiagent, srfmode) => {
153
+ id = qxUtil.createUUID();
154
+ abortController = new AbortController();
155
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
156
+ try {
157
+ const questionRequestData = {
158
+ messages: arr,
159
+ sessionid: sessionid2
160
+ };
161
+ if (srfaiagent) {
162
+ questionRequestData.srfaiagent = srfaiagent;
163
+ }
164
+ if (srfmode) {
165
+ questionRequestData.mode = srfmode;
166
+ }
167
+ await deService.aiChatSse(
168
+ (msg) => {
169
+ if (msg.actionstate === 20 && msg.actionresult) {
170
+ asyncacitonid = msg.asyncacitonid;
171
+ aiChat.addMessage({
172
+ messageid: id,
173
+ state: msg.actionstate,
174
+ type: "DEFAULT",
175
+ role: "ASSISTANT",
176
+ content: msg.actionresult,
177
+ status: "pending"
178
+ });
179
+ } else if (msg.actionstate === 30 && msg.actionresult) {
180
+ const result = JSON.parse(msg.actionresult);
181
+ const choices = result.choices;
182
+ if (choices && choices.length > 0) {
183
+ aiChat.replaceMessage({
184
+ messageid: id,
185
+ state: msg.actionstate,
186
+ type: "DEFAULT",
187
+ role: "ASSISTANT",
188
+ content: choices[0].content || "",
189
+ realmessageid: choices[0].messageid,
190
+ status: "sent"
191
+ });
192
+ }
193
+ } else if (msg.actionstate === 40) {
194
+ aiChat.replaceMessage({
195
+ messageid: id,
196
+ state: msg.actionstate,
197
+ type: "ERROR",
198
+ role: "ASSISTANT",
199
+ content: msg.actionresult,
200
+ status: "failed"
201
+ });
202
+ }
203
+ },
204
+ abortController,
205
+ ctx,
206
+ param,
207
+ { ...questionRequestData }
208
+ );
209
+ } catch (error) {
210
+ aiChat.replaceMessage({
211
+ messageid: id,
212
+ state: 40,
213
+ type: "ERROR",
214
+ role: "ASSISTANT",
215
+ content: error.message || ibiz.i18n.t("app.aiError"),
216
+ status: "failed"
217
+ });
218
+ abortController == null ? void 0 : abortController.abort();
219
+ } finally {
220
+ aiChat.completeMessage(id, true);
221
+ return true;
222
+ }
223
+ };
224
+ chatOptions.abortQuestion = async (aiChat, ctx, param, other) => {
225
+ abortController == null ? void 0 : abortController.abort();
226
+ if (asyncacitonid) {
227
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
228
+ const abortRequestData = { asyncacitonid };
229
+ if (other.sessionid) {
230
+ Object.assign(abortRequestData, {
231
+ sessionid: other.sessionid
232
+ });
233
+ }
234
+ const result = await deService.aiChatCancel(
235
+ ctx,
236
+ param,
237
+ abortRequestData
238
+ );
239
+ asyncacitonid = "";
240
+ }
241
+ await aiChat.stopMessage({
242
+ messageid: id,
243
+ state: 30,
244
+ type: "DEFAULT",
245
+ role: "ASSISTANT",
246
+ content: "",
247
+ status: "canceled"
248
+ });
249
+ await aiChat.completeMessage(id, true);
250
+ };
251
+ chatOptions.recommendPrompt = async (ctx, param, other) => {
252
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
253
+ const tempParams = { ...param };
254
+ if (other.srfaiagent) {
255
+ tempParams.srfaiagent = other.srfaiagent;
256
+ }
257
+ const result = await deService.aiChatRecommendPrompt(
258
+ ctx,
259
+ tempParams,
260
+ other.message
261
+ );
262
+ if (result.ok && result.data) {
263
+ const choices = result.data.choices;
264
+ if (choices && choices.length > 0) {
265
+ return choices[0];
266
+ }
267
+ return null;
268
+ }
269
+ return null;
270
+ };
271
+ chatOptions.uploader = {
272
+ onUpload: async (file, reportProgress, options) => {
273
+ const fileMeata = ibiz.util.file.calcFileUpDownUrl(
274
+ (options == null ? void 0 : options.context) || context,
275
+ (options == null ? void 0 : options.params) || params,
276
+ {},
277
+ { enableNoAccess: true }
278
+ );
279
+ const fielUploadHeaders = ibiz.util.file.getUploadHeaders();
280
+ const formData = new FormData();
281
+ formData.append("file", file);
282
+ const res = await ibiz.net.axios({
283
+ url: fileMeata.uploadUrl,
284
+ method: "post",
285
+ headers: fielUploadHeaders,
286
+ data: formData,
287
+ onUploadProgress: (progressEvent) => {
288
+ const percent = progressEvent.loaded / progressEvent.total * 100;
289
+ reportProgress(percent);
290
+ }
291
+ });
292
+ return res.data;
293
+ }
294
+ };
295
+ chatOptions.extendToolbarClick = async (event, source, context2, params2, data2) => {
296
+ var _a, _b, _c;
297
+ const { id: id2, isPluginApp } = source;
298
+ let appId = source.appId;
299
+ const tempContext = core.IBizContext.create(context2);
300
+ if (isPluginApp) {
301
+ const mainApp = ibiz.hub.getApp();
302
+ const targetApp = (_a = mainApp.model.subAppRefs) == null ? void 0 : _a.find(
303
+ (subAppRef) => subAppRef.appId.endsWith(appId)
304
+ );
305
+ if (targetApp) {
306
+ const targetAppId = targetApp.appId;
307
+ tempContext.srfappid = targetAppId;
308
+ appId = targetAppId;
309
+ }
310
+ }
311
+ const result = await runtime.UIActionUtil.exec(
312
+ id2,
313
+ {
314
+ view,
315
+ ctrl,
316
+ context: tempContext,
317
+ params: params2,
318
+ data: [data2],
319
+ event
320
+ },
321
+ appId
322
+ );
323
+ if (result.closeView) {
324
+ view.closeView({ ok: true });
325
+ } else if (result.refresh) {
326
+ switch (result.refreshMode) {
327
+ case 1:
328
+ view.callUIAction(runtime.SysUIActionTag.REFRESH);
329
+ break;
330
+ case 2:
331
+ (_b = view.parentView) == null ? void 0 : _b.callUIAction(runtime.SysUIActionTag.REFRESH);
332
+ break;
333
+ case 3:
334
+ (_c = view.getTopView()) == null ? void 0 : _c.callUIAction(runtime.SysUIActionTag.REFRESH);
335
+ break;
336
+ default:
337
+ }
338
+ }
339
+ return result;
340
+ };
341
+ return { containerOptions, topicOptions, chatOptions };
342
+ }
343
+ /**
344
+ * 获取界面行为扩展AI聊天参数
345
+ * @param context
346
+ * @param params
347
+ * @param data
348
+ * @param deACMode
349
+ * @param args
350
+ * @returns
351
+ */
352
+ async getUIActionExAIChatParams(context, params, data, deACMode, args) {
353
+ const containerOptions = {};
354
+ if (params.hasOwnProperty("autoclose")) {
355
+ try {
356
+ containerOptions.autoClose = JSON.parse(params.autoclose);
357
+ delete params.autoclose;
358
+ } catch (error) {
359
+ ibiz.log.error(error);
360
+ }
361
+ }
362
+ if (params.hasOwnProperty("openmode")) {
363
+ containerOptions.openMode = params.openmode;
364
+ delete params.openmode;
365
+ }
366
+ const topicOptions = {};
367
+ if (params.hasOwnProperty("topiccaptionmode")) {
368
+ topicOptions.captionMode = params.topiccaptionmode;
369
+ delete params.topiccaptionmode;
370
+ } else {
371
+ topicOptions.captionMode = ibiz.config.common.aiChatTopicCaptionMode;
372
+ }
373
+ topicOptions.disableStorage = false;
374
+ if (params.hasOwnProperty("disabletopicstorage")) {
375
+ topicOptions.disableStorage = params.disabletopicstorage === "true";
376
+ delete params.disabletopicstorage;
377
+ }
378
+ topicOptions.beforeDelete = async (...args2) => {
379
+ const isBatchRemove = args2[4];
380
+ const result = await ibiz.confirm.warning({
381
+ title: ibiz.i18n.t(
382
+ `util.appUtil.${isBatchRemove ? "clearTopic" : "aiTitle"}`
383
+ ),
384
+ desc: ibiz.i18n.t(
385
+ `util.appUtil.${isBatchRemove ? "clearTopicDesc" : "aiDesc"}`
386
+ )
387
+ });
388
+ return result;
389
+ };
390
+ topicOptions.action = async (action, context2, params2, data2, event) => {
391
+ if (action === "LINK")
392
+ await ibiz.openView.push(data2.url);
393
+ return true;
394
+ };
395
+ topicOptions.configService = (appid, storageType, subType) => {
396
+ return new runtime.ConfigService(appid, storageType, subType);
397
+ };
398
+ const chatOptions = {};
399
+ if (context.srfaiappendcurdata === "true") {
400
+ chatOptions.appendCurData = data;
401
+ } else if (params.hasOwnProperty("srfaiappendcurdata")) {
402
+ chatOptions.appendCurData = params.srfaiappendcurdata === "true" ? data : void 0;
403
+ delete params.srfaiappendcurdata;
404
+ }
405
+ if (params.hasOwnProperty("srfaiappendcurcontent")) {
406
+ chatOptions.appendCurContent = core.StringUtil.fill(
407
+ params.srfaiappendcurcontent,
408
+ context,
409
+ params,
410
+ data
411
+ );
412
+ delete params.srfaiappendcurcontent;
413
+ }
414
+ if (params.hasOwnProperty("autoquestion")) {
415
+ chatOptions.autoQuestion = params.autoquestion !== "false";
416
+ delete params.autoquestion;
417
+ }
418
+ if (params.hasOwnProperty("srfaiappendresource")) {
419
+ chatOptions.appendCurResource = core.StringUtil.fill(
420
+ params.srfaiappendresource,
421
+ context,
422
+ params,
423
+ data
424
+ );
425
+ delete params.srfaiappendresource;
426
+ }
427
+ if (params.hasOwnProperty("srfmode")) {
428
+ chatOptions.srfMode = params.srfmode;
429
+ delete params.srfmode;
430
+ }
431
+ if (params.hasOwnProperty("srfaiagent")) {
432
+ chatOptions.activeAIAgentID = params.srfaiagent;
433
+ delete params.srfaiagent;
434
+ }
435
+ let enableAIAgentChange = ibiz.config.common.enableAIAgentChange;
436
+ if (params.hasOwnProperty("srfenableaiagentchange")) {
437
+ enableAIAgentChange = params.srfenableaiagentchange === "true";
438
+ delete params.srfenableaiagentchange;
439
+ }
440
+ chatOptions.enableAIAgentChange = enableAIAgentChange;
441
+ const aiAgentlist = await this.getAIAgentList(context, params);
442
+ chatOptions.aiAgentlist = aiAgentlist;
443
+ if (deACMode) {
444
+ const {
445
+ contentToolbarItems,
446
+ footerToolbarItems,
447
+ questionToolbarItems,
448
+ otherToolbarItems
449
+ } = this.calcAiToolbarItemsByAc(deACMode);
450
+ chatOptions.contentToolbarItems = contentToolbarItems;
451
+ chatOptions.footerToolbarItems = footerToolbarItems;
452
+ chatOptions.questionToolbarItems = questionToolbarItems;
453
+ chatOptions.otherToolbarItems = otherToolbarItems;
454
+ }
455
+ let id = "";
456
+ let abortController;
457
+ let asyncacitonid = "";
458
+ const { chatInstance, view, ctrl } = args;
459
+ chatOptions.history = async (ctx, param, other) => {
460
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
461
+ const historyRequestData = {};
462
+ if (other.appendCurData) {
463
+ Object.assign(historyRequestData, {
464
+ ...other.appendCurData
465
+ });
466
+ }
467
+ if (other.sessionid) {
468
+ Object.assign(historyRequestData, {
469
+ sessionid: other.sessionid
470
+ });
471
+ }
472
+ if (other.srfaiagent) {
473
+ Object.assign(historyRequestData, {
474
+ srfaiagent: other.srfaiagent
475
+ });
476
+ }
477
+ if (other.srfmode) {
478
+ Object.assign(historyRequestData, {
479
+ mode: other.srfmode
480
+ });
481
+ }
482
+ const result = await deService.aiChatHistory(
483
+ ctx,
484
+ param,
485
+ historyRequestData
486
+ );
487
+ if (result.data && Array.isArray(result.data)) {
488
+ let preMsg;
489
+ result.data.forEach((item) => {
490
+ if (item.role === "TOOL") {
491
+ if (preMsg && item.content) {
492
+ chatInstance.aiChat.updateRecommendPrompt(
493
+ preMsg,
494
+ item.content
495
+ );
496
+ }
497
+ } else {
498
+ const msg = {
499
+ messageid: qxUtil.createUUID(),
500
+ state: 30,
501
+ type: "DEFAULT",
502
+ role: item.role,
503
+ content: item.content,
504
+ completed: true
505
+ };
506
+ preMsg = msg;
507
+ chatInstance.aiChat.addMessage(msg);
508
+ }
509
+ });
510
+ }
511
+ return true;
512
+ };
513
+ chatOptions.question = async (aiChat, ctx, param, other, arr, sessionid, srfaiagent, srfmode) => {
514
+ id = qxUtil.createUUID();
515
+ abortController = new AbortController();
516
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
517
+ try {
518
+ const questionRequestData = {
519
+ messages: arr,
520
+ sessionid
521
+ };
522
+ if (srfaiagent) {
523
+ questionRequestData.srfaiagent = srfaiagent;
524
+ }
525
+ if (srfmode) {
526
+ questionRequestData.mode = srfmode;
527
+ }
528
+ await deService.aiChatSse(
529
+ (msg) => {
530
+ if (msg.actionstate === 20 && msg.actionresult) {
531
+ asyncacitonid = msg.asyncacitonid;
532
+ aiChat.addMessage({
533
+ messageid: id,
534
+ state: msg.actionstate,
535
+ type: "DEFAULT",
536
+ role: "ASSISTANT",
537
+ content: msg.actionresult,
538
+ status: "pending"
539
+ });
540
+ } else if (msg.actionstate === 30 && msg.actionresult) {
541
+ const result = JSON.parse(msg.actionresult);
542
+ const choices = result.choices;
543
+ if (choices && choices.length > 0) {
544
+ aiChat.replaceMessage({
545
+ messageid: id,
546
+ state: msg.actionstate,
547
+ type: "DEFAULT",
548
+ role: "ASSISTANT",
549
+ content: choices[0].content || "",
550
+ realmessageid: choices[0].messageid,
551
+ status: "sent"
552
+ });
553
+ }
554
+ } else if (msg.actionstate === 40) {
555
+ aiChat.replaceMessage({
556
+ messageid: id,
557
+ state: msg.actionstate,
558
+ type: "ERROR",
559
+ role: "ASSISTANT",
560
+ content: msg.actionresult,
561
+ status: "failed"
562
+ });
563
+ }
564
+ },
565
+ abortController,
566
+ ctx,
567
+ param,
568
+ { ...questionRequestData }
569
+ );
570
+ } catch (error) {
571
+ aiChat.replaceMessage({
572
+ messageid: id,
573
+ state: 40,
574
+ type: "ERROR",
575
+ role: "ASSISTANT",
576
+ content: error.message || ibiz.i18n.t("app.aiError"),
577
+ status: "failed"
578
+ });
579
+ abortController == null ? void 0 : abortController.abort();
580
+ } finally {
581
+ aiChat.completeMessage(id, true);
582
+ return true;
583
+ }
584
+ };
585
+ chatOptions.abortQuestion = async (aiChat, ctx, param, other) => {
586
+ abortController == null ? void 0 : abortController.abort();
587
+ if (asyncacitonid) {
588
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
589
+ const abortRequestData = { asyncacitonid };
590
+ if (other.sessionid) {
591
+ Object.assign(abortRequestData, {
592
+ sessionid: other.sessionid
593
+ });
594
+ }
595
+ const result = await deService.aiChatCancel(
596
+ ctx,
597
+ param,
598
+ abortRequestData
599
+ );
600
+ asyncacitonid = "";
601
+ }
602
+ await aiChat.stopMessage({
603
+ messageid: id,
604
+ state: 30,
605
+ type: "DEFAULT",
606
+ role: "ASSISTANT",
607
+ content: "",
608
+ status: "canceled"
609
+ });
610
+ await aiChat.completeMessage(id, true);
611
+ };
612
+ chatOptions.recommendPrompt = async (ctx, param, other) => {
613
+ const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
614
+ const tempParams = { ...param };
615
+ if (other.srfaiagent) {
616
+ tempParams.srfaiagent = other.srfaiagent;
617
+ }
618
+ const result = await deService.aiChatRecommendPrompt(
619
+ ctx,
620
+ tempParams,
621
+ other.message
622
+ );
623
+ if (result.ok && result.data) {
624
+ const choices = result.data.choices;
625
+ if (choices && choices.length > 0) {
626
+ return choices[0];
627
+ }
628
+ return null;
629
+ }
630
+ return null;
631
+ };
632
+ chatOptions.uploader = {
633
+ onUpload: async (file, reportProgress, options) => {
634
+ const { uploadUrl } = ibiz.util.file.calcFileUpDownUrl(
635
+ (options == null ? void 0 : options.context) || context,
636
+ (options == null ? void 0 : options.params) || params,
637
+ {},
638
+ { enableNoAccess: true }
639
+ );
640
+ const headers = ibiz.util.file.getUploadHeaders();
641
+ const formData = new FormData();
642
+ formData.append("file", file);
643
+ const res = await ibiz.net.axios({
644
+ url: uploadUrl,
645
+ method: "post",
646
+ headers,
647
+ data: formData,
648
+ onUploadProgress: (progressEvent) => {
649
+ const percent = progressEvent.loaded / progressEvent.total * 100;
650
+ reportProgress(percent);
651
+ }
652
+ });
653
+ return res.data;
654
+ }
655
+ };
656
+ chatOptions.extendToolbarClick = async (event, source, context2, params2, data2) => {
657
+ var _a, _b, _c;
658
+ const { id: id2, isPluginApp } = source;
659
+ let appId = source.appId;
660
+ const tempContext = core.IBizContext.create(context2);
661
+ if (isPluginApp) {
662
+ const mainApp = ibiz.hub.getApp();
663
+ const targetApp = (_a = mainApp.model.subAppRefs) == null ? void 0 : _a.find(
664
+ (subAppRef) => subAppRef.appId.endsWith(appId)
665
+ );
666
+ if (targetApp) {
667
+ const targetAppId = targetApp.appId;
668
+ tempContext.srfappid = targetAppId;
669
+ appId = targetAppId;
670
+ }
671
+ }
672
+ const result = await runtime.UIActionUtil.exec(
673
+ id2,
674
+ {
675
+ view,
676
+ ctrl,
677
+ context: tempContext,
678
+ params: params2,
679
+ data: [data2],
680
+ event
681
+ },
682
+ appId
683
+ );
684
+ if (result.closeView) {
685
+ view.closeView({ ok: true });
686
+ } else if (result.refresh) {
687
+ switch (result.refreshMode) {
688
+ case 1:
689
+ view.callUIAction(runtime.SysUIActionTag.REFRESH);
690
+ break;
691
+ case 2:
692
+ (_b = view.parentView) == null ? void 0 : _b.callUIAction(runtime.SysUIActionTag.REFRESH);
693
+ break;
694
+ case 3:
695
+ (_c = view.getTopView()) == null ? void 0 : _c.callUIAction(runtime.SysUIActionTag.REFRESH);
696
+ break;
697
+ default:
698
+ }
699
+ }
700
+ return result;
701
+ };
702
+ return { containerOptions, topicOptions, chatOptions };
703
+ }
704
+ /**
705
+ * 计算界面行为扩展AI聊天工具栏项
706
+ * @param deACMode 自填模式
707
+ */
708
+ calcAiToolbarItemsByAc(deACMode) {
709
+ var _a;
710
+ const contentToolbarItems = [];
711
+ const footerToolbarItems = [];
712
+ const questionToolbarItems = [];
713
+ const functionToolbarItems = [];
714
+ const inlineToolbarItems = [];
715
+ const otherToolbarItems = [];
716
+ if (!deACMode || !deACMode.deuiactionGroup) {
717
+ return {
718
+ contentToolbarItems,
719
+ footerToolbarItems,
720
+ questionToolbarItems,
721
+ otherToolbarItems,
722
+ functionToolbarItems,
723
+ inlineToolbarItems
724
+ };
725
+ }
726
+ (_a = deACMode.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.forEach(
727
+ (item) => {
728
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
729
+ const toolbarItem = {
730
+ appId: item.appId,
731
+ id: item.uiactionId,
732
+ label: item.showCaption ? item.caption : "",
733
+ title: item.tooltip,
734
+ icon: {
735
+ showIcon: item.showIcon,
736
+ cssClass: (_a2 = item.sysImage) == null ? void 0 : _a2.cssClass,
737
+ imagePath: (_b = item.sysImage) == null ? void 0 : _b.imagePath
738
+ }
739
+ };
740
+ if (item.sysImage && item.sysImage.imagePath && !item.sysImage.imagePath.startsWith("http")) {
741
+ toolbarItem.icon.imagePath = `${ibiz.env.assetsUrl}/images/${item.sysImage.imagePath}`;
742
+ }
743
+ if ((_c = item.uiactionId) == null ? void 0 : _c.startsWith("mob_msg_content_")) {
744
+ contentToolbarItems.push(toolbarItem);
745
+ } else if ((_d = item.uiactionId) == null ? void 0 : _d.startsWith("mob_msg_footer_")) {
746
+ footerToolbarItems.push(toolbarItem);
747
+ } else if ((_e = item.uiactionId) == null ? void 0 : _e.startsWith("mob_question_")) {
748
+ questionToolbarItems.push(toolbarItem);
749
+ } else if ((_f = item.uiactionId) == null ? void 0 : _f.startsWith("mob_function_")) {
750
+ functionToolbarItems.push(toolbarItem);
751
+ } else if (((_g = item.uiactionId) == null ? void 0 : _g.startsWith("mob_inline")) || item.refUIActionGroup && ((_h = item.refUIActionGroup.id) == null ? void 0 : _h.startsWith("mob_inline"))) {
752
+ inlineToolbarItems.push(toolbarItem);
753
+ } else {
754
+ otherToolbarItems.push(toolbarItem);
755
+ }
756
+ }
757
+ );
758
+ return {
759
+ contentToolbarItems,
760
+ footerToolbarItems,
761
+ questionToolbarItems,
762
+ otherToolbarItems,
763
+ functionToolbarItems,
764
+ inlineToolbarItems
765
+ };
766
+ }
767
+ /**
768
+ * 获取AI代理列表
769
+ * @param context
770
+ * @param params
771
+ */
772
+ async getAIAgentList(context, params, editorParams) {
773
+ const emptyList = [];
774
+ const app = ibiz.hub.getApp(ibiz.env.appId);
775
+ const aiAgentUtil = app.getAppUtil("DYNAMICAIGENT", "CUSTOM");
776
+ if (!aiAgentUtil) {
777
+ return emptyList;
778
+ }
779
+ const utilService = new runtime.UtilService(aiAgentUtil);
780
+ const resultParams = { ...params, page: 0, size: 1e3 };
781
+ if (editorParams && editorParams.srfaiagentscope) {
782
+ Object.assign(resultParams, {
783
+ srfaiagentscope: editorParams.srfaiagentscope
784
+ });
785
+ }
786
+ const data = await utilService.load("", context, resultParams);
787
+ if (!data || data.length === 0) {
788
+ return emptyList;
789
+ }
790
+ return data;
791
+ }
792
+ /**
793
+ * 获取会话标识(TOPIC:适用于多话题场景;INLINE:适用于ai行内会话场景;TEMP:适用于传统ai编辑器会话场景)
794
+ * @param sessionID
795
+ */
796
+ getChatSessionId(type, sessionID) {
797
+ let tempSessionID = "";
798
+ switch (type) {
799
+ case "TOPIC":
800
+ tempSessionID += this.TOPIC_CHAT_PREFIX;
801
+ break;
802
+ case "INLINE":
803
+ tempSessionID += this.INLINE_CHAT_SUFFIX;
804
+ break;
805
+ case "TEMP":
806
+ tempSessionID += this.TEMP_CHAT_SUFFIX;
807
+ break;
808
+ default:
809
+ tempSessionID += this.UNKOWN_CHAT_SUFFIX;
810
+ break;
811
+ }
812
+ tempSessionID += `@${sessionID || qxUtil.createUUID()}@${(/* @__PURE__ */ new Date()).getTime()}`;
813
+ return tempSessionID;
814
+ }
815
+ /**
816
+ * 获取AI会话应用功能
817
+ * @returns
818
+ */
819
+ async getAIResourceUtil() {
820
+ const app = ibiz.hub.getApp(ibiz.env.appId);
821
+ const aiSessionUtil = app.getAppUtil("DYNAMICAISESSION", "CUSTOM");
822
+ return aiSessionUtil;
823
+ }
824
+ /**
825
+ * 获取AI资源参数
826
+ * @returns
827
+ */
828
+ async getAIResourceOptions(context, params) {
829
+ const resourceOptions = {};
830
+ if (ibiz.config.common.aiResourceMode) {
831
+ resourceOptions.resourceMode = ibiz.config.common.aiResourceMode;
832
+ return resourceOptions;
833
+ }
834
+ const aiSessionUtil = await this.getAIResourceUtil();
835
+ resourceOptions.resourceMode = aiSessionUtil ? "REMOTE" : "LOCAL";
836
+ if (!aiSessionUtil) {
837
+ return resourceOptions;
838
+ }
839
+ const utilService = new runtime.AIUtilService(aiSessionUtil);
840
+ resourceOptions.getSessionList = async (args = {}) => {
841
+ const tempParams = { ...params, page: 0, size: 1e3, ...args };
842
+ const result = await utilService.getSessionList(context, tempParams);
843
+ return result;
844
+ };
845
+ resourceOptions.updateSession = async (realID, data) => {
846
+ const result = await utilService.updateSession(
847
+ context,
848
+ params,
849
+ realID,
850
+ data
851
+ );
852
+ return result;
853
+ };
854
+ resourceOptions.deleteSession = async (realID) => {
855
+ const result = await utilService.deleteSession(context, params, realID);
856
+ return result;
857
+ };
858
+ resourceOptions.getMessages = async (args = {}) => {
859
+ const tempParams = { ...params, page: 0, size: 1e3, ...args };
860
+ const result = await utilService.getMessageList(context, tempParams);
861
+ return result;
862
+ };
863
+ resourceOptions.deleteMessage = async (messageID) => {
864
+ const result = await utilService.deleteMessage(
865
+ context,
866
+ params,
867
+ messageID
868
+ );
869
+ return result;
870
+ };
871
+ resourceOptions.likeMessage = async (messageID) => {
872
+ const result = await utilService.likeMessage(context, params, messageID);
873
+ return result;
874
+ };
875
+ resourceOptions.dislikeMessage = async (messageID, feedbackContent) => {
876
+ var _a, _b;
877
+ const overlay = ibiz.overlay.createDrawer(
878
+ (modal) => {
879
+ return vue.h(aiFeedback.AIFeedback, {
880
+ modal,
881
+ content: feedbackContent
882
+ });
883
+ },
884
+ void 0,
885
+ {
886
+ height: "auto",
887
+ placement: "bottom",
888
+ attrs: {
889
+ closeable: false
890
+ }
891
+ }
892
+ );
893
+ overlay.present();
894
+ const result = await overlay.onWillDismiss();
895
+ if (!result.ok)
896
+ return false;
897
+ const content = (_b = (_a = result.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.feedbackContent;
898
+ const _result = await utilService.dislikeMessage(
899
+ context,
900
+ params,
901
+ messageID,
902
+ content
903
+ );
904
+ return _result;
905
+ };
906
+ resourceOptions.cancelFeedback = async (messageID) => {
907
+ const result = await utilService.cancelFeedback(
908
+ context,
909
+ params,
910
+ messageID
911
+ );
912
+ return result;
913
+ };
914
+ resourceOptions.clearAllSession = async (excludeSessionID) => {
915
+ const result = await utilService.clearAllSession(
916
+ context,
917
+ params,
918
+ excludeSessionID
919
+ );
920
+ return result;
921
+ };
922
+ resourceOptions.clearAllMessageBySessionId = async (realID) => {
923
+ const result = await utilService.clearAllMessageBySessionId(
924
+ context,
925
+ params,
926
+ realID
927
+ );
928
+ return result;
929
+ };
930
+ return resourceOptions;
931
+ }
932
+ }
933
+
934
+ exports.AIChatUtil = AIChatUtil;