@ctzy-web-client/plugin-component-vue 1.0.26 → 1.0.27

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 (228) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +11 -0
  2. package/es/advance-select/advance-operation.mjs +48 -51
  3. package/es/advance-select/advance-option.mjs +128 -163
  4. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +11 -5
  5. package/es/advance-select/advance-select.mjs +323 -370
  6. package/es/advance-select/events-helpers.mjs +9 -0
  7. package/es/advance-select/index.mjs +9 -0
  8. package/es/advance-select/use-advance-option.mjs +9 -0
  9. package/es/advance-select/use-advance-select.mjs +9 -0
  10. package/es/application-slot/application-slot.mjs +9 -0
  11. package/es/application-slot/breadcrumb-item.mjs +26 -20
  12. package/es/application-slot/header-tools-item.mjs +26 -20
  13. package/es/application-slot/index.mjs +9 -0
  14. package/es/breadcrumb-select/breadcrumb-select.mjs +123 -137
  15. package/es/breadcrumb-select/index.mjs +9 -0
  16. package/es/components.mjs +9 -0
  17. package/es/contextmenu/contextmenu-item.mjs +24 -19
  18. package/es/contextmenu/contextmenu.mjs +68 -73
  19. package/es/contextmenu/index.mjs +9 -0
  20. package/es/contextmenu/use-contextmenu.mjs +10 -1
  21. package/es/data-form/data-form-item.mjs +41 -49
  22. package/es/data-form/data-form.mjs +176 -213
  23. package/es/data-form/dynamic-component.mjs +9 -0
  24. package/es/data-form/form-components/Blots/AtBlot.mjs +9 -0
  25. package/es/data-form/form-components/bwa-date-picker.mjs +50 -51
  26. package/es/data-form/form-components/bwa-date-time-picker.mjs +55 -56
  27. package/es/data-form/form-components/bwa-input-float.mjs +48 -48
  28. package/es/data-form/form-components/bwa-input-integer.mjs +61 -68
  29. package/es/data-form/form-components/bwa-input.mjs +43 -43
  30. package/es/data-form/form-components/bwa-multi-select.mjs +40 -40
  31. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +230 -555
  32. package/es/data-form/form-components/bwa-rich-text.mjs +326 -404
  33. package/es/data-form/form-components/bwa-select.mjs +81 -84
  34. package/es/data-form/form-components/bwa-textarea.mjs +38 -38
  35. package/es/data-form/form-components/bwa-upload.mjs +160 -173
  36. package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -35
  37. package/es/data-form/form-components/bwa-user-select.mjs +72 -86
  38. package/es/data-form/index.mjs +9 -0
  39. package/es/data-table/data-column-view.mjs +124 -146
  40. package/es/data-table/data-table-card.mjs +49 -48
  41. package/es/data-table/data-table-column.mjs +55 -58
  42. package/es/data-table/data-table.mjs +328 -404
  43. package/es/data-table/dynamic-component.mjs +9 -0
  44. package/es/data-table/index.mjs +9 -0
  45. package/es/data-table/use-datatable-drag.mjs +9 -0
  46. package/es/datatable-settings/datatable-settings.mjs +286 -328
  47. package/es/datatable-settings/index.mjs +9 -0
  48. package/es/date-range/date-picker.mjs +125 -131
  49. package/es/date-range/date-range.mjs +173 -216
  50. package/es/date-range/index.mjs +9 -0
  51. package/es/drag-list/constants.mjs +10 -0
  52. package/es/drag-list/drag-item.mjs +51 -56
  53. package/es/drag-list/drag-list.mjs +58 -60
  54. package/es/drag-list/index.mjs +9 -0
  55. package/es/drag-list/use-drag-list.mjs +10 -1
  56. package/es/dragable/constants.mjs +10 -0
  57. package/es/dragable/dragable-item.mjs +27 -23
  58. package/es/dragable/dragable-operation.mjs +33 -32
  59. package/es/dragable/dragable.mjs +33 -32
  60. package/es/dragable/index.mjs +9 -0
  61. package/es/dragable/use-dragable.mjs +9 -0
  62. package/es/filter-panel/conditions/condition.mjs +9 -0
  63. package/es/filter-panel/conditions/date-range-condition.mjs +51 -50
  64. package/es/filter-panel/conditions/department-condition/department-condition.mjs +82 -99
  65. package/es/filter-panel/conditions/department-condition/department-node.mjs +69 -73
  66. package/es/filter-panel/conditions/index.mjs +9 -0
  67. package/es/filter-panel/conditions/input-condition.mjs +88 -91
  68. package/es/filter-panel/conditions/multi-user-condition.mjs +66 -67
  69. package/es/filter-panel/conditions/multiple-menu-condition.mjs +44 -54
  70. package/es/filter-panel/conditions/single-menu-condition.mjs +71 -65
  71. package/es/filter-panel/conditions/single-user-condition.mjs +66 -67
  72. package/es/filter-panel/filter-panel-item.mjs +51 -55
  73. package/es/filter-panel/filter-panel.mjs +147 -156
  74. package/es/filter-panel/index.mjs +9 -0
  75. package/es/filter-panel/use-filter-panel-item.mjs +9 -0
  76. package/es/filter-panel/use-filter-panel.mjs +9 -0
  77. package/es/hooks/use-data/index.mjs +9 -0
  78. package/es/index.mjs +9 -0
  79. package/es/layout/index.mjs +9 -0
  80. package/es/layout/layout.mjs +87 -85
  81. package/es/make-installer.mjs +9 -0
  82. package/es/math/Rectangle.mjs +10 -0
  83. package/es/menu/index.mjs +9 -0
  84. package/es/menu/menu-item.mjs +65 -70
  85. package/es/menu/menu.mjs +64 -70
  86. package/es/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.mjs +680 -454
  87. package/es/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.mjs +108 -46
  88. package/es/panel/index.mjs +9 -0
  89. package/es/panel/panel.mjs +49 -53
  90. package/es/panel-tabs/index.mjs +9 -0
  91. package/es/panel-tabs/panel-tabs.mjs +9 -0
  92. package/es/pct-filter-panel/index.mjs +9 -0
  93. package/es/pct-filter-panel/pct-compents/index.mjs +9 -0
  94. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +73 -75
  95. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +77 -77
  96. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +345 -374
  97. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +149 -154
  98. package/es/pct-filter-panel/pct-filter-panel-item.mjs +52 -56
  99. package/es/pct-filter-panel/pct-filter-panel.mjs +235 -248
  100. package/es/pct-filter-panel/use-filter-panel-item.mjs +9 -0
  101. package/es/pct-filter-panel/use-filter-panel.mjs +9 -0
  102. package/es/plugins.mjs +9 -0
  103. package/es/progress/index.mjs +9 -0
  104. package/es/progress/progress-item.mjs +71 -81
  105. package/es/progress/progress.mjs +74 -78
  106. package/es/progress/use-progress.mjs +9 -0
  107. package/es/utils/db.mjs +9 -0
  108. package/es/utils.css +1 -0
  109. package/es/utils.mjs +9 -0
  110. package/es/where-filter-panel/index.mjs +9 -1
  111. package/es/where-filter-panel/use-where-filter-panel.mjs +9 -0
  112. package/es/where-filter-panel/where-filter-panel.mjs +21 -15
  113. package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
  114. package/lib/advance-select/advance-operation.js +47 -50
  115. package/lib/advance-select/advance-option.js +127 -162
  116. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +11 -6
  117. package/lib/advance-select/advance-select.js +322 -369
  118. package/lib/advance-select/events-helpers.js +9 -0
  119. package/lib/advance-select/index.js +9 -0
  120. package/lib/advance-select/use-advance-option.js +9 -0
  121. package/lib/advance-select/use-advance-select.js +9 -0
  122. package/lib/application-slot/application-slot.js +9 -0
  123. package/lib/application-slot/breadcrumb-item.js +25 -19
  124. package/lib/application-slot/header-tools-item.js +25 -19
  125. package/lib/application-slot/index.js +9 -0
  126. package/lib/breadcrumb-select/breadcrumb-select.js +122 -136
  127. package/lib/breadcrumb-select/index.js +9 -0
  128. package/lib/components.js +9 -0
  129. package/lib/contextmenu/contextmenu-item.js +23 -18
  130. package/lib/contextmenu/contextmenu.js +67 -72
  131. package/lib/contextmenu/index.js +9 -0
  132. package/lib/contextmenu/use-contextmenu.js +10 -1
  133. package/lib/data-form/data-form-item.js +40 -48
  134. package/lib/data-form/data-form.js +175 -212
  135. package/lib/data-form/dynamic-component.js +9 -0
  136. package/lib/data-form/form-components/Blots/AtBlot.js +9 -0
  137. package/lib/data-form/form-components/bwa-date-picker.js +49 -50
  138. package/lib/data-form/form-components/bwa-date-time-picker.js +54 -55
  139. package/lib/data-form/form-components/bwa-input-float.js +47 -47
  140. package/lib/data-form/form-components/bwa-input-integer.js +60 -67
  141. package/lib/data-form/form-components/bwa-input.js +42 -42
  142. package/lib/data-form/form-components/bwa-multi-select.js +39 -39
  143. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +229 -554
  144. package/lib/data-form/form-components/bwa-rich-text.js +325 -403
  145. package/lib/data-form/form-components/bwa-select.js +80 -83
  146. package/lib/data-form/form-components/bwa-textarea.js +37 -37
  147. package/lib/data-form/form-components/bwa-upload.js +159 -172
  148. package/lib/data-form/form-components/bwa-user-multi-select.js +34 -34
  149. package/lib/data-form/form-components/bwa-user-select.js +71 -85
  150. package/lib/data-form/index.js +9 -0
  151. package/lib/data-table/data-column-view.js +124 -146
  152. package/lib/data-table/data-table-card.js +49 -48
  153. package/lib/data-table/data-table-column.js +54 -57
  154. package/lib/data-table/data-table.js +327 -403
  155. package/lib/data-table/dynamic-component.js +9 -0
  156. package/lib/data-table/index.js +9 -0
  157. package/lib/data-table/use-datatable-drag.js +9 -0
  158. package/lib/datatable-settings/datatable-settings.js +285 -327
  159. package/lib/datatable-settings/index.js +9 -0
  160. package/lib/date-range/date-picker.js +124 -130
  161. package/lib/date-range/date-range.js +172 -215
  162. package/lib/date-range/index.js +9 -0
  163. package/lib/drag-list/constants.js +10 -0
  164. package/lib/drag-list/drag-item.js +50 -55
  165. package/lib/drag-list/drag-list.js +57 -59
  166. package/lib/drag-list/index.js +9 -0
  167. package/lib/drag-list/use-drag-list.js +10 -1
  168. package/lib/dragable/constants.js +10 -0
  169. package/lib/dragable/dragable-item.js +26 -22
  170. package/lib/dragable/dragable-operation.js +32 -31
  171. package/lib/dragable/dragable.js +32 -31
  172. package/lib/dragable/index.js +9 -0
  173. package/lib/dragable/use-dragable.js +9 -0
  174. package/lib/filter-panel/conditions/condition.js +9 -0
  175. package/lib/filter-panel/conditions/date-range-condition.js +50 -49
  176. package/lib/filter-panel/conditions/department-condition/department-condition.js +81 -98
  177. package/lib/filter-panel/conditions/department-condition/department-node.js +68 -72
  178. package/lib/filter-panel/conditions/index.js +9 -0
  179. package/lib/filter-panel/conditions/input-condition.js +87 -90
  180. package/lib/filter-panel/conditions/multi-user-condition.js +65 -66
  181. package/lib/filter-panel/conditions/multiple-menu-condition.js +43 -53
  182. package/lib/filter-panel/conditions/single-menu-condition.js +70 -64
  183. package/lib/filter-panel/conditions/single-user-condition.js +65 -66
  184. package/lib/filter-panel/filter-panel-item.js +50 -54
  185. package/lib/filter-panel/filter-panel.js +146 -155
  186. package/lib/filter-panel/index.js +9 -0
  187. package/lib/filter-panel/use-filter-panel-item.js +9 -0
  188. package/lib/filter-panel/use-filter-panel.js +9 -0
  189. package/lib/hooks/use-data/index.js +9 -0
  190. package/lib/index.js +9 -0
  191. package/lib/layout/index.js +9 -0
  192. package/lib/layout/layout.js +86 -84
  193. package/lib/make-installer.js +9 -0
  194. package/lib/math/Rectangle.js +10 -0
  195. package/lib/menu/index.js +9 -0
  196. package/lib/menu/menu-item.js +64 -69
  197. package/lib/menu/menu.js +63 -69
  198. package/lib/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.js +685 -451
  199. package/lib/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.js +109 -44
  200. package/lib/panel/index.js +9 -0
  201. package/lib/panel/panel.js +48 -52
  202. package/lib/panel-tabs/index.js +9 -0
  203. package/lib/panel-tabs/panel-tabs.js +9 -0
  204. package/lib/pct-filter-panel/index.js +9 -0
  205. package/lib/pct-filter-panel/pct-compents/index.js +9 -0
  206. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +72 -74
  207. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +76 -76
  208. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +344 -373
  209. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +148 -153
  210. package/lib/pct-filter-panel/pct-filter-panel-item.js +51 -55
  211. package/lib/pct-filter-panel/pct-filter-panel.js +234 -247
  212. package/lib/pct-filter-panel/use-filter-panel-item.js +9 -0
  213. package/lib/pct-filter-panel/use-filter-panel.js +9 -0
  214. package/lib/plugins.js +9 -0
  215. package/lib/progress/index.js +9 -0
  216. package/lib/progress/progress-item.js +70 -80
  217. package/lib/progress/progress.js +73 -77
  218. package/lib/progress/use-progress.js +9 -0
  219. package/lib/utils/db.js +9 -0
  220. package/lib/utils.css +1 -0
  221. package/lib/utils.js +9 -0
  222. package/lib/where-filter-panel/index.js +9 -0
  223. package/lib/where-filter-panel/use-where-filter-panel.js +9 -0
  224. package/lib/where-filter-panel/where-filter-panel.js +20 -14
  225. package/package.json +1 -1
  226. package/style/index.css +1 -1
  227. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
  228. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -32
