bm-admin-ui 1.0.82-alpha → 1.0.84-alpha

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 (41) hide show
  1. package/es/components/attachment/index.js +273 -0
  2. package/es/components/breadcrumb/index.js +158 -0
  3. package/es/components/button/index.js +49 -0
  4. package/es/components/edit-form/index.js +1186 -0
  5. package/es/components/editor/index.js +12554 -0
  6. package/es/components/feedback/index.js +295 -0
  7. package/es/components/float-table/index.js +3511 -0
  8. package/es/components/flow-designer/index.js +1317 -0
  9. package/es/components/form-create/index.js +20978 -0
  10. package/es/components/form-designer/index.js +4514 -0
  11. package/es/components/index.js +19 -0
  12. package/es/components/input-tags-display/index.js +226 -0
  13. package/es/components/over-tooltips/index.js +133 -0
  14. package/es/components/search-filter/index.js +449 -0
  15. package/es/components/select-all/index.js +172 -0
  16. package/es/components/shops-filter/index.js +453 -0
  17. package/es/components/staffs-selector/index.js +728 -0
  18. package/es/components/timeline/index.js +168 -0
  19. package/es/components/upload/index.js +909 -0
  20. package/es/components/videoView/index.js +100 -0
  21. package/lib/components/attachment/index.js +278 -0
  22. package/lib/components/breadcrumb/index.js +168 -0
  23. package/lib/components/button/index.js +58 -0
  24. package/lib/components/edit-form/index.js +1195 -0
  25. package/lib/components/editor/index.js +12559 -0
  26. package/lib/components/feedback/index.js +309 -0
  27. package/lib/components/float-table/index.js +3516 -0
  28. package/lib/components/flow-designer/index.js +1329 -0
  29. package/lib/components/form-create/index.js +20990 -0
  30. package/lib/components/form-designer/index.js +4525 -0
  31. package/lib/components/index.js +140 -0
  32. package/lib/components/input-tags-display/index.js +237 -0
  33. package/lib/components/over-tooltips/index.js +138 -0
  34. package/lib/components/search-filter/index.js +459 -0
  35. package/lib/components/select-all/index.js +181 -0
  36. package/lib/components/shops-filter/index.js +465 -0
  37. package/lib/components/staffs-selector/index.js +733 -0
  38. package/lib/components/timeline/index.js +174 -0
  39. package/lib/components/upload/index.js +914 -0
  40. package/lib/components/videoView/index.js +105 -0
  41. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ export * from './button';
