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,309 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var antDesignVue = require('ant-design-vue');
6
- var iconsVue = require('@ant-design/icons-vue');
7
- var withInstall = require('bm-admin-ui/lib/utils/with-install');
8
- var vue = require('vue');
9
- var AAlert = require('ant-design-vue/lib/alert');
10
- var AModal$1 = require('ant-design-vue/lib/modal');
11
- var message = require('ant-design-vue/lib/message');
12
-
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- var AAlert__default = /*#__PURE__*/_interopDefaultLegacy(AAlert);
16
- var AModal__default = /*#__PURE__*/_interopDefaultLegacy(AModal$1);
17
- var message__default = /*#__PURE__*/_interopDefaultLegacy(message);
18
-
19
- /******************************************************************************
20
- Copyright (c) Microsoft Corporation.
21
-
22
- Permission to use, copy, modify, and/or distribute this software for any
23
- purpose with or without fee is hereby granted.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
26
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
27
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
28
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
29
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
- PERFORMANCE OF THIS SOFTWARE.
32
- ***************************************************************************** */
33
-
34
- function __awaiter(thisArg, _arguments, P, generator) {
35
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
36
- return new (P || (P = Promise))(function (resolve, reject) {
37
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
38
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
39
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
40
- step((generator = generator.apply(thisArg, _arguments || [])).next());
41
- });
42
- }
43
-
44
- var _export_sfc = (sfc, props) => {
45
- const target = sfc.__vccOpts || sfc;
46
- for (const [key, val] of props) {
47
- target[key] = val;
48
- }
49
- return target;
50
- };
51
-
52
- const __default__$1 = {
53
- name: "BmAlert"
54
- };
55
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
56
- ...__default__$1,
57
- props: {
58
- type: {
59
- type: String,
60
- default: "info"
61
- },
62
- message: {
63
- type: String,
64
- default: ""
65
- },
66
- description: {
67
- type: String,
68
- default: ""
69
- }
70
- },
71
- setup(__props) {
72
- const props = __props;
73
- const getIconCmp = vue.computed(() => {
74
- if (props.message !== "" && props.description !== "") {
75
- return {
76
- success: iconsVue.CheckCircleFilled,
77
- warning: iconsVue.ExclamationCircleFilled,
78
- error: iconsVue.CloseCircleFilled,
79
- info: iconsVue.InfoCircleFilled
80
- }[props.type || "info"];
81
- } else {
82
- return {
83
- success: iconsVue.CheckCircleOutlined,
84
- warning: iconsVue.ExclamationCircleOutlined,
85
- error: iconsVue.CloseCircleOutlined,
86
- info: iconsVue.InfoCircleOutlined
87
- }[props.type || "info"];
88
- }
89
- });
90
- return (_ctx, _cache) => {
91
- return vue.openBlock(), vue.createBlock(vue.unref(AAlert__default["default"]), {
92
- message: props.message,
93
- description: props.description,
94
- type: props.type,
95
- "show-icon": ""
96
- }, {
97
- icon: vue.withCtx(() => [
98
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(getIconCmp))))
99
- ]),
100
- default: vue.withCtx(() => [
101
- vue.renderSlot(_ctx.$slots, "default")
102
- ]),
103
- _: 3
104
- }, 8, ["message", "description", "type"]);
105
- };
106
- }
107
- });
108
- var Alert = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "bmAlert.vue"]]);
109
-
110
- const _hoisted_1 = {
111
- ref: "modalBody",
112
- class: "bm-modal-body"
113
- };
114
- const __default__ = {
115
- name: "BmModal"
116
- };
117
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
118
- ...__default__,
119
- props: {
120
- width: {
121
- type: String,
122
- default: ""
123
- },
124
- visible: {
125
- type: Boolean,
126
- default: false,
127
- require: true
128
- },
129
- size: {
130
- type: String,
131
- default: "small"
132
- }
133
- },
134
- emits: ["close", "ok"],
135
- setup(__props, { emit }) {
136
- const props = __props;
137
- const slots = vue.useSlots();
138
- const caculWidth = vue.computed(() => {
139
- if (props.width && props.width !== "")
140
- return props.width;
141
- if (props.size === "middle")
142
- return "640px";
143
- if (props.size === "large")
144
- return "900px";
145
- return "480px";
146
- });
147
- function onOkCallback(e) {
148
- emit("ok", e);
149
- emit("close", false);
150
- }
151
- return (_ctx, _cache) => {
152
- const _component_a_button = vue.resolveComponent("a-button");
153
- return vue.openBlock(), vue.createBlock(vue.unref(AModal__default["default"]), {
154
- "wrap-class-name": "bm-modal-dialog",
155
- width: vue.unref(caculWidth),
156
- visible: props.visible,
157
- onChange: _cache[1] || (_cache[1] = (v) => _ctx.$emit("close", v))
158
- }, vue.createSlots({
159
- default: vue.withCtx(() => [
160
- vue.createElementVNode("div", _hoisted_1, [
161
- vue.renderSlot(_ctx.$slots, "default")
162
- ], 512)
163
- ]),
164
- _: 2
165
- }, [
166
- vue.unref(slots) && vue.unref(slots).title ? {
167
- name: "title",
168
- fn: vue.withCtx(() => [
169
- vue.renderSlot(_ctx.$slots, "title")
170
- ]),
171
- key: "0"
172
- } : void 0,
173
- vue.unref(slots) && vue.unref(slots).footer ? {
174
- name: "footer",
175
- fn: vue.withCtx(() => [
176
- vue.renderSlot(_ctx.$slots, "footer")
177
- ]),
178
- key: "1"
179
- } : {
180
- name: "footer",
181
- fn: vue.withCtx(() => [
182
- vue.createVNode(_component_a_button, {
183
- type: "second",
184
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
185
- }, {
186
- default: vue.withCtx(() => [
187
- vue.createTextVNode("\u53D6\u6D88")
188
- ]),
189
- _: 1
190
- }),
191
- vue.createVNode(_component_a_button, {
192
- type: "primary",
193
- onClick: onOkCallback
194
- }, {
195
- default: vue.withCtx(() => [
196
- vue.createTextVNode("\u786E\u5B9A")
197
- ]),
198
- _: 1
199
- })
200
- ]),
201
- key: "2"
202
- }
203
- ]), 1032, ["width", "visible"]);
204
- };
205
- }
206
- });
207
- var AModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bmModal.vue"]]);
208
-
209
- const idGenerator = (function () {
210
- let id = 0;
211
- return function () {
212
- return (Math.random().toString(36) + Number(`${Date.now()}${++id}`).toString(36)).slice(2);
213
- };
214
- })();
215
- var feedbackType;
216
- (function (feedbackType) {
217
- feedbackType["SUCCESS"] = "success";
218
- feedbackType["ERROR"] = "error";
219
- feedbackType["INFO"] = "info";
220
- feedbackType["WARNING"] = "warning";
221
- feedbackType["CONFIRM"] = "confirm";
222
- feedbackType["WARN"] = "warn";
223
- })(feedbackType || (feedbackType = {}));
224
- var feedbackColor;
225
- (function (feedbackColor) {
226
- feedbackColor["SUCCESS"] = "#29CC7A";
227
- feedbackColor["ERROR"] = "#E64C2E";
228
- feedbackColor["INFO"] = "#2F4EED";
229
- feedbackColor["WARNING"] = "#FF9019";
230
- feedbackColor["CONFIRM"] = "#2F4EED";
231
- feedbackColor["WARN"] = "#FF9019";
232
- })(feedbackColor || (feedbackColor = {}));
233
- const feedbackIcon = {
234
- success: () => vue.h(iconsVue.CheckCircleFilled, { style: `color: ${feedbackColor.SUCCESS}` }),
235
- error: () => vue.h(iconsVue.CloseCircleFilled, { style: `color: ${feedbackColor.ERROR}` }),
236
- warning: () => vue.h(iconsVue.ExclamationCircleFilled, { style: `color: ${feedbackColor.WARNING}` }),
237
- info: () => vue.h(iconsVue.InfoCircleFilled, { style: `color: ${feedbackColor.INFO}` }),
238
- confirm: () => vue.h(iconsVue.InfoCircleFilled, { style: `color: ${feedbackColor.INFO}` }),
239
- warn: () => vue.h(iconsVue.ExclamationCircleFilled, { style: `color: ${feedbackColor.WARNING}` }),
240
- };
241
- function __createBtn(btnText = '确定', onClick = (() => '点击'), style = '', type = 'primary', size = 'small') {
242
- return vue.h(antDesignVue.Button, {
243
- type,
244
- size,
245
- onClick,
246
- style,
247
- }, { default: () => btnText });
248
- }
249
- const BmNotification = (config) => {
250
- const type = config['type'] || feedbackType.INFO;
251
- let btn = undefined;
252
- const key = config['key'] || `${type}${Date.now()}`;
253
- if (config['onConfirm']) {
254
- btn = __createBtn('确定', (e) => __awaiter(void 0, void 0, void 0, function* () {
255
- e.stopPropagation();
256
- e.preventDefault();
257
- yield config['onConfirm']();
258
- antDesignVue.notification.close(key);
259
- }), 'margin-left: 8px');
260
- }
261
- if (config['onCancel']) {
262
- const cancel = __createBtn('取消', (e) => __awaiter(void 0, void 0, void 0, function* () {
263
- e.stopPropagation();
264
- e.preventDefault();
265
- yield antDesignVue.notification.close(key);
266
- config['onCancel']();
267
- }), '', 'second');
268
- btn = (btn ? vue.h('div', {}, [cancel, btn]) : cancel);
269
- }
270
- if (btn)
271
- config['btn'] = btn;
272
- if ([feedbackType.WARNING, feedbackType.WARN].indexOf(type) !== -1) {
273
- antDesignVue.notification.warning(Object.assign({ key, icon: feedbackIcon['warning'] }, config));
274
- return;
275
- }
276
- antDesignVue.notification[type](Object.assign({ key }, config));
277
- };
278
- const StaticBmModal = (config) => {
279
- const type = config['type'] || feedbackType.INFO;
280
- return antDesignVue.Modal[type](Object.assign({ cancelButtonProps: { type: 'second' }, okType: 'primary', cancelText: '取消', okText: '确认', autoFocusButton: null, icon: feedbackIcon[type] }, config));
281
- };
282
- const BmMessage = (config) => {
283
- const type = config.type;
284
- if (!type || !message__default["default"][type]) {
285
- throw new Error('请输入正确的message类型type值');
286
- }
287
- const key = config.key || idGenerator();
288
- const content = config.closable
289
- ? vue.h('div', { class: 'bm-message-content-fade-div' }, [
290
- config.content,
291
- vue.h(iconsVue.CloseOutlined, {
292
- onClick(e) {
293
- e.stopPropagation();
294
- message__default["default"].destroy(key);
295
- },
296
- }),
297
- ])
298
- : config.content;
299
- message__default["default"][type](Object.assign(Object.assign({ class: `bm-message-${type}` }, config), { key,
300
- content }));
301
- };
302
- const BmModal = withInstall.withInstall(AModal);
303
- const BmAlert = withInstall.withInstall(Alert);
304
-
305
- exports.BmAlert = BmAlert;
306
- exports.BmMessage = BmMessage;
307
- exports.BmModal = BmModal;
308
- exports.BmNotification = BmNotification;
309
- exports.StaticBmModal = StaticBmModal;