bkui-vue 0.0.1-beta.424 → 0.0.1-beta.426

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.
@@ -107,20 +107,20 @@ declare const BkInput: {
107
107
  default: boolean;
108
108
  };
109
109
  }>> & {
110
- onPaste?: (_value: any, _evt?: Event | KeyboardEvent) => any;
110
+ onPaste?: (_value: any, _evt?: KeyboardEvent) => any;
111
111
  onCompositionend?: (evt: CompositionEvent) => any;
112
112
  onCompositionstart?: (evt: CompositionEvent) => any;
113
113
  onCompositionupdate?: (evt: CompositionEvent) => any;
114
114
  onFocus?: (evt: FocusEvent) => any;
115
115
  onBlur?: (evt: FocusEvent) => any;
116
- onChange?: (_value: any, _evt?: Event | KeyboardEvent) => any;
117
- onInput?: (_value: any, _evt?: Event | KeyboardEvent) => any;
118
- onKeydown?: (_value: any, _evt?: Event | KeyboardEvent) => any;
119
- onKeypress?: (_value: any, _evt?: Event | KeyboardEvent) => any;
120
- onKeyup?: (_value: any, _evt?: Event | KeyboardEvent) => any;
116
+ onChange?: (_value: any, _evt?: KeyboardEvent) => any;
117
+ onInput?: (_value: any, _evt?: KeyboardEvent) => any;
118
+ onKeydown?: (_value: any, _evt?: KeyboardEvent) => any;
119
+ onKeypress?: (_value: any, _evt?: KeyboardEvent) => any;
120
+ onKeyup?: (_value: any, _evt?: KeyboardEvent) => any;
121
121
  onClear?: () => any;
122
- "onUpdate:modelValue"?: (_value: any, _evt?: Event | KeyboardEvent) => any;
123
- onEnter?: (_value: any, _evt?: Event | KeyboardEvent) => any;
122
+ "onUpdate:modelValue"?: (_value: any, _evt?: KeyboardEvent) => any;
123
+ onEnter?: (_value: any, _evt?: KeyboardEvent) => any;
124
124
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "behavior" | "disabled" | "step" | "placeholder" | "prefix" | "max" | "min" | "maxlength" | "clearable" | "readonly" | "prefixIcon" | "suffixIcon" | "suffix" | "showWordLimit" | "showControl" | "showClearOnlyHover" | "precision" | "rows" | "selectReadonly" | "withValidate">;
125
125
  $attrs: {
126
126
  [x: string]: unknown;
@@ -133,7 +133,7 @@ declare const BkInput: {
133
133
  }>;
134
134
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
135
135
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
136
- $emit: ((event: import("./input").EVENTS.UPDATE, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.FOCUS, evt: FocusEvent) => void) & ((event: import("./input").EVENTS.BLUR, evt: FocusEvent) => void) & ((event: import("./input").EVENTS.CHANGE, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.CLEAR) => void) & ((event: import("./input").EVENTS.INPUT, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYPRESS, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYDOWN, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYUP, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.ENTER, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.PASTE, _value: any, _evt?: Event | KeyboardEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONSTART, evt: CompositionEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONUPDATE, evt: CompositionEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONEND, evt: CompositionEvent) => void);
136
+ $emit: ((event: import("./input").EVENTS.UPDATE, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.FOCUS, evt: FocusEvent) => void) & ((event: import("./input").EVENTS.BLUR, evt: FocusEvent) => void) & ((event: import("./input").EVENTS.CHANGE, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.CLEAR) => void) & ((event: import("./input").EVENTS.INPUT, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYPRESS, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYDOWN, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.KEYUP, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.ENTER, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.PASTE, _value: any, _evt?: KeyboardEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONSTART, evt: CompositionEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONUPDATE, evt: CompositionEvent) => void) & ((event: import("./input").EVENTS.COMPOSITIONEND, evt: CompositionEvent) => void);
137
137
  $el: any;
138
138
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
139
139
  type: import("vue-types").VueTypeValidableDef<string> & {
@@ -218,32 +218,32 @@ declare const BkInput: {
218
218
  default: boolean;
219
219
  };
220
220
  }>> & {
221
- onPaste?: (_value: any, _evt?: Event | KeyboardEvent) => any;
221
+ onPaste?: (_value: any, _evt?: KeyboardEvent) => any;
222
222
  onCompositionend?: (evt: CompositionEvent) => any;
223
223
  onCompositionstart?: (evt: CompositionEvent) => any;
224
224
  onCompositionupdate?: (evt: CompositionEvent) => any;
225
225
  onFocus?: (evt: FocusEvent) => any;
226
226
  onBlur?: (evt: FocusEvent) => any;
227
- onChange?: (_value: any, _evt?: Event | KeyboardEvent) => any;
228
- onInput?: (_value: any, _evt?: Event | KeyboardEvent) => any;
229
- onKeydown?: (_value: any, _evt?: Event | KeyboardEvent) => any;
230
- onKeypress?: (_value: any, _evt?: Event | KeyboardEvent) => any;
231
- onKeyup?: (_value: any, _evt?: Event | KeyboardEvent) => any;
227
+ onChange?: (_value: any, _evt?: KeyboardEvent) => any;
228
+ onInput?: (_value: any, _evt?: KeyboardEvent) => any;
229
+ onKeydown?: (_value: any, _evt?: KeyboardEvent) => any;
230
+ onKeypress?: (_value: any, _evt?: KeyboardEvent) => any;
231
+ onKeyup?: (_value: any, _evt?: KeyboardEvent) => any;
232
232
  onClear?: () => any;
233
- "onUpdate:modelValue"?: (_value: any, _evt?: Event | KeyboardEvent) => any;
234
- onEnter?: (_value: any, _evt?: Event | KeyboardEvent) => any;
233
+ "onUpdate:modelValue"?: (_value: any, _evt?: KeyboardEvent) => any;
234
+ onEnter?: (_value: any, _evt?: KeyboardEvent) => any;
235
235
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
236
- "update:modelValue": (_value: any, _evt?: Event | KeyboardEvent) => boolean;
236
+ "update:modelValue": (_value: any, _evt?: KeyboardEvent) => any;
237
237
  focus: (evt: FocusEvent) => FocusEvent;
238
238
  blur: (evt: FocusEvent) => FocusEvent;
239
- change: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
239
+ change: (_value: any, _evt?: KeyboardEvent) => any;
240
240
  clear: () => boolean;
241
- input: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
242
- keypress: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
243
- keydown: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
244
- keyup: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
245
- enter: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
246
- paste: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
241
+ input: (_value: any, _evt?: KeyboardEvent) => any;
242
+ keypress: (_value: any, _evt?: KeyboardEvent) => any;
243
+ keydown: (_value: any, _evt?: KeyboardEvent) => any;
244
+ keyup: (_value: any, _evt?: KeyboardEvent) => any;
245
+ enter: (_value: any, _evt?: KeyboardEvent) => any;
246
+ paste: (_value: any, _evt?: KeyboardEvent) => any;
247
247
  compositionstart: (evt: CompositionEvent) => CompositionEvent;
248
248
  compositionupdate: (evt: CompositionEvent) => CompositionEvent;
249
249
  compositionend: (evt: CompositionEvent) => CompositionEvent;
@@ -372,20 +372,20 @@ declare const BkInput: {
372
372
  default: boolean;
373
373
  };
374
374
  }>> & {
375
- onPaste?: (_value: any, _evt?: Event | KeyboardEvent) => any;
375
+ onPaste?: (_value: any, _evt?: KeyboardEvent) => any;
376
376
  onCompositionend?: (evt: CompositionEvent) => any;
377
377
  onCompositionstart?: (evt: CompositionEvent) => any;
378
378
  onCompositionupdate?: (evt: CompositionEvent) => any;
379
379
  onFocus?: (evt: FocusEvent) => any;
380
380
  onBlur?: (evt: FocusEvent) => any;
381
- onChange?: (_value: any, _evt?: Event | KeyboardEvent) => any;
382
- onInput?: (_value: any, _evt?: Event | KeyboardEvent) => any;
383
- onKeydown?: (_value: any, _evt?: Event | KeyboardEvent) => any;
384
- onKeypress?: (_value: any, _evt?: Event | KeyboardEvent) => any;
385
- onKeyup?: (_value: any, _evt?: Event | KeyboardEvent) => any;
381
+ onChange?: (_value: any, _evt?: KeyboardEvent) => any;
382
+ onInput?: (_value: any, _evt?: KeyboardEvent) => any;
383
+ onKeydown?: (_value: any, _evt?: KeyboardEvent) => any;
384
+ onKeypress?: (_value: any, _evt?: KeyboardEvent) => any;
385
+ onKeyup?: (_value: any, _evt?: KeyboardEvent) => any;
386
386
  onClear?: () => any;
387
- "onUpdate:modelValue"?: (_value: any, _evt?: Event | KeyboardEvent) => any;
388
- onEnter?: (_value: any, _evt?: Event | KeyboardEvent) => any;
387
+ "onUpdate:modelValue"?: (_value: any, _evt?: KeyboardEvent) => any;
388
+ onEnter?: (_value: any, _evt?: KeyboardEvent) => any;
389
389
  } & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
390
390
  __isFragment?: never;
391
391
  __isTeleport?: never;
@@ -473,32 +473,32 @@ declare const BkInput: {
473
473
  default: boolean;
474
474
  };
475
475
  }>> & {
476
- onPaste?: (_value: any, _evt?: Event | KeyboardEvent) => any;
476
+ onPaste?: (_value: any, _evt?: KeyboardEvent) => any;
477
477
  onCompositionend?: (evt: CompositionEvent) => any;
478
478
  onCompositionstart?: (evt: CompositionEvent) => any;
479
479
  onCompositionupdate?: (evt: CompositionEvent) => any;
480
480
  onFocus?: (evt: FocusEvent) => any;
481
481
  onBlur?: (evt: FocusEvent) => any;
482
- onChange?: (_value: any, _evt?: Event | KeyboardEvent) => any;
483
- onInput?: (_value: any, _evt?: Event | KeyboardEvent) => any;
484
- onKeydown?: (_value: any, _evt?: Event | KeyboardEvent) => any;
485
- onKeypress?: (_value: any, _evt?: Event | KeyboardEvent) => any;
486
- onKeyup?: (_value: any, _evt?: Event | KeyboardEvent) => any;
482
+ onChange?: (_value: any, _evt?: KeyboardEvent) => any;
483
+ onInput?: (_value: any, _evt?: KeyboardEvent) => any;
484
+ onKeydown?: (_value: any, _evt?: KeyboardEvent) => any;
485
+ onKeypress?: (_value: any, _evt?: KeyboardEvent) => any;
486
+ onKeyup?: (_value: any, _evt?: KeyboardEvent) => any;
487
487
  onClear?: () => any;
488
- "onUpdate:modelValue"?: (_value: any, _evt?: Event | KeyboardEvent) => any;
489
- onEnter?: (_value: any, _evt?: Event | KeyboardEvent) => any;
488
+ "onUpdate:modelValue"?: (_value: any, _evt?: KeyboardEvent) => any;
489
+ onEnter?: (_value: any, _evt?: KeyboardEvent) => any;
490
490
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
491
- "update:modelValue": (_value: any, _evt?: Event | KeyboardEvent) => boolean;
491
+ "update:modelValue": (_value: any, _evt?: KeyboardEvent) => any;
492
492
  focus: (evt: FocusEvent) => FocusEvent;
493
493
  blur: (evt: FocusEvent) => FocusEvent;
494
- change: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
494
+ change: (_value: any, _evt?: KeyboardEvent) => any;
495
495
  clear: () => boolean;
496
- input: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
497
- keypress: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
498
- keydown: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
499
- keyup: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
500
- enter: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
501
- paste: (_value: any, _evt?: Event | KeyboardEvent) => boolean;
496
+ input: (_value: any, _evt?: KeyboardEvent) => any;
497
+ keypress: (_value: any, _evt?: KeyboardEvent) => any;
498
+ keydown: (_value: any, _evt?: KeyboardEvent) => any;
499
+ keyup: (_value: any, _evt?: KeyboardEvent) => any;
500
+ enter: (_value: any, _evt?: KeyboardEvent) => any;
501
+ paste: (_value: any, _evt?: KeyboardEvent) => any;
502
502
  compositionstart: (evt: CompositionEvent) => CompositionEvent;
503
503
  compositionupdate: (evt: CompositionEvent) => CompositionEvent;
504
504
  compositionend: (evt: CompositionEvent) => CompositionEvent;
@@ -98,7 +98,7 @@ export declare const enum EVENTS {
98
98
  COMPOSITIONUPDATE = "compositionupdate",
99
99
  COMPOSITIONEND = "compositionend"
100
100
  }
101
- declare function EventFunction(_value: any, _evt?: KeyboardEvent | Event): boolean;
101
+ declare function EventFunction(_value: any, _evt?: KeyboardEvent): any;
102
102
  declare function CompositionEventFunction(evt: CompositionEvent): CompositionEvent;
103
103
  export declare const inputEmitEventsType: {
104
104
  "update:modelValue": typeof EventFunction;
@@ -297,20 +297,20 @@ declare const _default: import("vue").DefineComponent<{
297
297
  default: boolean;
298
298
  };
299
299
  }>> & {
300
- onPaste?: (_value: any, _evt?: Event | KeyboardEvent) => any;
300
+ onPaste?: (_value: any, _evt?: KeyboardEvent) => any;
301
301
  onCompositionend?: (evt: CompositionEvent) => any;
302
302
  onCompositionstart?: (evt: CompositionEvent) => any;
303
303
  onCompositionupdate?: (evt: CompositionEvent) => any;
304
304
  onFocus?: (evt: FocusEvent) => any;
305
305
  onBlur?: (evt: FocusEvent) => any;
306
- onChange?: (_value: any, _evt?: Event | KeyboardEvent) => any;
307
- onInput?: (_value: any, _evt?: Event | KeyboardEvent) => any;
308
- onKeydown?: (_value: any, _evt?: Event | KeyboardEvent) => any;
309
- onKeypress?: (_value: any, _evt?: Event | KeyboardEvent) => any;
310
- onKeyup?: (_value: any, _evt?: Event | KeyboardEvent) => any;
306
+ onChange?: (_value: any, _evt?: KeyboardEvent) => any;
307
+ onInput?: (_value: any, _evt?: KeyboardEvent) => any;
308
+ onKeydown?: (_value: any, _evt?: KeyboardEvent) => any;
309
+ onKeypress?: (_value: any, _evt?: KeyboardEvent) => any;
310
+ onKeyup?: (_value: any, _evt?: KeyboardEvent) => any;
311
311
  onClear?: () => any;
312
- "onUpdate:modelValue"?: (_value: any, _evt?: Event | KeyboardEvent) => any;
313
- onEnter?: (_value: any, _evt?: Event | KeyboardEvent) => any;
312
+ "onUpdate:modelValue"?: (_value: any, _evt?: KeyboardEvent) => any;
313
+ onEnter?: (_value: any, _evt?: KeyboardEvent) => any;
314
314
  }, {
315
315
  type: string;
316
316
  behavior: "simplicity" | "normal";
@@ -1 +1 @@
1
- !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue")):o(e["../shared"],e.vue);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(self,((e,o)=>(()=>{"use strict";var t={4212:o=>{o.exports=e},748:e=>{e.exports=o}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{i.r(r),i.d(r,{BkLoading:()=>v,BkLoadingMode:()=>e,BkLoadingSize:()=>o,default:()=>f,setDefaultIndicator:()=>d});var e,o,t,n=i(4212),l=i(748);function a(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function d(e){t="function"==typeof e?e:function(){return(0,l.createVNode)(e,null,null)}}!function(e){e.Default="default",e.Spin="spin"}(e||(e={})),function(e){e.Normal="",e.Mini="mini",e.Small="small",e.Large="large"}(o||(o={}));var u={indicator:{type:Function},loading:n.PropTypes.bool.def(!0),inline:n.PropTypes.bool.def(!0),theme:{type:String},title:n.PropTypes.string.def(""),size:{type:String,default:o.Normal},mode:{type:String,default:"default"},opacity:n.PropTypes.number.def(.9),color:n.PropTypes.string.def("white"),zIndex:n.PropTypes.number.def(1),isDirective:n.PropTypes.bool.def(!1)};const c=(0,l.defineComponent)({name:"Loading",props:u,setup:function(o,i){var r=(0,l.createVNode)("div",{class:"bk-normal-indicator"},[[1,2,3,4].map((function(e){return(0,l.createVNode)("span",{class:"dot dot-".concat(e)},null)}))]),d=(0,l.createVNode)("div",{class:"bk-spin-indicator"},[[1,2,3,4,5,6,7,8].map((function(e){return(0,l.createVNode)("span",{class:"oval oval-".concat(e)},null)}))]),u=(0,l.computed)((function(){return{zIndex:o.zIndex}})),c=(0,l.computed)((function(){return Object.assign({opacity:o.opacity,backgroundColor:o.color},u.value)})),s=(0,l.computed)((function(){return(0,n.classes)({"bk-loading-wrapper":o.loading,"bk-nested-loading":!!i.slots.default,"bk-directive-loading":o.isDirective})})),p=(0,l.computed)((function(){var e;return(0,n.classes)((a(e={},"bk-loading-size-".concat(o.size),!!o.size),a(e,"bk-loading-".concat(o.theme),!!o.theme),e),"bk-loading-indicator")})),v=(0,l.computed)((function(){return!!o.title})),f=(0,l.computed)((function(){var n=o.mode===e.Spin;return"function"==typeof o.indicator?(0,l.createVNode)(o.indicator,null,null):"function"==typeof t?(0,l.createVNode)(t,null,null):n?d:r}));return function(){var e,t;return(0,l.createVNode)("div",{class:s.value},[null===(t=(e=i.slots).default)||void 0===t?void 0:t.call(e),o.loading&&[(i.slots.default||o.isDirective)&&(0,l.createVNode)("div",{class:"bk-loading-mask",style:c.value},null),(0,l.createVNode)("div",{class:p.value,style:u.value},[f.value,v.value&&(0,l.createVNode)("div",{class:"bk-loading-title"},[o.title])])]])}}});var s=Symbol("vBkLoading"),p={mounted:function(e,o){o.value&&function(e,o){var t,n,i,r,a,d=function(e){var t,n;return null!==(n=null===(t=o.value)||void 0===t?void 0:t[e])&&void 0!==n?n:void 0},u=(0,l.reactive)({indicator:d("indicator"),loading:null!==(t=d("loading"))&&void 0!==t&&t,inline:null!==(n=d("inline"))&&void 0!==n&&n,theme:d("theme"),title:null!==(i=d("title"))&&void 0!==i?i:"",size:null!==(r=d("size"))&&void 0!==r?r:"",mode:d("mode"),opacity:d("opacity"),color:null!==(a=d("color"))&&void 0!==a?a:"white",zIndex:d("zIndex"),isDirective:!0}),p=document.createElement("div");Object.assign(p.style,{position:"absolute",left:0,right:0,top:0,bottom:0}),Object.assign(e.style,{position:"relative"});var v=(0,l.createApp)({render:function(){return(0,l.h)(c,u)}});e[s]={options:u,instance:v,vm:v.mount(p)},e.appendChild(p)}(e,o)},updated:function(e,o){var t,n,i=e[s],r=o.value;t=r,n=i.options,Object.keys(t).forEach((function(e){t[e]!==n[e]&&(n[e]=t[e])}))},unmounted:function(e){var o,t,n,i=e[s];null==e||e.removeChild(null===(t=null===(o=null==i?void 0:i.vm)||void 0===o?void 0:o.$el)||void 0===t?void 0:t.parentNode),null===(n=null==i?void 0:i.instance)||void 0===n||n.unmount(),e[s]=null}},v=(0,n.withInstallProps)(c,{setDefaultIndicator:d,BkLoadingMode:e,BkLoadingSize:o},!0,{name:"loading",directive:p});const f=v})(),r})()));
1
+ !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"));else if("function"==typeof define&&define.amd)define(["../shared","vue"],o);else{var t="object"==typeof exports?o(require("../shared"),require("vue")):o(e["../shared"],e.vue);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(self,((e,o)=>(()=>{"use strict";var t={4212:o=>{o.exports=e},748:e=>{e.exports=o}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,i),l.exports}i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{i.r(l),i.d(l,{BkLoading:()=>v,BkLoadingMode:()=>e,BkLoadingSize:()=>o,default:()=>f,setDefaultIndicator:()=>d});var e,o,t,n=i(4212),r=i(748);function a(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function d(e){t="function"==typeof e?e:function(){return(0,r.createVNode)(e,null,null)}}!function(e){e.Default="default",e.Spin="spin"}(e||(e={})),function(e){e.Normal="",e.Mini="mini",e.Small="small",e.Large="large"}(o||(o={}));var u={indicator:{type:Function},loading:n.PropTypes.bool.def(!0),inline:n.PropTypes.bool.def(!0),theme:{type:String},title:n.PropTypes.string.def(""),size:{type:String,default:o.Normal},mode:{type:String,default:"default"},opacity:n.PropTypes.number.def(.9),color:n.PropTypes.string.def("white"),zIndex:n.PropTypes.number.def(1),isDirective:n.PropTypes.bool.def(!1)};const c=(0,r.defineComponent)({name:"Loading",props:u,setup:function(o,i){var l=(0,r.createVNode)("div",{class:"bk-normal-indicator"},[[1,2,3,4].map((function(e){return(0,r.createVNode)("span",{class:"dot dot-".concat(e)},null)}))]),d=(0,r.createVNode)("div",{class:"bk-spin-indicator"},[[1,2,3,4,5,6,7,8].map((function(e){return(0,r.createVNode)("span",{class:"oval oval-".concat(e)},null)}))]),u=(0,r.computed)((function(){return{zIndex:o.zIndex}})),c=(0,r.computed)((function(){return Object.assign({opacity:o.opacity,backgroundColor:o.color},u.value)})),s=(0,r.computed)((function(){return(0,n.classes)({"bk-loading-wrapper":o.loading,"bk-nested-loading":!!i.slots.default,"bk-directive-loading":o.isDirective})})),p=(0,r.computed)((function(){var e;return(0,n.classes)((a(e={},"bk-loading-size-".concat(o.size),!!o.size),a(e,"bk-loading-".concat(o.theme),!!o.theme),e),"bk-loading-indicator")})),v=(0,r.computed)((function(){return!!o.title})),f=(0,r.computed)((function(){var n=o.mode===e.Spin;return"function"==typeof o.indicator?(0,r.createVNode)(o.indicator,null,null):"function"==typeof t?(0,r.createVNode)(t,null,null):n?d:l}));return function(){var e,t;return(0,r.createVNode)("div",{class:s.value},[null===(t=(e=i.slots).default)||void 0===t?void 0:t.call(e),o.loading&&[(i.slots.default||o.isDirective)&&(0,r.createVNode)("div",{class:"bk-loading-mask",style:c.value},null),(0,r.createVNode)("div",{class:p.value,style:u.value},[f.value,v.value&&(0,r.createVNode)("div",{class:"bk-loading-title"},[o.title])])]])}}});var s=Symbol("vBkLoading"),p={mounted:function(e,o){o.value&&function(e,o){var t,n,i,l,a,d=function(e){var t,n;return null!==(n=null===(t=o.value)||void 0===t?void 0:t[e])&&void 0!==n?n:void 0},u=(0,r.reactive)({indicator:d("indicator"),loading:null!==(t=d("loading"))&&void 0!==t&&t,inline:null!==(n=d("inline"))&&void 0!==n&&n,theme:d("theme"),title:null!==(i=d("title"))&&void 0!==i?i:"",size:null!==(l=d("size"))&&void 0!==l?l:"",mode:d("mode"),opacity:d("opacity"),color:null!==(a=d("color"))&&void 0!==a?a:"white",zIndex:d("zIndex"),isDirective:!0}),p=document.createElement("div");Object.assign(p.style,{position:"absolute",left:0,right:0,top:0,bottom:0}),Object.assign(e.style,{position:"relative"});var v=(0,r.createApp)({render:function(){return(0,r.h)(c,u)}});e[s]={options:u,instance:v,vm:v.mount(p)},e.appendChild(p)}(e,o)},updated:function(e,o){var t,n,i,l,r,a=e[s],d=o.value;l=d,r=a.options,Object.keys(l).forEach((function(e){l[e]!==r[e]&&(r[e]=l[e])})),(null===(i=null===(n=null===(t=null==a?void 0:a.vm)||void 0===t?void 0:t.$el)||void 0===n?void 0:n.parentNode)||void 0===i?void 0:i.style)&&(a.vm.$el.parentNode.style.display=d.loading?"":"none")},unmounted:function(e){var o,t,n,i=e[s];null==e||e.removeChild(null===(t=null===(o=null==i?void 0:i.vm)||void 0===o?void 0:o.$el)||void 0===t?void 0:t.parentNode),null===(n=null==i?void 0:i.instance)||void 0===n||n.unmount(),e[s]=null}},v=(0,n.withInstallProps)(c,{setDefaultIndicator:d,BkLoadingMode:e,BkLoadingSize:o},!0,{name:"loading",directive:p});const f=v})(),l})()));
@@ -30,6 +30,7 @@ declare const Transfer: {
30
30
  $props: Partial<{
31
31
  title: string[];
32
32
  extCls: string;
33
+ multiple: boolean;
33
34
  displayKey: string;
34
35
  searchPlaceholder: string;
35
36
  sortable: boolean;
@@ -93,10 +94,15 @@ declare const Transfer: {
93
94
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
94
95
  default: () => string[];
95
96
  };
97
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
98
+ default: boolean;
99
+ } & {
100
+ default: boolean;
101
+ };
96
102
  }>> & {
97
103
  onChange?: (...args: any[]) => any;
98
104
  "onUpdate:targetList"?: (...args: any[]) => any;
99
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "extCls" | "displayKey" | "searchPlaceholder" | "sortable" | "settingKey" | "sortKey" | "showOverflowTips" | "searchable" | "sourceList" | "targetList" | "emptyContent">;
105
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "extCls" | "multiple" | "displayKey" | "searchPlaceholder" | "sortable" | "settingKey" | "sortKey" | "showOverflowTips" | "searchable" | "sourceList" | "targetList" | "emptyContent">;
100
106
  $attrs: {
101
107
  [x: string]: unknown;
102
108
  };
@@ -163,6 +169,11 @@ declare const Transfer: {
163
169
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
164
170
  default: () => string[];
165
171
  };
172
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
173
+ default: boolean;
174
+ } & {
175
+ default: boolean;
176
+ };
166
177
  }>> & {
167
178
  onChange?: (...args: any[]) => any;
168
179
  "onUpdate:targetList"?: (...args: any[]) => any;
@@ -186,9 +197,21 @@ declare const Transfer: {
186
197
  noSelected: string;
187
198
  search: string;
188
199
  }>;
200
+ handleAllChecked: (value: any, dirct: any) => void;
201
+ multipleSelectAllValue: import("vue").Ref<{
202
+ source: boolean;
203
+ target: boolean;
204
+ }>;
205
+ multipleSelectList: import("vue").Ref<{
206
+ source: any[];
207
+ target: any[];
208
+ }>;
209
+ handleMultipleChange: (dirct: any) => void;
210
+ handleItemChecked: (dirct: any) => void;
189
211
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:targetList")[], string, {
190
212
  title: string[];
191
213
  extCls: string;
214
+ multiple: boolean;
192
215
  displayKey: string;
193
216
  searchPlaceholder: string;
194
217
  sortable: boolean;
@@ -272,6 +295,11 @@ declare const Transfer: {
272
295
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
273
296
  default: () => string[];
274
297
  };
298
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
299
+ default: boolean;
300
+ } & {
301
+ default: boolean;
302
+ };
275
303
  }>> & {
276
304
  onChange?: (...args: any[]) => any;
277
305
  "onUpdate:targetList"?: (...args: any[]) => any;
@@ -295,6 +323,17 @@ declare const Transfer: {
295
323
  noSelected: string;
296
324
  search: string;
297
325
  }>;
326
+ handleAllChecked: (value: any, dirct: any) => void;
327
+ multipleSelectAllValue: import("vue").Ref<{
328
+ source: boolean;
329
+ target: boolean;
330
+ }>;
331
+ multipleSelectList: import("vue").Ref<{
332
+ source: any[];
333
+ target: any[];
334
+ }>;
335
+ handleMultipleChange: (dirct: any) => void;
336
+ handleItemChecked: (dirct: any) => void;
298
337
  }> & {} & {} & import("vue").ComponentCustomProperties;
299
338
  __isFragment?: never;
300
339
  __isTeleport?: never;
@@ -352,6 +391,11 @@ declare const Transfer: {
352
391
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
353
392
  default: () => string[];
354
393
  };
394
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
395
+ default: boolean;
396
+ } & {
397
+ default: boolean;
398
+ };
355
399
  }>> & {
356
400
  onChange?: (...args: any[]) => any;
357
401
  "onUpdate:targetList"?: (...args: any[]) => any;
@@ -375,9 +419,21 @@ declare const Transfer: {
375
419
  noSelected: string;
376
420
  search: string;
377
421
  }>;
422
+ handleAllChecked: (value: any, dirct: any) => void;
423
+ multipleSelectAllValue: import("vue").Ref<{
424
+ source: boolean;
425
+ target: boolean;
426
+ }>;
427
+ multipleSelectList: import("vue").Ref<{
428
+ source: any[];
429
+ target: any[];
430
+ }>;
431
+ handleMultipleChange: (dirct: any) => void;
432
+ handleItemChecked: (dirct: any) => void;
378
433
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:targetList")[], "change" | "update:targetList", {
379
434
  title: string[];
380
435
  extCls: string;
436
+ multiple: boolean;
381
437
  displayKey: string;
382
438
  searchPlaceholder: string;
383
439
  sortable: boolean;
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../icon/"),require("../input"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../icon/","../input"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../icon/"),require("../input")):t(e["../shared"],e.vue,e["../config-provider"],e["../icon/"],e["../input"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,o)=>(()=>{"use strict";var a={2717:e=>{e.exports=r},7685:e=>{e.exports=n},8133:e=>{e.exports=o},4212:t=>{t.exports=e},748:e=>{e.exports=t}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return a[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{u.r(l),u.d(l,{default:()=>p});var e=u(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n,o=u(748),a=u(2717),i=u(7685),s=u(8133),c=u.n(s);!function(e){e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray"}(n||(n={}));var d={title:e.PropTypes.arrayOf(e.PropTypes.string).def([]),extCls:e.PropTypes.string.def(""),searchPlaceholder:e.PropTypes.string.def(""),settingKey:e.PropTypes.string.def("id"),displayKey:e.PropTypes.string.def("value"),sortKey:e.PropTypes.string.def("value"),showOverflowTips:e.PropTypes.bool.def(!1),searchable:e.PropTypes.bool.def(!1),sortable:e.PropTypes.bool.def(!1),sourceList:e.PropTypes.arrayOf(e.PropTypes.any).def([]),targetList:e.PropTypes.arrayOf(e.PropTypes.any).def([]),emptyContent:e.PropTypes.arrayOf(e.PropTypes.string).def([])};const f=(0,o.defineComponent)({name:"Transfer",props:d,emits:["change","update:targetList"],setup:function(e,t){var i=t.emit,u=(0,a.useLocale)("transfer"),l=(0,o.computed)((function(){return Array.isArray(e.sourceList)?e.sourceList.every((function(e){return e.toString().includes("[object Object]")}))?n.OBJECT_ARRAY:n.BASE_ARRAY:n.NOT_ARRAY})),s=(0,o.computed)((function(){return l.value===n.BASE_ARRAY?"value":e.settingKey})),c=(0,o.computed)((function(){return l.value===n.BASE_ARRAY?"value":e.displayKey})),d=(0,o.computed)((function(){return e.sortKey||c.value})),f=(0,o.computed)((function(){switch(l.value){case n.BASE_ARRAY:return r(new Set(e.sourceList)).map((function(e){return{value:e}}));case n.OBJECT_ARRAY:return r(e.sourceList);default:return[]}})),p=(0,o.toRefs)(e).targetList,v=function(e,t,r){var n=(0,o.ref)([]),a=(0,o.ref)([]),i=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(n.value=[],a.value=[]),e.value.forEach((function(e){var o=e[r.value];t.value.includes(o)?a.value.push(e):n.value.push(e)}))};return i(),(0,o.watch)((function(){return[e,t,r]}),(function(){i(!0)}),{deep:!0}),{selectList:n,selectedList:a}}(f,p,s),y=v.selectList,h=v.selectedList,m=function(e,t){var r=(0,o.ref)(""),n=(0,o.computed)((function(){return e.value.filter((function(e){var n=e[t.value];return!(n instanceof Object)&&n.toString().includes(r.value)}))}));return{selectSearchQuery:r,selectListSearch:n}}(y,c),g=m.selectSearchQuery,A=m.selectListSearch,b=(0,o.computed)((function(){return r(A.value).sort((function(e,t){return e[d.value]>t[d.value]?1:-1}))})),S=(0,o.computed)((function(){return r(h.value).sort((function(e,t){return e[d.value]>t[d.value]?1:-1}))}));(0,o.watch)((function(){return[y,h]}),(function(){R()}),{deep:!0});var T=function(e,t){var r=s.value;return e.some((function(e){return e[r]===t[r]}))&&t.disabled},R=function(){var e=y.value.map((function(e){return e[s.value]})),t=h.value.map((function(e){return e[s.value]}));i("update:targetList",t),i("change",l.value===n.BASE_ARRAY?e:y.value.map((function(e){return(0,o.toRaw)(e)})),l.value===n.BASE_ARRAY?t:h.value.map((function(e){return(0,o.toRaw)(e)})),t)};return{selectSearchQuery:g,selectListSearch:A,selectedList:h,selectListSort:b,selectedListSort:S,settingCode:s,displayCode:c,allToRight:function(){y.value=r(f.value.filter((function(e){return T(y.value,e)}))),h.value=r(f.value.filter((function(e){return!T(y.value,e)}))),R()},allToLeft:function(){y.value=r(f.value.filter((function(e){return!T(h.value,e)}))),h.value=r(f.value.filter((function(e){return T(h.value,e)}))),R()},handleItemClick:function(e,t){var n;if(!e.disabled){var o=e[s.value],a=t?y:h,i=t?h:y,u=a.value.findIndex((function(e){return e[s.value]===o}));(n=i.value).push.apply(n,r(a.value.splice(u,1))),R()}},t:u}},render:function(){var e=this,t=this.sortable?this.selectListSort:this.selectListSearch,r=this.sortable?this.selectedListSort:this.selectedList,n=function(n){var a,i,u="left-header"===n,l="".concat(u?null!==(a=e.title[0])&&void 0!==a?a:e.t.sourceList:null!==(i=e.title[1])&&void 0!==i?i:e.t.targetList),s=u?!t.length:!r.length;return e.$slots[n]?(0,o.createVNode)("div",{class:"slot-header"},[e.$slots[n]()]):(0,o.createVNode)("div",{class:"header"},["".concat(l,"(").concat(u?t.length:r.length,")"),(0,o.createVNode)("span",{class:{disabled:s},onClick:function(){s||(u?e.allToRight():e.allToLeft())}},[u?e.t.selectAll:e.t.removeAll])])},a=function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,o.createVNode)("div",{class:["item-content",{"is-disabled":t.disabled}]},[(0,o.createVNode)("span",{class:"content-text",title:t[e.displayCode]},[t[e.displayCode]]),(0,o.createVNode)("span",{class:"icon-wrapper"},[r?(0,o.createVNode)(i.ArrowsRight,{class:"bk-icon icon-move"},null):(0,o.createVNode)(i.Error,{class:"bk-icon icon-delete"},null)])])},u=function(n){var i="left"===n,u=i?t:r,l=i?"source-option":"target-option",s=i?"left-empty-content":"right-empty-content";return u.length?(0,o.createVNode)("ul",{class:["content",e.searchable&&i?"is-search":""]},[u.map((function(t){var r,n,u;return(0,o.createVNode)("li",{key:t[e.settingCode],class:[e.$slots[l]?"custom-item":""],onClick:function(){return e.handleItemClick(t,i)}},[null!==(u=null===(n=(r=e.$slots)[l])||void 0===n?void 0:n.call(r,t))&&void 0!==u?u:a(t,i)])}))]):function(t){var r,n="left-empty-content"===t,a=null!==(r=n?e.emptyContent[0]:e.emptyContent[1])&&void 0!==r?r:n?e.t.noData:e.t.noSelected;return e.$slots[t]?(0,o.createVNode)("div",null,[e.$slots[t]()]):(0,o.createVNode)("div",{class:"empty"},[a])}(s)};return(0,o.createVNode)("div",{class:["bk-transfer",this.extCls]},[(0,o.createVNode)("div",{class:"source-list"},[n("left-header"),this.searchable&&(0,o.createVNode)(c(),{modelValue:e.selectSearchQuery,"onUpdate:modelValue":function(t){return e.selectSearchQuery=t},class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:function(){return(0,o.createVNode)(i.Search,{class:"icon-search"},null)}}),u("left")]),(0,o.createVNode)(i.Transfer,{class:"transfer"},null),(0,o.createVNode)("div",{class:"target-list"},[n("right-header"),u("right")])])}}),p=(0,e.withInstall)(f)})(),l})()));
1
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../checkbox"),require("../config-provider"),require("../icon/"),require("../input"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../checkbox","../config-provider","../icon/","../input"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../checkbox"),require("../config-provider"),require("../icon/"),require("../input")):t(e["../shared"],e.vue,e["../checkbox"],e["../config-provider"],e["../icon/"],e["../input"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,l,o)=>(()=>{"use strict";var a={5800:e=>{e.exports=r},2717:e=>{e.exports=n},7685:e=>{e.exports=l},8133:e=>{e.exports=o},4212:t=>{t.exports=e},748:e=>{e.exports=t}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return a[e](r,r.exports,c),r.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{c.r(i),c.d(i,{default:()=>h});var e=c(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n,l=c(748),o=c(5800),a=c.n(o),u=c(2717),s=c(7685),d=c(8133),f=c.n(d);!function(e){e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray"}(n||(n={}));var p={title:e.PropTypes.arrayOf(e.PropTypes.string).def([]),extCls:e.PropTypes.string.def(""),searchPlaceholder:e.PropTypes.string.def(""),settingKey:e.PropTypes.string.def("id"),displayKey:e.PropTypes.string.def("value"),sortKey:e.PropTypes.string.def("value"),showOverflowTips:e.PropTypes.bool.def(!1),searchable:e.PropTypes.bool.def(!1),sortable:e.PropTypes.bool.def(!1),sourceList:e.PropTypes.arrayOf(e.PropTypes.any).def([]),targetList:e.PropTypes.arrayOf(e.PropTypes.any).def([]),emptyContent:e.PropTypes.arrayOf(e.PropTypes.string).def([]),multiple:e.PropTypes.bool.def(!1)};const v=(0,l.defineComponent)({name:"Transfer",props:p,emits:["change","update:targetList"],setup:function(e,t){var o=t.emit,a=(0,u.useLocale)("transfer"),c=(0,l.ref)({source:!1,target:!1}),i=(0,l.ref)({source:[],target:[]}),s=(0,l.computed)((function(){return Array.isArray(e.sourceList)?e.sourceList.every((function(e){return e.toString().includes("[object Object]")}))?n.OBJECT_ARRAY:n.BASE_ARRAY:n.NOT_ARRAY})),d=(0,l.computed)((function(){return s.value===n.BASE_ARRAY?"value":e.settingKey})),f=(0,l.computed)((function(){return s.value===n.BASE_ARRAY?"value":e.displayKey})),p=(0,l.computed)((function(){return e.sortKey||f.value})),v=(0,l.computed)((function(){switch(s.value){case n.BASE_ARRAY:return r(new Set(e.sourceList)).map((function(e){return{value:e}}));case n.OBJECT_ARRAY:return r(e.sourceList);default:return[]}})),h=(0,l.toRefs)(e).targetList,y=function(e,t,r){var n=(0,l.ref)([]),o=(0,l.ref)([]),a=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(n.value=[],o.value=[]),e.value.forEach((function(e){var l=e[r.value];t.value.includes(l)?o.value.push(e):n.value.push(e)}))};return a(),(0,l.watch)((function(){return[e,t,r]}),(function(){a(!0)}),{deep:!0}),{selectList:n,selectedList:o}}(v,h,d),m=y.selectList,g=y.selectedList,b=function(e,t){var r=(0,l.ref)(""),n=(0,l.computed)((function(){return e.value.filter((function(e){var n=e[t.value];return!(n instanceof Object)&&n.toString().includes(r.value)}))}));return{selectSearchQuery:r,selectListSearch:n}}(m,f),A=b.selectSearchQuery,S=b.selectListSearch,V=(0,l.computed)((function(){return r(S.value).sort((function(e,t){return e[p.value]>t[p.value]?1:-1}))})),L=(0,l.computed)((function(){return r(g.value).sort((function(e,t){return e[p.value]>t[p.value]?1:-1}))}));(0,l.watch)((function(){return[m,g]}),(function(){e.multiple||T()}),{deep:!0});var N=function(e,t){var r=d.value;return e.some((function(e){return e[r]===t[r]}))&&t.disabled},T=function(){var e=m.value.map((function(e){return e[d.value]})),t=g.value.map((function(e){return e[d.value]}));o("update:targetList",t),o("change",s.value===n.BASE_ARRAY?e:m.value.map((function(e){return(0,l.toRaw)(e)})),s.value===n.BASE_ARRAY?t:g.value.map((function(e){return(0,l.toRaw)(e)})),t)};return{selectSearchQuery:A,selectListSearch:S,selectedList:g,selectListSort:V,selectedListSort:L,settingCode:d,displayCode:f,allToRight:function(){m.value=r(v.value.filter((function(e){return N(m.value,e)}))),g.value=r(v.value.filter((function(e){return!N(m.value,e)}))),T()},allToLeft:function(){m.value=r(v.value.filter((function(e){return!N(g.value,e)}))),g.value=r(v.value.filter((function(e){return N(g.value,e)}))),T()},handleItemClick:function(e,t){var n;if(!e.disabled){var l=e[d.value],o=t?m:g,a=t?g:m,u=o.value.findIndex((function(e){return e[d.value]===l}));(n=a.value).push.apply(n,r(o.value.splice(u,1))),T()}},t:a,handleAllChecked:function(e,t){var r="source"===t?m:g;i.value[t]=e?r.value.map((function(e){return e[d.value]})):[]},multipleSelectAllValue:c,multipleSelectList:i,handleMultipleChange:function(e){var t,n="left"===e,l=n?m:g,o=n?g:m,a=i.value[n?"source":"target"],u=l.value.filter((function(e){return a.includes(e[d.value])}));l.value=l.value.filter((function(e){return!a.includes(e[d.value])})),(t=o.value).push.apply(t,r(u)),i.value[n?"source":"target"]=[],T()},handleItemChecked:function(e){var t="source"===e?m:g;c.value[e]=i.value[e].length===t.value.length}}},render:function(){var e=this,t=this.$props.multiple,r=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,u=function(t){var o,u,c="left-header"===t,i=c?"source":"target",s="".concat(c?null!==(o=e.title[0])&&void 0!==o?o:e.t.sourceList:null!==(u=e.title[1])&&void 0!==u?u:e.t.targetList),d=c?!r.length:!n.length,f=!!e.multipleSelectList[i].length&&!e.multipleSelectAllValue[i],p=e.multipleSelectList[i].length;return e.$slots[t]?(0,l.createVNode)("div",{class:"slot-header"},[e.$slots[t]()]):(0,l.createVNode)("div",{class:"header"},[e.multiple?(0,l.createVNode)(a(),{class:"header-checkbox",label:s,modelValue:e.multipleSelectAllValue[i],"onUpdate:modelValue":function(t){return e.multipleSelectAllValue[i]=t},indeterminate:f,onChange:function(t){return e.handleAllChecked(t,i)}},null):(0,l.createVNode)(l.Fragment,null,["".concat(s,"(").concat(c?r.length:n.length,")")]),e.multiple?(0,l.createVNode)("div",{class:"select-total-count"},[(0,l.createVNode)("span",{class:"select-count"},[p]),(0,l.createVNode)("span",{class:"count-delimiter"},[(0,l.createTextVNode)("/")]),(0,l.createVNode)("span",{class:"total-count"},[c?r.length:n.length])]):(0,l.createVNode)("span",{class:{"select-all":!0,disabled:d},onClick:function(){d||(c?e.allToRight():e.allToLeft())}},[c?e.t.selectAll:e.t.removeAll])])},c=function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,l.createVNode)("div",{class:["item-content",{"is-disabled":r.disabled}]},[(0,l.createVNode)("span",{class:"content-text",title:r[e.displayCode]},[r[e.displayCode]]),!t&&(0,l.createVNode)("span",{class:"icon-wrapper"},[n?(0,l.createVNode)(s.ArrowsRight,{class:"bk-icon icon-move"},null):(0,l.createVNode)(s.Error,{class:"bk-icon icon-delete"},null)])])},i=function(u){var i,s,d="left"===u,f="left"===u?"source":"target",p=d?r:n,v=d?"source-option":"target-option",h=d?"left-empty-content":"right-empty-content",y=t?(0,l.createVNode)(o.BkCheckboxGroup,{class:"content is-flex",modelValue:e.multipleSelectList[f],"onUpdate:modelValue":function(t){return e.multipleSelectList[f]=t},onChange:function(){return e.handleItemChecked(f)}},"function"==typeof(s=i=p.map((function(t){var r,n,o;return(0,l.createVNode)("div",null,[(0,l.createVNode)(a(),{class:"checkbox-item",label:t[e.settingCode]},{default:function(){return[null!==(o=null===(n=(r=e.$slots)[v])||void 0===n?void 0:n.call(r,t))&&void 0!==o?o:c(t,d)]}})])})))||"[object Object]"===Object.prototype.toString.call(s)&&!(0,l.isVNode)(s)?i:{default:function(){return[i]}}):(0,l.createVNode)("ul",{class:["content",e.searchable&&d?"is-search":""]},[p.map((function(t){var r,n,o;return(0,l.createVNode)("li",{key:t[e.settingCode],class:[e.$slots[v]?"custom-item":""],onClick:function(){return e.handleItemClick(t,d)}},[null!==(o=null===(n=(r=e.$slots)[v])||void 0===n?void 0:n.call(r,t))&&void 0!==o?o:c(t,d)])}))]);return p.length?y:function(t){var r,n="left-empty-content"===t,o=null!==(r=n?e.emptyContent[0]:e.emptyContent[1])&&void 0!==r?r:n?e.t.noData:e.t.noSelected;return e.$slots[t]?(0,l.createVNode)("div",null,[e.$slots[t]()]):(0,l.createVNode)("div",{class:"empty"},[o])}(h)};return(0,l.createVNode)("div",{class:["bk-transfer",this.extCls]},[(0,l.createVNode)("div",{class:"source-list"},[u("left-header"),this.searchable&&(0,l.createVNode)(f(),{modelValue:e.selectSearchQuery,"onUpdate:modelValue":function(t){return e.selectSearchQuery=t},class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:function(){return(0,l.createVNode)(s.Search,{class:"icon-search"},null)}}),i("left")]),t?(0,l.createVNode)("div",{class:"transfer-button-group"},[(0,l.createVNode)("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:function(){return e.handleMultipleChange("left")}},[(0,l.createVNode)(s.AngleRight,null,null)]),(0,l.createVNode)("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:function(){return e.handleMultipleChange("right")}},[(0,l.createVNode)(s.AngleLeft,null,null)])]):(0,l.createVNode)(s.Transfer,{class:"transfer"},null),(0,l.createVNode)("div",{class:"target-list"},[u("right-header"),i("right")])])}}),h=(0,e.withInstall)(v)})(),i})()));
@@ -51,4 +51,9 @@ export declare const transferProps: {
51
51
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
52
52
  default: () => string[];
53
53
  };
