bm-admin-ui 1.0.81-alpha → 1.0.82-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/package.json +1 -1
  2. package/es/components/attachment/index.js +0 -273
  3. package/es/components/breadcrumb/index.js +0 -158
  4. package/es/components/button/index.js +0 -49
  5. package/es/components/edit-form/index.js +0 -1186
  6. package/es/components/editor/index.js +0 -12554
  7. package/es/components/feedback/index.js +0 -295
  8. package/es/components/float-table/index.js +0 -3511
  9. package/es/components/flow-designer/index.js +0 -1317
  10. package/es/components/form-create/index.js +0 -20978
  11. package/es/components/form-designer/index.js +0 -4514
  12. package/es/components/index.js +0 -19
  13. package/es/components/input-tags-display/index.js +0 -226
  14. package/es/components/over-tooltips/index.js +0 -133
  15. package/es/components/search-filter/index.js +0 -441
  16. package/es/components/select-all/index.js +0 -165
  17. package/es/components/shops-filter/index.js +0 -453
  18. package/es/components/staffs-selector/index.js +0 -728
  19. package/es/components/timeline/index.js +0 -168
  20. package/es/components/upload/index.js +0 -909
  21. package/es/components/videoView/index.js +0 -100
  22. package/lib/components/attachment/index.js +0 -278
  23. package/lib/components/breadcrumb/index.js +0 -168
  24. package/lib/components/button/index.js +0 -58
  25. package/lib/components/edit-form/index.js +0 -1195
  26. package/lib/components/editor/index.js +0 -12559
  27. package/lib/components/feedback/index.js +0 -309
  28. package/lib/components/float-table/index.js +0 -3516
  29. package/lib/components/flow-designer/index.js +0 -1329
  30. package/lib/components/form-create/index.js +0 -20990
  31. package/lib/components/form-designer/index.js +0 -4525
  32. package/lib/components/index.js +0 -140
  33. package/lib/components/input-tags-display/index.js +0 -237
  34. package/lib/components/over-tooltips/index.js +0 -138
  35. package/lib/components/search-filter/index.js +0 -451
  36. package/lib/components/select-all/index.js +0 -174
  37. package/lib/components/shops-filter/index.js +0 -465
  38. package/lib/components/staffs-selector/index.js +0 -733
  39. package/lib/components/timeline/index.js +0 -174
  40. package/lib/components/upload/index.js +0 -914
  41. package/lib/components/videoView/index.js +0 -105
