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