54
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
55
+ default: boolean;
56
+ } & {
57
+ default: boolean;
58
+ };
54
59
  };
@@ -9,6 +9,33 @@
9
9
  font-size: 24px;
10
10
  color: #c4c6cc;
11
11
  }
12
+ .bk-transfer .transfer-button-group {
13
+ margin: 0 8px;
14
+ }
15
+ .bk-transfer .transfer-button-group .transfer-button {
16
+ display: flex;
17
+ width: 24px;
18
+ height: 24px;
19
+ color: white;
20
+ cursor: pointer;
21
+ background-color: #3a84ff;
22
+ border: 1px solid #3a84ff;
23
+ border-radius: 2px;
24
+ align-items: center;
25
+ justify-content: center;
26
+ }
27
+ .bk-transfer .transfer-button-group .transfer-button:first-child {
28
+ margin-bottom: 8px;
29
+ }
30
+ .bk-transfer .transfer-button-group .transfer-button.disabled {
31
+ color: #c4c6cc;
32
+ cursor: not-allowed;
33
+ background-color: #fafbfd;
34
+ border-color: #dcdee5;
35
+ }
36
+ .bk-transfer .transfer-button-group .transfer-button span {
37
+ font-size: 18px;
38
+ }
12
39
  .bk-transfer .source-list,