@@ -1,224 +1,181 @@
1
- import { ref, inject, computed, useSlots, unref, provide, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from 'vue';
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
2
  import { useNamespace, filterPanelItemKey, useGlobalConfig } from '@ctzy-web-client/web-base-client-vue';
3
3
  import { timePickerDefaultProps, ROOT_PICKER_INJECTION_KEY, useNamespace as useNamespace$1, dayjs, parseDate, valueEquals, formatter } from 'element-plus';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
5
5
 
6
- const _sfc_main = {
7
- __name: 'date-range',
8
- props: {
9
- ...timePickerDefaultProps,
10
- modelValue: {
11
- type: null,
12
- required: true,
13
- },
14
- },
15
- emits: ['update:modelValue'],
16
- setup(__props, { emit }) {
17
-
18
- const props = __props;
19
-
20
- defineOptions({ name: 'BwaDateRange' });
21
-
22
-
23
-
24
- const ns = useNamespace('daterange');
25
-
26
- const pickerVisivle = ref(false);
27
-
28
- const filterPanelItem = inject(filterPanelItemKey);
29
- const column = computed(() => filterPanelItem?.column ?? null);
30
-
31
-
32
-
33
- const slots = useSlots();
34
-
35
- const locale = useGlobalConfig('locale', 'ZH');
36
- const lang = computed(() => unref(locale).name);
37
-
38
- provide(ROOT_PICKER_INJECTION_KEY, {
39
- slots,
40
- pickerNs: useNamespace$1('picker-panel'),
41
- });
42
- provide('EP_PICKER_BASE', {
43
- props,
44
- });
45
-
46
- watch(
47
- computed(() => props.modelValue),
48
- () => {
49
- if (
50
- !props.modelValue ||
51
- Array.isArray(props.modelValue) ||
52
- typeof props.modelValue !== 'object'
53
- ) {
54
- emit('update:modelValue', { start: '', end: '' });
55
- }
56
- },
57
- { immediate: true }
58
- );
59
-
60
- const formatShowTime = (date) => {
61
- return date ? dayjs(date).format('YYYY-MM-DD') : '';
62
- };
63
-
64
- /** @type {import('vue').ComputedRef<string>} */
65
- const startTime = computed(() => {
66
- if (!props.modelValue?.start) {
67
- return '';
68
- }
69
-
70
- return dayjs(props.modelValue.start)
71
- .set('hour', 0)
72
- .set('minute', 0)
73
- .set('second', 0)
74
- .format('YYYY-MM-DD HH:mm:ss');
75
- });
76
- /** @type {import('vue').ComputedRef<string>} */
77
- const endTime = computed(() => {
78
- if (!props.modelValue?.end) {
79
- return '';
80
- }
81
-
82
- return dayjs(props.modelValue.end)
83
- .set('hour', 23)
84
- .set('minute', 59)
85
- .set('second', 59)
86
- .format('YYYY-MM-DD HH:mm:ss');
87
- });
88
-
89
- const formatStartTime = computed(() => formatShowTime(unref(startTime)));
90
- const formatEndTime = computed(() => formatShowTime(unref(endTime)));
91
-
92
- const dateRangeValue = computed(() => [unref(startTime), unref(endTime)]);
93
-
94
- const valueIsEmpty = computed(() => {
95
- const value = unref(dateRangeValue);
96
- return !value || (Array.isArray(value) && !value.filter(Boolean).length);
97
- });
98
-
99
- const parsedValue = computed(() => {
100
- const { valueFormat } = props;
101
- const value = unref(dateRangeValue);
102
-
103
- if (!unref(valueIsEmpty)) {
104
- return value.map((d) => parseDate(d, valueFormat, unref(lang)));
105
- }
106
-
107
- return [];
108
- });
109
-
110
- const emitInput = (input) => {
111
- if (!valueEquals(unref(dateRangeValue), input)) {
112
- const formatted = input.map((item) =>
113
- formatter(item, props.valueFormat, unref(lang))
114
- );
115
-
116
- emit('update:modelValue', {
117
- start: formatted[0]
118
- ? dayjs(formatted[0])
119
- .set('hour', 0)
120
- .set('minute', 0)
121
- .set('second', 0)
122
- .format('YYYY-MM-DD HH:mm:ss')
123
- : '',
124
- end: formatted[1]
125
- ? dayjs(formatted[1])
126
- .set('hour', 23)
127
- .set('minute', 59)
128
- .set('second', 59)
129
- .format('YYYY-MM-DD HH:mm:ss')
130
- : '',
131
- });
132
- }
133
- };
134
-
135
- const onPick = (date, visible = false) => {
136
- pickerVisivle.value = visible;
137
-
138
- emitInput(date.map((item) => item.toDate()));
139
- };
140
-
141
- return (_ctx, _cache) => {
142
- const _component_CaretBottom = resolveComponent("CaretBottom");
143
- const _component_ElIcon = resolveComponent("ElIcon");
144
- const _component_ElTooltip = resolveComponent("ElTooltip");
145
-
146
- return (openBlock(), createBlock(_component_ElTooltip, {
147
- visible: pickerVisivle.value,
148
- "onUpdate:visible": _cache[0] || (_cache[0] = $event => ((pickerVisivle).value = $event)),
149
- pure: "",
150
- teleported: "",
151
- effect: "light",
152
- role: "dialog",
153
- transition: `el-zoom-in-top`,
154
- "fallback-placements": ['bottom', 'top', 'right', 'left'],
155
- "gpu-acceleration": false,
156
- "show-arrow": false,
157
- "stop-popper-mouse-event": false,
158
- "hide-after": 0,
159
- persistent: "",
160
- trigger: "click",
161
- "append-to": ".bwa-application"
162
- }, {
163
- default: withCtx(() => [
164
- renderSlot(_ctx.$slots, "pct-default", {
165
- formatStartTime: unref(formatStartTime),
166
- formatEndTime: unref(formatEndTime)
167
- }, () => [
168
- createElementVNode("div", {
169
- class: normalizeClass([unref(ns).b(), unref(ns).is('active', pickerVisivle.value)])
170
- }, [
171
- renderSlot(_ctx.$slots, "label", {}, () => [
172
- (unref(column))
173
- ? (openBlock(), createElementBlock("span", {
6
+ // Inject __name helper
7
+ if (typeof __name === 'undefined') {
8
+ function __name(obj, name) {
9
+ Object.defineProperty(obj, "name", {
10
+ value: name,
11
+ configurable: true
12
+ });
13
+ }
14
+ }
15
+ const __default__ = defineComponent({ name: "BwaDateRange" });
16
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
17
+ props: {
18
+ ...timePickerDefaultProps,
19
+ modelValue: {
20
+ type: null,
21
+ required: true
22
+ }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(__props, { emit: __emit }) {
26
+ ;
27
+ const props = __props;
28
+ const ns = useNamespace("daterange");
29
+ const pickerVisivle = ref(false);
30
+ const filterPanelItem = inject(filterPanelItemKey);
31
+ const column = computed(() => {
32
+ var _a;
33
+ return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
34
+ });
35
+ const emit = __emit;
36
+ const slots = useSlots();
37
+ const locale = useGlobalConfig("locale", "ZH");
38
+ const lang = computed(() => unref(locale).name);
39
+ provide(ROOT_PICKER_INJECTION_KEY, {
40
+ slots,
41
+ pickerNs: useNamespace$1("picker-panel")
42
+ });
43
+ provide("EP_PICKER_BASE", {
44
+ props
45
+ });
46
+ watch(
47
+ computed(() => props.modelValue),
48
+ () => {
49
+ if (!props.modelValue || Array.isArray(props.modelValue) || typeof props.modelValue !== "object") {
50
+ emit("update:modelValue", { start: "", end: "" });
51
+ }
52
+ },
53
+ { immediate: true }
54
+ );
55
+ const formatShowTime = (date) => {
56
+ return date ? dayjs(date).format("YYYY-MM-DD") : "";
57
+ };
58
+ const startTime = computed(() => {
59
+ var _a;
60
+ if (!((_a = props.modelValue) == null ? void 0 : _a.start)) {
61
+ return "";
62
+ }
63
+ return dayjs(props.modelValue.start).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss");
64
+ });
65
+ const endTime = computed(() => {
66
+ var _a;
67
+ if (!((_a = props.modelValue) == null ? void 0 : _a.end)) {
68
+ return "";
69
+ }
70
+ return dayjs(props.modelValue.end).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss");
71
+ });
72
+ const formatStartTime = computed(() => formatShowTime(unref(startTime)));
73
+ const formatEndTime = computed(() => formatShowTime(unref(endTime)));
74
+ const dateRangeValue = computed(() => [unref(startTime), unref(endTime)]);
75
+ const valueIsEmpty = computed(() => {
76
+ const value = unref(dateRangeValue);
77
+ return !value || Array.isArray(value) && !value.filter(Boolean).length;
78
+ });
79
+ const parsedValue = computed(() => {
80
+ const { valueFormat } = props;
81
+ const value = unref(dateRangeValue);
82
+ if (!unref(valueIsEmpty)) {
83
+ return value.map((d) => parseDate(d, valueFormat, unref(lang)));
84
+ }
85
+ return [];
86
+ });
87
+ const emitInput = (input) => {
88
+ if (!valueEquals(unref(dateRangeValue), input)) {
89
+ const formatted = input.map(
90
+ (item) => formatter(item, props.valueFormat, unref(lang))
91
+ );
92
+ emit("update:modelValue", {
93
+ start: formatted[0] ? dayjs(formatted[0]).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss") : "",
94
+ end: formatted[1] ? dayjs(formatted[1]).set("hour", 23).set("minute", 59).set("second", 59).format("YYYY-MM-DD HH:mm:ss") : ""
95
+ });
96
+ }
97
+ };
98
+ const onPick = (date, visible = false) => {
99
+ pickerVisivle.value = visible;
100
+ emitInput(date.map((item) => item.toDate()));
101
+ };
102
+ return (_ctx, _cache) => {
103
+ const _component_CaretBottom = resolveComponent("CaretBottom");
104
+ const _component_ElIcon = resolveComponent("ElIcon");
105
+ const _component_ElTooltip = resolveComponent("ElTooltip");
106
+ return openBlock(), createBlock(_component_ElTooltip, {
107
+ visible: pickerVisivle.value,
108
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => pickerVisivle.value = $event),
109
+ pure: "",
110
+ teleported: "",
111
+ effect: "light",
112
+ role: "dialog",
113
+ transition: `el-zoom-in-top`,
114
+ "fallback-placements": ["bottom", "top", "right", "left"],
115
+ "gpu-acceleration": false,
116
+ "show-arrow": false,
117
+ "stop-popper-mouse-event": false,
118
+ "hide-after": 0,
119
+ persistent: "",
120
+ trigger: "click",
121
+ "append-to": ".bwa-application"
122
+ }, {
123
+ default: withCtx(() => [
124
+ renderSlot(_ctx.$slots, "pct-default", {
125
+ formatStartTime: formatStartTime.value,
126
+ formatEndTime: formatEndTime.value
127
+ }, () => [
128
+ createElementVNode("div", {
129
+ class: normalizeClass([unref(ns).b(), unref(ns).is("active", pickerVisivle.value)])
130
+ }, [
131
+ renderSlot(_ctx.$slots, "label", {}, () => [
132
+ column.value ? (openBlock(), createElementBlock("span", {
174
133
  key: 0,
175
- class: normalizeClass(unref(ns).e('label'))
176
- }, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
177
- : createCommentVNode("v-if", true)
178
- ]),
179
- createElementVNode("span", {
180
- class: normalizeClass([unref(ns).e('time'), unref(ns).is('empty', !unref(formatStartTime))])
181
- }, [
182
- createElementVNode("span", {
183
- class: normalizeClass(unref(ns).e('content'))
184
- }, toDisplayString(unref(formatStartTime) ? unref(formatStartTime) : '开始日期'), 3 /* TEXT, CLASS */),
185
- createVNode(_component_ElIcon, {
186
- class: normalizeClass(unref(ns).e('caret'))
187
- }, {
188
- default: withCtx(() => [
189
- createVNode(_component_CaretBottom)
134
+ class: normalizeClass(unref(ns).e("label"))
135
+ }, toDisplayString(column.value.title), 3)) : createCommentVNode("v-if", true)
190
136
  ]),
191
- _: 1 /* STABLE */
192
- }, 8 /* PROPS */, ["class"])
193
- ], 2 /* CLASS */),
194
- createTextVNode(""),
195
- createElementVNode("span", {
196
- class: normalizeClass([unref(ns).e('time'), unref(ns).is('empty', !unref(formatEndTime))])
197
- }, [
198
- createElementVNode("span", {
199
- class: normalizeClass(unref(ns).e('content'))
200
- }, toDisplayString(unref(formatEndTime) ? unref(formatEndTime) : '结束日期'), 3 /* TEXT, CLASS */),
201
- createVNode(_component_ElIcon, {
202
- class: normalizeClass(unref(ns).e('caret'))
203
- }, {
204
- default: withCtx(() => [
205
- createVNode(_component_CaretBottom)
206
- ]),
207
- _: 1 /* STABLE */
208
- }, 8 /* PROPS */, ["class"])
209
- ], 2 /* CLASS */)
210
- ], 2 /* CLASS */)
211
- ])
212
- ]),
213
- content: withCtx(() => [
214
- createCommentVNode(" <PanelDateRange\r\n :parsed-value=\"parsedValue\"\r\n type=\"daterange\"\r\n :visible=\"pickerVisivle\"\r\n @pick=\"onPick\"\r\n :teleported=\"false\"\r\n /> ")
215
- ]),
216
- _: 3 /* FORWARDED */
217
- }, 8 /* PROPS */, ["visible"]))
218
- }
219
- }
220
-
221
- };
222
- var DateRange = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"date-range.vue"]]);
137
+ createElementVNode("span", {
138
+ class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !formatStartTime.value)])
139
+ }, [
140
+ createElementVNode("span", {
141
+ class: normalizeClass(unref(ns).e("content"))
142
+ }, toDisplayString(formatStartTime.value ? formatStartTime.value : "\u5F00\u59CB\u65E5\u671F"), 3),
143
+ createVNode(_component_ElIcon, {
144
+ class: normalizeClass(unref(ns).e("caret"))
145
+ }, {
146
+ default: withCtx(() => [
147
+ createVNode(_component_CaretBottom)
148
+ ]),
149
+ _: 1
150
+ }, 8, ["class"])
151
+ ], 2),
152
+ _cache[1] || (_cache[1] = createTextVNode(" \u81F3 ", -1)),
153
+ createElementVNode("span", {
154
+ class: normalizeClass([unref(ns).e("time"), unref(ns).is("empty", !formatEndTime.value)])
155
+ }, [
156
+ createElementVNode("span", {
157
+ class: normalizeClass(unref(ns).e("content"))
158
+ }, toDisplayString(formatEndTime.value ? formatEndTime.value : "\u7ED3\u675F\u65E5\u671F"), 3),
159
+ createVNode(_component_ElIcon, {
160
+ class: normalizeClass(unref(ns).e("caret"))
161
+ }, {
162
+ default: withCtx(() => [
163
+ createVNode(_component_CaretBottom)
164
+ ]),
165
+ _: 1
166
+ }, 8, ["class"])
167
+ ], 2)
168
+ ], 2)
169
+ ])
170
+ ]),
171
+ content: withCtx(() => [
172
+ createCommentVNode(' <PanelDateRange\r\n :parsed-value="parsedValue"\r\n type="daterange"\r\n :visible="pickerVisivle"\r\n @pick="onPick"\r\n :teleported="false"\r\n /> ')
173
+ ]),
174
+ _: 3
175
+ }, 8, ["visible"]);
176
+ };
177
+ }
178
+ });
179
+ var DateRange = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "date-range.vue"]]);
223
180
 
