@ibiz-template/vue3-components 0.7.31-alpha.0 → 0.7.37-alpha.5

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 (301) hide show
  1. package/dist/chart-IZpj2cdX.js +1 -0
  2. package/dist/index-2J-iBLG-.js +1 -0
  3. package/dist/index-Yhyr5LJS.js +1 -0
  4. package/dist/index-p59-xI3J.js +4 -0
  5. package/dist/index.min.css +1 -1
  6. package/dist/index.system.min.js +1 -1
  7. package/dist/{xlsx-util-OUxT4A8O.js → xlsx-util-rAKH_Qlc.js} +1 -1
  8. package/es/_virtual/_dayjs.mjs +1 -0
  9. package/es/_virtual/zh-cn.mjs +3 -0
  10. package/es/common/action-toolbar/action-toolbar.css +1 -1
  11. package/es/common/action-toolbar/action-toolbar.mjs +2 -2
  12. package/es/common/coop-alert/coop-alert.d.ts +3 -3
  13. package/es/common/custom-filter-condition/custom-filter-condition.css +1 -0
  14. package/es/common/custom-filter-condition/custom-filter-condition.d.ts +998 -0
  15. package/es/common/custom-filter-condition/custom-filter-condition.mjs +286 -0
  16. package/es/common/custom-theme/custom-theme-model.mjs +62 -0
  17. package/es/common/custom-theme/custom-theme.controller.mjs +6 -5
  18. package/es/common/custom-theme/custom-theme.css +1 -1
  19. package/es/common/emoji-select/emoji-select.d.ts +1 -1
  20. package/es/common/index.mjs +2 -0
  21. package/es/common/pagination/pagination.css +1 -1
  22. package/es/common/pagination/pagination.mjs +1 -1
  23. package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -1
  24. package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.mjs +4 -1
  25. package/es/common/pql-editor/pql-editor.d.ts +6 -0
  26. package/es/common/pql-editor/pql-editor.mjs +229 -130
  27. package/es/common/pql-editor/utils/index.d.ts +8 -4
  28. package/es/common/pql-editor/utils/index.mjs +193 -69
  29. package/es/common/rawitem/rawitem.mjs +16 -0
  30. package/es/common/split/split.d.ts +1 -1
  31. package/es/control/app-menu/app-menu.css +1 -1
  32. package/es/control/app-menu/app-menu.mjs +3 -2
  33. package/es/control/caption-bar/caption-bar.css +1 -1
  34. package/es/control/caption-bar/caption-bar.d.ts +1 -0
  35. package/es/control/caption-bar/caption-bar.mjs +12 -3
  36. package/es/control/caption-bar/index.d.ts +1 -0
  37. package/es/control/chart/chart.mjs +1 -1
  38. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +21 -3
  39. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +35 -10
  40. package/es/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  41. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +2 -2
  42. package/es/control/dashboard/dashboard.d.ts +2 -2
  43. package/es/control/dashboard/dashboard.mjs +41 -7
  44. package/es/control/dashboard/index.d.ts +1 -1
  45. package/es/control/dashboard/index.mjs +4 -1
  46. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -0
  47. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.d.ts +64 -0
  48. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.mjs +341 -0
  49. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.d.ts +0 -0
  50. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.mjs +1 -0
  51. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.css +1 -0
  52. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.d.ts +41 -0
  53. package/es/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.mjs +130 -0
  54. package/es/control/dashboard/portlet/filter-portlet/filter-portlet.css +1 -0
  55. package/es/control/dashboard/portlet/filter-portlet/filter-portlet.d.ts +30 -0
  56. package/es/control/dashboard/portlet/filter-portlet/filter-portlet.mjs +87 -0
  57. package/es/control/dashboard/portlet/filter-portlet/filter-portlet.provider.d.ts +15 -0
  58. package/es/control/dashboard/portlet/filter-portlet/filter-portlet.provider.mjs +21 -0
  59. package/es/control/dashboard/portlet/filter-portlet/index.d.ts +28 -0
  60. package/es/control/dashboard/portlet/filter-portlet/index.mjs +14 -0
  61. package/es/control/dashboard/portlet/index.d.ts +1 -0
  62. package/es/control/dashboard/portlet/index.mjs +2 -0
  63. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  64. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
  65. package/es/control/drtab/drtab-control.util.mjs +1 -1
  66. package/es/control/form/form-detail/form-druipart/form-druipart.css +1 -1
  67. package/es/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  68. package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +6 -2
  69. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  70. package/es/control/form/form-detail/form-item/form-item.mjs +8 -3
  71. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +6 -0
  72. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +4 -3
  73. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +6 -12
  74. package/es/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
  75. package/es/control/form/form-detail/form-rawitem/form-rawitem.mjs +8 -1
  76. package/es/control/grid/grid/grid-control.util.mjs +1 -1
  77. package/es/control/grid/grid/grid.css +1 -1
  78. package/es/control/grid/grid/grid.mjs +5 -1
  79. package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +2 -2
  80. package/es/control/index.mjs +2 -0
  81. package/es/control/search-bar/filter-tree/filter-tree.d.ts +16 -1
  82. package/es/control/search-bar/filter-tree/filter-tree.mjs +12 -4
  83. package/es/control/search-bar/quick-search-select/quick-search-select.css +1 -1
  84. package/es/control/search-bar/quick-search-select/quick-search-select.mjs +1 -0
  85. package/es/control/search-bar/search-bar.css +1 -1
  86. package/es/control/search-bar/search-bar.mjs +2 -0
  87. package/es/control/search-bar/search-groups/search-groups.mjs +8 -5
  88. package/es/control/toolbar/export-excel/export-excel.css +1 -1
  89. package/es/control/toolbar/toolbar.css +1 -1
  90. package/es/control/tree/tree.css +1 -1
  91. package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.mjs +2 -2
  92. package/es/control/tree-grid-ex/tree-grid-ex.mjs +1 -1
  93. package/es/control/wizard-panel/wizard-panel.css +1 -1
  94. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -1
  95. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +35 -1
  96. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +26 -55
  97. package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.css +1 -0
  98. package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.d.ts +51 -0
  99. package/es/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.mjs +335 -0
  100. package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.css +1 -0
  101. package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.d.ts +65 -0
  102. package/es/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.mjs +260 -0
  103. package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.css +1 -0
  104. package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.d.ts +52 -0
  105. package/es/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.mjs +258 -0
  106. package/es/editor/date-range-select/date-range-select-picker/date-range-select.css +1 -0
  107. package/es/editor/date-range-select/date-range-select-picker/date-range-select.d.ts +64 -0
  108. package/es/editor/date-range-select/date-range-select-picker/date-range-select.mjs +339 -0
  109. package/es/editor/date-range-select/date-range-select.controller.d.ts +328 -0
  110. package/es/editor/date-range-select/date-range-select.controller.mjs +859 -0
  111. package/es/editor/date-range-select/date-range-select.provider.d.ts +8 -0
  112. package/es/editor/date-range-select/date-range-select.provider.mjs +25 -0
  113. package/es/editor/date-range-select/index.d.ts +3 -0
  114. package/es/editor/date-range-select/index.mjs +5 -0
  115. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +3 -0
  116. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +48 -22
  117. package/es/editor/index.mjs +8 -0
  118. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.mjs +32 -32
  119. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  120. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +17 -2
  121. package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +6 -7
  122. package/es/editor/span/span/span.css +1 -1
  123. package/es/editor/span/span/span.mjs +2 -0
  124. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
  125. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
  126. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.mjs +4 -2
  127. package/es/editor/upload/use/use-iview-upload.d.ts +1 -0
  128. package/es/editor/upload/use/use-iview-upload.mjs +37 -0
  129. package/es/index.mjs +2 -0
  130. package/es/interface/i-field.d.ts +66 -0
  131. package/es/interface/i-field.mjs +1 -0
  132. package/es/interface/i-filter-condition.d.ts +52 -0
  133. package/es/interface/i-filter-condition.mjs +1 -0
  134. package/es/interface/i-pql-item.d.ts +1 -0
  135. package/es/interface/i-pql-node-item.d.ts +35 -0
  136. package/es/interface/i-pql-node-item.mjs +1 -0
  137. package/es/interface/index.d.ts +3 -0
  138. package/es/interface/index.mjs +3 -0
  139. package/es/locale/en/index.d.ts +78 -1
  140. package/es/locale/en/index.mjs +74 -3
  141. package/es/locale/zh-CN/index.d.ts +78 -1
  142. package/es/locale/zh-CN/index.mjs +74 -3
  143. package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +15 -0
  144. package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  145. package/es/panel-component/coop-pos/coop-pos.controller.d.ts +17 -4
  146. package/es/panel-component/coop-pos/coop-pos.controller.mjs +48 -4
  147. package/es/panel-component/coop-pos/coop-pos.css +1 -1
  148. package/es/panel-component/coop-pos/coop-pos.d.ts +12 -0
  149. package/es/panel-component/coop-pos/coop-pos.mjs +20 -4
  150. package/es/panel-component/coop-pos/coop-pos.state.d.ts +14 -0
  151. package/es/panel-component/coop-pos/coop-pos.state.mjs +14 -0
  152. package/es/panel-component/coop-pos/index.d.ts +1 -0
  153. package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
  154. package/es/panel-component/panel-app-login-view/panel-app-login-view.css +1 -1
  155. package/es/panel-component/panel-app-title/panel-app-title.controller.d.ts +18 -3
  156. package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +28 -0
  157. package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
  158. package/es/panel-component/panel-app-title/panel-app-title.mjs +46 -3
  159. package/es/panel-component/panel-button/index.d.ts +1 -1
  160. package/es/panel-component/panel-button/panel-button.d.ts +1 -1
  161. package/es/panel-component/panel-exp-header/panel-exp-header.css +1 -1
  162. package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
  163. package/es/panel-component/short-cut/short-cut.css +1 -1
  164. package/es/util/app-modal/app-modal-component.css +1 -1
  165. package/es/util/fullscreen/fullscreen-util.d.ts +7 -0
  166. package/es/util/fullscreen/fullscreen-util.mjs +9 -0
  167. package/es/util/open-view-util/open-view-util.d.ts +11 -0
  168. package/es/util/open-view-util/open-view-util.mjs +21 -0
  169. package/es/util/wang-editor-util/wang-editor-util.d.ts +1 -0
  170. package/es/util/wang-editor-util/wang-editor-util.mjs +12 -7
  171. package/es/view/login-view/login-view.css +1 -1
  172. package/es/view/share-view/share-view.css +1 -1
  173. package/es/view-engine/edit-view.engine.d.ts +17 -0
  174. package/es/view-engine/edit-view.engine.mjs +73 -36
  175. package/es/web-app/components/modal-router-shell/modal-router-shell.mjs +1 -1
  176. package/es/web-app/create-vue-app.mjs +8 -0
  177. package/lib/_virtual/_dayjs.cjs +9 -0
  178. package/lib/_virtual/zh-cn.cjs +5 -0
  179. package/lib/common/action-toolbar/action-toolbar.cjs +2 -2
  180. package/lib/common/action-toolbar/action-toolbar.css +1 -1
  181. package/lib/common/custom-filter-condition/custom-filter-condition.cjs +288 -0
  182. package/lib/common/custom-filter-condition/custom-filter-condition.css +1 -0
  183. package/lib/common/custom-theme/custom-theme-model.cjs +62 -0
  184. package/lib/common/custom-theme/custom-theme.controller.cjs +6 -5
  185. package/lib/common/custom-theme/custom-theme.css +1 -1
  186. package/lib/common/index.cjs +2 -0
  187. package/lib/common/pagination/pagination.cjs +1 -1
  188. package/lib/common/pagination/pagination.css +1 -1
  189. package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.cjs +4 -1
  190. package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -1
  191. package/lib/common/pql-editor/pql-editor.cjs +228 -129
  192. package/lib/common/pql-editor/utils/index.cjs +195 -68
  193. package/lib/common/rawitem/rawitem.cjs +16 -0
  194. package/lib/control/app-menu/app-menu.cjs +3 -2
  195. package/lib/control/app-menu/app-menu.css +1 -1
  196. package/lib/control/caption-bar/caption-bar.cjs +11 -2
  197. package/lib/control/caption-bar/caption-bar.css +1 -1
  198. package/lib/control/chart/chart.cjs +1 -1
  199. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +34 -9
  200. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +2 -2
  201. package/lib/control/dashboard/dashboard-design/dashboard-design.css +1 -1
  202. package/lib/control/dashboard/dashboard.cjs +40 -6
  203. package/lib/control/dashboard/index.cjs +5 -0
  204. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.cjs +343 -0
  205. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -0
  206. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/index.cjs +3 -0
  207. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.cjs +132 -0
  208. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-item/filter-portlet-item.css +1 -0
  209. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.cjs +89 -0
  210. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.css +1 -0
  211. package/lib/control/dashboard/portlet/filter-portlet/filter-portlet.provider.cjs +23 -0
  212. package/lib/control/dashboard/portlet/filter-portlet/index.cjs +20 -0
  213. package/lib/control/dashboard/portlet/index.cjs +4 -0
  214. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
  215. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  216. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  217. package/lib/control/form/form-detail/form-druipart/form-druipart.css +1 -1
  218. package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +6 -2
  219. package/lib/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  220. package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
  221. package/lib/control/form/form-detail/form-item/form-item.cjs +8 -3
  222. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +3 -2
  223. package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +5 -11
  224. package/lib/control/form/form-detail/form-rawitem/form-rawitem.cjs +8 -1
  225. package/lib/control/form/form-detail/form-rawitem/form-rawitem.css +1 -1
  226. package/lib/control/grid/grid/grid-control.util.cjs +1 -1
  227. package/lib/control/grid/grid/grid.cjs +5 -1
  228. package/lib/control/grid/grid/grid.css +1 -1
  229. package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +2 -2
  230. package/lib/control/index.cjs +22 -18
  231. package/lib/control/search-bar/filter-tree/filter-tree.cjs +12 -4
  232. package/lib/control/search-bar/quick-search-select/quick-search-select.cjs +1 -0
  233. package/lib/control/search-bar/quick-search-select/quick-search-select.css +1 -1
  234. package/lib/control/search-bar/search-bar.cjs +2 -0
  235. package/lib/control/search-bar/search-bar.css +1 -1
  236. package/lib/control/search-bar/search-groups/search-groups.cjs +8 -5
  237. package/lib/control/toolbar/export-excel/export-excel.css +1 -1
  238. package/lib/control/toolbar/toolbar.css +1 -1
  239. package/lib/control/tree/tree.css +1 -1
  240. package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-edit-column/tree-grid-ex-edit-column.cjs +2 -2
  241. package/lib/control/tree-grid-ex/tree-grid-ex.cjs +1 -1
  242. package/lib/control/wizard-panel/wizard-panel.css +1 -1
  243. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +26 -55
  244. package/lib/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.cjs +339 -0
  245. package/lib/editor/date-range-select/date-range-select-picker/components/quarter-range-select/quarter-range-select.css +1 -0
  246. package/lib/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.cjs +264 -0
  247. package/lib/editor/date-range-select/date-range-select-picker/components/week-range-select/week-range-select.css +1 -0
  248. package/lib/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.cjs +262 -0
  249. package/lib/editor/date-range-select/date-range-select-picker/components/year-range-select/year-range-select.css +1 -0
  250. package/lib/editor/date-range-select/date-range-select-picker/date-range-select.cjs +341 -0
  251. package/lib/editor/date-range-select/date-range-select-picker/date-range-select.css +1 -0
  252. package/lib/editor/date-range-select/date-range-select.controller.cjs +861 -0
  253. package/lib/editor/date-range-select/date-range-select.provider.cjs +27 -0
  254. package/lib/editor/date-range-select/index.cjs +11 -0
  255. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +47 -21
  256. package/lib/editor/index.cjs +8 -0
  257. package/lib/editor/list-box/ibiz-list-box/ibiz-list-box.cjs +32 -32
  258. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +17 -2
  259. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  260. package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +6 -7
  261. package/lib/editor/span/span/span.cjs +2 -0
  262. package/lib/editor/span/span/span.css +1 -1
  263. package/lib/editor/upload/ibiz-image-upload/ibiz-image-upload.cjs +4 -2
  264. package/lib/editor/upload/use/use-iview-upload.cjs +37 -0
  265. package/lib/index.cjs +52 -48
  266. package/lib/interface/i-field.cjs +3 -0
  267. package/lib/interface/i-filter-condition.cjs +3 -0
  268. package/lib/interface/i-pql-node-item.cjs +3 -0
  269. package/lib/interface/index.cjs +3 -0
  270. package/lib/locale/en/index.cjs +74 -3
  271. package/lib/locale/zh-CN/index.cjs +74 -3
  272. package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.cjs +19 -0
  273. package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
  274. package/lib/panel-component/coop-pos/coop-pos.cjs +19 -3
  275. package/lib/panel-component/coop-pos/coop-pos.controller.cjs +48 -4
  276. package/lib/panel-component/coop-pos/coop-pos.css +1 -1
  277. package/lib/panel-component/coop-pos/coop-pos.state.cjs +14 -0
  278. package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
  279. package/lib/panel-component/panel-app-login-view/panel-app-login-view.css +1 -1
  280. package/lib/panel-component/panel-app-title/panel-app-title.cjs +46 -3
  281. package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +28 -0
  282. package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
  283. package/lib/panel-component/panel-exp-header/panel-exp-header.css +1 -1
  284. package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
  285. package/lib/panel-component/short-cut/short-cut.css +1 -1
  286. package/lib/util/app-modal/app-modal-component.css +1 -1
  287. package/lib/util/fullscreen/fullscreen-util.cjs +9 -0
  288. package/lib/util/open-view-util/open-view-util.cjs +21 -0
  289. package/lib/util/wang-editor-util/wang-editor-util.cjs +12 -7
  290. package/lib/view/login-view/login-view.css +1 -1
  291. package/lib/view/share-view/share-view.css +1 -1
  292. package/lib/view-engine/edit-view.engine.cjs +72 -35
  293. package/lib/web-app/components/modal-router-shell/modal-router-shell.cjs +1 -1
  294. package/lib/web-app/create-vue-app.cjs +8 -0
  295. package/package.json +9 -8
  296. package/dist/chart-0UV2FAN6.js +0 -1
  297. package/dist/index-YQyitjSg.js +0 -1
  298. package/dist/index-maJGu4b8.js +0 -4
  299. package/dist/index-trS6uS3E.js +0 -1
  300. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.30_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.35-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  301. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.30_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.35-alpha.1_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -0,0 +1,859 @@
