@ctzy-web-client/plugin-component-vue 1.0.8 → 1.0.9

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 (272) hide show
  1. package/package.json +3 -3
  2. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  3. package/es/advance-select/advance-operation.mjs +0 -43
  4. package/es/advance-select/advance-option.mjs +0 -125
  5. package/es/advance-select/advance-select.mjs +0 -359
  6. package/es/advance-select/events-helpers.mjs +0 -29
  7. package/es/advance-select/index.mjs +0 -13
  8. package/es/advance-select/use-advance-option.mjs +0 -43
  9. package/es/advance-select/use-advance-select.mjs +0 -117
  10. package/es/application-slot/application-slot.mjs +0 -51
  11. package/es/application-slot/breadcrumb-item.mjs +0 -23
  12. package/es/application-slot/header-tools-item.mjs +0 -23
  13. package/es/application-slot/index.mjs +0 -16
  14. package/es/breadcrumb-select/breadcrumb-select.mjs +0 -155
  15. package/es/breadcrumb-select/index.mjs +0 -6
  16. package/es/components.mjs +0 -22
  17. package/es/contextmenu/contextmenu-item.mjs +0 -21
  18. package/es/contextmenu/contextmenu.mjs +0 -64
  19. package/es/contextmenu/index.mjs +0 -10
  20. package/es/contextmenu/use-contextmenu.mjs +0 -85
  21. package/es/data-form/data-form-item.mjs +0 -53
  22. package/es/data-form/data-form.mjs +0 -175
  23. package/es/data-form/dynamic-component.mjs +0 -23
  24. package/es/data-form/form-components/Blots/AtBlot.mjs +0 -25
  25. package/es/data-form/form-components/bwa-date-picker.mjs +0 -45
  26. package/es/data-form/form-components/bwa-date-time-picker.mjs +0 -50
  27. package/es/data-form/form-components/bwa-input-float.mjs +0 -43
  28. package/es/data-form/form-components/bwa-input-integer.mjs +0 -56
  29. package/es/data-form/form-components/bwa-input.mjs +0 -38
  30. package/es/data-form/form-components/bwa-multi-select.mjs +0 -35
  31. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +0 -234
  32. package/es/data-form/form-components/bwa-rich-text.mjs +0 -325
  33. package/es/data-form/form-components/bwa-select.mjs +0 -76
  34. package/es/data-form/form-components/bwa-textarea.mjs +0 -33
  35. package/es/data-form/form-components/bwa-upload.mjs +0 -159
  36. package/es/data-form/form-components/bwa-user-multi-select.mjs +0 -30
  37. package/es/data-form/form-components/bwa-user-select.mjs +0 -69
  38. package/es/data-form/index.mjs +0 -34
  39. package/es/data-table/data-column-view.mjs +0 -131
  40. package/es/data-table/data-table-card.mjs +0 -118
  41. package/es/data-table/data-table-column.mjs +0 -56
  42. package/es/data-table/data-table.mjs +0 -369
  43. package/es/data-table/dynamic-component.mjs +0 -48
  44. package/es/data-table/index.mjs +0 -13
  45. package/es/data-table/use-datatable-drag.mjs +0 -110
  46. package/es/datatable-settings/datatable-settings.mjs +0 -309
  47. package/es/datatable-settings/index.mjs +0 -6
  48. package/es/date-range/date-picker.mjs +0 -128
  49. package/es/date-range/date-range.mjs +0 -177
  50. package/es/date-range/index.mjs +0 -6
  51. package/es/drag-list/constants.mjs +0 -3
  52. package/es/drag-list/drag-item.mjs +0 -49
  53. package/es/drag-list/drag-list.mjs +0 -56
  54. package/es/drag-list/index.mjs +0 -6
  55. package/es/drag-list/use-drag-list.mjs +0 -154
  56. package/es/dragable/constants.mjs +0 -4
  57. package/es/dragable/dragable-item.mjs +0 -25
  58. package/es/dragable/dragable-operation.mjs +0 -32
  59. package/es/dragable/dragable.mjs +0 -31
  60. package/es/dragable/index.mjs +0 -15
  61. package/es/dragable/use-dragable.mjs +0 -134
  62. package/es/filter-panel/conditions/condition.mjs +0 -30
  63. package/es/filter-panel/conditions/date-range-condition.mjs +0 -46
  64. package/es/filter-panel/conditions/department-condition/department-condition.mjs +0 -81
  65. package/es/filter-panel/conditions/department-condition/department-node.mjs +0 -74
  66. package/es/filter-panel/conditions/index.mjs +0 -21
  67. package/es/filter-panel/conditions/input-condition.mjs +0 -83
  68. package/es/filter-panel/conditions/multi-user-condition.mjs +0 -64
  69. package/es/filter-panel/conditions/multiple-menu-condition.mjs +0 -41
  70. package/es/filter-panel/conditions/single-menu-condition.mjs +0 -68
  71. package/es/filter-panel/conditions/single-user-condition.mjs +0 -64
  72. package/es/filter-panel/filter-panel-item.mjs +0 -47
  73. package/es/filter-panel/filter-panel.mjs +0 -180
  74. package/es/filter-panel/index.mjs +0 -15
  75. package/es/filter-panel/use-filter-panel-item.mjs +0 -52
  76. package/es/filter-panel/use-filter-panel.mjs +0 -135
  77. package/es/hooks/use-data/index.mjs +0 -152
  78. package/es/index.mjs +0 -27
  79. package/es/layout/index.mjs +0 -6
  80. package/es/layout/layout.mjs +0 -86
  81. package/es/make-installer.mjs +0 -34
  82. package/es/math/Rectangle.mjs +0 -25
  83. package/es/menu/index.mjs +0 -6
  84. package/es/menu/menu-item.mjs +0 -75
  85. package/es/menu/menu.mjs +0 -60
  86. package/es/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.mjs +0 -6372
  87. package/es/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.mjs +0 -1517
  88. package/es/panel/index.mjs +0 -6
  89. package/es/panel/panel.mjs +0 -55
  90. package/es/panel-tabs/index.mjs +0 -6
  91. package/es/panel-tabs/panel-tabs.mjs +0 -66
  92. package/es/pct-filter-panel/index.mjs +0 -10
  93. package/es/pct-filter-panel/pct-compents/index.mjs +0 -10
  94. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +0 -71
  95. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +0 -74
  96. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +0 -186
  97. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +0 -147
  98. package/es/pct-filter-panel/pct-filter-panel-item.mjs +0 -48
  99. package/es/pct-filter-panel/pct-filter-panel.mjs +0 -251
  100. package/es/pct-filter-panel/use-filter-panel-item.mjs +0 -56
  101. package/es/pct-filter-panel/use-filter-panel.mjs +0 -127
  102. package/es/plugins.mjs +0 -5
  103. package/es/progress/index.mjs +0 -10
  104. package/es/progress/progress-item.mjs +0 -68
  105. package/es/progress/progress.mjs +0 -74
  106. package/es/progress/use-progress.mjs +0 -46
  107. package/es/utils/db.mjs +0 -9
  108. package/es/utils.mjs +0 -99
  109. package/es/where-filter-panel/index.mjs +0 -1
  110. package/es/where-filter-panel/use-where-filter-panel.mjs +0 -18
  111. package/es/where-filter-panel/where-filter-panel.mjs +0 -17
  112. package/lib/_virtual/_plugin-vue_export-helper.js +0 -13
  113. package/lib/advance-select/advance-operation.js +0 -47
  114. package/lib/advance-select/advance-option.js +0 -129
  115. package/lib/advance-select/advance-select.js +0 -363
  116. package/lib/advance-select/events-helpers.js +0 -33
  117. package/lib/advance-select/index.js +0 -20
  118. package/lib/advance-select/use-advance-option.js +0 -47
  119. package/lib/advance-select/use-advance-select.js +0 -122
  120. package/lib/application-slot/application-slot.js +0 -55
  121. package/lib/application-slot/breadcrumb-item.js +0 -27
  122. package/lib/application-slot/header-tools-item.js +0 -27
  123. package/lib/application-slot/index.js +0 -23
  124. package/lib/breadcrumb-select/breadcrumb-select.js +0 -159
  125. package/lib/breadcrumb-select/index.js +0 -11
  126. package/lib/components.js +0 -26
  127. package/lib/contextmenu/contextmenu-item.js +0 -25
  128. package/lib/contextmenu/contextmenu.js +0 -68
  129. package/lib/contextmenu/index.js +0 -16
  130. package/lib/contextmenu/use-contextmenu.js +0 -89
  131. package/lib/data-form/data-form-item.js +0 -57
  132. package/lib/data-form/data-form.js +0 -179
  133. package/lib/data-form/dynamic-component.js +0 -27
  134. package/lib/data-form/form-components/Blots/AtBlot.js +0 -31
  135. package/lib/data-form/form-components/bwa-date-picker.js +0 -49
  136. package/lib/data-form/form-components/bwa-date-time-picker.js +0 -54
  137. package/lib/data-form/form-components/bwa-input-float.js +0 -47
  138. package/lib/data-form/form-components/bwa-input-integer.js +0 -60
  139. package/lib/data-form/form-components/bwa-input.js +0 -42
  140. package/lib/data-form/form-components/bwa-multi-select.js +0 -39
  141. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +0 -242
  142. package/lib/data-form/form-components/bwa-rich-text.js +0 -333
  143. package/lib/data-form/form-components/bwa-select.js +0 -80
  144. package/lib/data-form/form-components/bwa-textarea.js +0 -37
  145. package/lib/data-form/form-components/bwa-upload.js +0 -163
  146. package/lib/data-form/form-components/bwa-user-multi-select.js +0 -34
  147. package/lib/data-form/form-components/bwa-user-select.js +0 -73
  148. package/lib/data-form/index.js +0 -40
  149. package/lib/data-table/data-column-view.js +0 -135
  150. package/lib/data-table/data-table-card.js +0 -122
  151. package/lib/data-table/data-table-column.js +0 -60
  152. package/lib/data-table/data-table.js +0 -373
  153. package/lib/data-table/dynamic-component.js +0 -56
  154. package/lib/data-table/index.js +0 -20
  155. package/lib/data-table/use-datatable-drag.js +0 -114
  156. package/lib/datatable-settings/datatable-settings.js +0 -313
  157. package/lib/datatable-settings/index.js +0 -11
  158. package/lib/date-range/date-picker.js +0 -136
  159. package/lib/date-range/date-range.js +0 -185
  160. package/lib/date-range/index.js +0 -11
  161. package/lib/drag-list/constants.js +0 -7
  162. package/lib/drag-list/drag-item.js +0 -53
  163. package/lib/drag-list/drag-list.js +0 -60
  164. package/lib/drag-list/index.js +0 -11
  165. package/lib/drag-list/use-drag-list.js +0 -158
  166. package/lib/dragable/constants.js +0 -9
  167. package/lib/dragable/dragable-item.js +0 -29
  168. package/lib/dragable/dragable-operation.js +0 -36
  169. package/lib/dragable/dragable.js +0 -35
  170. package/lib/dragable/index.js +0 -22
  171. package/lib/dragable/use-dragable.js +0 -138
  172. package/lib/filter-panel/conditions/condition.js +0 -34
  173. package/lib/filter-panel/conditions/date-range-condition.js +0 -50
  174. package/lib/filter-panel/conditions/department-condition/department-condition.js +0 -85
  175. package/lib/filter-panel/conditions/department-condition/department-node.js +0 -78
  176. package/lib/filter-panel/conditions/index.js +0 -26
  177. package/lib/filter-panel/conditions/input-condition.js +0 -87
  178. package/lib/filter-panel/conditions/multi-user-condition.js +0 -68
  179. package/lib/filter-panel/conditions/multiple-menu-condition.js +0 -45
  180. package/lib/filter-panel/conditions/single-menu-condition.js +0 -72
  181. package/lib/filter-panel/conditions/single-user-condition.js +0 -68
  182. package/lib/filter-panel/filter-panel-item.js +0 -51
  183. package/lib/filter-panel/filter-panel.js +0 -184
  184. package/lib/filter-panel/index.js +0 -20
  185. package/lib/filter-panel/use-filter-panel-item.js +0 -56
  186. package/lib/filter-panel/use-filter-panel.js +0 -139
  187. package/lib/hooks/use-data/index.js +0 -157
  188. package/lib/index.js +0 -60
  189. package/lib/layout/index.js +0 -11
  190. package/lib/layout/layout.js +0 -90
  191. package/lib/make-installer.js +0 -62
  192. package/lib/math/Rectangle.js +0 -29
  193. package/lib/menu/index.js +0 -11
  194. package/lib/menu/menu-item.js +0 -79
  195. package/lib/menu/menu.js +0 -64
  196. package/lib/node_modules/.pnpm/@vueuse_core@9.6.0_vue@3.2.41/node_modules/@vueuse/core/index.js +0 -6635
  197. package/lib/node_modules/.pnpm/@vueuse_shared@9.6.0_vue@3.2.41/node_modules/@vueuse/shared/index.js +0 -1628
  198. package/lib/panel/index.js +0 -11
  199. package/lib/panel/panel.js +0 -59
  200. package/lib/panel-tabs/index.js +0 -11
  201. package/lib/panel-tabs/panel-tabs.js +0 -70
  202. package/lib/pct-filter-panel/index.js +0 -14
  203. package/lib/pct-filter-panel/pct-compents/index.js +0 -16
  204. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +0 -75
  205. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +0 -78
  206. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +0 -190
  207. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +0 -151
  208. package/lib/pct-filter-panel/pct-filter-panel-item.js +0 -52
  209. package/lib/pct-filter-panel/pct-filter-panel.js +0 -255
  210. package/lib/pct-filter-panel/use-filter-panel-item.js +0 -60
  211. package/lib/pct-filter-panel/use-filter-panel.js +0 -131
  212. package/lib/plugins.js +0 -9
  213. package/lib/progress/index.js +0 -16
  214. package/lib/progress/progress-item.js +0 -72
  215. package/lib/progress/progress.js +0 -78
  216. package/lib/progress/use-progress.js +0 -51
  217. package/lib/utils/db.js +0 -17
  218. package/lib/utils.js +0 -110
  219. package/lib/where-filter-panel/index.js +0 -2
  220. package/lib/where-filter-panel/use-where-filter-panel.js +0 -22
  221. package/lib/where-filter-panel/where-filter-panel.js +0 -21
  222. package/style/advance-select.css +0 -1
  223. package/style/breadcrumb-select.css +0 -1
  224. package/style/common.css +0 -1
  225. package/style/contextmenu.css +0 -1
  226. package/style/data-form.css +0 -1
  227. package/style/data-table.css +0 -1
  228. package/style/datatable-settings.css +0 -1
  229. package/style/date-range.css +0 -1
  230. package/style/department-condition.css +0 -1
  231. package/style/drag-list.css +0 -1
  232. package/style/dragable.css +0 -1
  233. package/style/filter-panel.css +0 -1
  234. package/style/index.css +0 -1
  235. package/style/input-condition.css +0 -1
  236. package/style/layout.css +0 -1
  237. package/style/menu.css +0 -1
  238. package/style/panel-tabs.css +0 -1
  239. package/style/panel.css +0 -1
  240. package/style/pct-filter-panel.css +0 -1
  241. package/style/progress.css +0 -1
  242. package/style/rich-text.css +0 -1
  243. package/style/var.css +0 -1
  244. /package/style/{src/advance-select.scss → advance-select.scss} +0 -0
  245. /package/style/{src/breadcrumb-select.scss → breadcrumb-select.scss} +0 -0
  246. /package/style/{src/common → common}/var.scss +0 -0
  247. /package/style/{src/common.scss → common.scss} +0 -0
  248. /package/style/{src/contextmenu.scss → contextmenu.scss} +0 -0
  249. /package/style/{src/data-form.scss → data-form.scss} +0 -0
  250. /package/style/{src/data-table.scss → data-table.scss} +0 -0
  251. /package/style/{src/datatable-settings.scss → datatable-settings.scss} +0 -0
  252. /package/style/{src/date-range.scss → date-range.scss} +0 -0
  253. /package/style/{src/department-condition.scss → department-condition.scss} +0 -0
  254. /package/style/{src/drag-list.scss → drag-list.scss} +0 -0
  255. /package/style/{src/dragable.scss → dragable.scss} +0 -0
  256. /package/style/{src/filter-panel.scss → filter-panel.scss} +0 -0
  257. /package/style/{src/index.scss → index.scss} +0 -0
  258. /package/style/{src/input-condition.scss → input-condition.scss} +0 -0
  259. /package/style/{src/layout.scss → layout.scss} +0 -0
  260. /package/style/{src/menu.scss → menu.scss} +0 -0
  261. /package/style/{src/mixins → mixins}/_var.scss +0 -0
  262. /package/style/{src/mixins → mixins}/config.scss +0 -0
  263. /package/style/{src/mixins → mixins}/function.scss +0 -0
  264. /package/style/{src/mixins → mixins}/mixins.scss +0 -0
  265. /package/style/{src/panel-tabs.scss → panel-tabs.scss} +0 -0
  266. /package/style/{src/panel.scss → panel.scss} +0 -0
  267. /package/style/{src/pct-filter-panel.scss → pct-filter-panel.scss} +0 -0
  268. /package/style/{src/progress.scss → progress.scss} +0 -0
  269. /package/style/{src/rich-text.scss → rich-text.scss} +0 -0
  270. /package/style/{src/theme → theme}/theme.scss +0 -0
  271. /package/style/{src/theme → theme}/var.scss +0 -0
  272. /package/style/{src/var.scss → var.scss} +0 -0