2
+ export * from './form-create';
3
+ export * from './form-designer';
4
+ export * from './flow-designer';
5
+ export * from './feedback';
6
+ export * from './search-filter';
7
+ export * from './shops-filter';
8
+ export * from './staffs-selector/index';
9
+ export * from './float-table';
10
+ export * from './over-tooltips';
11
+ export * from './upload';
12
+ export * from './timeline';
13
+ export * from './input-tags-display';
14
+ export * from './select-all';
15
+ export * from './breadcrumb';
16
+ export * from './editor';
17
+ export * from './videoView';
18
+ export * from './attachment';
19
+ export * from './edit-form';
@@ -0,0 +1,226 @@
1
+ import { withInstall } from 'bm-admin-ui/es/utils/with-install';
2
+ import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, normalizeProps, guardReactiveProps, withCtx, createElementVNode, createTextVNode, toDisplayString, withModifiers, Fragment, renderList, createBlock, createCommentVNode, normalizeClass } from 'vue';
3
+ import ToolTip from 'ant-design-vue/lib/tooltip';
4
+ import Button from 'ant-design-vue/lib/button';
5
+ import Tag from 'ant-design-vue/lib/tag';
6
+ import { CloseCircleFilled } from '@ant-design/icons-vue';
7
+
8
+ var _export_sfc = (sfc, props) => {
9
+ const target = sfc.__vccOpts || sfc;
10
+ for (const [key, val] of props) {
11
+ target[key] = val;
12
+ }
13
+ return target;
14
+ };
15
+
16
+ const _sfc_main = defineComponent({
17
+ components: { ToolTip, CloseCircleFilled, Button, Tag },
18
+ props: {
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ list: {
24
+ type: Array,
25
+ default: () => []
26
+ },
27
+ showEmpty: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ placeholder: {
32
+ type: String,
33
+ default: "\u8BF7\u9009\u62E9"
34
+ },
35
+ showEmptyBtn: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ unitStr: {
40
+ type: String,
41
+ default: "\u9879"
42
+ },
43
+ btnText: {
44
+ type: String,
45
+ default: "\u6DFB\u52A0"
46
+ },
47
+ toolTipProps: {
48
+ type: Object,
49
+ default: () => {
50
+ return {};
51
+ }
52
+ },
53
+ placement: {
54
+ type: String,
55
+ default: "bottom"
56
+ },
57
+ fieldNames: {
58
+ type: Object,
59
+ default: () => ({ key: "key", title: "title" })
60
+ },
61
+ alwaysInvoke: {
62
+ type: Boolean,
63
+ default: true
64
+ }
65
+ },
66
+ emits: ["clear", "update:list", "addClick"],
67
+ setup(props, { emit }) {
68
+ const containId = `bm-tags-display${Date.now()}`;
69
+ function getPopupContainer() {
70
+ return document.querySelector(`#${containId}`);
71
+ }
72
+ function clear() {
73
+ if (props.disabled) {
74
+ return;
75
+ }
76
+ emit("update:list", []);
77
+ emit("clear");
78
+ if (!props.showEmptyBtn && !props.showEmpty) {
79
+ console.error(
80
+ "\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1"
81
+ );
82
+ }
83
+ }
84
+ function toAddTags() {
85
+ if (props.disabled) {
86
+ return;
87
+ }
88
+ if (!props.list.length || props.alwaysInvoke)
89
+ emit("addClick");
90
+ }
91
+ const tooltipConfig = ref({
92
+ align: void 0,
93
+ arrowPointAtCenter: false,
94
+ autoAdjustOverflow: true,
95
+ color: "#fff",
96
+ defaultVisible: false,
97
+ destroyTooltipOnHide: false,
98
+ getPopupContainer,
99
+ mouseEnterDelay: 0.1,
100
+ mouseLeaveDelay: 0.1,
101
+ overlayClassName: "__list-filter-popover",
102
+ overlayStyle: null,
103
+ placement: props.placement,
104
+ trigger: "hover"
105
+ });
106
+ watch(
107
+ () => props.toolTipProps,
108
+ (tooltipprop) => {
109
+ tooltipConfig.value = {
110
+ ...tooltipConfig.value,
111
+ ...tooltipprop
112
+ };
113
+ },
114
+ {
115
+ immediate: true,
116
+ deep: true
117
+ }
118
+ );
119
+ return {
120
+ containId,
121
+ clear,
122
+ toAddTags,
123
+ tooltipConfig
124
+ };
125
+ }
126
+ });
127
+ const _hoisted_1 = { class: "bm-tags-display" };
128
+ const _hoisted_2 = ["id"];
129
+ const _hoisted_3 = { class: "pop-seleted" };
130
+ const _hoisted_4 = { class: "pop-seleted-title" };
131
+ const _hoisted_5 = { key: 1 };
132
+ const _hoisted_6 = { key: 2 };
133
+ const _hoisted_7 = /* @__PURE__ */ createElementVNode("div", null, null, -1);
134
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
135
+ const _component_Tag = resolveComponent("Tag");
136
+ const _component_CloseCircleFilled = resolveComponent("CloseCircleFilled");
137
+ const _component_ToolTip = resolveComponent("ToolTip");
138
+ const _component_Button = resolveComponent("Button");
139
+ return openBlock(), createElementBlock("div", _hoisted_1, [
140
+ _ctx.list && _ctx.list.length ? (openBlock(), createElementBlock("div", {
141
+ key: 0,
142
+ id: _ctx.containId,
143
+ class: "bm-tags-display-wrapper"
144
+ }, [
145
+ createVNode(_component_ToolTip, normalizeProps(guardReactiveProps(_ctx.tooltipConfig)), {
146
+ title: withCtx(() => [
147
+ createElementVNode("div", _hoisted_3, [
148
+ createElementVNode("div", _hoisted_4, [
149
+ createTextVNode(" \u5DF2\u9009\u62E9"),
150
+ createElementVNode("span", null, toDisplayString(_ctx.list.length), 1),
151
+ createTextVNode("\u9879 ")
152
+ ])
153
+ ]),
154
+ createElementVNode("div", {
155
+ class: "pop-seleted-list",
156
+ onWheel: _cache[0] || (_cache[0] = withModifiers(() => {
157
+ }, ["stop"]))
158
+ }, [
159
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
160
+ return openBlock(), createBlock(_component_Tag, {
161
+ key: item[_ctx.fieldNames.key],
162
+ class: "pop-seleted-item"
163
+ }, {
164
+ default: withCtx(() => [
165
+ createTextVNode(toDisplayString(item[_ctx.fieldNames.title]), 1)
166
+ ]),
167
+ _: 2
168
+ }, 1024);
169
+ }), 128))
170
+ ], 32)
171
+ ]),
172
+ default: withCtx(() => [
173
+ createElementVNode("div", {
174
+ class: "select-input-wrapper",
175
+ onClick: _cache[4] || (_cache[4] = withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
176
+ }, [
177
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
178
+ return openBlock(), createBlock(_component_Tag, {
179
+ key: item[_ctx.fieldNames.key]
180
+ }, {
181
+ default: withCtx(() => [
182
+ createTextVNode(toDisplayString(item[_ctx.fieldNames.title]), 1)
183
+ ]),
184
+ _: 2
185
+ }, 1024);
186
+ }), 128)),
187
+ !_ctx.disabled ? (openBlock(), createElementBlock("div", {
188
+ key: 0,
189
+ class: "list-clear",
190
+ onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.clear && _ctx.clear(...args), ["stop"])),
191
+ onMouseenter: _cache[2] || (_cache[2] = withModifiers(() => {
192
+ }, ["stop"])),
193
+ onMouseover: _cache[3] || (_cache[3] = withModifiers(() => {
194
+ }, ["stop"]))
195
+ }, [
196
+ createVNode(_component_CloseCircleFilled)
197
+ ], 32)) : createCommentVNode("v-if", true)
198
+ ])
199
+ ]),
200
+ _: 1
201
+ }, 16)
202
+ ], 8, _hoisted_2)) : createCommentVNode("v-if", true),
203
+ _ctx.showEmptyBtn && !_ctx.list.length ? (openBlock(), createElementBlock("div", _hoisted_5, [
204
+ createVNode(_component_Button, {
205
+ onClick: withModifiers(_ctx.toAddTags, ["stop"])
206
+ }, {
207
+ default: withCtx(() => [
208
+ createTextVNode(toDisplayString(_ctx.btnText), 1)
209
+ ]),
210
+ _: 1
211
+ }, 8, ["onClick"])
212
+ ])) : createCommentVNode("v-if", true),
213
+ _ctx.showEmpty && !_ctx.list.length ? (openBlock(), createElementBlock("div", _hoisted_6, [
214
+ createElementVNode("div", {
215
+ class: normalizeClass(["selector-empty-input", { "empty-disabled": _ctx.disabled }]),
216
+ onClick: _cache[5] || (_cache[5] = withModifiers((...args) => _ctx.toAddTags && _ctx.toAddTags(...args), ["stop"]))
217
+ }, " \xA0\xA0" + toDisplayString(_ctx.placeholder), 3)
218
+ ])) : createCommentVNode("v-if", true),
219
+ _hoisted_7
220
+ ]);
221
+ }
222
+ var InputTagsDisplay = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "input-tags-display.vue"]]);
223
+
224
+ const BmTagsDisplay = withInstall(InputTagsDisplay);
225
+
226
+ export { BmTagsDisplay, BmTagsDisplay as default };
@@ -0,0 +1,133 @@
1
+ import { withInstall } from 'bm-admin-ui/es/utils/with-install';
2
+ import { reactive, onBeforeUnmount, ref, watch, nextTick, toRefs, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeStyle, normalizeClass, createTextVNode, toDisplayString } from 'vue';
3
+
4
+ var _export_sfc = (sfc, props) => {
5
+ const target = sfc.__vccOpts || sfc;
6
+ for (const [key, val] of props) {
7
+ target[key] = val;
8
+ }
9
+ return target;
10
+ };
11
+
12
+ const _sfc_main = {
13
+ name: "BmOverTooltips",
14
+ props: {
15
+ title: {
16
+ type: String,
17
+ default: void 0
18
+ },
19
+ labelTitle: {
20
+ type: String,
21
+ default: void 0
22
+ },
23
+ line: {
24
+ type: Number,
25
+ default: 1
26
+ },
27
+ width: {
28
+ type: [Number, String],
29
+ default: 0
30
+ },
31
+ showAlways: {
32
+ type: Boolean,
33
+ default: false
34
+ }
35
+ },
36
+ setup(props, context) {
37
+ const state = reactive({
38
+ mSlots: {},
39
+ isShow: false,
40
+ openShow: false
41
+ });
42
+ const observer = new IntersectionObserver(
43
+ (entries) => {
44
+ entries.forEach((item) => {
45
+ if (item.intersectionRatio > 0.3) {
46
+ observerDom();
47
+ observer.disconnect();
48
+ }
49
+ });
50
+ },
51
+ {
52
+ threshold: 0.3
53
+ }
54
+ );
55
+ function observerDom() {
56
+ if (props.line === 1) {
57
+ if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
58
+ state.openShow = true;
59
+ }
60
+ } else if (props.line > 1) {
61
+ if (mySelf.value.scrollHeight > mySelf.value.clientHeight) {
62
+ state.openShow = true;
63
+ }
64
+ }
65
+ }
66
+ onBeforeUnmount(function() {
67
+ observer.disconnect();
68
+ });
69
+ let mySelf = ref();
70
+ watch(
71
+ () => props.showAlways,
72
+ function(showAlways) {
73
+ if (showAlways)
74
+ state.openShow = showAlways;
75
+ mySelf.value && observer.unobserve(mySelf.value);
76
+ nextTick(function() {
77
+ mySelf.value && observer.observe(mySelf.value);
78
+ });
79
+ },
80
+ {
81
+ immediate: true
82
+ }
83
+ );
84
+ const handleVisibleChange = (val) => {
85
+ state.isShow = !state.openShow ? false : val;
86
+ };
87
+ const getPopupContainer = () => {
88
+ return document.body;
89
+ };
90
+ return {
91
+ ...toRefs(state),
92
+ mySelf,
93
+ handleVisibleChange,
94
+ getPopupContainer
95
+ };
96
+ }
97
+ };
98
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
99
+ const _component_a_tooltip = resolveComponent("a-tooltip");
100
+ return openBlock(), createBlock(_component_a_tooltip, {
101
+ visible: _ctx.isShow,
102
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => _ctx.isShow = $event),
103
+ title: $props.labelTitle || $props.title,
104
+ "get-popup-container": $setup.getPopupContainer,
105
+ onVisibleChange: $setup.handleVisibleChange
106
+ }, {
107
+ title: withCtx(() => [
108
+ renderSlot(_ctx.$slots, "title")
109
+ ]),
110
+ default: withCtx(() => [
111
+ createElementVNode("div", {
112
+ ref: "mySelf",
113
+ style: normalizeStyle({
114
+ width: $props.width ? $props.width + "px" : "100%",
115
+ WebkitLineClamp: $props.line
116
+ }),
117
+ class: normalizeClass($props.line === 1 ? `bm-over-tooltip` : `bm-over-tooltip-multi`)
118
+ }, [
119
+ renderSlot(_ctx.$slots, "default", {}, () => [
120
+ renderSlot(_ctx.$slots, "title", {}, () => [
121
+ createTextVNode(toDisplayString($props.title), 1)
122
+ ])
123
+ ])
124
+ ], 6)
125
+ ]),
126
+ _: 3
127
+ }, 8, ["visible", "title", "get-popup-container", "onVisibleChange"]);
128
+ }
129
+ var OverTooltips = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "over-tooltips.vue"]]);
130
+
131
+ const BmOverTooltips = withInstall(OverTooltips);
132
+
133
+ export { BmOverTooltips, BmOverTooltips as default };