13
40
  .bk-transfer .target-list {
14
41
  flex: 1;
@@ -37,18 +64,23 @@
37
64
  justify-content: space-between;
38
65
  font-weight: 700;
39
66
  }
40
- .bk-transfer .source-list .header span,
41
- .bk-transfer .target-list .header span {
67
+ .bk-transfer .source-list .header .select-all,
68
+ .bk-transfer .target-list .header .select-all {
42
69
  font-size: 12px;
43
70
  font-weight: normal;
44
71
  color: #3a84ff;
45
72
  cursor: pointer;
46
73
  }
47
- .bk-transfer .source-list .header span.disabled,
48
- .bk-transfer .target-list .header span.disabled {
74
+ .bk-transfer .source-list .header .select-all.disabled,
75
+ .bk-transfer .target-list .header .select-all.disabled {
49
76
  color: #c4c6cc;
50
77
  cursor: not-allowed;
51
78
  }
79
+ .bk-transfer .source-list .header .select-total-count,
80
+ .bk-transfer .target-list .header .select-total-count {
81
+ font-weight: normal;
82
+ color: #979ba5;
83
+ }
52
84
  .bk-transfer .source-list .transfer-search-input,
53
85
  .bk-transfer .target-list .transfer-search-input {
54
86
  width: calc(100% - 32px);
@@ -89,10 +121,17 @@
89
121
  margin: 8px 0;
90
122
  overflow-y: auto;
91
123
  }
124
+ .bk-transfer .source-list .content.is-flex,
125
+ .bk-transfer .target-list .content.is-flex {
126
+ display: flex;
127
+ flex-direction: column;
128
+ }
92
129
  .bk-transfer .source-list .content li.custom-item,
93
130
  .bk-transfer .target-list .content li.custom-item,
94
131
  .bk-transfer .source-list .content li .item-content,
95
- .bk-transfer .target-list .content li .item-content {
132
+ .bk-transfer .target-list .content li .item-content,
133
+ .bk-transfer .source-list .content .checkbox-item,
134
+ .bk-transfer .target-list .content .checkbox-item {
96
135
  display: flex;
97
136
  height: 32px;
98
137
  padding: 0 10px 0 16px;
@@ -103,20 +142,26 @@
103
142
  .bk-transfer .source-list .content li.custom-item:hover:not(.is-disabled),
104
143
  .bk-transfer .target-list .content li.custom-item:hover:not(.is-disabled),
105
144
  .bk-transfer .source-list .content li .item-content:hover:not(.is-disabled),
106
- .bk-transfer .target-list .content li .item-content:hover:not(.is-disabled) {
145
+ .bk-transfer .target-list .content li .item-content:hover:not(.is-disabled),
146
+ .bk-transfer .source-list .content .checkbox-item:hover:not(.is-disabled),
147
+ .bk-transfer .target-list .content .checkbox-item:hover:not(.is-disabled) {
107
148
  color: #3a84ff;
108
149
  background-color: #e1ecff;
109
150
  }
110
151
  .bk-transfer .source-list .content li.custom-item:hover:not(.is-disabled) .icon-wrapper,
111
152
  .bk-transfer .target-list .content li.custom-item:hover:not(.is-disabled) .icon-wrapper,
112
153
  .bk-transfer .source-list .content li .item-content:hover:not(.is-disabled) .icon-wrapper,
113
- .bk-transfer .target-list .content li .item-content:hover:not(.is-disabled) .icon-wrapper {
154
+ .bk-transfer .target-list .content li .item-content:hover:not(.is-disabled) .icon-wrapper,
155
+ .bk-transfer .source-list .content .checkbox-item:hover:not(.is-disabled) .icon-wrapper,
156
+ .bk-transfer .target-list .content .checkbox-item:hover:not(.is-disabled) .icon-wrapper {
114
157
  visibility: visible;
115
158
  }
116
159
  .bk-transfer .source-list .content li.custom-item .content-text,
117
160
  .bk-transfer .target-list .content li.custom-item .content-text,
118
161
  .bk-transfer .source-list .content li .item-content .content-text,
119
- .bk-transfer .target-list .content li .item-content .content-text {
162
+ .bk-transfer .target-list .content li .item-content .content-text,
163
+ .bk-transfer .source-list .content .checkbox-item .content-text,
164
+ .bk-transfer .target-list .content .checkbox-item .content-text {
120
165
  flex: 1;
121
166
  overflow: hidden;
122
167
  text-overflow: ellipsis;
@@ -125,30 +170,43 @@
125
170
  .bk-transfer .source-list .content li.custom-item .icon-wrapper,
126
171
  .bk-transfer .target-list .content li.custom-item .icon-wrapper,
127
172
  .bk-transfer .source-list .content li .item-content .icon-wrapper,
128
- .bk-transfer .target-list .content li .item-content .icon-wrapper {
173
+ .bk-transfer .target-list .content li .item-content .icon-wrapper,
174
+ .bk-transfer .source-list .content .checkbox-item .icon-wrapper,
175
+ .bk-transfer .target-list .content .checkbox-item .icon-wrapper {
129
176
  visibility: hidden;
130
177
  }
131
178
  .bk-transfer .source-list .content li.custom-item .icon-wrapper .bk-icon,
132
179
  .bk-transfer .target-list .content li.custom-item .icon-wrapper .bk-icon,
133
180
  .bk-transfer .source-list .content li .item-content .icon-wrapper .bk-icon,
134
- .bk-transfer .target-list .content li .item-content .icon-wrapper .bk-icon {
181
+ .bk-transfer .target-list .content li .item-content .icon-wrapper .bk-icon,
182
+ .bk-transfer .source-list .content .checkbox-item .icon-wrapper .bk-icon,
183
+ .bk-transfer .target-list .content .checkbox-item .icon-wrapper .bk-icon {
135
184
  display: flex;
136
185
  font-size: 30px;
137
186
  }
138
187
  .bk-transfer .source-list .content li.custom-item .icon-wrapper .icon-delete,
139
188
  .bk-transfer .target-list .content li.custom-item .icon-wrapper .icon-delete,
140
189
  .bk-transfer .source-list .content li .item-content .icon-wrapper .icon-delete,
141
- .bk-transfer .target-list .content li .item-content .icon-wrapper .icon-delete {
190
+ .bk-transfer .target-list .content li .item-content .icon-wrapper .icon-delete,
191
+ .bk-transfer .source-list .content .checkbox-item .icon-wrapper .icon-delete,
192
+ .bk-transfer .target-list .content .checkbox-item .icon-wrapper .icon-delete {
142
193
  margin-right: 6px;
143
194
  font-size: 16px;
144
195
  }
145
196
  .bk-transfer .source-list .content li.custom-item.is-disabled,
146
197
  .bk-transfer .target-list .content li.custom-item.is-disabled,
147
198
  .bk-transfer .source-list .content li .item-content.is-disabled,
148
- .bk-transfer .target-list .content li .item-content.is-disabled {
199
+ .bk-transfer .target-list .content li .item-content.is-disabled,
200
+ .bk-transfer .source-list .content .checkbox-item.is-disabled,
201
+ .bk-transfer .target-list .content .checkbox-item.is-disabled {
149
202
  color: #c4c6cc;
150
203
  cursor: not-allowed;
151
204
  }
205
+ .bk-transfer .source-list .content .checkbox-item .item-content,
206
+ .bk-transfer .target-list .content .checkbox-item .item-content {
207
+ display: flex;
208
+ align-items: center;
209
+ }
152
210
  .bk-transfer .source-list .content::-webkit-scrollbar,
153
211
  .bk-transfer .target-list .content::-webkit-scrollbar {
154
212
  width: 4px;
@@ -76,6 +76,11 @@ declare const _default: import("vue").DefineComponent<{
76
76
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
77
77
  default: () => string[];
78
78
  };
79
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
80
+ default: boolean;
81
+ } & {
82
+ default: boolean;
83
+ };
79
84
  }, {
80
85
  selectSearchQuery: import("vue").Ref<string>;
81
86
  selectListSearch: import("vue").ComputedRef<any>;
@@ -96,6 +101,17 @@ declare const _default: import("vue").DefineComponent<{
96
101
  noSelected: string;
97
102
  search: string;
98
103
  }>;
104
+ handleAllChecked: (value: any, dirct: any) => void;
105
+ multipleSelectAllValue: import("vue").Ref<{
106
+ source: boolean;
107
+ target: boolean;
108
+ }>;
109
+ multipleSelectList: import("vue").Ref<{
110
+ source: any[];
111
+ target: any[];
112
+ }>;
113
+ handleMultipleChange: (dirct: any) => void;
114
+ handleItemChecked: (dirct: any) => void;
99
115
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:targetList")[], "change" | "update:targetList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
100
116
  title: import("vue-types").VueTypeDef<string[]> & {
101
117
  default: () => string[];
@@ -149,12 +165,18 @@ declare const _default: import("vue").DefineComponent<{
149
165
  emptyContent: import("vue-types").VueTypeDef<string[]> & {
150
166
  default: () => string[];
151
167
  };
168
+ multiple: import("vue-types").VueTypeValidableDef<boolean> & {
169
+ default: boolean;
170
+ } & {
171
+ default: boolean;
172
+ };
152
173
  }>> & {
153
174
  onChange?: (...args: any[]) => any;
154
175
  "onUpdate:targetList"?: (...args: any[]) => any;
155
176
  }, {
156
177
  title: string[];
157
178
  extCls: string;
179
+ multiple: boolean;
158
180
  displayKey: string;
159
181
  searchPlaceholder: string;
160
182
  sortable: boolean;