bm-admin-ui 1.0.82-alpha → 1.0.83-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.
- package/es/components/attachment/index.js +273 -0
- package/es/components/breadcrumb/index.js +158 -0
- package/es/components/button/index.js +49 -0
- package/es/components/edit-form/index.js +1186 -0
- package/es/components/editor/index.js +12554 -0
- package/es/components/feedback/index.js +295 -0
- package/es/components/float-table/index.js +3511 -0
- package/es/components/flow-designer/index.js +1317 -0
- package/es/components/form-create/index.js +20978 -0
- package/es/components/form-designer/index.js +4514 -0
- package/es/components/index.js +19 -0
- package/es/components/input-tags-display/index.js +226 -0
- package/es/components/over-tooltips/index.js +133 -0
- package/es/components/search-filter/index.js +441 -0
- package/es/components/select-all/index.js +165 -0
- package/es/components/shops-filter/index.js +453 -0
- package/es/components/staffs-selector/index.js +728 -0
- package/es/components/timeline/index.js +168 -0
- package/es/components/upload/index.js +909 -0
- package/es/components/videoView/index.js +100 -0
- package/lib/components/attachment/index.js +278 -0
- package/lib/components/breadcrumb/index.js +168 -0
- package/lib/components/button/index.js +58 -0
- package/lib/components/edit-form/index.js +1195 -0
- package/lib/components/editor/index.js +12559 -0
- package/lib/components/feedback/index.js +309 -0
- package/lib/components/float-table/index.js +3516 -0
- package/lib/components/flow-designer/index.js +1329 -0
- package/lib/components/form-create/index.js +20990 -0
- package/lib/components/form-designer/index.js +4525 -0
- package/lib/components/index.js +140 -0
- package/lib/components/input-tags-display/index.js +237 -0
- package/lib/components/over-tooltips/index.js +138 -0
- package/lib/components/search-filter/index.js +451 -0
- package/lib/components/select-all/index.js +174 -0
- package/lib/components/shops-filter/index.js +465 -0
- package/lib/components/staffs-selector/index.js +733 -0
- package/lib/components/timeline/index.js +174 -0
- package/lib/components/upload/index.js +914 -0
- package/lib/components/videoView/index.js +105 -0
- package/package.json +1 -1
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
|
|
8
|
+
/*!
|
|
9
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
12
|
+
* Released under the MIT License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
function isObject(o) {
|
|
16
|
+
return Object.prototype.toString.call(o) === '[object Object]';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function isPlainObject(o) {
|
|
20
|
+
var ctor,prot;
|
|
21
|
+
|
|
22
|
+
if (isObject(o) === false) return false;
|
|
23
|
+
|
|
24
|
+
// If has modified constructor
|
|
25
|
+
ctor = o.constructor;
|
|
26
|
+
if (ctor === undefined) return true;
|
|
27
|
+
|
|
28
|
+
// If has modified prototype
|
|
29
|
+
prot = ctor.prototype;
|
|
30
|
+
if (isObject(prot) === false) return false;
|
|
31
|
+
|
|
32
|
+
// If constructor does not have an Object-specific method
|
|
33
|
+
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Most likely a plain Object
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e},t.apply(this,arguments)}function r(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}const n={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(u);return e?e[1]:""}return ""}const c=isPlainObject,f=e=>e;let d=f;if("production"!==process.env.NODE_ENV){const e="undefined"!=typeof console;d=e?function(e,t=n.logLevel){!1===n.silent&&console[t](`[VueTypes warn]: ${e}`);}:f;}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return "[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=e=>c(e)&&p(e,"_vueTypes_name"),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,r=!1){let n,i=!0,o="";n=c(e)?e:{type:e};const a=b(n)?n._vueTypes_name+" - ":"";if(g(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return i;if(!n.required&&void 0===t)return i;v(n.type)?(i=n.type.some(e=>!0===m(e,t,!0)),o=n.type.map(e=>l(e)).join(" or ")):(o=l(n),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return "";const t=e.constructor.toString().match(u);return t?t[1]:""}(t)===o:t instanceof n.type);}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return !1===r?(d(e),!1):e}if(p(n,"validator")&&h(n.validator)){const e=d,o=[];if(d=e=>{o.push(e);},i=n.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===r?(d(e),i):e}}return i}function j(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:n}=r;return h(n)&&(r.validator=O(n,r)),r}function _(e,t){const r=j(e,t);return Object.defineProperty(r,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r);}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(n))return o;const{validator:a}=n,s=r(n,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o);}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),P=()=>_("function",{type:Function}),x=()=>_("boolean",{type:Boolean}),E=()=>_("string",{type:String}),N=()=>_("number",{type:Number}),q=()=>_("array",{type:Array}),A=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator:e=>y(e)}),S=()=>j("symbol",{validator:e=>"symbol"==typeof e});function D(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(r){const n=e(r);return n||d(`${this._vueTypes_name} - ${t}`),n}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,r=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r);}return e},[]);return j("oneOf",{type:r.length>0?r:void 0,validator(r){const n=-1!==e.indexOf(r);return n||d(t),n}})}function F(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,r=[];for(let n=0;n<e.length;n+=1){const i=e[n];if(g(i)){if(b(i)&&"oneOf"===i._vueTypes_name&&i.type){r=r.concat(i.type);continue}if(h(i.validator)&&(t=!0),!0===i.type||!i.type){d('oneOfType - invalid usage of "true" or "null" as types.');continue}r=r.concat(i.type);}else r.push(i);}r=r.filter((e,t)=>r.indexOf(e)===t);const n=r.length>0?r:null;return j("oneOfType",t?{type:n,validator(t){const r=[],n=e.some(e=>{const n=m(b(e)&&"oneOf"===e._vueTypes_name?e.type||null:e,t,!0);return "string"==typeof n&&r.push(n),!0===n});return n||d(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\n${$(r.join("\n"))}`),n}}:{type:n})}function Y(e){return j("arrayOf",{type:Array,validator(t){let r="";const n=t.every(t=>(r=m(e,t,!0),!0===r));return n||d(`arrayOf - value validation error:\n${$(r)}`),n}})}function B(e){return j("instanceOf",{type:e})}function I(e){return j("objectOf",{type:Object,validator(t){let r="";const n=Object.keys(t).every(n=>(r=m(e,t[n],!0),!0===r));return n||d(`objectOf - value validation error:\n${$(r)}`),n}})}function J(e){const t=Object.keys(e),r=t.filter(t=>{var r;return !(null===(r=e[t])||void 0===r||!r.required)}),n=j("shape",{type:Object,validator(n){if(!c(n))return !1;const i=Object.keys(n);if(r.length>0&&r.some(e=>-1===i.indexOf(e))){const e=r.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(r=>{if(-1===t.indexOf(r))return !0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[r],n[r],!0);return "string"==typeof i&&d(`shape - "${r}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const M=["name","validate","getter"],R=/*#__PURE__*/(()=>{var e;return (e=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static get nullable(){return {type:null}}static extend(e){if(v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:i=!1}=e,o=r(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const r=T(t,a,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let s;return s=i?{get(){const e=Object.assign({},o);return n?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?_(t,r):j(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=n,e.custom=D,e.oneOf=L,e.instanceOf=B,e.oneOfType=F,e.arrayOf=Y,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,r=!1)=>r?_(e,t):j(e,t)},e})();function z(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var r;return (r=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(r){this.defaults=!1!==r?t({},!0!==r?r:e):{};}}).defaults=t({},e),r}class C extends(z()){}
|
|
42
|
+
|
|
43
|
+
const timelineProps = () => ({
|
|
44
|
+
mode: C.oneOf(['left', 'right']).def('left'),
|
|
45
|
+
size: C.oneOf(['normal', 'small']).def('normal'),
|
|
46
|
+
labelWidth: C.string.def(''),
|
|
47
|
+
});
|
|
48
|
+
const timelineItemProps = () => ({
|
|
49
|
+
color: C.oneOf(['blue', 'red', 'green', 'gray']).def('blue'),
|
|
50
|
+
dot: C.any.def(''),
|
|
51
|
+
label: C.any.def(''),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
var _export_sfc = (sfc, props) => {
|
|
55
|
+
const target = sfc.__vccOpts || sfc;
|
|
56
|
+
for (const [key, val] of props) {
|
|
57
|
+
target[key] = val;
|
|
58
|
+
}
|
|
59
|
+
return target;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const __default__$1 = {
|
|
63
|
+
name: "BmTimeline"
|
|
64
|
+
};
|
|
65
|
+
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
66
|
+
...__default__$1,
|
|
67
|
+
props: timelineProps(),
|
|
68
|
+
setup(__props) {
|
|
69
|
+
const props = __props;
|
|
70
|
+
const { labelWidth } = vue.toRefs(props);
|
|
71
|
+
vue.provide("labelWidth", labelWidth);
|
|
72
|
+
const { mode } = vue.toRefs(props);
|
|
73
|
+
vue.provide("mode", mode);
|
|
74
|
+
const className = vue.computed(() => {
|
|
75
|
+
return {
|
|
76
|
+
"bm-timeline": true,
|
|
77
|
+
[`bm-timeline-${props.mode}`]: true,
|
|
78
|
+
[`bm-timeline-${props.size}`]: true
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
return (_ctx, _cache) => {
|
|
82
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
83
|
+
class: vue.normalizeClass(vue.unref(className))
|
|
84
|
+
}, [
|
|
85
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
86
|
+
], 2);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
var Timeline = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "timeline.vue"]]);
|
|
91
|
+
|
|
92
|
+
const _hoisted_1 = { class: "bm-timeline-item-main" };
|
|
93
|
+
const _hoisted_2 = { class: "bm-timeline-item-content" };
|
|
94
|
+
const __default__ = {
|
|
95
|
+
name: "BmTimelineItem"
|
|
96
|
+
};
|
|
97
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
98
|
+
...__default__,
|
|
99
|
+
props: timelineItemProps(),
|
|
100
|
+
setup(__props) {
|
|
101
|
+
const props = __props;
|
|
102
|
+
const slots = vue.useSlots();
|
|
103
|
+
const labelWidth = vue.inject("labelWidth", vue.ref(""));
|
|
104
|
+
const mode = vue.inject("mode", vue.ref("left"));
|
|
105
|
+
const offsetStyle = vue.computed(() => {
|
|
106
|
+
if (labelWidth.value) {
|
|
107
|
+
if (mode.value !== "right") {
|
|
108
|
+
return { left: `calc(${labelWidth.value})` };
|
|
109
|
+
} else {
|
|
110
|
+
return { right: `calc(${labelWidth.value})` };
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
return {};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const itemClassName = vue.computed(() => {
|
|
117
|
+
return {
|
|
118
|
+
"bm-timeline-item": true,
|
|
119
|
+
"bm-timeline-item-has-label": labelWidth.value
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
const dotClassName = vue.computed(() => {
|
|
123
|
+
return {
|
|
124
|
+
"bm-timeline-item-head": true,
|
|
125
|
+
"bm-timeline-item-head-custom": props.dot || slots.dot,
|
|
126
|
+
[`bm-timeline-item-head-${props.color}`]: true
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
const customColor = vue.computed(() => {
|
|
130
|
+
return /blue|red|green|gray/.test(props.color || "") ? void 0 : props.color;
|
|
131
|
+
});
|
|
132
|
+
return (_ctx, _cache) => {
|
|
133
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
134
|
+
class: vue.normalizeClass(vue.unref(itemClassName))
|
|
135
|
+
}, [
|
|
136
|
+
vue.createElementVNode("div", {
|
|
137
|
+
class: "bm-timeline-item-tail",
|
|
138
|
+
style: vue.normalizeStyle(vue.unref(offsetStyle))
|
|
139
|
+
}, null, 4),
|
|
140
|
+
vue.createElementVNode("div", {
|
|
141
|
+
class: vue.normalizeClass(vue.unref(dotClassName)),
|
|
142
|
+
style: vue.normalizeStyle({ borderColor: vue.unref(customColor), color: vue.unref(customColor), ...vue.unref(offsetStyle) })
|
|
143
|
+
}, [
|
|
144
|
+
vue.renderSlot(_ctx.$slots, "dot", {}, () => [
|
|
145
|
+
vue.createTextVNode(vue.toDisplayString(props.dot), 1)
|
|
146
|
+
])
|
|
147
|
+
], 6),
|
|
148
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
149
|
+
vue.unref(labelWidth) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
150
|
+
key: 0,
|
|
151
|
+
class: "bm-timeline-item-label",
|
|
152
|
+
style: vue.normalizeStyle({ width: vue.unref(labelWidth) })
|
|
153
|
+
}, [
|
|
154
|
+
vue.renderSlot(_ctx.$slots, "label", {}, () => [
|
|
155
|
+
vue.createTextVNode(vue.toDisplayString(props.label), 1)
|
|
156
|
+
])
|
|
157
|
+
], 4)) : vue.createCommentVNode("v-if", true),
|
|
158
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
159
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
160
|
+
])
|
|
161
|
+
])
|
|
162
|
+
], 2);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
var TimelineItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "timeline-item.vue"]]);
|
|
167
|
+
|
|
168
|
+
Timeline.Item = TimelineItem;
|
|
169
|
+
const BmTimeline = withInstall.withInstall(Timeline);
|
|
170
|
+
const BmTimelineItem = withInstall.withInstall(TimelineItem);
|
|
171
|
+
|
|
172
|
+
exports.BmTimeline = BmTimeline;
|
|
173
|
+
exports.BmTimelineItem = BmTimelineItem;
|
|
174
|
+
exports["default"] = BmTimeline;
|