224
181
  export { DateRange as default };
@@ -1,6 +1,15 @@
1
1
  import { withInstall } from 'element-plus/es/utils/vue/install';
2
2
  import DateRange from './date-range.mjs';
3
3
 
4
+ // Inject __name helper
5
+ if (typeof __name === 'undefined') {
6
+ function __name(obj, name) {
7
+ Object.defineProperty(obj, "name", {
8
+ value: name,
9
+ configurable: true
10
+ });
11
+ }
12
+ }
4
13
  const BwaDateRange = withInstall(DateRange);
5
14
 
6
15
  export { BwaDateRange, BwaDateRange as default };
@@ -1,3 +1,13 @@
1
+ // Inject __name helper
2
+ if (typeof __name === 'undefined') {
3
+ function __name(obj, name) {
4
+ Object.defineProperty(obj, "name", {
5
+ value: name,
6
+ configurable: true
7
+ });
8
+ }
9
+ }
10
+
1
11
  const dragListContextKey = "DRAG_LIST_CONTEXT_KEY";
2
12
 
3
13
  export { dragListContextKey };
@@ -1,63 +1,58 @@
1
- import { inject, getCurrentInstance, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot } from 'vue';
1
+ import { defineComponent, inject, getCurrentInstance, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot } from 'vue';
2
2
  import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