1
+ import { EditorController } from '@ibiz-template/runtime';
2
+ import dayjs from 'dayjs';
3
+
4
+ "use strict";
5
+ var __defProp = Object.defineProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __publicField = (obj, key, value) => {
8
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
+ return value;
10
+ };
11
+ class DateRangeSelectEditorController extends EditorController {
12
+ constructor() {
13
+ super(...arguments);
14
+ /**
15
+ * 是否显示时间单位选择
16
+ *
17
+ * @type {Boolean}
18
+ * @memberof DateRangeSelectEditorController
19
+ */
20
+ __publicField(this, "switchUnit", true);
21
+ /**
22
+ * 默认时间单位
23
+ *
24
+ * @type {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')}
25
+ * @memberof DateRangeSelectEditorController
26
+ */
27
+ __publicField(this, "defaultUnit", "DAY");
28
+ /**
29
+ * 抛出模式
30
+ * TIME模式则是抛出时间字符串 年-月-日 时:分:秒
31
+ * @type {('DEFAULT' | 'TIME')}
32
+ * @memberof DateRangeSelectEditorController
33
+ */
34
+ __publicField(this, "emitMode", "DEFAULT");
35
+ /**
36
+ * 初始化默认时间
37
+ *
38
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} unit
39
+ * @memberof DateRangeSelectEditorController
40
+ */
41
+ __publicField(this, "initDefaultDate", (unit) => {
42
+ const current = new Date((/* @__PURE__ */ new Date()).toLocaleDateString());
43
+ if (unit === "DAY") {
44
+ const start = new Date(current.getTime() - 7 * 24 * 60 * 60 * 1e3);
45
+ const end = current.toLocaleDateString().replaceAll("/", "-");
46
+ return [
47
+ dayjs(start).format("YYYY-MM-DD"),
48
+ dayjs(end).format("YYYY-MM-DD")
49
+ ];
50
+ }
51
+ if (unit === "WEEK") {
52
+ const day = current.getDay();
53
+ let weekday = day;
54
+ if (day === 0) {
55
+ weekday = 7;
56
+ }
57
+ const sunday = current.getTime() + (7 - weekday) * 24 * 60 * 60 * 1e3;
58
+ const end = new Date(sunday).toLocaleDateString().replaceAll("/", "-");
59
+ const beforeSix = current.getTime() - 6 * 7 * 24 * 60 * 60 * 1e3;
60
+ const start = new Date(beforeSix).toLocaleDateString().replaceAll("/", "-");
61
+ return [start, end];
62
+ }
63
+ if (unit === "MONTH") {
64
+ const year = current.getFullYear();
65
+ const month = current.getMonth() + 1;
66
+ let startYear = year;
67
+ let startMonth = month - 6;
68
+ if (startMonth < 1) {
69
+ startMonth += 12;
70
+ startYear -= 1;
71
+ }
72
+ let startMonthText = "".concat(startMonth);
73
+ let monthText = "".concat(month);
74
+ if (startMonth < 10) {
75
+ startMonthText = "0".concat(startMonthText);
76
+ }
77
+ if (month < 10) {
78
+ monthText = "0".concat(month);
79
+ }
80
+ return ["".concat(startYear, "-").concat(startMonthText), "".concat(year, "-").concat(monthText)];
81
+ }
82
+ if (unit === "QUARTER") {
83
+ const year = current.getFullYear();
84
+ return ["".concat(year, "-1"), "".concat(year, "-12")];
85
+ }
86
+ if (unit === "YEAR") {
87
+ return [current.getFullYear(), current.getFullYear()];
88
+ }
89
+ });
90
+ /**
91
+ * 处理时间转文本
92
+ *
93
+ * @param {('DYNAMIC' | 'STATIC')} type
94
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} unit
95
+ * @param {string[]} value
96
+ * @param {number} start
97
+ * @param {number} end
98
+ * @memberof DateRangeSelectEditorController
99
+ */
100
+ __publicField(this, "handleTimeToText", (type, unit, value, start, end) => {
101
+ if (!value || Array.isArray(value) && !value.length) {
102
+ return "";
103
+ }
104
+ const tempStart = new Date(value[0]);
105
+ const tempEnd = new Date(value[1]);
106
+ const tempStartYear = tempStart.getFullYear();
107
+ const tempEndYear = tempEnd.getFullYear();
108
+ const tempStartMonth = tempStart.getMonth() + 1;
109
+ const tempEndMonth = tempEnd.getMonth() + 1;
110
+ const startWeek = this.getYearWeek(tempStart);
111
+ const endWeek = this.getYearWeek(tempEnd);
112
+ let timeSpan = value.join("~");
113
+ let timetype = "";
114
+ if (unit === "DAY") {
115
+ timeSpan = value.join("~");
116
+ }
117
+ if (unit === "WEEK") {
118
+ const startText = "".concat(tempStartYear, "-").concat(startWeek).concat(ibiz.i18n.t(
119
+ "editor.dateRangeSelect.week"
120
+ ));
121
+ const endText = "".concat(tempEndYear, "-").concat(endWeek).concat(ibiz.i18n.t(
122
+ "editor.dateRangeSelect.week"
123
+ ));
124
+ timeSpan = "".concat(startText, "~").concat(endText);
125
+ }
126
+ if (unit === "MONTH") {
127
+ let startMonth = tempStartMonth;
128
+ let endMonth = tempEndMonth;
129
+ if (tempStartMonth < 10) {
130
+ startMonth = "0".concat(tempStartMonth);
131
+ }
132
+ if (tempEndMonth < 10) {
133
+ endMonth = "0".concat(tempEndMonth);
134
+ }
135
+ timeSpan = "".concat(tempStartYear, "-").concat(startMonth, " ~ ").concat(tempEndYear, "-").concat(endMonth);
136
+ }
137
+ if (unit === "QUARTER") {
138
+ const startQuarter = Math.ceil(tempStartMonth / 3);
139
+ const endQuarter = Math.ceil(tempEndMonth / 3);
140
+ timeSpan = "".concat(tempStartYear, "-Q").concat(startQuarter, " ~ ").concat(tempEndYear, "-Q").concat(endQuarter);
141
+ }
142
+ if (unit === "YEAR") {
143
+ timeSpan = "".concat(value[0], " ~ ").concat(value[1]);
144
+ }
145
+ if (type === "STATIC") {
146
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.static");
147
+ } else if (unit === "DAY") {
148
+ timetype = this.computedTextOfDay(start, end);
149
+ } else if (unit === "WEEK") {
150
+ timetype = this.computedTextOfWeek(start, end);
151
+ } else if (unit === "MONTH") {
152
+ timetype = this.computedTextOfMonth(start, end);
153
+ } else if (unit === "QUARTER") {
154
+ timetype = this.computedTextOfQuarter(
155
+ start,
156
+ end,
157
+ tempStartYear,
158
+ tempEndYear,
159
+ tempStartMonth,
160
+ tempEndMonth
161
+ );
162
+ } else if (unit === "YEAR") {
163
+ timetype = this.computedTextOfYear(start, end);
164
+ } else {
165
+ timetype = this.computedTextOfDay(start, end);
166
+ }
167
+ return "".concat(timetype, " | ").concat(timeSpan);
168
+ });
169
+ }
170
+ /**
171
+ * 初始化
172
+ *
173
+ * @return {*} {Promise<void>}
174
+ * @memberof DateRangeSelectEditorController
175
+ */
176
+ async init() {
177
+ await super.onInit();
178
+ if (this.editorParams) {
179
+ if (this.editorParams.switchUnit) {
180
+ this.switchUnit = this.editorParams.switchUnit === "true";
181
+ }
182
+ if (this.editorParams.defaultUnit) {
183
+ this.defaultUnit = this.editorParams.defaultUnit;
184
+ }
185
+ if (this.editorParams.emitMode) {
186
+ this.emitMode = this.editorParams.emitMode;
187
+ }
188
+ }
189
+ }
190
+ /**
191
+ * 计算动态时间间隔转具体时间
192
+ *
193
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} dateUnit
194
+ * @param {string} _start
195
+ * @param {string} _end
196
+ * @memberof DateRangeSelectEditorController
197
+ */
198
+ computedDynamicTimeToDate(dateUnit, dateType, _start, _end) {
199
+ if (dateType === "STATIC") {
200
+ const start2 = new Date(_start * 1e3);
201
+ const end2 = new Date(_end * 1e3);
202
+ if (dateUnit === "YEAR") {
203
+ return [start2.getFullYear(), end2.getFullYear()];
204
+ }
205
+ return [
206
+ dayjs(start2).format("YYYY-MM-DD"),
207
+ dayjs(end2).format("YYYY-MM-DD")
208
+ ];
209
+ }
210
+ const current = /* @__PURE__ */ new Date();
211
+ current.setHours(0, 0, 0, 0);
212
+ if (dateUnit === "WEEK") {
213
+ const start2 = this.timeSpanConvertToWeek(current, _start);
214
+ const end2 = this.timeSpanConvertToWeek(current, _end);
215
+ return [start2, end2];
216
+ }
217
+ if (dateUnit === "MONTH") {
218
+ const start2 = this.timeSpanConvertToMonth(current, _start);
219
+ const end2 = this.timeSpanConvertToMonth(current, _end);
220
+ return [start2, end2];
221
+ }
222
+ if (dateUnit === "QUARTER") {
223
+ const start2 = this.timeSpanConvertToQuarter(current, _start);
224
+ const end2 = this.timeSpanConvertToQuarter(current, _end);
225
+ return [start2, end2];
226
+ }
227
+ if (dateUnit === "YEAR") {
228
+ const start2 = current.getFullYear() + _start;
229
+ const end2 = current.getFullYear() + _end;
230
+ return [start2, end2];
231
+ }
232
+ const start = _start * 24 * 60 * 60 * 1e3;
233
+ const end = _end * 24 * 60 * 60 * 1e3;
234
+ const tempStart = new Date(current.getTime() + start);
235
+ const tempEnd = new Date(current.getTime() + end);
236
+ return [
237
+ dayjs(tempStart).format("YYYY-MM-DD"),
238
+ dayjs(tempEnd).format("YYYY-MM-DD")
239
+ ];
240
+ }
241
+ /**
242
+ * 时间间隔转季度
243
+ *
244
+ * @private
245
+ * @param {Date} current
246
+ * @param {number} timespan
247
+ * @memberof DateRangeSelectEditorController
248
+ */
249
+ timeSpanConvertToQuarter(current, timespan) {
250
+ const tempYear = Math.floor(Math.abs(timespan) / 4);
251
+ const tempQuarter = timespan % 4;
252
+ let yearSpan = tempYear;
253
+ if (timespan < 0) {
254
+ yearSpan = -yearSpan;
255
+ }
256
+ let year = current.getFullYear() + yearSpan;
257
+ const month = current.getMonth() + 1;
258
+ const curQuarter = Math.ceil(month / 3);
259
+ let quarter = curQuarter + tempQuarter;
260
+ if (quarter < 0) {
261
+ year -= 1;
262
+ quarter += 4;
263
+ }
264
+ if (quarter > 4) {
265
+ year += 1;
266
+ quarter -= 4;
267
+ }
268
+ return "".concat(year, "-").concat(quarter * 3);
269
+ }
270
+ /**
271
+ * 时间转年周
272
+ *
273
+ * @private
274
+ * @param {Date} current
275
+ * @param {number} timespan
276
+ * @memberof DateRangeSelectEditorController
277
+ */
278
+ timeSpanConvertToWeek(current, timespan) {
279
+ const date = current.getTime();
280
+ const time = timespan * 7 * 24 * 60 * 60 * 1e3;
281
+ return new Date(date + time).toLocaleDateString();
282
+ }
283
+ /**
284
+ * 时间间隔转月份
285
+ *
286
+ * @private
287
+ * @param {Date} current
288
+ * @param {number} timespan
289
+ * @memberof DateRangeSelectEditorController
290
+ */
291
+ timeSpanConvertToMonth(current, timespan) {
292
+ const tempYear = Math.floor(Math.abs(timespan) / 12);
293
+ const tempMonth = timespan % 12;
294
+ let yearSpan = tempYear;
295
+ if (timespan < 0) {
296
+ yearSpan = -yearSpan;
297
+ }
298
+ let year = current.getFullYear() + yearSpan;
299
+ let month = current.getMonth() + 1 + tempMonth;
300
+ if (month < 0) {
301
+ year -= 1;
302
+ month += 12;
303
+ }
304
+ if (month > 12) {
305
+ year += 1;
306
+ month -= 12;
307
+ }
308
+ if (month < 10) {
309
+ return "".concat(year, "-0").concat(month);
310
+ }
311
+ return "".concat(year, "-").concat(month);
312
+ }
313
+ /**
314
+ *计算在各个时间类型下的开始结束时间
315
+ *
316
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} dateUnit
317
+ * @param {('DYNAMIC' | 'STATIC')} dateType
318
+ * @param {string} _start
319
+ * @param {string} _end
320
+ * @return {*} {{ start: number; end: number; }}
321
+ * @memberof DateRangeSelectEditorController
322
+ */
323
+ computedDateTypesTime(dateUnit, dateType, _start, _end) {
324
+ const tempDate = {
325
+ start: 0,
326
+ end: 0,
327
+ emitStart: 0,
328
+ emitEnd: 0
329
+ };
330
+ if (dateType === "STATIC") {
331
+ const { start, end } = this.computedStaticTime(dateUnit, _start, _end);
332
+ Object.assign(tempDate, {
333
+ start,
334
+ end,
335
+ emitStart: start,
336
+ emitEnd: end
337
+ });
338
+ } else {
339
+ const { start, end } = this.computedDynamicTime(dateUnit, _start, _end);
340
+ Object.assign(tempDate, {
341
+ start,
342
+ end,
343
+ emitStart: start,
344
+ emitEnd: end
345
+ });
346
+ }
347
+ if (this.emitMode === "TIME") {
348
+ const tempStart = this.computedFullDateFormat(_start, dateUnit, "START");
349
+ const tempEnd = this.computedFullDateFormat(_end, dateUnit, "END");
350
+ Object.assign(tempDate, {
351
+ emitStart: tempStart,
352
+ emitEnd: tempEnd
353
+ });
354
+ }
355
+ return tempDate;
356
+ }
357
+ /**
358
+ * 计算完整时间格式
359
+ *
360
+ * @private
361
+ * @param {(string|number)} date
362
+ * @memberof DateRangeSelectEditorController
363
+ */
364
+ computedFullDateFormat(date, unit, tag) {
365
+ const tempDate = new Date(String(date));
366
+ const month = tempDate.getMonth() + 1;
367
+ const bigMonth = [1, 3, 5, 7, 8, 10, 12];
368
+ if (tag === "START") {
369
+ tempDate.setHours(0, 0, 0, 0);
370
+ } else {
371
+ tempDate.setHours(23, 59, 59, 0);
372
+ }
373
+ if (unit === "MONTH") {
374
+ if (tag === "START") {
375
+ tempDate.setDate(1);
376
+ } else if (month === 2) {
377
+ tempDate.setDate(29);
378
+ } else if (bigMonth.includes(month)) {
379
+ tempDate.setDate(31);
380
+ } else {
381
+ tempDate.setDate(30);
382
+ }
383
+ }
384
+ if (unit === "QUARTER") {
385
+ if (tag === "START") {
386
+ tempDate.setDate(1);
387
+ } else if (month === 2) {
388
+ tempDate.setDate(29);
389
+ } else if (bigMonth.includes(month)) {
390
+ tempDate.setDate(31);
391
+ } else {
392
+ tempDate.setDate(30);
393
+ }
394
+ }
395
+ if (unit === "YEAR") {
396
+ if (tag === "START") {
397
+ tempDate.setMonth(0);
398
+ tempDate.setDate(1);
399
+ } else {
400
+ tempDate.setMonth(11);
401
+ tempDate.setDate(31);
402
+ }
403
+ }
404
+ return tempDate.toLocaleString();
405
+ }
406
+ /**
407
+ * 计算动态类型时间
408
+ *
409
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} dateUnit
410
+ * @param {string} _start
411
+ * @param {string} _end
412
+ * @return {*} {{ start: number; end: number }}
413
+ * @memberof DateRangeSelectEditorController
414
+ */
415
+ computedDynamicTime(dateUnit, _start, _end) {
416
+ switch (dateUnit) {
417
+ case "DAY":
418
+ return this.computedDaysSpace(_start, _end);
419
+ case "WEEK":
420
+ return this.computedWeeksSpace(_start, _end);
421
+ case "MONTH":
422
+ return this.computedMonthsSpace(_start, _end);
423
+ case "QUARTER":
424
+ return this.computedQuartersSpace(_start, _end);
425
+ case "YEAR":
426
+ return this.computedYearsSpace(_start, _end);
427
+ default:
428
+ return this.computedDaysSpace(_start, _end);
429
+ }
430
+ }
431
+ /**
432
+ * 计算天的前后间隔
433
+ *
434
+ * @param {string} _start
435
+ * @param {string} _end
436
+ * @return {*} {{ start: number; end: number }}
437
+ * @memberof DateRangeSelectEditorController
438
+ */
439
+ computedDaysSpace(_start, _end) {
440
+ const current = /* @__PURE__ */ new Date();
441
+ const tempStart = new Date(_start);
442
+ const tempEnd = new Date(_end);
443
+ current.setHours(0, 0, 0, 0);
444
+ tempStart.setHours(0, 0, 0, 0);
445
+ tempEnd.setHours(0, 0, 0, 0);
446
+ const start = (tempStart.getTime() - current.getTime()) / (24 * 60 * 60 * 1e3);
447
+ const end = (tempEnd.getTime() - current.getTime()) / (24 * 60 * 60 * 1e3);
448
+ return {
449
+ start,
450
+ end
451
+ };
452
+ }
453
+ /**
454
+ * 计算周的前后间隔
455
+ *
456
+ * @param {string} _start
457
+ * @param {string} _end
458
+ * @return {*} {{ start: number; end: number }}
459
+ * @memberof DateRangeSelectEditorController
460
+ */
461
+ computedWeeksSpace(_start, _end) {
462
+ const current = /* @__PURE__ */ new Date();
463
+ const tempStart = new Date(_start);
464
+ const tempEnd = new Date(_end);
465
+ current.setHours(0, 0, 0, 0);
466
+ tempStart.setHours(0, 0, 0, 0);
467
+ tempEnd.setHours(0, 0, 0, 0);
468
+ const computedWeekInterval = (start2, end2) => {
469
+ const startMonday = this.getDateWeekMonday(start2);
470
+ const endMonday = this.getDateWeekMonday(end2);
471
+ const week = (endMonday.getTime() - startMonday.getTime()) / (7 * 24 * 60 * 60 * 1e3);
472
+ return week;
473
+ };
474
+ const start = computedWeekInterval(current, tempStart);
475
+ const end = computedWeekInterval(current, tempEnd);
476
+ return {
477
+ start,
478
+ end
479
+ };
480
+ }
481
+ /**
482
+ * 获取指定时间所在周星期一的时间
483
+ *
484
+ * @param {Date} date
485
+ * @return {*}
486
+ * @memberof DateRangeSelectEditorController
487
+ */
488
+ getDateWeekMonday(date) {
489
+ const day = date.getDay();
490
+ let week = day;
491
+ if (day === 0) {
492
+ week = 7;
493
+ }
494
+ const monday = date.getTime() - (week - 1) * 24 * 60 * 60 * 1e3;
495
+ return new Date(monday);
496
+ }
497
+ /**
498
+ * 计算指定时间在年度内的周数
499
+ *
500
+ * @param {(Date | string)} endDate
501
+ * @return {*}
502
+ * @memberof DateRangeSelectEditorController
503
+ */
504
+ getYearWeek(endDate) {
505
+ const beginDate = new Date(endDate.getFullYear(), 0, 1);
506
+ let endWeek = endDate.getDay();
507
+ if (endWeek === 0)
508
+ endWeek = 7;
509
+ let beginWeek = beginDate.getDay();
510
+ if (beginWeek === 0)
511
+ beginWeek = 7;
512
+ const millisDiff = endDate.getTime() - beginDate.getTime();
513
+ const dayDiff = Math.floor(
514
+ (millisDiff + (beginWeek - endWeek) * (24 * 60 * 60 * 1e3)) / 864e5
515
+ );
516
+ return Math.ceil(dayDiff / 7) + 1;
517
+ }
518
+ /**
519
+ * 计算月的前后间隔
520
+ *
521
+ * @param {string} _start
522
+ * @param {string} _end
523
+ * @return {*} {{ start: number; end: number }}
524
+ * @memberof DateRangeSelectEditorController
525
+ */
526
+ computedMonthsSpace(_start, _end) {
527
+ const current = /* @__PURE__ */ new Date();
528
+ const startDate = new Date(_start);
529
+ const endDate = new Date(_end);
530
+ const computedMonthInterval = (start2, end2) => {
531
+ const startYear = start2.getFullYear();
532
+ const startMonth = start2.getMonth() + 1;
533
+ const endYear = end2.getFullYear();
534
+ const endMonth = end2.getMonth() + 1;
535
+ return (endYear - startYear) * 12 - startMonth + endMonth;
536
+ };
537
+ const start = computedMonthInterval(current, startDate);
538
+ const end = computedMonthInterval(current, endDate);
539
+ return {
540
+ start,
541
+ end
542
+ };
543
+ }
544
+ /**
545
+ *计算季度的前后间隔
546
+ *
547
+ * @param {string} _start
548
+ * @param {string} _end
549
+ * @return {*} {{ start: number; end: number }}
550
+ * @memberof DateRangeSelectEditorController
551
+ */
552
+ computedQuartersSpace(_start, _end) {
553
+ const current = /* @__PURE__ */ new Date();
554
+ const startDate = new Date(_start);
555
+ const endDate = new Date(_end);
556
+ const computedQuarterInterval = (start2, end2) => {
557
+ const startYear = start2.getFullYear();
558
+ const startMonth = start2.getMonth() + 1;
559
+ const startQuarter = Math.ceil(startMonth / 3);
560
+ const endYear = end2.getFullYear();
561
+ const endMonth = end2.getMonth() + 1;
562
+ const endQuarter = Math.ceil(endMonth / 3);
563
+ return (endYear - startYear) * 4 - startQuarter + endQuarter;
564
+ };
565
+ const start = computedQuarterInterval(current, startDate);
566
+ const end = computedQuarterInterval(current, endDate);
567
+ return {
568
+ start,
569
+ end
570
+ };
571
+ }
572
+ /**
573
+ *计算年的前后间隔
574
+ *
575
+ * @param {string} _start
576
+ * @param {string} _end
577
+ * @return {*} {{ start: number; end: number }}
578
+ * @memberof DateRangeSelectEditorController
579
+ */
580
+ computedYearsSpace(_start, _end) {
581
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
582
+ const start = new Date("".concat(_start)).getFullYear() - currentYear;
583
+ const end = new Date("".concat(_end)).getFullYear() - currentYear;
584
+ return {
585
+ start,
586
+ end
587
+ };
588
+ }
589
+ /**
590
+ * 计算静态类型时间
591
+ *
592
+ * @param {('DAY' | 'WEEK' | 'MONTH' | 'QUARTER' | 'YEAR')} dateUnit
593
+ * @param {string} _start
594
+ * @param {string} _end
595
+ * @return {*} {{ start: number; end: number }}
596
+ * @memberof DateRangeSelectEditorController
597
+ */
598
+ computedStaticTime(dateUnit, _start, _end) {
599
+ switch (dateUnit) {
600
+ case "DAY":
601
+ return this.computedDaysTime(_start, _end);
602
+ case "WEEK":
603
+ return this.computedWeeksTime(_start, _end);
604
+ case "MONTH":
605
+ return this.computedMonthsTime(_start, _end);
606
+ case "QUARTER":
607
+ return this.computedQuartersTime(_start, _end);
608
+ case "YEAR":
609
+ return this.computedYearsTime(_start, _end);
610
+ default:
611
+ return this.computedDaysTime(_start, _end);
612
+ }
613
+ }
614
+ /**
615
+ * 计算 天 的时间范围,返回开始和结束时间的秒数
616
+ *
617
+ * @param {string} _start
618
+ * @param {string} _end
619
+ * @return {*} {{
620
+ * start: number;
621
+ * end: number;
622
+ * }}
623
+ * @memberof DateRangeSelectEditorController
624
+ */
625
+ computedDaysTime(_start, _end) {
626
+ const startDate = new Date(_start);
627
+ const endDate = new Date(_end);
628
+ startDate.setHours(0, 0, 0, 0);
629
+ endDate.setHours(23, 59, 59, 0);
630
+ const start = startDate.getTime() / 1e3;
631
+ const end = endDate.getTime() / 1e3;
632
+ return {
633
+ start,
634
+ end
635
+ };
636
+ }
637
+ /**
638
+ * 计算 周 的时间范围,返回开始和结束时间的秒数
639
+ *
640
+ * @param {string} _start
641
+ * @param {string} _end
642
+ * @return {*} {{ start: number; end: number }}
643
+ * @memberof DateRangeSelectEditorController
644
+ */
645
+ computedWeeksTime(_start, _end) {
646
+ const startDate = new Date(_start);
647
+ const endDate = new Date(_end);
648
+ startDate.setHours(0, 0, 0, 0);
649
+ endDate.setHours(23, 59, 59, 0);
650
+ const start = startDate.getTime() / 1e3;
651
+ const end = endDate.getTime() / 1e3;
652
+ return {
653
+ start,
654
+ end
655
+ };
656
+ }
657
+ /**
658
+ * 计算 月 的时间范围,返回开始和结束时间的秒数
659
+ *
660
+ * @param {string} _start
661
+ * @param {string} _end
662
+ * @return {*} {{ start: number; end: number }}
663
+ * @memberof DateRangeSelectEditorController
664
+ */
665
+ computedMonthsTime(_start, _end) {
666
+ const big = [1, 3, 5, 7, 8, 10, 12];
667
+ const startDate = new Date(_start);
668
+ const endDate = new Date(_end);
669
+ startDate.setHours(0, 0, 0, 0);
670
+ if (big.includes(endDate.getMonth() + 1)) {
671
+ endDate.setDate(31);
672
+ } else if (endDate.getMonth() === 1) {
673
+ endDate.setDate(29);
674
+ } else {
675
+ endDate.setDate(30);
676
+ }
677
+ endDate.setHours(23, 59, 59, 0);
678
+ const start = startDate.getTime() / 1e3;
679
+ const end = endDate.getTime() / 1e3;
680
+ return {
681
+ start,
682
+ end
683
+ };
684
+ }
685
+ /**
686
+ * 计算 季度 的时间范围,返回开始和结束时间的秒数
687
+ *
688
+ * @param {string} _start
689
+ * @param {string} _end
690
+ * @return {*} {{ start: number; end: number }}
691
+ * @memberof DateRangeSelectEditorController
692
+ */
693
+ computedQuartersTime(_start, _end) {
694
+ const startDate = new Date(_start);
695
+ const endDate = new Date(_end);
696
+ startDate.setHours(0, 0, 0, 0);
697
+ endDate.setHours(23, 59, 59, 0);
698
+ const start = startDate.getTime() / 1e3;
699
+ const end = endDate.getTime() / 1e3;
700
+ return {
701
+ start,
702
+ end
703
+ };
704
+ }
705
+ /**
706
+ * 计算 年 的时间范围,返回开始和结束时间的秒数
707
+ *
708
+ * @param {string} _start
709
+ * @param {string} _end
710
+ * @return {*} {{ start: number; end: number }}
711
+ * @memberof DateRangeSelectEditorController
712
+ */
713
+ computedYearsTime(_start, _end) {
714
+ const startDate = new Date(_start);
715
+ const endDate = new Date(_end);
716
+ startDate.setHours(0, 0, 0, 0);
717
+ endDate.setMonth(11);
718
+ endDate.setDate(31);
719
+ endDate.setHours(23, 59, 59, 0);
720
+ const start = startDate.getTime() / 1e3;
721
+ const end = endDate.getTime() / 1e3;
722
+ return {
723
+ start,
724
+ end
725
+ };
726
+ }
727
+ /**
728
+ * 计算天的显示文本
729
+ *
730
+ * @private
731
+ * @param {number} start
732
+ * @param {number} end
733
+ * @return {*}
734
+ * @memberof DateRangeSelectEditorController
735
+ */
736
+ computedTextOfDay(start, end) {
737
+ let timetype = "";
738
+ if (start === end && start === 0) {
739
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.today");
740
+ } else if (end === 0 && start < 0) {
741
+ timetype = "".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(
742
+ start
743
+ )).concat(ibiz.i18n.t("editor.dateRangeSelect.day"));
744
+ } else {
745
+ const starTtime = "".concat(start > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.day"));
746
+ const endTime = "".concat(end > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(end)).concat(ibiz.i18n.t("editor.dateRangeSelect.day"));
747
+ timetype = "".concat(starTtime, " ~ ").concat(endTime);
748
+ }
749
+ return timetype;
750
+ }
751
+ /**
752
+ * 计算周的文本
753
+ *
754
+ * @private
755
+ * @param {number} start
756
+ * @param {number} end
757
+ * @return {*}
758
+ * @memberof DateRangeSelectEditorController
759
+ */
760
+ computedTextOfWeek(start, end) {
761
+ let timetype = "";
762
+ if (start === end && start === 0) {
763
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.currentWeek");
764
+ } else if (end === 0 && start < 0) {
765
+ timetype = "".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(
766
+ start
767
+ )).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));
768
+ } else {
769
+ const starTtime = "".concat(start > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));
770
+ const endTime = "".concat(end > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(end)).concat(ibiz.i18n.t("editor.dateRangeSelect.week"));
771
+ timetype = "".concat(starTtime, " ~ ").concat(endTime);
772
+ }
773
+ return timetype;
774
+ }
775
+ /**
776
+ * 计算月的文本
777
+ *
778
+ * @private
779
+ * @param {number} start
780
+ * @param {number} end
781
+ * @return {*}
782
+ * @memberof DateRangeSelectEditorController
783
+ */
784
+ computedTextOfMonth(start, end) {
785
+ let timetype = "";
786
+ if (start === end && start === 0) {
787
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.pastTime");
788
+ } else if (end === 0 && start < 0) {
789
+ timetype = "".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(
790
+ start
791
+ )).concat(ibiz.i18n.t("editor.dateRangeSelect.month"));
792
+ } else {
793
+ const starTtime = "".concat(start > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.month"));
794
+ const endTime = "".concat(end > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(end)).concat(ibiz.i18n.t("editor.dateRangeSelect.month"));
795
+ timetype = "".concat(starTtime, " ~ ").concat(endTime);
796
+ }
797
+ return timetype;
798
+ }
799
+ /**
800
+ * 计算季度的文本
801
+ *
802
+ * @private
803
+ * @param {number} start
804
+ * @param {number} end
805
+ * @param {number} tempStartYear
806
+ * @param {number} tempEndYear
807
+ * @param {number} tempStartMonth
808
+ * @param {number} tempEndMonth
809
+ * @return {*}
810
+ * @memberof DateRangeSelectEditorController
811
+ */
812
+ computedTextOfQuarter(start, end, tempStartYear, tempEndYear, tempStartMonth, tempEndMonth) {
813
+ let timetype = "";
814
+ const curDate = /* @__PURE__ */ new Date();
815
+ const curYear = curDate.getFullYear();
816
+ const startQuarter = Math.ceil(tempStartMonth / 3);
817
+ const endQuarter = Math.ceil(tempEndMonth / 3);
818
+ if (tempStartYear === tempEndYear && startQuarter === 1 && endQuarter === 4) {
819
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.currentYear");
820
+ } else if (start === end && start === 0) {
821
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.currentYear");
822
+ } else if (end === 0 && start < 0 && curYear === tempStartYear) {
823
+ timetype = "".concat(ibiz.i18n.t(
824
+ "editor.dateRangeSelect.currentYear"
825
+ )).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter"));
826
+ } else {
827
+ const starTtime = "".concat(start > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter"));
828
+ const endTime = "".concat(end > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(end)).concat(ibiz.i18n.t("editor.dateRangeSelect.quarter"));
829
+ timetype = "".concat(starTtime, " ~ ").concat(endTime);
830
+ }
831
+ return timetype;
832
+ }
833
+ /**
834
+ * 计算年的文本
835
+ *
836
+ * @private
837
+ * @param {number} start
838
+ * @param {number} end
839
+ * @return {*}
840
+ * @memberof DateRangeSelectEditorController
841
+ */
842
+ computedTextOfYear(start, end) {
843
+ let timetype = "";
844
+ if (start === end && start === 0) {
845
+ timetype = ibiz.i18n.t("editor.dateRangeSelect.currentYear");
846
+ } else if (end === 0 && start < 0) {
847
+ timetype = "".concat(ibiz.i18n.t("editor.dateRangeSelect.recently")).concat(Math.abs(
848
+ start
849
+ )).concat(ibiz.i18n.t("editor.dateRangeSelect.year"));
850
+ } else {
851
+ const starTtime = "".concat(start > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(start)).concat(ibiz.i18n.t("editor.dateRangeSelect.year"));
852
+ const endTime = "".concat(end > 0 ? ibiz.i18n.t("editor.dateRangeSelect.future") : ibiz.i18n.t("editor.dateRangeSelect.pastTime")).concat(Math.abs(end)).concat(ibiz.i18n.t("editor.dateRangeSelect.year"));
853
+ timetype = "".concat(starTtime, " ~ ").concat(endTime);
854
+ }
855
+ return timetype;
856
+ }
857
+ }
858
+
859
+ export { DateRangeSelectEditorController };