vue-devui 1.6.11 → 1.6.12

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.
@@ -1 +1 @@
1
- .devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .24));opacity:1;z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{z-index:var(--devui-z-index-full-page-overlay, 1080);position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:var(--devui-z-index-full-page-overlay, 1080)}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-editable-select-input{height:32px;font-size:var(--devui-font-size, 12px)}.devui-editable-select-input--sm{height:24px;font-size:var(--devui-font-size-sm, 12px)}.devui-editable-select-input--lg{height:40px;font-size:var(--devui-font-size-lg, 14px)}.devui-editable-select-input--open .devui-editable-select__arrow-icon{transform:rotate(180deg)}.devui-editable-select-input__wrapper{display:flex;align-items:center;justify-content:center;position:relative;height:100%;padding:0 8px;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff);transition:border-color .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),box-shadow var(--devui-animation-duration-base, .2s) var(--devui-animation-ease-in, cubic-bezier(.5, 0, .84, .25))}.devui-editable-select-input__wrapper:not(.devui-editable-select-input__wrapper--disabled):not(.devui-editable-select-input__wrapper--focus):hover{border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-editable-select-input__wrapper--focus{border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-editable-select-input__wrapper--focus.devui-editable-select-input__wrapper--glow-style{box-shadow:0 0 0 4px var(--devui-form-control-interactive-outline, rgba(94, 124, 224, .08));border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-editable-select-input__wrapper--disabled{color:var(--devui-disabled-text, #cfd0d3);border-color:var(--devui-disabled-line, #dfe1e6);background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.devui-editable-select-input__wrapper--disabled:hover{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-editable-select-input__wrapper--disabled .devui-editable-select-input__inner{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-editable-select-input__wrapper--glow-style:not(.devui-editable-select-input__wrapper--disabled,.devui-editable-select-input__wrapper--focus):hover{box-shadow:0 0 0 4px var(--devui-form-control-interactive-outline, rgba(94, 124, 224, .08));border-color:var(--devui-form-control-line, #d7d8da)!important}.devui-editable-select-input__inner{width:100%;height:100%;padding:4px 0;border:none;background:none;outline:none}.devui-editable-select-input__placeholder{width:calc(100% - 16px);position:absolute;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translateY(-50%);top:50%}.devui-editable-select-input__suffix{height:100%;display:inline-flex;align-items:center;justify-content:center;font-size:var(--devui-font-size, 12px)}.devui-editable-select-input__suffix>span{align-items:center}.devui-editable-select-input__suffix .devui-editable-select__clear-icon{pointer-events:auto;display:flex;cursor:pointer}.devui-editable-select-input__suffix .devui-editable-select__clear-icon svg path{fill:var(--devui-shape-icon-fill, #d7d8da);transition:all var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) var(--devui-animation-duration-slow, .3s)}.devui-editable-select-input__suffix .devui-editable-select__clear-icon svg:hover path{fill:var(--devui-shape-icon-fill-hover, #babbc0)}.devui-editable-select-input__suffix .devui-editable-select__arrow-icon{display:flex;transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-editable-select-input__suffix .devui-editable-select__arrow-icon svg path{fill:var(--devui-icon-text, #71757f)}.devui-editable-select__dropdown{margin:8px 0}.devui-editable-select__inner{padding:12px;margin:0;list-style:none;overflow-y:auto}.devui-editable-select__item{cursor:pointer;user-select:none;line-height:20px;padding:8px 12px;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.devui-editable-select__item:not(:first-child){margin-top:4px}.devui-editable-select__item--disabled{cursor:not-allowed;color:var(--devui-disabled-text, #cfd0d3)}.devui-editable-select__item--selected:not(.devui-editable-select__item--disabled):not(.devui-editable-select__item--no-data-tip){color:var(--devui-list-item-active-text, #252b3a);background-color:var(--devui-list-item-active-bg, #f2f5fc)}.devui-editable-select__item--last-selected{background:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item--hover:not(.devui-editable-select__item--selected){background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item:not(.devui-editable-select__item--disabled):not(.devui-editable-select__item--selected):not(.devui-editable-select__item--no-data-tip):hover{background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item--no-data-tip{text-align:center;cursor:not-allowed;user-select:none;color:var(--devui-disabled-text, #cfd0d3);font-size:var(--devui-font-size, 12px);line-height:22px;padding:0}.devui-editable-select--fade-bottom-enter-from,.devui-editable-select--fade-bottom-leave-to{opacity:.8;transform:scaleY(.8) translateY(-4px)}.devui-editable-select--fade-bottom-enter-to,.devui-editable-select--fade-bottom-leave-from{opacity:1;transform:scaleY(.9999) translateY(0)}.devui-editable-select--fade-bottom-enter-active{transition:transform .2s cubic-bezier(.16,.75,.5,1),opacity .2s cubic-bezier(.16,.75,.5,1)}.devui-editable-select--fade-bottom-leave-active{transition:transform .2s cubic-bezier(.5,0,.84,.25),opacity .2s cubic-bezier(.5,0,.84,.25)}.devui-editable-select--fade-top-enter-from,.devui-editable-select--fade-top-leave-to{opacity:.8;transform:scaleY(.8) translateY(4px)}.devui-editable-select--fade-top-enter-to,.devui-editable-select--fade-top-leave-from{opacity:1;transform:scaleY(.9999) translateY(0)}.devui-editable-select--fade-top-enter-active{transition:transform .2s cubic-bezier(.16,.75,.5,1),opacity .2s cubic-bezier(.16,.75,.5,1)}.devui-editable-select--fade-top-leave-active{transition:transform .2s cubic-bezier(.5,0,.84,.25),opacity .2s cubic-bezier(.5,0,.84,.25)}
1
+ .devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .24));opacity:1;z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 2px 12px 0) var(--devui-shadow, rgba(37, 43, 58, .24));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(180deg) scale(1.5)}to{transform:rotate(360deg) scale(1)}}.devui-loading__mask{z-index:var(--devui-z-index-full-page-overlay, 1080);position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #d7d8da);opacity:.3}.devui-loading__wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:var(--devui-z-index-full-page-overlay, 1080)}.devui-loading--hidden{overflow:hidden}.devui-loading__text{margin-left:10px}.devui-loading__area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-loading__busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-loading__busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-loading__busy-default-spinner .devui-loading__bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-loading__busy-default-spinner .devui-loading__bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-loading__busy-default-spinner .devui-loading__bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-editable-select-input{height:32px;font-size:var(--devui-font-size, 12px)}.devui-editable-select-input--sm{height:24px;font-size:var(--devui-font-size-sm, 12px)}.devui-editable-select-input--lg{height:40px;font-size:var(--devui-font-size-lg, 14px)}.devui-editable-select-input--open .devui-editable-select__arrow-icon{transform:rotate(180deg)}.devui-editable-select-input__wrapper{display:flex;align-items:center;justify-content:center;position:relative;height:100%;padding:0 8px;border:1px solid var(--devui-form-control-line, #d7d8da);border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-form-control-bg, #ffffff);transition:border-color .3s var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)),box-shadow var(--devui-animation-duration-base, .2s) var(--devui-animation-ease-in, cubic-bezier(.5, 0, .84, .25))}.devui-editable-select-input__wrapper:not(.devui-editable-select-input__wrapper--disabled):not(.devui-editable-select-input__wrapper--focus):hover{border-color:var(--devui-form-control-line-hover, #9b9fa8)}.devui-editable-select-input__wrapper--focus{border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-editable-select-input__wrapper--focus.devui-editable-select-input__wrapper--glow-style{box-shadow:0 0 0 4px var(--devui-form-control-interactive-outline, rgba(94, 124, 224, .08));border-color:var(--devui-form-control-line-active, #5e7ce0)}.devui-editable-select-input__wrapper--disabled{color:var(--devui-disabled-text, #cfd0d3);border-color:var(--devui-disabled-line, #dfe1e6);background-color:var(--devui-disabled-bg, #f5f5f5);cursor:not-allowed}.devui-editable-select-input__wrapper--disabled:hover{border-color:var(--devui-disabled-line, #dfe1e6)}.devui-editable-select-input__wrapper--disabled .devui-editable-select-input__inner{color:var(--devui-disabled-text, #cfd0d3);cursor:not-allowed}.devui-editable-select-input__wrapper--glow-style:not(.devui-editable-select-input__wrapper--disabled,.devui-editable-select-input__wrapper--focus):hover{box-shadow:0 0 0 4px var(--devui-form-control-interactive-outline, rgba(94, 124, 224, .08));border-color:var(--devui-form-control-line, #d7d8da)!important}.devui-editable-select-input__inner{width:100%;height:100%;padding:4px 0;border:none;background:none;outline:none}.devui-editable-select-input__placeholder{width:calc(100% - 16px);position:absolute;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform:translateY(-50%);top:50%}.devui-editable-select-input__suffix{height:100%;display:inline-flex;align-items:center;justify-content:center;font-size:var(--devui-font-size, 12px)}.devui-editable-select-input__suffix>span{align-items:center}.devui-editable-select-input__suffix .devui-editable-select__clear-icon{pointer-events:auto;display:flex;cursor:pointer}.devui-editable-select-input__suffix .devui-editable-select__clear-icon svg path{fill:var(--devui-shape-icon-fill, #d7d8da);transition:all var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1)) var(--devui-animation-duration-slow, .3s)}.devui-editable-select-input__suffix .devui-editable-select__clear-icon svg:hover path{fill:var(--devui-shape-icon-fill-hover, #babbc0)}.devui-editable-select-input__suffix .devui-editable-select__arrow-icon{display:flex;transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-editable-select-input__suffix .devui-editable-select__arrow-icon svg path{fill:var(--devui-icon-text, #71757f)}.devui-editable-select__inner{padding:12px;margin:0;list-style:none;overflow-y:auto}.devui-editable-select__item{cursor:pointer;user-select:none;line-height:20px;padding:8px 12px;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.devui-editable-select__item:not(:first-child){margin-top:4px}.devui-editable-select__item--disabled{cursor:not-allowed;color:var(--devui-disabled-text, #cfd0d3)}.devui-editable-select__item--selected:not(.devui-editable-select__item--disabled):not(.devui-editable-select__item--no-data-tip){color:var(--devui-list-item-active-text, #252b3a);background-color:var(--devui-list-item-active-bg, #f2f5fc)}.devui-editable-select__item--last-selected{background:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item--hover:not(.devui-editable-select__item--selected){background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item:not(.devui-editable-select__item--disabled):not(.devui-editable-select__item--selected):not(.devui-editable-select__item--no-data-tip):hover{background-color:var(--devui-list-item-hover-bg, #f2f2f3);color:var(--devui-list-item-hover-text, #252b3a)}.devui-editable-select__item--no-data-tip{text-align:center;cursor:not-allowed;user-select:none;color:var(--devui-disabled-text, #cfd0d3);font-size:var(--devui-font-size, 12px);line-height:22px;padding:0}.devui-editable-select--fade-bottom-enter-from,.devui-editable-select--fade-bottom-leave-to{opacity:.8;transform:scaleY(.8) translateY(-4px)}.devui-editable-select--fade-bottom-enter-to,.devui-editable-select--fade-bottom-leave-from{opacity:1;transform:scaleY(.9999) translateY(0)}.devui-editable-select--fade-bottom-enter-active{transition:transform .2s cubic-bezier(.16,.75,.5,1),opacity .2s cubic-bezier(.16,.75,.5,1)}.devui-editable-select--fade-bottom-leave-active{transition:transform .2s cubic-bezier(.5,0,.84,.25),opacity .2s cubic-bezier(.5,0,.84,.25)}.devui-editable-select--fade-top-enter-from,.devui-editable-select--fade-top-leave-to{opacity:.8;transform:scaleY(.8) translateY(4px)}.devui-editable-select--fade-top-enter-to,.devui-editable-select--fade-top-leave-from{opacity:1;transform:scaleY(.9999) translateY(0)}.devui-editable-select--fade-top-enter-active{transition:transform .2s cubic-bezier(.16,.75,.5,1),opacity .2s cubic-bezier(.16,.75,.5,1)}.devui-editable-select--fade-top-leave-active{transition:transform .2s cubic-bezier(.5,0,.84,.25),opacity .2s cubic-bezier(.5,0,.84,.25)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-devui",
3
- "version": "1.6.11",
3
+ "version": "1.6.12",
4
4
  "license": "MIT",
5
5
  "description": "DevUI components based on Vite and Vue3",
6
6
  "keywords": [
@@ -29,7 +29,11 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, resolveDirective } from "vue";
32
+ var __publicField = (obj, key, value) => {
33
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
+ return value;
35
+ };
36
+ import { defineComponent, watch, provide, reactive, toRefs, createVNode, onUnmounted, Transition, mergeProps, ref, unref, nextTick, withModifiers, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, onBeforeMount, vShow, resolveComponent, getCurrentInstance, render, resolveDirective } from "vue";
33
37
  import { onClickOutside } from "@vueuse/core";
34
38
  import "clipboard";
35
39
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
@@ -4069,7 +4073,7 @@ var lodash = { exports: {} };
4069
4073
  function isElement(value) {
4070
4074
  return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
4071
4075
  }
4072
- function isEmpty(value) {
4076
+ function isEmpty2(value) {
4073
4077
  if (value == null) {
4074
4078
  return true;
4075
4079
  }
@@ -5199,7 +5203,7 @@ var lodash = { exports: {} };
5199
5203
  lodash2.isBuffer = isBuffer;
5200
5204
  lodash2.isDate = isDate;
5201
5205
  lodash2.isElement = isElement;
5202
- lodash2.isEmpty = isEmpty;
5206
+ lodash2.isEmpty = isEmpty2;
5203
5207
  lodash2.isEqual = isEqual;
5204
5208
  lodash2.isEqualWith = isEqualWith;
5205
5209
  lodash2.isError = isError;
@@ -7562,7 +7566,7 @@ var Schema = /* @__PURE__ */ function() {
7562
7566
  complete(results);
7563
7567
  }, source);
7564
7568
  };
7565
- _proto.getType = function getType(rule) {
7569
+ _proto.getType = function getType2(rule) {
7566
7570
  if (rule.type === void 0 && rule.pattern instanceof RegExp) {
7567
7571
  rule.type = "pattern";
7568
7572
  }
@@ -8088,7 +8092,7 @@ function useSelect(props, selectRef, ctx2, focus, blur, isSelectFocus, t) {
8088
8092
  return label.toString().toLocaleLowerCase().includes(filterQuery.value.toLocaleLowerCase().trim());
8089
8093
  }).length;
8090
8094
  if (isLoading.value) {
8091
- return props.loadingText || t("loadingText");
8095
+ return "";
8092
8096
  }
8093
8097
  if (isSupportFilter.value && filterQuery.value && injectOptionsArray.value.length > 0 && visibleOptionsCount === 0) {
8094
8098
  return props.noMatchText || t("noMatchText");
@@ -9383,8 +9387,216 @@ function useSelectFunction(props, selectRef) {
9383
9387
  return { isSelectFocus, focus, blur };
9384
9388
  }
9385
9389
  var select = "";
9390
+ class View {
9391
+ constructor() {
9392
+ __publicField(this, "top", "50%");
9393
+ __publicField(this, "left", "50%");
9394
+ }
9395
+ }
9396
+ const loadingProps = {
9397
+ message: String,
9398
+ backdrop: Boolean,
9399
+ view: {
9400
+ type: Object,
9401
+ default: () => new View()
9402
+ },
9403
+ zIndex: Number,
9404
+ isFull: {
9405
+ type: Boolean,
9406
+ default: false
9407
+ }
9408
+ };
9409
+ class LoadingOptions {
9410
+ constructor() {
9411
+ __publicField(this, "target");
9412
+ __publicField(this, "message");
9413
+ __publicField(this, "loadingTemplateRef");
9414
+ __publicField(this, "backdrop", true);
9415
+ __publicField(this, "positionType", "relative");
9416
+ __publicField(this, "view", new View());
9417
+ __publicField(this, "zIndex");
9418
+ }
9419
+ }
9420
+ var loading = "";
9421
+ var Loading = defineComponent({
9422
+ name: "Loading",
9423
+ inheritAttrs: false,
9424
+ props: loadingProps,
9425
+ setup(props) {
9426
+ const style = {
9427
+ top: props.view.top,
9428
+ left: props.view.left,
9429
+ zIndex: props.zIndex
9430
+ };
9431
+ if (!props.message) {
9432
+ style.background = "none";
9433
+ }
9434
+ const isShow = ref(false);
9435
+ const open = () => {
9436
+ isShow.value = true;
9437
+ };
9438
+ const close = () => {
9439
+ isShow.value = false;
9440
+ };
9441
+ return {
9442
+ style,
9443
+ isShow,
9444
+ open,
9445
+ close
9446
+ };
9447
+ },
9448
+ render() {
9449
+ var _a;
9450
+ const {
9451
+ isShow,
9452
+ isFull,
9453
+ backdrop,
9454
+ style,
9455
+ message,
9456
+ $slots
9457
+ } = this;
9458
+ const ns2 = useNamespace$1("loading");
9459
+ return isShow && createVNode("div", {
9460
+ "class": [ns2.b(), isFull ? ns2.m("full") : ""]
9461
+ }, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
9462
+ "class": ns2.e("wrapper")
9463
+ }, [backdrop ? createVNode("div", {
9464
+ "class": ns2.e("mask")
9465
+ }, null) : null, createVNode("div", {
9466
+ "style": style,
9467
+ "class": ns2.e("area")
9468
+ }, [createVNode("div", {
9469
+ "class": ns2.e("busy-default-spinner")
9470
+ }, [createVNode("div", {
9471
+ "class": ns2.e("bar1")
9472
+ }, null), createVNode("div", {
9473
+ "class": ns2.e("bar2")
9474
+ }, null), createVNode("div", {
9475
+ "class": ns2.e("bar3")
9476
+ }, null), createVNode("div", {
9477
+ "class": ns2.e("bar4")
9478
+ }, null)]), message ? createVNode("span", {
9479
+ "class": ns2.e("text")
9480
+ }, [message]) : null])])]);
9481
+ }
9482
+ });
9483
+ const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
9484
+ function createComponent(component, props, children = null) {
9485
+ const vnode = h(component, __spreadValues({}, props), children);
9486
+ const container = document.createElement("div");
9487
+ vnode[COMPONENT_CONTAINER_SYMBOL] = container;
9488
+ render(vnode, container);
9489
+ return vnode.component;
9490
+ }
9491
+ function unmountComponent(ComponnetInstance) {
9492
+ render(null, ComponnetInstance == null ? void 0 : ComponnetInstance.vnode[COMPONENT_CONTAINER_SYMBOL]);
9493
+ }
9494
+ const loadingConstructor = defineComponent(Loading);
9495
+ const cacheInstance = /* @__PURE__ */ new WeakSet();
9496
+ const isEmpty = (val) => {
9497
+ if (!val) {
9498
+ return true;
9499
+ }
9500
+ if (Array.isArray(val)) {
9501
+ return val.length === 0;
9502
+ }
9503
+ if (val instanceof Set || val instanceof Map) {
9504
+ return val.size === 0;
9505
+ }
9506
+ if (val instanceof Promise) {
9507
+ return false;
9508
+ }
9509
+ if (typeof val === "object") {
9510
+ try {
9511
+ return Object.keys(val).length === 0;
9512
+ } catch (e) {
9513
+ return false;
9514
+ }
9515
+ }
9516
+ return false;
9517
+ };
9518
+ const getType = (vari) => {
9519
+ return Object.prototype.toString.call(vari).slice(8, -1).toLowerCase();
9520
+ };
9521
+ const isPromise = (value) => {
9522
+ const type4 = getType(value);
9523
+ switch (type4) {
9524
+ case "promise":
9525
+ return [value];
9526
+ case "array":
9527
+ if (value.some((val) => getType(val) !== "promise")) {
9528
+ console.error(new TypeError("Binding values should all be of type Promise"));
9529
+ return "error";
9530
+ }
9531
+ return value;
9532
+ default:
9533
+ return false;
9534
+ }
9535
+ };
9536
+ const unmount = (el) => {
9537
+ cacheInstance.delete(el);
9538
+ el.instance.proxy.close();
9539
+ unmountComponent(el.instance);
9540
+ };
9541
+ const toggleLoading = (el, binding) => {
9542
+ var _a, _b, _c;
9543
+ if (binding.value) {
9544
+ const vals = isPromise(binding.value);
9545
+ if (vals === "error") {
9546
+ return;
9547
+ }
9548
+ (_c = (_b = (_a = el == null ? void 0 : el.instance) == null ? void 0 : _a.proxy) == null ? void 0 : _b.open) == null ? void 0 : _c.call(_b);
9549
+ el.appendChild(el.mask);
9550
+ cacheInstance.add(el);
9551
+ if (vals) {
9552
+ Promise.all(vals).catch((err) => {
9553
+ console.error(new Error("Promise handling errors"), err);
9554
+ }).finally(() => {
9555
+ unmount(el);
9556
+ });
9557
+ }
9558
+ } else {
9559
+ unmount(el);
9560
+ }
9561
+ };
9562
+ const removeAttribute = (el) => {
9563
+ el.removeAttribute("zindex");
9564
+ el.removeAttribute("positiontype");
9565
+ el.removeAttribute("backdrop");
9566
+ el.removeAttribute("message");
9567
+ el.removeAttribute("view");
9568
+ el.removeAttribute("loadingtemplateref");
9569
+ };
9570
+ const handleProps = (el, vprops) => {
9571
+ var _a;
9572
+ const props = __spreadValues(__spreadValues({}, new LoadingOptions()), vprops);
9573
+ const loadingTemplateRef = props.loadingTemplateRef;
9574
+ const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
9575
+ el.style.position = props.positionType || "relative";
9576
+ el.options = props;
9577
+ el.instance = loadingInstance;
9578
+ el.mask = (_a = loadingInstance == null ? void 0 : loadingInstance.proxy) == null ? void 0 : _a.$el;
9579
+ };
9580
+ const LoadingDirective = {
9581
+ mounted: function(el, binding, vnode) {
9582
+ handleProps(el, vnode.props);
9583
+ removeAttribute(el);
9584
+ !isEmpty(binding.value) && toggleLoading(el, binding);
9585
+ },
9586
+ updated: function(el, binding, vnode) {
9587
+ if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el)) {
9588
+ return;
9589
+ }
9590
+ !cacheInstance.has(el) && handleProps(el, vnode.props);
9591
+ removeAttribute(el);
9592
+ toggleLoading(el, binding);
9593
+ }
9594
+ };
9386
9595
  var Select = defineComponent({
9387
9596
  name: "DSelect",
9597
+ directives: {
9598
+ dLoading: LoadingDirective
9599
+ },
9388
9600
  props: selectProps,
9389
9601
  emits: ["toggle-change", "value-change", "update:modelValue", "focus", "blur", "remove-tag", "clear", "input-change"],
9390
9602
  setup(props, ctx2) {
@@ -9514,7 +9726,7 @@ var Select = defineComponent({
9514
9726
  }, {
9515
9727
  default: () => {
9516
9728
  var _a, _b, _c, _d;
9517
- return [createVNode("div", {
9729
+ return [withDirectives(createVNode("div", {
9518
9730
  "class": dropdownCls,
9519
9731
  "style": {
9520
9732
  width: `${dropdownWidth.value}`
@@ -9542,9 +9754,9 @@ var Select = defineComponent({
9542
9754
  "label": item.name,
9543
9755
  "disabled": isDisabled(item)
9544
9756
  }, null) : item.name || item.value]
9545
- }))]), [[vShow, !isLoading.value]]), isShowEmptyText.value && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
9757
+ }))]), [[vShow, !isLoading.value]]), (isLoading.value || isShowEmptyText.value) && createVNode("div", null, [((_c = ctx2.slots) == null ? void 0 : _c.empty) && ctx2.slots.empty(), !((_d = ctx2.slots) == null ? void 0 : _d.empty) && createVNode("p", {
9546
9758
  "class": dropdownEmptyCls
9547
- }, [emptyText.value])])])];
9759
+ }, [emptyText.value])])]), [[resolveDirective("dLoading"), isLoading.value]])];
9548
9760
  }
9549
9761
  }), [[vShow, isOpen.value]])]
9550
9762
  })]