@@ -1,465 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
- var vue = require('vue');
7
- var iconsVue = require('@ant-design/icons-vue');
8
- var input = require('ant-design-vue/lib/input');
9
- var Checkbox = require('ant-design-vue/lib/checkbox');
10
- var Button = require('ant-design-vue/lib/button');
11
- var Popover = require('ant-design-vue/lib/popover');
12
- var Empty = require('ant-design-vue/lib/empty');
13
-
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
17
- var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
18
- var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
19
- var Empty__default = /*#__PURE__*/_interopDefaultLegacy(Empty);
20
-
21
- var _export_sfc = (sfc, props) => {
22
- const target = sfc.__vccOpts || sfc;
23
- for (const [key, val] of props) {
24
- target[key] = val;
25
- }
26
- return target;
27
- };
28
-
29
- const _sfc_main = vue.defineComponent({
30
- name: "BmShopsFilter",
31
- components: {
32
- DownOutlined: iconsVue.DownOutlined,
33
- DeleteOutlined: iconsVue.DeleteOutlined,
34
- CloseCircleFilled: iconsVue.CloseCircleFilled,
35
- InputSearch: input.InputSearch,
36
- Checkbox: Checkbox__default["default"],
37
- Button: Button__default["default"],
38
- Popover: Popover__default["default"],
39
- Empty: Empty__default["default"]
40
- },
41
- props: {
42
- labelTitle: {
43
- type: String,
44
- default: "\u5E97\u94FA"
45
- },
46
- showAlways: {
47
- type: Boolean,
48
- default: false
49
- },
50
- displayParams: {
51
- type: Object,
52
- default: () => {
53
- return {
54
- width: "436px",
55
- labelOffset: "0px",
56
- labelWidth: "98px",
57
- searchWidth: "240px",
58
- listMaxHeight: "366px"
59
- };
60
- }
61
- },
62
- loadFilter: {
63
- type: Function,
64
- default: () => {
65
- return Promise.resolve([]);
66
- }
67
- },
68
- loadData: {
69
- type: Function,
70
- default: () => {
71
- return Promise.reject("\u672A\u58F0\u660E\u5E97\u94FA\u6570\u636E\u8BF7\u6C42\u51FD\u6570");
72
- }
73
- }
74
- },
75
- emits: ["update:selected", "change"],
76
- setup(props, { emit }) {
77
- const state = vue.reactive({
78
- isActive: false,
79
- searchVal: "",
80
- selected: [],
81
- shopList: [],
82
- shopListByCode: {},
83
- checkAll: false,
84
- hasCheck: false,
85
- inverSelect: false,
86
- shopCheck: {},
87
- filterSelects: [],
88
- filterArr: []
89
- });
90
- const methods = {
91
- triggleActive() {
92
- if (!props.showAlways)
93
- state.isActive = !state.isActive;
94
- if (state.shopList && !state.shopList.length)
95
- methods.fetchData();
96
- },
97
- outSideClick() {
98
- state.isActive = false;
99
- },
100
- changeFilterSelect(index, code) {
101
- let filter = state.filterArr[index];
102
- if (filter.multiple) {
103
- if (!code) {
104
- state.filterSelects[index] = [];
105
- } else {
106
- let list = state.filterSelects[index];
107
- list.indexOf(code) > -1 ? list.splice(list.indexOf(code), 1) : list.push(code);
108
- }
109
- } else {
110
- state.filterSelects[index] = code;
111
- }
112
- methods.fetchData();
113
- },
114
- onCheckAllChange(e) {
115
- state.inverSelect = false;
116
- let checked = e.target.checked;
117
- state.shopList.forEach((item) => {
118
- state.shopCheck[item.shopCode] = checked;
119
- });
120
- },
121
- checkboxChange() {
122
- let hasCheck = false;
123
- let checkAll = true;
124
- state.shopList.some((item) => {
125
- if (state.shopCheck[item.shopCode]) {
126
- hasCheck = true;
127
- return true;
128
- }
129
- });
130
- state.shopList.every((item) => {
131
- if (!state.shopCheck[item.shopCode]) {
132
- checkAll = false;
133
- return false;
134
- }
135
- return true;
136
- });
137
- state.checkAll = checkAll;
138
- state.hasCheck = state.checkAll ? false : hasCheck;
139
- },
140
- invertChange() {
141
- state.checkAll = false;
142
- state.shopList.forEach((item) => {
143
- state.shopCheck[item.shopCode] = !state.shopCheck[item.shopCode];
144
- });
145
- },
146
- clearAll() {
147
- state.inverSelect = false;
148
- state.checkAll = false;
149
- state.hasCheck = false;
150
- state.shopList.forEach((item) => {
151
- state.shopCheck[item.shopCode] = false;
152
- });
153
- },
154
- fetchData() {
155
- let params = {};
156
- let filters = state.filterArr;
157
- filters.forEach((item, index) => {
158
- params[String(item.paramsStr)] = state.filterSelects[index] || "";
159
- });
160
- params["search"] = state.searchVal;
161
- props.loadData(params).then((data) => {
162
- state.shopList = data;
163
- data.forEach((item) => {
164
- return state.shopListByCode[item.shopCode] = item.shopName;
165
- });
166
- methods.checkboxChange();
167
- });
168
- },
169
- clearAllSelected(e) {
170
- e && e.stopPropagation();
171
- state.searchVal = "";
172
- state.shopCheck = {};
173
- state.inverSelect = false;
174
- state.checkAll = false;
175
- },
176
- filterIsActive(filterIndex, code) {
177
- let select = state.filterSelects[filterIndex];
178
- let filter = state.filterArr[filterIndex];
179
- let isMultiple = filter && filter.multiple;
180
- if (!isMultiple) {
181
- return select === code;
182
- } else {
183
- return select.indexOf(code) > -1;
184
- }
185
- }
186
- };
187
- props.loadFilter().then((data) => {
188
- state.filterArr = data;
189
- state.filterSelects = state.filterArr.map(
190
- (item) => {
191
- return item.multiple ? [] : "";
192
- }
193
- );
194
- }).finally(() => {
195
- methods.fetchData();
196
- });
197
- vue.watch(
198
- () => state.shopCheck,
199
- () => {
200
- let list = [];
201
- for (let [key, value] of Object.entries(state.shopCheck)) {
202
- value && list.push(key);
203
- }
204
- state.selected = list;
205
- emit("update:selected", list);
206
- emit("change", list);
207
- methods.checkboxChange();
208
- },
209
- { deep: true }
210
- );
211
- if (props.showAlways) {
212
- state.isActive = true;
213
- }
214
- vue.onMounted(() => {
215
- if (!props.showAlways)
216
- document.addEventListener("click", methods.outSideClick);
217
- });
218
- vue.onUnmounted(() => {
219
- if (!props.showAlways)
220
- document.removeEventListener("click", methods.outSideClick);
221
- });
222
- return {
223
- ...vue.toRefs(state),
224
- ...methods
225
- };
226
- }
227
- });
228
- const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u8BF7\u9009\u62E9", -1);
229
- const _hoisted_2 = { class: "input-icon active-icon" };
230
- const _hoisted_3 = { class: "pop-seleted-title" };
231
- const _hoisted_4 = { class: "__shops-filter-list" };
232
- const _hoisted_5 = {
233
- key: 0,
234
- class: "__shops-filter-tabs"
235
- };
236
- const _hoisted_6 = { class: "label" };
237
- const _hoisted_7 = { class: "__shops-filter-areas" };
238
- const _hoisted_8 = ["onClick"];
239
- const _hoisted_9 = ["onClick"];
240
- const _hoisted_10 = { class: "__shops-filter-selecting" };
241
- const _hoisted_11 = { class: "__checkbox-operate-box" };
242
- const _hoisted_12 = {
243
- key: 0,
244
- class: "__shops-filter-selecting"
245
- };
246
- const _hoisted_13 = /* @__PURE__ */ vue.createElementVNode("span", { style: { "color": "#9393a3" } }, "\u6682\u65E0\u6570\u636E", -1);
247
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
248
- const _component_down_outlined = vue.resolveComponent("down-outlined");
249
- const _component_close_circle_filled = vue.resolveComponent("close-circle-filled");
250
- const _component_Popover = vue.resolveComponent("Popover");
251
- const _component_input_search = vue.resolveComponent("input-search");
252
- const _component_Checkbox = vue.resolveComponent("Checkbox");
253
- const _component_delete_outlined = vue.resolveComponent("delete-outlined");
254
- const _component_Button = vue.resolveComponent("Button");
255
- const _component_Empty = vue.resolveComponent("Empty");
256
- return vue.openBlock(), vue.createElementBlock("div", {
257
- class: "__shops-filter-component",
258
- onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
259
- }, ["stop"]))
260
- }, [
261
- vue.createElementVNode("span", {
262
- class: "__shops-filter-label",
263
- style: vue.normalizeStyle({
264
- width: _ctx.displayParams?.labelWidth || "",
265
- marginRight: _ctx.displayParams?.labelOffset || "0"
266
- })
267
- }, vue.toDisplayString(_ctx.labelTitle) + ":", 5),
268
- vue.createElementVNode("div", {
269
- class: vue.normalizeClass(["__shops-filter-input-box", { "active-box": !_ctx.showAlways && _ctx.isActive }]),
270
- style: vue.normalizeStyle({ width: _ctx.displayParams?.width || "436px" }),
271
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.triggleActive && _ctx.triggleActive(...args))
272
- }, [
273
- vue.withDirectives(vue.createElementVNode("div", null, [
274
- _hoisted_1,
275
- vue.createElementVNode("span", _hoisted_2, [
276
- vue.createVNode(_component_down_outlined)
277
- ])
278
- ], 512), [
279
- [vue.vShow, _ctx.selected && !_ctx.selected.length]
280
- ]),
281
- vue.withDirectives(vue.createElementVNode("div", null, [
282
- vue.createVNode(_component_Popover, {
283
- title: "",
284
- "overlay-class-name": "__shops-filter-popover"
285
- }, {
286
- content: vue.withCtx(() => [
287
- vue.createElementVNode("div", {
288
- class: "pop-seleted",
289
- style: vue.normalizeStyle({ "min-width": _ctx.displayParams?.width || "436px" })
290
- }, [
291
- vue.createElementVNode("div", _hoisted_3, [
292
- vue.createTextVNode(" \u5DF2\u9009\u62E9"),
293
- vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
294
- vue.createTextVNode("\u9879 ")
295
- ]),
296
- vue.createElementVNode("div", {
297
- class: "pop-seleted-shops",
298
- onWheel: _cache[0] || (_cache[0] = vue.withModifiers(() => {
299
- }, ["stop"]))
300
- }, [
301
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
302
- return vue.openBlock(), vue.createElementBlock("div", {
303
- key: item,
304
- class: "pop-seleted-item"
305
- }, vue.toDisplayString(_ctx.shopListByCode[item]), 1);
306
- }), 128))
307
- ], 32)
308
- ], 4)
309
- ]),
310
- default: vue.withCtx(() => [
311
- vue.createElementVNode("div", _hoisted_4, [
312
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
313
- return vue.openBlock(), vue.createElementBlock("div", {
314
- key: item,
315
- class: "selected-tag"
316
- }, vue.toDisplayString(_ctx.shopListByCode[item]), 1);
317
- }), 128)),
318
- vue.createElementVNode("div", {
319
- class: "delete-icon",
320
- onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.clearAllSelected && _ctx.clearAllSelected(...args), ["stop"])),
321
- onMouseover: _cache[2] || (_cache[2] = vue.withModifiers(() => {
322
- }, ["stop"]))
323
- }, [
324
- vue.createVNode(_component_close_circle_filled, { style: { "color": "#9393a3" } })
325
- ], 32)
326
- ])
327
- ]),
328
- _: 1
329
- })
330
- ], 512), [
331
- [vue.vShow, _ctx.selected && _ctx.selected.length]
332
- ])
333
- ], 6),
334
- vue.withDirectives(vue.createElementVNode("div", {
335
- class: "__shops-filter-search-input",
336
- style: vue.normalizeStyle({ width: _ctx.displayParams?.searchWidth || "240px" })
337
- }, [
338
- vue.createVNode(_component_input_search, {
339
- modelValue: _ctx.searchVal,
340
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.searchVal = $event),
341
- placeholder: "\u641C\u7D22\u5E97\u94FA\u540D\u79F0",
342
- "allow-clear": true,
343
- onSearch: _ctx.fetchData
344
- }, null, 8, ["modelValue", "onSearch"])
345
- ], 4), [
346
- [vue.vShow, _ctx.isActive]
347
- ]),
348
- vue.withDirectives(vue.createElementVNode("div", {
349
- class: vue.normalizeClass(["__shops-filter-content", { "__shops-filter-no-absolute": _ctx.showAlways }])
350
- }, [
351
- _ctx.filterArr && _ctx.filterArr.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
352
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filterArr, (item, index) => {
353
- return vue.openBlock(), vue.createElementBlock("div", {
354
- key: item.paramsStr,
355
- class: "__shops-filter-area-tabs"
356
- }, [
357
- vue.createElementVNode("div", _hoisted_6, vue.toDisplayString(item.label) + ":", 1),
358
- vue.createElementVNode("div", _hoisted_7, [
359
- vue.createElementVNode("span", {
360
- class: vue.normalizeClass({
361
- active: !(item.multiple ? _ctx.filterSelects[index].length : !!_ctx.filterSelects[index])
362
- }),
363
- onClick: vue.withModifiers(($event) => _ctx.changeFilterSelect(index, ""), ["self"])
364
- }, "\u5168\u90E8", 10, _hoisted_8),
365
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.list, (element) => {
366
- return vue.openBlock(), vue.createElementBlock("span", {
367
- key: element.code,
368
- class: vue.normalizeClass({ active: _ctx.filterIsActive(index, element.code) }),
369
- onClick: vue.withModifiers(($event) => _ctx.changeFilterSelect(index, element.code), ["self"])
370
- }, vue.toDisplayString(element.label), 11, _hoisted_9);
371
- }), 128))
372
- ])
373
- ]);
374
- }), 128)),
375
- vue.createElementVNode("div", _hoisted_10, [
376
- vue.createTextVNode(" \u5DF2\u9009\u62E9"),
377
- vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
378
- vue.createTextVNode("\u9879 ")
379
- ])
380
- ])) : vue.createCommentVNode("v-if", true),
381
- _ctx.shopList && _ctx.shopList.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
382
- vue.createElementVNode("div", _hoisted_11, [
383
- vue.createVNode(_component_Checkbox, {
384
- checked: _ctx.checkAll,
385
- "onUpdate:checked": _cache[5] || (_cache[5] = ($event) => _ctx.checkAll = $event),
386
- indeterminate: _ctx.hasCheck,
387
- onChange: _ctx.onCheckAllChange
388
- }, {
389
- default: vue.withCtx(() => [
390
- vue.createTextVNode("\u5168\u9009")
391
- ]),
392
- _: 1
393
- }, 8, ["checked", "indeterminate", "onChange"]),
394
- vue.createVNode(_component_Checkbox, {
395
- checked: _ctx.inverSelect,
396
- "onUpdate:checked": _cache[6] || (_cache[6] = ($event) => _ctx.inverSelect = $event),
397
- onChange: _ctx.invertChange
398
- }, {
399
- default: vue.withCtx(() => [
400
- vue.createTextVNode("\u53CD\u9009")
401
- ]),
402
- _: 1
403
- }, 8, ["checked", "onChange"]),
404
- vue.createVNode(_component_Button, {
405
- type: "text",
406
- onClick: _ctx.clearAll
407
- }, {
408
- icon: vue.withCtx(() => [
409
- vue.createVNode(_component_delete_outlined)
410
- ]),
411
- default: vue.withCtx(() => [
412
- vue.createTextVNode("\u6E05\u7A7A")
413
- ]),
414
- _: 1
415
- }, 8, ["onClick"]),
416
- _ctx.filterArr && !_ctx.filterArr.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
417
- vue.createTextVNode(" \u5DF2\u9009\u62E9"),
418
- vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
419
- vue.createTextVNode("\u9879 ")
420
- ])) : vue.createCommentVNode("v-if", true)
421
- ]),
422
- vue.createElementVNode("div", {
423
- class: "__shops-checkbox-box",
424
- style: vue.normalizeStyle({ maxHeight: _ctx.displayParams.listMaxHeight || "366px" })
425
- }, [
426
- vue.createElementVNode("div", {
427
- class: "__shops-checkbox-grid",
428
- onWheel: _cache[7] || (_cache[7] = vue.withModifiers(() => {
429
- }, ["stop"]))
430
- }, [
431
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.shopList, (item) => {
432
- return vue.openBlock(), vue.createElementBlock("div", {
433
- key: item.shopCode
434
- }, [
435
- vue.createVNode(_component_Checkbox, {
436
- checked: _ctx.shopCheck[item.shopCode],
437
- "onUpdate:checked": ($event) => _ctx.shopCheck[item.shopCode] = $event
438
- }, {
439
- default: vue.withCtx(() => [
440
- vue.createTextVNode(vue.toDisplayString(item.shopName), 1)
441
- ]),
442
- _: 2
443
- }, 1032, ["checked", "onUpdate:checked"])
444
- ]);
445
- }), 128))
446
- ], 32)
447
- ], 4)
448
- ], 64)) : vue.createCommentVNode("v-if", true),
449
- _ctx.shopList && !_ctx.shopList.length ? (vue.openBlock(), vue.createBlock(_component_Empty, { key: 2 }, {
450
- description: vue.withCtx(() => [
451
- _hoisted_13
452
- ]),
453
- _: 1
454
- })) : vue.createCommentVNode("v-if", true)
455
- ], 2), [
456
- [vue.vShow, _ctx.isActive]
457
- ])
458
- ]);
459
- }
460
- var shopsFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "shops-filter.vue"]]);
461
-
462
- const BmShopsFilter = withInstall.withInstall(shopsFilter);
463
-
464
- exports.BmShopsFilter = BmShopsFilter;
465
- exports["default"] = BmShopsFilter;