3
3
  import { dragListContextKey } from './constants.mjs';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
5
5
 
6
- const _sfc_main = {
7
- __name: 'drag-item',
8
- setup(__props, { expose }) {
9
-
10
- const ns = useNamespace('dragitem');
11
-
12
- defineOptions({ name: 'BwaDragItem' });
13
-
14
- const dragListContext = inject(dragListContextKey);
15
-
16
- const id = dragListContext.nextID();
17
-
18
- const instance = getCurrentInstance();
19
-
20
- /**
21
- * @param {MouseEvent} event
22
- */
23
- const handleMousedown = (event) => {
24
- if (event.button !== 0) {
25
- return;
26
- }
27
- dragListContext.startDrag(instance.proxy);
28
- };
29
-
30
- onMounted(() => {
31
- dragListContext.handleItemCreate(id, instance.proxy);
32
- });
33
-
34
- onBeforeUnmount(() => {
35
- dragListContext.handleItemDestroy(id, instance.proxy);
36
- });
37
-
38
- expose({
39
- id,
40
- });
41
-
42
- return (_ctx, _cache) => {
43
- return (openBlock(), createElementBlock("div", {
44
- class: normalizeClass(unref(ns).b()),
45
- "draggable-context-id": "",
46
- onMousedown: handleMousedown
47
- }, [
48
- createElementVNode("i", {
49
- class: normalizeClass([unref(ns).e('drag-icon'), 'ptp-icon', 'ptp-buzhou-yidong'])
50
- }, null, 2 /* CLASS */),
51
- createElementVNode("span", {
52
- class: normalizeClass(unref(ns).e('content'))
53
- }, [
54
- renderSlot(_ctx.$slots, "default")
55
- ], 2 /* CLASS */)
56
- ], 34 /* CLASS, HYDRATE_EVENTS */))
57
- }
6
+ // Inject __name helper
7
+ if (typeof __name === 'undefined') {
8
+ function __name(obj, name) {
9
+ Object.defineProperty(obj, "name", {
10
+ value: name,
11
+ configurable: true
12
+ });
13
+ }
58
14
  }
59
-
60
- };
61
- var DragItem = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"drag-item.vue"]]);
15
+ const __default__ = defineComponent({ name: "BwaDragItem" });
16
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
17
+ setup(__props, { expose: __expose }) {
18
+ const ns = useNamespace("dragitem");
19
+ ;
20
+ const dragListContext = inject(dragListContextKey);
21
+ const id = dragListContext.nextID();
22
+ const instance = getCurrentInstance();
23
+ const handleMousedown = (event) => {
24
+ if (event.button !== 0) {
25
+ return;
26
+ }
27
+ dragListContext.startDrag(instance.proxy);
28
+ };
29
+ onMounted(() => {
30
+ dragListContext.handleItemCreate(id, instance.proxy);
31
+ });
32
+ onBeforeUnmount(() => {
33
+ dragListContext.handleItemDestroy(id, instance.proxy);
34
+ });
35
+ __expose({
36
+ id
37
+ });
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createElementBlock("div", {
40
+ class: normalizeClass(unref(ns).b()),
41
+ "draggable-context-id": "",
42
+ onMousedown: handleMousedown
43
+ }, [
44
+ createElementVNode("i", {
45
+ class: normalizeClass([unref(ns).e("drag-icon"), "ptp-icon", "ptp-buzhou-yidong"])
46
+ }, null, 2),
47
+ createElementVNode("span", {
48
+ class: normalizeClass(unref(ns).e("content"))
49
+ }, [
50
+ renderSlot(_ctx.$slots, "default")
51
+ ], 2)
52
+ ], 34);
53
+ };
54
+ }
55
+ });
56
+ var DragItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "drag-item.vue"]]);
62
57
 
63
58
  export { DragItem as default };