@@ -1,309 +0,0 @@
1
- import { defineComponent, useAttrs, ref, computed, unref, getCurrentScope, onScopeDispose, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementVNode, normalizeClass, createTextVNode, createElementBlock, createVNode, createCommentVNode, toDisplayString, withModifiers, Fragment, renderList, renderSlot } from 'vue';
2
- import { ElTooltip, ElIcon, ElScrollbar, ElSwitch } from 'element-plus';
3
- import { useNamespace, useValue, useService, useEventDispatcher } from '@ctzy-web-client/web-base-client-vue';
4
- import { BwaDraglist } from '../drag-list/index.mjs';
5
- import { map } from 'rxjs';
6
- import { dataModelDB } from '../utils/db.mjs';
7
- import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
8
-
9
- const __default__ = defineComponent({ name: "BwaDataTableSetting" });
10
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
11
- props: {
12
- dataTable: {
13
- type: Object,
14
- required: true
15
- }
16
- },
17
- setup(__props) {
18
- const props = __props;
19
- const attrs = useAttrs();
20
- const ns = useNamespace("datatable-settings");
21
- const value = ref(false);
22
- const appName = useValue("AppName");
23
- const userService = useService("UserService");
24
- const userID = computed(() => {
25
- var _a, _b;
26
- return ((_b = (_a = unref(userService)) == null ? void 0 : _a.userInfo) == null ? void 0 : _b.id) || "";
27
- });
28
- const isShowResetColumn = computed(
29
- () => !props.dataTable.isDefaultColumnSort()
30
- );
31
- const key = computed(
32
- () => `${unref(appName)}_${props.dataTable.name}_settings`
33
- );
34
- const search = ref("");
35
- const columns = computed(
36
- () => props.dataTable.getColumns().filter((column) => column.settings.visible).filter((column) => column.settings.visible)
37
- );
38
- const initColumns = async () => {
39
- var _a, _b, _c;
40
- let persistentColumnInfos = [];
41
- const result = await dataModelDB.tableHeaderSettings.where("[app+tableName+userID]").equals([unref(appName), props.dataTable.name, unref(userID)]).toArray();
42
- if (result.length) {
43
- persistentColumnInfos = (_b = (_a = result[0]) == null ? void 0 : _a.columnInfo) != null ? _b : [];
44
- }
45
- if (persistentColumnInfos.some((item) => typeof item === "string")) {
46
- persistentColumnInfos = persistentColumnInfos.map((columnInfo) => {
47
- return typeof columnInfo === "object" ? columnInfo : { name: columnInfo, visible: true };
48
- });
49
- }
50
- const _dataTable = props.dataTable;
51
- let dataTableColumns = _dataTable.getColumns().slice().filter((item) => item.settings.visible);
52
- persistentColumnInfos = persistentColumnInfos.filter(
53
- (item) => dataTableColumns.findIndex((column) => column.name === item.name) !== -1
54
- );
55
- if (!persistentColumnInfos) {
56
- return dataTableColumns;
57
- }
58
- let sortedColumns = persistentColumnInfos.map(
59
- (columnInfo) => dataTableColumns.find((column) => column.name === columnInfo.name)
60
- ).filter(Boolean);
61
- dataTableColumns = sortedColumns.concat(
62
- dataTableColumns.filter(
63
- (column) => !sortedColumns.find((col) => column.name === col.name)
64
- )
65
- );
66
- for (const column of dataTableColumns) {
67
- const persistentItem = persistentColumnInfos.find(
68
- (item) => item.name === column.name
69
- );
70
- column.visible = (_c = persistentItem == null ? void 0 : persistentItem.visible) != null ? _c : column.visible;
71
- }
72
- props.dataTable.setDisplayColumns(
73
- dataTableColumns.filter((column) => column.visible)
74
- );
75
- return dataTableColumns;
76
- };
77
- const resetColumns = () => {
78
- const _dataTable = props.dataTable;
79
- _dataTable.resetColumnSort();
80
- };
81
- const allSearchedColumns = computed(() => {
82
- const _search = unref(search);
83
- return unref(columns).filter((column) => column.title.indexOf(_search) > -1);
84
- });
85
- const hiddenSearchedColumns = computed(
86
- () => unref(allSearchedColumns).filter((item) => !item.visible)
87
- );
88
- const displaySearchedColumns = computed(() => {
89
- const _search = unref(search);
90
- return props.dataTable.getDisplayColumns().filter((column) => column.settings.visible).filter((column) => column.title.indexOf(_search) > -1);
91
- });
92
- const handleSortChange = (sort) => {
93
- const _columns = unref(columns);
94
- const displayColumns = sort.map(
95
- (attrName) => {
96
- var _a;
97
- return (_a = _columns.find((column) => column.attrName === attrName)) != null ? _a : null;
98
- }
99
- ).filter(Boolean);
100
- props.dataTable.setDisplayColumns(displayColumns);
101
- };
102
- const scope = getCurrentScope();
103
- const handleInitCompleted = async () => {
104
- const dataTableColumns = await initColumns();
105
- const subscription = props.dataTable.getDisplayColumnsSubject().pipe(
106
- map((displayColumns) => {
107
- const hiddenColumns = dataTableColumns.filter(
108
- (column) => !displayColumns.find(
109
- (displayColumn) => displayColumn.attrName === column.attrName
110
- )
111
- );
112
- return [...displayColumns, ...hiddenColumns].map((column) => ({
113
- name: column.name,
114
- visible: column.visible
115
- }));
116
- })
117
- ).subscribe({
118
- next: (columnInfo) => {
119
- dataModelDB.tableHeaderSettings.put({
120
- app: unref(appName),
121
- tableName: props.dataTable.name,
122
- userID: unref(userID),
123
- columnInfo
124
- });
125
- }
126
- });
127
- scope.run(() => {
128
- onScopeDispose(() => {
129
- subscription.unsubscribe();
130
- });
131
- });
132
- };
133
- if (!props.dataTable.inited) {
134
- useEventDispatcher(props.dataTable, "init-completed", handleInitCompleted);
135
- } else {
136
- handleInitCompleted();
137
- }
138
- return (_ctx, _cache) => {
139
- const _component_RefreshRight = resolveComponent("RefreshRight");
140
- const _component_Close = resolveComponent("Close");
141
- return openBlock(), createBlock(unref(ElTooltip), mergeProps({
142
- visible: value.value,
143
- "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => value.value = $event)
144
- }, unref(attrs), {
145
- effect: "light",
146
- "show-arrow": false,
147
- trigger: "click",
148
- "popper-class": unref(ns).b(),
149
- "gpu-acceleration": false,
150
- placement: "bottom",
151
- "append-to": ".bwa-application"
152
- }), {
153
- content: withCtx(() => [
154
- createElementVNode("div", {
155
- class: normalizeClass(unref(ns).e("content"))
156
- }, [
157
- createElementVNode("div", {
158
- class: normalizeClass(unref(ns).e("header"))
159
- }, [
160
- createTextVNode(" \u8868\u5934\u8BBE\u7F6E "),
161
- createElementVNode("span", {
162
- class: normalizeClass(unref(ns).e("tools"))
163
- }, [
164
- unref(isShowResetColumn) ? (openBlock(), createElementBlock("span", {
165
- key: 0,
166
- class: normalizeClass([unref(ns).e("tools-item"), unref(ns).e("refresh")]),
167
- onClick: resetColumns
168
- }, [
169
- createVNode(unref(ElTooltip), {
170
- content: "\u6062\u590D\u9ED8\u8BA4",
171
- "append-to": ".bwa-application"
172
- }, {
173
- default: withCtx(() => [
174
- createVNode(unref(ElIcon), null, {
175
- default: withCtx(() => [
176
- createVNode(_component_RefreshRight)
177
- ]),
178
- _: 1
179
- })
180
- ]),
181
- _: 1
182
- })
183
- ], 2)) : createCommentVNode("v-if", true),
184
- createElementVNode("span", {
185
- class: normalizeClass([unref(ns).e("tools-item"), unref(ns).e("close")]),
186
- onClick: _cache[0] || (_cache[0] = ($event) => value.value = false)
187
- }, [
188
- createVNode(unref(ElTooltip), {
189
- content: "\u5173\u95ED",
190
- "append-to": ".bwa-application"
191
- }, {
192
- default: withCtx(() => [
193
- createVNode(unref(ElIcon), null, {
194
- default: withCtx(() => [
195
- createVNode(_component_Close)
196
- ]),
197
- _: 1
198
- })
199
- ]),
200
- _: 1
201
- })
202
- ], 2)
203
- ], 2)
204
- ], 2),
205
- createCommentVNode(` <div :class="ns.e('search')">\r
206
- <ElInput\r
207
- v-model="search"\r
208
- :clearable="true"\r
209
- prefix-icon="Search"\r
210
- placeholder="\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"\r
211
- />\r
212
- </div> `),
213
- createVNode(unref(ElScrollbar), { "max-height": "500px" }, {
214
- default: withCtx(() => [
215
- createElementVNode("div", {
216
- class: normalizeClass(unref(ns).e("main"))
217
- }, [
218
- unref(displaySearchedColumns).length ? (openBlock(), createElementBlock("div", {
219
- key: 0,
220
- class: normalizeClass(unref(ns).b("section"))
221
- }, [
222
- createElementVNode("div", {
223
- class: normalizeClass(unref(ns).be("section", "header"))
224
- }, "\u663E\u793A\u5B57\u6BB5", 2),
225
- createVNode(unref(BwaDraglist), {
226
- data: unref(displaySearchedColumns),
227
- labelAttr: "title",
228
- idAttr: "attrName",
229
- onSortChange: handleSortChange
230
- }, {
231
- default: withCtx(({ item }) => [
232
- createElementVNode("div", {
233
- class: normalizeClass(unref(ns).be("section", "content"))
234
- }, [
235
- createElementVNode("div", {
236
- class: normalizeClass(unref(ns).e("field-item"))
237
- }, [
238
- createElementVNode("span", null, toDisplayString(item.title), 1),
239
- createVNode(unref(ElSwitch), {
240
- modelValue: item.visible,
241
- "onUpdate:modelValue": ($event) => item.visible = $event,
242
- size: "small",
243
- disabled: item.settings.disabled,
244
- onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
245
- }, ["stop"]))
246
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
247
- ], 2)
248
- ], 2)
249
- ]),
250
- _: 1
251
- }, 8, ["data"]),
252
- createCommentVNode(` <div\r
253
- v-show="!displaySearchedColumns.length"\r
254
- :class="ns.be('section', 'empty')"\r
255
- >\r
256
- \u6682\u65E0\u5B57\u6BB5\r
257
- </div> `)
258
- ], 2)) : createCommentVNode("v-if", true),
259
- unref(hiddenSearchedColumns).length ? (openBlock(), createElementBlock("div", {
260
- key: 1,
261
- class: normalizeClass(unref(ns).b("section"))
262
- }, [
263
- createElementVNode("div", {
264
- class: normalizeClass(unref(ns).be("section", "header"))
265
- }, "\u672A\u663E\u793A\u5B57\u6BB5", 2),
266
- createElementVNode("div", {
267
- class: normalizeClass(unref(ns).be("section", "content"))
268
- }, [
269
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(hiddenSearchedColumns), (column) => {
270
- return openBlock(), createElementBlock("div", {
271
- key: column.attrName,
272
- class: normalizeClass(unref(ns).e("field-item"))
273
- }, [
274
- createElementVNode("span", null, toDisplayString(column.title), 1),
275
- createVNode(unref(ElSwitch), {
276
- modelValue: column.visible,
277
- "onUpdate:modelValue": ($event) => column.visible = $event,
278
- size: "small",
279
- disabled: column.settings.disabled
280
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
281
- ], 2);
282
- }), 128))
283
- ], 2),
284
- createCommentVNode(` <div\r
285
- v-show="!hiddenSearchedColumns.length"\r
286
- :class="ns.be('section', 'empty')"\r
287
- >\r
288
- \u6682\u65E0\u5B57\u6BB5\r
289
- </div> `)
290
- ], 2)) : createCommentVNode("v-if", true)
291
- ], 2)
292
- ]),
293
- _: 1
294
- })
295
- ], 2)
296
- ]),
297
- default: withCtx(() => [
298
- createElementVNode("span", null, [
299
- renderSlot(_ctx.$slots, "default")
300
- ])
301
- ]),
302
- _: 3
303
- }, 16, ["visible", "popper-class"]);
304
- };
305
- }
306
- });
307
- var DataTableSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "datatable-settings.vue"]]);
308
-
309
- export { DataTableSettings as default };
@@ -1,6 +0,0 @@
1
- import { withInstall } from 'element-plus/es/utils/vue/install';
2
- import DataTableSettings from './datatable-settings.mjs';
3
-
4
- const BwaDataTableSetting = withInstall(DataTableSettings);
5
-
6
- export { BwaDataTableSetting, BwaDataTableSetting as default };
@@ -1,128 +0,0 @@
1
- import { defineComponent, ref, watch, provide, computed, resolveComponent, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeClass, createTextVNode } from 'vue';
2
- import { ROOT_PICKER_INJECTION_KEY } from 'element-plus/es/components/date-picker/src/constants';
3
- import ElPanelDatePicker from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-pick';
4
- import { parseDate, valueEquals, formatter } from 'element-plus/es/components/time-picker/src/utils';
5
- import { useLocale } from 'element-plus/es/hooks/index';
6
- import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
7
- import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
8
-
9
- const __default__ = defineComponent({ name: "BwaDatePicker" });
10
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
11
- props: {
12
- modelValue: {
13
- type: [String, Date, Array]
14
- },
15
- visible: {
16
- type: Boolean
17
- },
18
- format: {
19
- type: String,
20
- default: "YYYY-MM-DD"
21
- },
22
- shortcuts: {
23
- type: Array,
24
- default: () => []
25
- }
26
- },
27
- emits: ["update:modelValue", "update:visible"],
28
- setup(__props, { emit }) {
29
- const props = __props;
30
- const ns = useNamespace("datepicker");
31
- const { lang } = useLocale();
32
- const visible = ref(false);
33
- watch(visible, () => {
34
- emit("update:visible", visible.value);
35
- });
36
- provide("EP_PICKER_BASE", {
37
- props
38
- });
39
- provide(ROOT_PICKER_INJECTION_KEY, {
40
- slots: {},
41
- pickerNs: null
42
- });
43
- const parsedValue = computed(() => {
44
- return parseDate(props.modelValue, props.format, lang);
45
- });
46
- const emitInput = (input) => {
47
- if (valueEquals(props.modelValue, input)) {
48
- return;
49
- }
50
- let formatted;
51
- if (Array.isArray(input)) {
52
- formatted = input.map((item) => formatter(item, props.format, lang.value));
53
- } else {
54
- formatted = formatter(input, props.format, lang.value);
55
- }
56
- emit("update:modelValue", formatted);
57
- };
58
- const onPick = (date) => {
59
- let result;
60
- if (Array.isArray(date)) {
61
- result = date.map((_) => _.toDate());
62
- } else {
63
- result = date ? date.toDate() : date;
64
- }
65
- emitInput(result);
66
- visible.value = false;
67
- };
68
- const onClear = () => {
69
- emit("update:modelValue", "");
70
- visible.value = false;
71
- };
72
- return (_ctx, _cache) => {
73
- const _component_ElButton = resolveComponent("ElButton");
74
- const _component_ElTooltip = resolveComponent("ElTooltip");
75
- return openBlock(), createBlock(_component_ElTooltip, {
76
- trigger: "click",
77
- pure: "",
78
- teleported: "",
79
- effect: "light",
80
- role: "dialog",
81
- transition: `el-zoom-in-top`,
82
- "fallback-placements": ["bottom", "top", "right", "left"],
83
- "gpu-acceleration": false,
84
- "show-arrow": false,
85
- "stop-popper-mouse-event": false,
86
- visible: visible.value,
87
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
88
- "hide-after": 0,
89
- "popper-class": unref(ns).b(),
90
- persistent: "",
91
- "append-to": ".bwa-application"
92
- }, {
93
- default: withCtx(() => [
94
- renderSlot(_ctx.$slots, "default", { visible: visible.value })
95
- ]),
96
- content: withCtx(() => [
97
- createVNode(unref(ElPanelDatePicker), {
98
- type: "date",
99
- "parsed-value": unref(parsedValue),
100
- onPick,
101
- teleported: false
102
- }, {
103
- sidebar: withCtx(() => [
104
- createElementVNode("div", {
105
- class: normalizeClass(unref(ns).e("sidebar"))
106
- }, [
107
- createVNode(_component_ElButton, {
108
- size: "small",
109
- onClick: onClear
110
- }, {
111
- default: withCtx(() => [
112
- createTextVNode("\u6E05\u7A7A")
113
- ]),
114
- _: 1
115
- })
116
- ], 2)
117
- ]),
118
- _: 1
119
- }, 8, ["parsed-value"])
120
- ]),
121
- _: 3
122
- }, 8, ["visible", "popper-class"]);
123
- };
124
- }
125
- });
126
- var datePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-picker.vue"]]);
127
-
128
- export { datePicker as default };
@@ -1,177 +0,0 @@
1
- import { defineComponent, ref, inject, computed, useSlots, unref, provide, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from 'vue';
2
- import { useNamespace, filterPanelItemKey, useGlobalConfig } from '@ctzy-web-client/web-base-client-vue';
3
- import { timePickerDefaultProps, ROOT_PICKER_INJECTION_KEY, useNamespace as useNamespace$1, dayjs, parseDate, valueEquals, formatter } from 'element-plus';
4
- import PanelDateRange from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-range';
5
- import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
6
-
7
- const __default__ = defineComponent({ name: "BwaDateRange" });
8
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
9
- props: {
10
- ...timePickerDefaultProps,
11
- modelValue: {
12
- type: null,
13
- required: true
14
- }
15
- },
16
- emits: ["update:modelValue"],
17
- setup(__props, { emit }) {
18
- const props = __props;
19
- const ns = useNamespace("daterange");
20
- const pickerVisivle = ref(false);
21
- const filterPanelItem = inject(filterPanelItemKey);
22
- const column = computed(() => {
23
- var _a;
24
- return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
25
- });
26
- const slots = useSlots();
27
- const locale = useGlobalConfig("locale", "ZH");
28
- const lang = computed(() => unref(locale).name);
29
- provide(ROOT_PICKER_INJECTION_KEY, {
30
- slots,
31
- pickerNs: useNamespace$1("picker-panel")
32
- });
33
- provide("EP_PICKER_BASE", {
34
- props
35
- });
36
- watch(
37
- computed(() => props.modelValue),
38
- () => {
39
- if (!props.modelValue || Array.isArray(props.modelValue) || typeof props.modelValue !== "object") {
40
- emit("update:modelValue", { start: "", end: "" });
41
- }
42
- },
43
- { immediate: true }
44
- );
45
- const formatShowTime = (date) => {
46
- return date ? dayjs(date).format("YYYY-MM-DD") : "";
47
- };
48
- const startTime = computed(() => {
49
- var _a;
50
- if (!((_a = props.modelValue) == null ? void 0 : _a.start)) {
51
- return "";
52
- }
53
- return dayjs(props.modelValue.start).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss");
54
- });
55
- const endTime = computed(() => {
56
- var _a;
57
- if (!((_a = props.modelValue) == null ? void 0 : _a.end)) {
58
- return "";
59
- }
60
- return dayjs(props.modelValue.end).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss");
61
- });
62
- const formatStartTime = computed(() => formatShowTime(unref(startTime)));
63
- const formatEndTime = computed(() => formatShowTime(unref(endTime)));
64
- const dateRangeValue = computed(() => [unref(startTime), unref(endTime)]);
65
- const valueIsEmpty = computed(() => {
66
- const value = unref(dateRangeValue);
67
- return !value || Array.isArray(value) && !value.filter(Boolean).length;
68
- });
69
- const parsedValue = computed(() => {
70
- const { valueFormat } = props;
71
- const value = unref(dateRangeValue);
72
- if (!unref(valueIsEmpty)) {
73
- return value.map((d) => parseDate(d, valueFormat, unref(lang)));
74
- }
75
- return [];
76
- });
77
- const emitInput = (input) => {
78
- if (!valueEquals(unref(dateRangeValue), input)) {
79
- const formatted = input.map(
80
- (item) => formatter(item, props.valueFormat, unref(lang))
81
- );
82
- emit("update:modelValue", {
83
- start: formatted[0] ? dayjs(formatted[0]).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss") : "",
84
- end: formatted[1] ? dayjs(formatted[1]).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss") : ""
85
- });
86
- }
87
- };
88
- const onPick = (date, visible = false) => {
89
- pickerVisivle.value = visible;
90
- emitInput(date.map((item) => item.toDate()));
91
- };
92
- return (_ctx, _cache) => {
93
- const _component_CaretBottom = resolveComponent("CaretBottom");
94
- const _component_ElIcon = resolveComponent("ElIcon");
95
- const _component_ElTooltip = resolveComponent("ElTooltip");
96
- return openBlock(), createBlock(_component_ElTooltip, {
97
- visible: pickerVisivle.value,
98
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => pickerVisivle.value = $event),
99
- pure: "",
100
- teleported: "",
101
- effect: "light",
102
- role: "dialog",
103
- transition: `el-zoom-in-top`,
104
- "fallback-placements": ["bottom", "top", "right", "left"],
105
- "gpu-acceleration": false,
106
- "show-arrow": false,
107
- "stop-popper-mouse-event": false,
108
- "hide-after": 0,
109
- persistent: "",
110
- trigger: "click",
111
- "append-to": ".bwa-application"
112
- }, {
113
- default: withCtx(() => [
114
- renderSlot(_ctx.$slots, "pct-default", {
115
- formatStartTime: unref(formatStartTime),
116
- formatEndTime: unref(formatEndTime)
117
- }, () => [
118
- createElementVNode("div", {
119
- class: normalizeClass([unref(ns).b(), unref(ns).is("active", pickerVisivle.value)])
120
- }, [
121
- renderSlot(_ctx.$slots, "label", {}, () => [
122
- unref(column) ? (openBlock(), createElementBlock("span", {
123
- key: 0,
124
- class: normalizeClass(unref(ns).e("label"))
125
- }, toDisplayString(unref(column).title), 3)) : createCommentVNode("v-if", true)
126
- ]),
127
- createElementVNode("span", {
128
- class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !unref(formatStartTime))])
129
- }, [
130
- createElementVNode("span", {
131
- class: normalizeClass(unref(ns).e("content"))
132
- }, toDisplayString(unref(formatStartTime) ? unref(formatStartTime) : "\u5F00\u59CB\u65E5\u671F"), 3),
133
- createVNode(_component_ElIcon, {
134
- class: normalizeClass(unref(ns).e("caret"))
135
- }, {
136
- default: withCtx(() => [
137
- createVNode(_component_CaretBottom)
138
- ]),
139
- _: 1
140
- }, 8, ["class"])
141
- ], 2),
142
- createTextVNode(" \uFFFD? "),
143
- createElementVNode("span", {
144
- class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !unref(formatEndTime))])
145
- }, [
146
- createElementVNode("span", {
147
- class: normalizeClass(unref(ns).e("content"))
148
- }, toDisplayString(unref(formatEndTime) ? unref(formatEndTime) : "\u7ED3\u675F\u65E5\u671F"), 3),
149
- createVNode(_component_ElIcon, {
150
- class: normalizeClass(unref(ns).e("caret"))
151
- }, {
152
- default: withCtx(() => [
153
- createVNode(_component_CaretBottom)
154
- ]),
155
- _: 1
156
- }, 8, ["class"])
157
- ], 2)
158
- ], 2)
159
- ])
160
- ]),
161
- content: withCtx(() => [
162
- createVNode(unref(PanelDateRange), {
163
- "parsed-value": unref(parsedValue),
164
- type: "daterange",
165
- visible: pickerVisivle.value,
166
- onPick,
167
- teleported: false
168
- }, null, 8, ["parsed-value", "visible"])
169
- ]),
170
- _: 3
171
- }, 8, ["visible"]);
172
- };
173
- }
174
- });
175
- var DateRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-range.vue"]]);
176
-
177
- export { DateRange as default };
@@ -1,6 +0,0 @@
1
- import { withInstall } from 'element-plus/es/utils/vue/install';
2
- import DateRange from './date-range.mjs';
3
-
4
- const BwaDateRange = withInstall(DateRange);
5
-
6
- export { BwaDateRange, BwaDateRange as default };
@@ -1,3 +0,0 @@
1
- const dragListContextKey = "DRAG_LIST_CONTEXT_KEY";
2
-
3
- export { dragListContextKey };
@@ -1,49 +0,0 @@
1
- import { defineComponent, inject, getCurrentInstance, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot } from 'vue';
2
- import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
3
- import { dragListContextKey } from './constants.mjs';
4
- import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
5
-
6
- const __default__ = defineComponent({ name: "BwaDragItem" });
7
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
8
- setup(__props, { expose }) {
9
- const ns = useNamespace("dragitem");
10
- ;
11
- const dragListContext = inject(dragListContextKey);
12
- const id = dragListContext.nextID();
13
- const instance = getCurrentInstance();
14
- const handleMousedown = (event) => {
15
- if (event.button !== 0) {
16
- return;
17
- }
18
- dragListContext.startDrag(instance.proxy);
19
- };
20
- onMounted(() => {
21
- dragListContext.handleItemCreate(id, instance.proxy);
22
- });
23
- onBeforeUnmount(() => {
24
- dragListContext.handleItemDestroy(id, instance.proxy);
25
- });
26
- expose({
27
- id
28
- });
29
- return (_ctx, _cache) => {
30
- return openBlock(), createElementBlock("div", {
31
- class: normalizeClass(unref(ns).b()),
32
- "draggable-context-id": "",
33
- onMousedown: handleMousedown
34
- }, [
35
- createElementVNode("i", {
36
- class: normalizeClass([unref(ns).e("drag-icon"), "ptp-icon", "ptp-buzhou-yidong"])
37
- }, null, 2),
38
- createElementVNode("span", {
39
- class: normalizeClass(unref(ns).e("content"))
40
- }, [
41
- renderSlot(_ctx.$slots, "default")
42
- ], 2)
43
- ], 34);
44
- };
45
- }
46
- });
47
- var DragItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "drag-item.vue"]]);
48
-
49
- export { DragItem as default };