You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2024/08/27 13:01:59 UTC
(servicecomb-fence) 02/02: publish compiled files
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-fence.git
commit 42caaf5d646309d8870e734a7da5f5f4625273cc
Author: liubao <bi...@qq.com>
AuthorDate: Tue Aug 27 20:54:26 2024 +0800
publish compiled files
---
.../src/main/resources/static/assets/index.css | 38 +-
.../src/main/resources/static/assets/index.js | 1271 +-
.../src/main/resources/static/assets/index10.js | 1137 +-
.../src/main/resources/static/assets/index11.js | 26546 +------------------
.../static/assets/{index10.js => index12.js} | 2 +-
.../static/assets/{index11.js => index13.js} | 4 +-
.../src/main/resources/static/assets/index3.js | 23938 +----------------
.../src/main/resources/static/assets/index5.js | 23983 ++++++++++++++++-
.../src/main/resources/static/assets/index6.js | 898 +-
.../src/main/resources/static/assets/index7.js | 295 +-
.../src/main/resources/static/assets/index8.js | 1069 +-
.../src/main/resources/static/assets/index9.js | 1822 +-
.../src/main/resources/static/assets/time.js | 4 +-
13 files changed, 27331 insertions(+), 53676 deletions(-)
diff --git a/admin-website/src/main/resources/static/assets/index.css b/admin-website/src/main/resources/static/assets/index.css
index 40805b2..27b6a0b 100644
--- a/admin-website/src/main/resources/static/assets/index.css
+++ b/admin-website/src/main/resources/static/assets/index.css
@@ -454,7 +454,7 @@
font-size: 14px;
text-align: left;
}
-.main-title[data-v-22812e81] {
+.main-title[data-v-aee1960e] {
height: 20px;
font-size: 14px;
line-height: 20px;
@@ -464,81 +464,81 @@
word-break: break-all;
color: #000;
}
-.title[data-v-22812e81] {
+.title[data-v-aee1960e] {
height: 20px;
font-size: 14px;
line-height: 20px;
text-align: left;
}
-.menu-title[data-v-22812e81] {
+.menu-title[data-v-aee1960e] {
display: flex;
gap: 10px;
align-items: center;
height: 20px;
}
-.menu-title > svg[data-v-22812e81] {
+.menu-title > svg[data-v-aee1960e] {
width: 1.3em;
height: 1.3em;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content {
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content {
color: #000 !important;
background: none !important;
margin-left: 0 !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content:hover {
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content:hover {
background: #fff !important;
color: #fff !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
> .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content
{
background-color: var(--ti-tree-menu-node-hover-bg-color) !important;
margin-left: 0 !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
> .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content
:hover {
background: var(--ti-tree-menu-node-hover-bg-color) !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
.tiny-tree-node__wrapper .is-current .tiny-tree-node__content .tree-node-name {
border-left: 2px solid var(--ti-tree-menu-square-left-border-color, '#fff') !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
.tiny-tree-node__wrapper .is-current .tiny-tree-node__content .tiny-tree-node__content-right {
background-color: var(--ti-tree-menu-node-hover-bg-color) !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
.tiny-tree-node__wrapper .is-current .tiny-tree-node__content .tiny-tree-node__content-left
.tiny-tree-node__content-box {
background-color: var(--ti-tree-menu-node-hover-bg-color) !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
.tiny-tree-node__wrapper .is-current .tiny-tree-node__content .tiny-tree-node__content-left
.tiny-tree-node__content-box:before {
display: none !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-expanded > .tiny-tree-node__children
.tiny-tree-node__wrapper .is-current .tiny-tree-node__content .tiny-tree-node__content-left:before {
display: none !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content {
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content {
background-color: #fff !important;
}
-[data-v-22812e81] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content .tiny-tree-node__content-box {
+[data-v-aee1960e] .tiny-tree-node__wrapper > .is-current > .tiny-tree-node__content .tiny-tree-node__content-box {
background-color: #fff !important;
}
-[data-v-22812e81] .tiny-tree-node__content:hover {
+[data-v-aee1960e] .tiny-tree-node__content:hover {
background-color: var(--ti-tree-node-content-hover-bg-color) !important;
}
-[data-v-22812e81] .tiny-tree-menu__wrap > .tiny-tree-node__wrapper > .is-root > .tiny-tree-node__content
+[data-v-aee1960e] .tiny-tree-menu__wrap > .tiny-tree-node__wrapper > .is-root > .tiny-tree-node__content
> .tiny-tree-node__content-left .tiny-tree-node__content-box .tree-node-name {
padding: 0 8px !important;
}
-[data-v-22812e81] .tiny-tree-node > .tiny-tree-node__content {
+[data-v-aee1960e] .tiny-tree-node > .tiny-tree-node__content {
margin-left: 0 !important;
}
-.tiny-tree-menu .tiny-tree .tiny-tree-node.is-current > .tiny-tree-node__content .tree-node-name .tiny-svg[data-v-22812e81] {
+.tiny-tree-menu .tiny-tree .tiny-tree-node.is-current > .tiny-tree-node__content .tree-node-name .tiny-svg[data-v-aee1960e] {
fill: var(--ti-base-icon-color);
}
.layout[data-v-6254482e] {
diff --git a/admin-website/src/main/resources/static/assets/index.js b/admin-website/src/main/resources/static/assets/index.js
index 39ed29a..5714c44 100644
--- a/admin-website/src/main/resources/static/assets/index.js
+++ b/admin-website/src/main/resources/static/assets/index.js
@@ -72,13 +72,13 @@ else if (typeof commonjsGlobal !== "undefined") {
}
var zrender = {};
var idStart = 2311;
-function _default$1a() {
+function _default$1g() {
return idStart++;
}
-var guid$3 = _default$1a;
-var env$9 = {};
+var guid$3 = _default$1g;
+var env$a = {};
if (typeof wx === "object" && typeof wx.getSystemInfoSync === "function") {
- env$9 = {
+ env$a = {
browser: {},
os: {},
node: false,
@@ -90,7 +90,7 @@ if (typeof wx === "object" && typeof wx.getSystemInfoSync === "function") {
domSupported: false
};
} else if (typeof document === "undefined" && typeof self !== "undefined") {
- env$9 = {
+ env$a = {
browser: {},
os: {},
node: false,
@@ -99,7 +99,7 @@ if (typeof wx === "object" && typeof wx.getSystemInfoSync === "function") {
domSupported: false
};
} else if (typeof navigator === "undefined") {
- env$9 = {
+ env$a = {
browser: {},
os: {},
node: true,
@@ -110,9 +110,9 @@ if (typeof wx === "object" && typeof wx.getSystemInfoSync === "function") {
domSupported: false
};
} else {
- env$9 = detect(navigator.userAgent);
+ env$a = detect(navigator.userAgent);
}
-var _default$19 = env$9;
+var _default$1f = env$a;
function detect(ua2) {
var os = {};
var browser = {};
@@ -163,7 +163,7 @@ function detect(ua2) {
domSupported: typeof document !== "undefined"
};
}
-var env_1 = _default$19;
+var env_1 = _default$1f;
var util$8 = {};
var BUILTIN_OBJECT = {
"[object Function]": 1,
@@ -316,7 +316,7 @@ function inherits$2(clazz2, baseClazz) {
clazz2.prototype.constructor = clazz2;
clazz2.superClass = baseClazz;
}
-function mixin$1(target, source, overlay) {
+function mixin$2(target, source, overlay) {
target = "prototype" in target ? target.prototype : target;
source = "prototype" in source ? source.prototype : source;
defaults$3(target, source, overlay);
@@ -546,7 +546,7 @@ util$8.createCanvas = createCanvas;
util$8.getContext = getContext$1;
util$8.indexOf = indexOf$3;
util$8.inherits = inherits$2;
-util$8.mixin = mixin$1;
+util$8.mixin = mixin$2;
util$8.isArrayLike = isArrayLike$2;
util$8.each = each$e;
util$8.map = map$4;
@@ -787,8 +787,8 @@ function param(target, e2) {
topTarget: e2 && e2.topTarget
};
}
-var _default$18 = Draggable$1;
-var Draggable_1 = _default$18;
+var _default$1e = Draggable$1;
+var Draggable_1 = _default$1e;
var arrySlice = Array.prototype.slice;
var Eventful$4 = function(eventProcessor) {
this._$handlers = {};
@@ -994,8 +994,8 @@ function on$1(eventful, event2, query, handler, context, isOnce) {
lastWrap && lastWrap.callAtLast ? _h[event2].splice(lastIndex, 0, wrap) : _h[event2].push(wrap);
return eventful;
}
-var _default$17 = Eventful$4;
-var Eventful_1 = _default$17;
+var _default$1d = Eventful$4;
+var Eventful_1 = _default$1d;
var event$1 = {};
var dom = {};
var fourPointsTransform = {};
@@ -1048,7 +1048,7 @@ function buildTransformer$1(src, dest) {
};
}
fourPointsTransform.buildTransformer = buildTransformer$1;
-var env$8 = env_1;
+var env$9 = env_1;
var _fourPointsTransform = fourPointsTransform;
var buildTransformer = _fourPointsTransform.buildTransformer;
var EVENT_SAVED_PROP = "___zrEVENTSAVED";
@@ -1057,7 +1057,7 @@ function transformLocalCoord(out2, elFrom, elTarget, inX, inY) {
return transformCoordWithViewport$1(_calcOut$1, elFrom, inX, inY, true) && transformCoordWithViewport$1(out2, elTarget, _calcOut$1[0], _calcOut$1[1]);
}
function transformCoordWithViewport$1(out2, el, inX, inY, inverse) {
- if (el.getBoundingClientRect && env$8.domSupported && !isCanvasEl$1(el)) {
+ if (el.getBoundingClientRect && env$9.domSupported && !isCanvasEl$1(el)) {
var saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {});
var markers = prepareCoordMarkers(el, saved);
var transformer = preparePointerTransformer(markers, saved, inverse);
@@ -1129,7 +1129,7 @@ dom.transformCoordWithViewport = transformCoordWithViewport$1;
dom.isCanvasEl = isCanvasEl$1;
var Eventful$3 = Eventful_1;
event$1.Dispatcher = Eventful$3;
-var env$7 = env_1;
+var env$8 = env_1;
var _dom = dom;
var isCanvasEl = _dom.isCanvasEl;
var transformCoordWithViewport = _dom.transformCoordWithViewport;
@@ -1138,9 +1138,9 @@ var MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
var _calcOut = [];
function clientToLocal(el, e2, out2, calculate) {
out2 = out2 || {};
- if (calculate || !env$7.canvasSupported) {
+ if (calculate || !env$8.canvasSupported) {
calculateZrXY(el, e2, out2);
- } else if (env$7.browser.firefox && e2.layerX != null && e2.layerX !== e2.offsetX) {
+ } else if (env$8.browser.firefox && e2.layerX != null && e2.layerX !== e2.offsetX) {
out2.zrX = e2.layerX;
out2.zrY = e2.layerY;
} else if (e2.offsetX != null) {
@@ -1152,7 +1152,7 @@ function clientToLocal(el, e2, out2, calculate) {
return out2;
}
function calculateZrXY(el, e2, out2) {
- if (env$7.domSupported && el.getBoundingClientRect) {
+ if (env$8.domSupported && el.getBoundingClientRect) {
var ex = e2.clientX;
var ey = e2.clientY;
if (isCanvasEl(el)) {
@@ -1305,8 +1305,8 @@ var recognizers = {
}
// Only pinch currently.
};
-var _default$16 = GestureMgr$1;
-var GestureMgr_1 = _default$16;
+var _default$1c = GestureMgr$1;
+var GestureMgr_1 = _default$1c;
var util$7 = util$8;
var vec2$3 = requireVector();
var Draggable = Draggable_1;
@@ -1568,8 +1568,8 @@ function isOutsideBoundary(handlerInstance, x, y) {
}
util$7.mixin(Handler$1, Eventful$2);
util$7.mixin(Handler$1, Draggable);
-var _default$15 = Handler$1;
-var Handler_1 = _default$15;
+var _default$1b = Handler$1;
+var Handler_1 = _default$1b;
var matrix$4 = {};
var hasRequiredMatrix;
function requireMatrix() {
@@ -1874,8 +1874,8 @@ Transformable$2.getLocalTransform = function(target, m2) {
m2[5] += position[1];
return m2;
};
-var _default$14 = Transformable$2;
-var Transformable_1 = _default$14;
+var _default$1a = Transformable$2;
+var Transformable_1 = _default$1a;
var easing = {
/**
* @param {number} k
@@ -2193,8 +2193,8 @@ var easing = {
return easing.bounceOut(k * 2 - 1) * 0.5 + 0.5;
}
};
-var _default$13 = easing;
-var easing_1 = _default$13;
+var _default$19 = easing;
+var easing_1 = _default$19;
var easingFuncs = easing_1;
function Clip$1(options) {
this._target = options.target;
@@ -2259,8 +2259,8 @@ Clip$1.prototype = {
this._paused = false;
}
};
-var _default$12 = Clip$1;
-var Clip_1 = _default$12;
+var _default$18 = Clip$1;
+var Clip_1 = _default$18;
var color$1 = {};
var LinkedList = function() {
this.head = null;
@@ -2359,8 +2359,8 @@ LRUProto.clear = function() {
this._list.clear();
this._map = {};
};
-var _default$11 = LRU$2;
-var LRU_1 = _default$11;
+var _default$17 = LRU$2;
+var LRU_1 = _default$17;
var LRU$1 = LRU_1;
var kCSSColorTable = {
"transparent": [0, 0, 0, 0],
@@ -3254,8 +3254,8 @@ Animator$2.prototype = {
return this._clipList;
}
};
-var _default$10 = Animator$2;
-var Animator_1 = _default$10;
+var _default$16 = Animator$2;
+var Animator_1 = _default$16;
var config = {};
var dpr$1 = 1;
if (typeof window !== "undefined") {
@@ -3272,8 +3272,8 @@ var logError$2 = function() {
if (debugMode === 1) {
logError$2 = console.error;
}
-var _default$$ = logError$2;
-var log$2 = _default$$;
+var _default$15 = logError$2;
+var log$2 = _default$15;
var Animator$1 = Animator_1;
var logError$1 = log$2;
var _util$f = util$8;
@@ -3463,13 +3463,13 @@ function setAttrByPath(el, path2, name2, value) {
el.attr(props2);
}
}
-var _default$_ = Animatable$1;
-var Animatable_1 = _default$_;
+var _default$14 = Animatable$1;
+var Animatable_1 = _default$14;
var guid$2 = guid$3;
var Eventful$1 = Eventful_1;
var Transformable$1 = Transformable_1;
var Animatable = Animatable_1;
-var zrUtil$m = util$8;
+var zrUtil$o = util$8;
var Element$2 = function(opts) {
Transformable$1.call(this, opts);
Eventful$1.call(this, opts);
@@ -3600,7 +3600,7 @@ Element$2.prototype = {
attr: function(key2, value) {
if (typeof key2 === "string") {
this.attrKV(key2, value);
- } else if (zrUtil$m.isObject(key2)) {
+ } else if (zrUtil$o.isObject(key2)) {
for (var name2 in key2) {
if (key2.hasOwnProperty(name2)) {
this.attrKV(name2, key2[name2]);
@@ -3675,11 +3675,11 @@ Element$2.prototype = {
}
}
};
-zrUtil$m.mixin(Element$2, Animatable);
-zrUtil$m.mixin(Element$2, Transformable$1);
-zrUtil$m.mixin(Element$2, Eventful$1);
-var _default$Z = Element$2;
-var Element_1 = _default$Z;
+zrUtil$o.mixin(Element$2, Animatable);
+zrUtil$o.mixin(Element$2, Transformable$1);
+zrUtil$o.mixin(Element$2, Eventful$1);
+var _default$13 = Element$2;
+var Element_1 = _default$13;
var vec2$2 = requireVector();
var matrix$2 = requireMatrix();
var v2ApplyTransform$1 = vec2$2.applyTransform;
@@ -3809,9 +3809,9 @@ BoundingRect$8.prototype = {
BoundingRect$8.create = function(rect) {
return new BoundingRect$8(rect.x, rect.y, rect.width, rect.height);
};
-var _default$Y = BoundingRect$8;
-var BoundingRect_1 = _default$Y;
-var zrUtil$l = util$8;
+var _default$12 = BoundingRect$8;
+var BoundingRect_1 = _default$12;
+var zrUtil$n = util$8;
var Element$1 = Element_1;
var BoundingRect$7 = BoundingRect_1;
var Group$5 = function(opts) {
@@ -3923,7 +3923,7 @@ Group$5.prototype = {
var zr = this.__zr;
var storage2 = this.__storage;
var children3 = this._children;
- var idx = zrUtil$l.indexOf(children3, child);
+ var idx = zrUtil$n.indexOf(children3, child);
if (idx < 0) {
return this;
}
@@ -4038,9 +4038,9 @@ Group$5.prototype = {
return rect || tmpRect2;
}
};
-zrUtil$l.inherits(Group$5, Element$1);
-var _default$X = Group$5;
-var Group_1 = _default$X;
+zrUtil$n.inherits(Group$5, Element$1);
+var _default$11 = Group$5;
+var Group_1 = _default$11;
var DEFAULT_MIN_MERGE = 32;
var DEFAULT_MIN_GALLOPING = 7;
function minRunLength(n2) {
@@ -4549,7 +4549,7 @@ function sort(array, compare2, lo, hi) {
}
var timsort$2 = sort;
var util$6 = util$8;
-var env$6 = env_1;
+var env$7 = env_1;
var Group$4 = Group_1;
var timsort$1 = timsort$2;
function shapeCompareFunc(a2, b) {
@@ -4606,7 +4606,7 @@ Storage$1.prototype = {
this._updateAndAddDisplayable(roots2[i2], null, includeIgnore);
}
displayList.length = this._displayListLen;
- env$6.canvasSupported && timsort$1(displayList, shapeCompareFunc);
+ env$7.canvasSupported && timsort$1(displayList, shapeCompareFunc);
},
_updateAndAddDisplayable: function(el, clipPaths, includeIgnore) {
if (el.ignore && !includeIgnore) {
@@ -4716,8 +4716,8 @@ Storage$1.prototype = {
},
displayableSortFunc: shapeCompareFunc
};
-var _default$W = Storage$1;
-var Storage_1 = _default$W;
+var _default$10 = Storage$1;
+var Storage_1 = _default$10;
var SHADOW_PROPS = {
"shadowBlur": 1,
"shadowOffsetX": 1,
@@ -4729,13 +4729,13 @@ var SHADOW_PROPS = {
"textBoxShadowOffsetX": 1,
"textBoxShadowOffsetY": 1
};
-function _default$V(ctx, propName, value) {
+function _default$$(ctx, propName, value) {
if (SHADOW_PROPS.hasOwnProperty(propName)) {
return value *= ctx.dpr;
}
return value;
}
-var fixShadow$2 = _default$V;
+var fixShadow$2 = _default$$;
var constant = {};
var ContextCachedBy$3 = {
NONE: 0,
@@ -5137,8 +5137,8 @@ for (var i$1 = 0; i$1 < STYLE_COMMON_PROPS.length; i$1++) {
}
}
Style$3.getGradient = styleProto.getGradient;
-var _default$U = Style$3;
-var Style_1 = _default$U;
+var _default$_ = Style$3;
+var Style_1 = _default$_;
var Pattern$2 = function(image2, repeat) {
this.image = image2;
this.repeat = repeat;
@@ -5147,8 +5147,8 @@ var Pattern$2 = function(image2, repeat) {
Pattern$2.prototype.getCanvasPattern = function(ctx) {
return ctx.createPattern(this.image, this.repeat || "repeat");
};
-var _default$T = Pattern$2;
-var Pattern_1 = _default$T;
+var _default$Z = Pattern$2;
+var Pattern_1 = _default$Z;
var util$5 = util$8;
var _config$2 = config;
var devicePixelRatio$1 = _config$2.devicePixelRatio;
@@ -5300,13 +5300,13 @@ Layer$1.prototype = {
}
}
};
-var _default$S = Layer$1;
-var Layer_1 = _default$S;
-var _default$R = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || // https://github.com/ecomfe/zrender/issues/189#issuecomment-224919809
+var _default$Y = Layer$1;
+var Layer_1 = _default$Y;
+var _default$X = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || // https://github.com/ecomfe/zrender/issues/189#issuecomment-224919809
window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(func) {
setTimeout(func, 16);
};
-var requestAnimationFrame$4 = _default$R;
+var requestAnimationFrame$4 = _default$X;
var text$1 = {};
var text = {};
var image = {};
@@ -5912,14 +5912,14 @@ var each$d = _util$d.each;
var normalizeCssArray = _util$d.normalizeCssArray;
var isString$4 = _util$d.isString;
var isObject$7 = _util$d.isObject;
-var textContain$2 = text;
+var textContain$3 = text;
var roundRectHelper$1 = roundRect;
var imageHelper$1 = image;
var fixShadow = fixShadow$2;
var _constant$1 = constant;
var ContextCachedBy$1 = _constant$1.ContextCachedBy;
var WILL_BE_RESTORED = _constant$1.WILL_BE_RESTORED;
-var DEFAULT_FONT = textContain$2.DEFAULT_FONT;
+var DEFAULT_FONT = textContain$3.DEFAULT_FONT;
var VALID_TEXT_ALIGN = {
left: 1,
right: 1,
@@ -5940,7 +5940,7 @@ function normalizeTextStyle(style2) {
}
function normalizeStyle(style2) {
if (style2) {
- style2.font = textContain$2.makeFont(style2);
+ style2.font = textContain$3.makeFont(style2);
var textAlign = style2.textAlign;
textAlign === "middle" && (textAlign = "center");
style2.textAlign = textAlign == null || VALID_TEXT_ALIGN[textAlign] ? textAlign : "left";
@@ -5983,7 +5983,7 @@ function renderPlainText(hostEl, ctx, text2, style2, rect, prevEl) {
var textLineHeight = style2.textLineHeight;
var contentBlock = hostEl.__textCotentBlock;
if (!contentBlock || hostEl.__dirtyText) {
- contentBlock = hostEl.__textCotentBlock = textContain$2.parsePlainText(text2, computedFont, textPadding, textLineHeight, style2.truncate);
+ contentBlock = hostEl.__textCotentBlock = textContain$3.parsePlainText(text2, computedFont, textPadding, textLineHeight, style2.truncate);
}
var outerHeight = contentBlock.outerHeight;
var textLines = contentBlock.lines;
@@ -5994,14 +5994,14 @@ function renderPlainText(hostEl, ctx, text2, style2, rect, prevEl) {
var textAlign = boxPos.textAlign || "left";
var textVerticalAlign = boxPos.textVerticalAlign;
applyTextRotation(ctx, style2, rect, baseX, baseY);
- var boxY = textContain$2.adjustTextY(baseY, outerHeight, textVerticalAlign);
+ var boxY = textContain$3.adjustTextY(baseY, outerHeight, textVerticalAlign);
var textX = baseX;
var textY = boxY;
if (needDrawBg || textPadding) {
- var textWidth = textContain$2.getWidth(text2, computedFont);
+ var textWidth = textContain$3.getWidth(text2, computedFont);
var outerWidth = textWidth;
textPadding && (outerWidth += textPadding[1] + textPadding[3]);
- var boxX = textContain$2.adjustTextX(baseX, outerWidth, textAlign);
+ var boxX = textContain$3.adjustTextX(baseX, outerWidth, textAlign);
needDrawBg && drawBackground(hostEl, ctx, style2, boxX, boxY, outerWidth, outerHeight);
if (textPadding) {
textX = getTextXForPadding(baseX, textAlign, textPadding);
@@ -6057,7 +6057,7 @@ function renderRichText(hostEl, ctx, text2, style2, rect, prevEl) {
}
var contentBlock = hostEl.__textCotentBlock;
if (!contentBlock || hostEl.__dirtyText) {
- contentBlock = hostEl.__textCotentBlock = textContain$2.parseRichText(text2, style2);
+ contentBlock = hostEl.__textCotentBlock = textContain$3.parseRichText(text2, style2);
}
drawRichText(hostEl, ctx, contentBlock, style2, rect);
}
@@ -6072,8 +6072,8 @@ function drawRichText(hostEl, ctx, contentBlock, style2, rect) {
var textAlign = boxPos.textAlign;
var textVerticalAlign = boxPos.textVerticalAlign;
applyTextRotation(ctx, style2, rect, baseX, baseY);
- var boxX = textContain$2.adjustTextX(baseX, outerWidth, textAlign);
- var boxY = textContain$2.adjustTextY(baseY, outerHeight, textVerticalAlign);
+ var boxX = textContain$3.adjustTextX(baseX, outerWidth, textAlign);
+ var boxY = textContain$3.adjustTextY(baseY, outerHeight, textVerticalAlign);
var xLeft = boxX;
var lineTop = boxY;
if (textPadding) {
@@ -6238,7 +6238,7 @@ function getBoxPosition(out2, hostEl, style2, rect) {
baseX = rect.x + parsePercent$1(textPosition[0], rect.width);
baseY = rect.y + parsePercent$1(textPosition[1], rect.height);
} else {
- var res = hostEl && hostEl.calculateTextPosition ? hostEl.calculateTextPosition(_tmpTextPositionResult, style2, rect) : textContain$2.calculateTextPosition(_tmpTextPositionResult, style2, rect);
+ var res = hostEl && hostEl.calculateTextPosition ? hostEl.calculateTextPosition(_tmpTextPositionResult, style2, rect) : textContain$3.calculateTextPosition(_tmpTextPositionResult, style2, rect);
baseX = res.x;
baseY = res.y;
textAlign = textAlign || res.textAlign;
@@ -6337,7 +6337,7 @@ function requireRectText() {
RectText_1 = _default68;
return RectText_1;
}
-var zrUtil$k = util$8;
+var zrUtil$m = util$8;
var Style$1 = Style_1;
var Element = Element_1;
var RectText = requireRectText();
@@ -6563,13 +6563,13 @@ Displayable$3.prototype = {
*/
calculateTextPosition: null
};
-zrUtil$k.inherits(Displayable$3, Element);
-zrUtil$k.mixin(Displayable$3, RectText);
-var _default$Q = Displayable$3;
-var Displayable_1 = _default$Q;
+zrUtil$m.inherits(Displayable$3, Element);
+zrUtil$m.mixin(Displayable$3, RectText);
+var _default$W = Displayable$3;
+var Displayable_1 = _default$W;
var Displayable$2 = Displayable_1;
var BoundingRect$5 = BoundingRect_1;
-var zrUtil$j = util$8;
+var zrUtil$l = util$8;
var imageHelper = image;
function ZImage$2(opts) {
Displayable$2.call(this, opts);
@@ -6625,9 +6625,9 @@ ZImage$2.prototype = {
return this._rect;
}
};
-zrUtil$j.inherits(ZImage$2, Displayable$2);
-var _default$P = ZImage$2;
-var Image$2 = _default$P;
+zrUtil$l.inherits(ZImage$2, Displayable$2);
+var _default$V = ZImage$2;
+var Image$2 = _default$V;
var _config$1 = config;
var devicePixelRatio = _config$1.devicePixelRatio;
var util$4 = util$8;
@@ -6637,7 +6637,7 @@ var timsort = timsort$2;
var Layer = Layer_1;
var requestAnimationFrame$3 = requestAnimationFrame$4;
var Image$1 = Image$2;
-var env$5 = env_1;
+var env$6 = env_1;
var HOVER_LAYER_ZLEVEL = 1e5;
var CANVAS_ZLEVEL = 314159;
var EL_AFTER_INCREMENTAL_INC = 0.01;
@@ -6957,7 +6957,7 @@ Painter$3.prototype = {
}
ctx.restore();
}
- if (env$5.wxa) {
+ if (env$6.wxa) {
util$4.each(this._layers, function(layer2) {
if (layer2 && layer2.ctx && layer2.ctx.draw) {
layer2.ctx.draw();
@@ -7406,8 +7406,8 @@ Painter$3.prototype = {
return imgShape;
}
};
-var _default$O = Painter$3;
-var Painter_1 = _default$O;
+var _default$U = Painter$3;
+var Painter_1 = _default$U;
var util$3 = util$8;
var _event$1 = event$1;
var Dispatcher = _event$1.Dispatcher;
@@ -7576,18 +7576,18 @@ Animation$2.prototype = {
}
};
util$3.mixin(Animation$2, Dispatcher);
-var _default$N = Animation$2;
-var Animation_1 = _default$N;
+var _default$T = Animation$2;
+var Animation_1 = _default$T;
var _event = event$1;
var addEventListener = _event.addEventListener;
var removeEventListener = _event.removeEventListener;
var normalizeEvent = _event.normalizeEvent;
var getNativeEvent = _event.getNativeEvent;
-var zrUtil$i = util$8;
+var zrUtil$k = util$8;
var Eventful = Eventful_1;
-var env$4 = env_1;
+var env$5 = env_1;
var TOUCH_CLICK_DELAY = 300;
-var globalEventSupported = env$4.domSupported;
+var globalEventSupported = env$5.domSupported;
var localNativeListenerNames = function() {
var mouseHandlerNames = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"];
var touchHandlerNames = ["touchstart", "touchend", "touchmove"];
@@ -7597,7 +7597,7 @@ var localNativeListenerNames = function() {
pointermove: 1,
pointerout: 1
};
- var pointerHandlerNames = zrUtil$i.map(mouseHandlerNames, function(name2) {
+ var pointerHandlerNames = zrUtil$k.map(mouseHandlerNames, function(name2) {
var nm = name2.replace("mouse", "pointer");
return pointerEventNameMap.hasOwnProperty(nm) ? nm : name2;
});
@@ -7612,7 +7612,7 @@ var globalNativeListenerNames = {
pointer: ["pointermove", "pointerup"]
};
function eventNameFix(name2) {
- return name2 === "mousewheel" && env$4.browser.firefox ? "DOMMouseScroll" : name2;
+ return name2 === "mousewheel" && env$5.browser.firefox ? "DOMMouseScroll" : name2;
}
function isPointerFromTouch(event2) {
var pointerType = event2.pointerType;
@@ -7651,7 +7651,7 @@ function FakeGlobalEvent(instance, event2) {
this.clientY = event2.clientY;
}
var fakeGlobalEventProto = FakeGlobalEvent.prototype;
-fakeGlobalEventProto.stopPropagation = fakeGlobalEventProto.stopImmediatePropagation = fakeGlobalEventProto.preventDefault = zrUtil$i.noop;
+fakeGlobalEventProto.stopPropagation = fakeGlobalEventProto.stopImmediatePropagation = fakeGlobalEventProto.preventDefault = zrUtil$k.noop;
var localDOMHandlers = {
mousedown: function(event2) {
event2 = normalizeEvent(this.dom, event2);
@@ -7720,7 +7720,7 @@ var localDOMHandlers = {
}
}
};
-zrUtil$i.each(["click", "mousewheel", "dblclick", "contextmenu"], function(name2) {
+zrUtil$k.each(["click", "mousewheel", "dblclick", "contextmenu"], function(name2) {
localDOMHandlers[name2] = function(event2) {
event2 = normalizeEvent(this.dom, event2);
this.trigger(name2, event2);
@@ -7750,22 +7750,22 @@ var globalDOMHandlers = {
};
function mountLocalDOMEventListeners(instance, scope) {
var domHandlers = scope.domHandlers;
- if (env$4.pointerEventsSupported) {
- zrUtil$i.each(localNativeListenerNames.pointer, function(nativeEventName) {
+ if (env$5.pointerEventsSupported) {
+ zrUtil$k.each(localNativeListenerNames.pointer, function(nativeEventName) {
mountSingleDOMEventListener(scope, nativeEventName, function(event2) {
domHandlers[nativeEventName].call(instance, event2);
});
});
} else {
- if (env$4.touchEventsSupported) {
- zrUtil$i.each(localNativeListenerNames.touch, function(nativeEventName) {
+ if (env$5.touchEventsSupported) {
+ zrUtil$k.each(localNativeListenerNames.touch, function(nativeEventName) {
mountSingleDOMEventListener(scope, nativeEventName, function(event2) {
domHandlers[nativeEventName].call(instance, event2);
setTouchTimer(scope);
});
});
}
- zrUtil$i.each(localNativeListenerNames.mouse, function(nativeEventName) {
+ zrUtil$k.each(localNativeListenerNames.mouse, function(nativeEventName) {
mountSingleDOMEventListener(scope, nativeEventName, function(event2) {
event2 = getNativeEvent(event2);
if (!scope.touching) {
@@ -7776,10 +7776,10 @@ function mountLocalDOMEventListeners(instance, scope) {
}
}
function mountGlobalDOMEventListeners(instance, scope) {
- if (env$4.pointerEventsSupported) {
- zrUtil$i.each(globalNativeListenerNames.pointer, mount);
- } else if (!env$4.touchEventsSupported) {
- zrUtil$i.each(globalNativeListenerNames.mouse, mount);
+ if (env$5.pointerEventsSupported) {
+ zrUtil$k.each(globalNativeListenerNames.pointer, mount);
+ } else if (!env$5.touchEventsSupported) {
+ zrUtil$k.each(globalNativeListenerNames.mouse, mount);
}
function mount(nativeEventName) {
function nativeEventListener(event2) {
@@ -7852,12 +7852,12 @@ handlerDomProxyProto.dispose = function() {
handlerDomProxyProto.setCursor = function(cursorStyle) {
this.dom.style && (this.dom.style.cursor = cursorStyle || "default");
};
-zrUtil$i.mixin(HandlerDomProxy, Eventful);
-var _default$M = HandlerDomProxy;
-var HandlerProxy$1 = _default$M;
+zrUtil$k.mixin(HandlerDomProxy, Eventful);
+var _default$S = HandlerDomProxy;
+var HandlerProxy$1 = _default$S;
var guid$1 = guid$3;
-var env$3 = env_1;
-var zrUtil$h = util$8;
+var env$4 = env_1;
+var zrUtil$j = util$8;
var Handler = Handler_1;
var Storage = Storage_1;
var Painter$2 = Painter_1;
@@ -7872,7 +7872,7 @@ var HandlerProxy = HandlerProxy$1;
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/
-var useVML = !env$3.canvasSupported;
+var useVML = !env$4.canvasSupported;
var painterCtors = {
canvas: Painter$2
};
@@ -7923,11 +7923,11 @@ var ZRender = function(id, dom2, opts) {
var painter = new painterCtors[rendererType](dom2, storage2, opts, id);
this.storage = storage2;
this.painter = painter;
- var handerProxy = !env$3.node && !env$3.worker ? new HandlerProxy(painter.getViewportRoot(), painter.root) : null;
+ var handerProxy = !env$4.node && !env$4.worker ? new HandlerProxy(painter.getViewportRoot(), painter.root) : null;
this.handler = new Handler(storage2, painter, handerProxy, painter.root);
this.animation = new Animation$1({
stage: {
- update: zrUtil$h.bind(this.flush, this)
+ update: zrUtil$j.bind(this.flush, this)
}
});
this.animation.start();
@@ -8186,11 +8186,11 @@ zrender.dispose = dispose;
zrender.getInstance = getInstance;
zrender.registerPainter = registerPainter;
var model = {};
-var zrUtil$g = util$8;
-var env$2 = env_1;
-var each$c = zrUtil$g.each;
-var isObject$6 = zrUtil$g.isObject;
-var isArray$5 = zrUtil$g.isArray;
+var zrUtil$i = util$8;
+var env$3 = env_1;
+var each$c = zrUtil$i.each;
+var isObject$6 = zrUtil$i.isObject;
+var isArray$5 = zrUtil$i.isArray;
var DUMMY_COMPONENT_NAME_PREFIX = "series\0";
function normalizeToArray$3(value) {
return value instanceof Array ? value : value == null ? [] : [value];
@@ -8217,7 +8217,7 @@ function isDataItemOption$1(dataItem) {
}
function mappingToExists(exists, newCptOptions) {
newCptOptions = (newCptOptions || []).slice();
- var result = zrUtil$g.map(exists || [], function(obj, index3) {
+ var result = zrUtil$i.map(exists || [], function(obj, index3) {
return {
exist: obj
};
@@ -8263,14 +8263,14 @@ function mappingToExists(exists, newCptOptions) {
return result;
}
function makeIdAndName(mapResult) {
- var idMap = zrUtil$g.createHashMap();
+ var idMap = zrUtil$i.createHashMap();
each$c(mapResult, function(item, index3) {
var existCpt = item.exist;
existCpt && idMap.set(existCpt.id, item);
});
each$c(mapResult, function(item, index3) {
var opt = item.option;
- zrUtil$g.assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, "id duplicates: " + (opt && opt.id));
+ zrUtil$i.assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, "id duplicates: " + (opt && opt.id));
opt && opt.id != null && idMap.set(opt.id, item);
!item.keyInfo && (item.keyInfo = {});
});
@@ -8345,16 +8345,16 @@ function queryDataIndex(data, payload) {
if (payload.dataIndexInside != null) {
return payload.dataIndexInside;
} else if (payload.dataIndex != null) {
- return zrUtil$g.isArray(payload.dataIndex) ? zrUtil$g.map(payload.dataIndex, function(value) {
+ return zrUtil$i.isArray(payload.dataIndex) ? zrUtil$i.map(payload.dataIndex, function(value) {
return data.indexOfRawIndex(value);
}) : data.indexOfRawIndex(payload.dataIndex);
} else if (payload.name != null) {
- return zrUtil$g.isArray(payload.name) ? zrUtil$g.map(payload.name, function(value) {
+ return zrUtil$i.isArray(payload.name) ? zrUtil$i.map(payload.name, function(value) {
return data.indexOfName(value);
}) : data.indexOfName(payload.name);
}
}
-function makeInner$3() {
+function makeInner$4() {
var key2 = "__\0ec_inner_" + innerUniqueIndex++ + "_" + Math.random().toFixed(5);
return function(hostObj) {
return hostObj[key2] || (hostObj[key2] = {});
@@ -8362,7 +8362,7 @@ function makeInner$3() {
}
var innerUniqueIndex = 0;
function parseFinder(ecModel, finder, opt) {
- if (zrUtil$g.isString(finder)) {
+ if (zrUtil$i.isString(finder)) {
var obj = {};
obj[finder + "Index"] = 0;
finder = obj;
@@ -8381,7 +8381,7 @@ function parseFinder(ecModel, finder, opt) {
var parsedKey = key2.match(/^(\w+)(Index|Id|Name)$/) || [];
var mainType = parsedKey[1];
var queryType = (parsedKey[2] || "").toLowerCase();
- if (!mainType || !queryType || value == null || queryType === "index" && value === "none" || opt && opt.includeMainTypes && zrUtil$g.indexOf(opt.includeMainTypes, mainType) < 0) {
+ if (!mainType || !queryType || value == null || queryType === "index" && value === "none" || opt && opt.includeMainTypes && zrUtil$i.indexOf(opt.includeMainTypes, mainType) < 0) {
return;
}
var queryParam = {
@@ -8407,15 +8407,15 @@ function getAttribute(dom2, key2) {
}
function getTooltipRenderMode$1(renderModeOption) {
if (renderModeOption === "auto") {
- return env$2.domSupported ? "html" : "richText";
+ return env$3.domSupported ? "html" : "richText";
} else {
return renderModeOption || "html";
}
}
function groupData(array, getKey) {
- var buckets = zrUtil$g.createHashMap();
+ var buckets = zrUtil$i.createHashMap();
var keys = [];
- zrUtil$g.each(array, function(item) {
+ zrUtil$i.each(array, function(item) {
var key2 = getKey(item);
(buckets.get(key2) || (keys.push(key2), buckets.set(key2, []))).push(item);
});
@@ -8435,14 +8435,14 @@ model.isNameSpecified = isNameSpecified;
model.isIdInner = isIdInner;
model.compressBatches = compressBatches;
model.queryDataIndex = queryDataIndex;
-model.makeInner = makeInner$3;
+model.makeInner = makeInner$4;
model.parseFinder = parseFinder;
model.setAttribute = setAttribute;
model.getAttribute = getAttribute;
model.getTooltipRenderMode = getTooltipRenderMode$1;
model.groupData = groupData;
var clazz = {};
-var zrUtil$f = util$8;
+var zrUtil$h = util$8;
var TYPE_DELIMITER = ".";
var IS_CONTAINER = "___EC__COMPONENT__CONTAINER___";
function parseClassType$2(componentType) {
@@ -8458,9 +8458,9 @@ function parseClassType$2(componentType) {
return ret;
}
function checkClassType(componentType) {
- zrUtil$f.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType "' + componentType + '" illegal');
+ zrUtil$h.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType "' + componentType + '" illegal');
}
-function enableClassExtend(RootClass, mandatoryMethods) {
+function enableClassExtend$1(RootClass, mandatoryMethods) {
RootClass.$constructor = RootClass;
RootClass.extend = function(proto2) {
var superClass = this;
@@ -8471,17 +8471,17 @@ function enableClassExtend(RootClass, mandatoryMethods) {
proto2.$constructor.apply(this, arguments);
}
};
- zrUtil$f.extend(ExtendedClass.prototype, proto2);
+ zrUtil$h.extend(ExtendedClass.prototype, proto2);
ExtendedClass.extend = this.extend;
ExtendedClass.superCall = superCall;
ExtendedClass.superApply = superApply;
- zrUtil$f.inherits(ExtendedClass, this);
+ zrUtil$h.inherits(ExtendedClass, this);
ExtendedClass.superClass = superClass;
return ExtendedClass;
};
}
var classBase = 0;
-function enableClassCheck(Clz) {
+function enableClassCheck$1(Clz) {
var classAttr = ["__\0is_clz", classBase++, Math.random().toFixed(3)].join("_");
Clz.prototype[classAttr] = true;
Clz.isInstance = function(obj) {
@@ -8489,7 +8489,7 @@ function enableClassCheck(Clz) {
};
}
function superCall(context, methodName) {
- var args = zrUtil$f.slice(arguments, 2);
+ var args = zrUtil$h.slice(arguments, 2);
return this.superClass.prototype[methodName].apply(context, args);
}
function superApply(context, methodName, args) {
@@ -8526,7 +8526,7 @@ function enableClassManagement$1(entity, options) {
var result = [];
var obj = storage2[componentType.main];
if (obj && obj[IS_CONTAINER]) {
- zrUtil$f.each(obj, function(o2, type2) {
+ zrUtil$h.each(obj, function(o2, type2) {
type2 !== IS_CONTAINER && result.push(o2);
});
} else {
@@ -8540,7 +8540,7 @@ function enableClassManagement$1(entity, options) {
};
entity.getAllClassMainTypes = function() {
var types2 = [];
- zrUtil$f.each(storage2, function(obj, type2) {
+ zrUtil$h.each(storage2, function(obj, type2) {
types2.push(type2);
});
return types2;
@@ -8573,91 +8573,67 @@ function enableClassManagement$1(entity, options) {
function setReadOnly(obj, properties) {
}
clazz.parseClassType = parseClassType$2;
-clazz.enableClassExtend = enableClassExtend;
-clazz.enableClassCheck = enableClassCheck;
+clazz.enableClassExtend = enableClassExtend$1;
+clazz.enableClassCheck = enableClassCheck$1;
clazz.enableClassManagement = enableClassManagement$1;
clazz.setReadOnly = setReadOnly;
-var makeStyleMapper;
-var hasRequiredMakeStyleMapper;
-function requireMakeStyleMapper() {
- if (hasRequiredMakeStyleMapper)
- return makeStyleMapper;
- hasRequiredMakeStyleMapper = 1;
- var zrUtil2 = util$8;
- function _default68(properties) {
- for (var i2 = 0; i2 < properties.length; i2++) {
- if (!properties[i2][1]) {
- properties[i2][1] = properties[i2][0];
- }
+var zrUtil$g = util$8;
+function _default$R(properties) {
+ for (var i2 = 0; i2 < properties.length; i2++) {
+ if (!properties[i2][1]) {
+ properties[i2][1] = properties[i2][0];
}
- return function(model2, excludes, includes) {
- var style2 = {};
- for (var i3 = 0; i3 < properties.length; i3++) {
- var propName = properties[i3][1];
- if (excludes && zrUtil2.indexOf(excludes, propName) >= 0 || includes && zrUtil2.indexOf(includes, propName) < 0) {
- continue;
- }
- var val = model2.getShallow(propName);
- if (val != null) {
- style2[properties[i3][0]] = val;
- }
- }
- return style2;
- };
}
- makeStyleMapper = _default68;
- return makeStyleMapper;
-}
-var lineStyle;
-var hasRequiredLineStyle;
-function requireLineStyle() {
- if (hasRequiredLineStyle)
- return lineStyle;
- hasRequiredLineStyle = 1;
- var makeStyleMapper2 = requireMakeStyleMapper();
- var getLineStyle = makeStyleMapper2([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]);
- var _default68 = {
- getLineStyle: function(excludes) {
- var style2 = getLineStyle(this, excludes);
- style2.lineDash = this.getLineDash(style2.lineWidth);
- return style2;
- },
- getLineDash: function(lineWidth) {
- if (lineWidth == null) {
- lineWidth = 1;
- }
- var lineType = this.get("type");
- var dotSize = Math.max(lineWidth, 2);
- var dashSize = lineWidth * 4;
- return lineType === "solid" || lineType == null ? (
- // Use `false` but not `null` for the solid line here, because `null` might be
- // ignored when assigning to `el.style`. e.g., when setting `lineStyle.type` as
- // `'dashed'` and `emphasis.lineStyle.type` as `'solid'` in graph series, the
- // `lineDash` gotten form the latter one is not able to erase that from the former
- // one if using `null` here according to the emhpsis strategy in `util/graphic.js`.
- false
- ) : lineType === "dashed" ? [dashSize, dashSize] : [dotSize, dotSize];
- }
- };
- lineStyle = _default68;
- return lineStyle;
-}
-var areaStyle;
-var hasRequiredAreaStyle;
-function requireAreaStyle() {
- if (hasRequiredAreaStyle)
- return areaStyle;
- hasRequiredAreaStyle = 1;
- var makeStyleMapper2 = requireMakeStyleMapper();
- var getAreaStyle = makeStyleMapper2([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]);
- var _default68 = {
- getAreaStyle: function(excludes, includes) {
- return getAreaStyle(this, excludes, includes);
+ return function(model2, excludes, includes) {
+ var style2 = {};
+ for (var i3 = 0; i3 < properties.length; i3++) {
+ var propName = properties[i3][1];
+ if (excludes && zrUtil$g.indexOf(excludes, propName) >= 0 || includes && zrUtil$g.indexOf(includes, propName) < 0) {
+ continue;
+ }
+ var val = model2.getShallow(propName);
+ if (val != null) {
+ style2[properties[i3][0]] = val;
+ }
}
+ return style2;
};
- areaStyle = _default68;
- return areaStyle;
}
+var makeStyleMapper$3 = _default$R;
+var makeStyleMapper$2 = makeStyleMapper$3;
+var getLineStyle = makeStyleMapper$2([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]);
+var _default$Q = {
+ getLineStyle: function(excludes) {
+ var style2 = getLineStyle(this, excludes);
+ style2.lineDash = this.getLineDash(style2.lineWidth);
+ return style2;
+ },
+ getLineDash: function(lineWidth) {
+ if (lineWidth == null) {
+ lineWidth = 1;
+ }
+ var lineType = this.get("type");
+ var dotSize = Math.max(lineWidth, 2);
+ var dashSize = lineWidth * 4;
+ return lineType === "solid" || lineType == null ? (
+ // Use `false` but not `null` for the solid line here, because `null` might be
+ // ignored when assigning to `el.style`. e.g., when setting `lineStyle.type` as
+ // `'dashed'` and `emphasis.lineStyle.type` as `'solid'` in graph series, the
+ // `lineDash` gotten form the latter one is not able to erase that from the former
+ // one if using `null` here according to the emhpsis strategy in `util/graphic.js`.
+ false
+ ) : lineType === "dashed" ? [dashSize, dashSize] : [dotSize, dotSize];
+ }
+};
+var lineStyle = _default$Q;
+var makeStyleMapper$1 = makeStyleMapper$3;
+var getAreaStyle = makeStyleMapper$1([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]);
+var _default$P = {
+ getAreaStyle: function(excludes, includes) {
+ return getAreaStyle(this, excludes, includes);
+ }
+};
+var areaStyle = _default$P;
var graphic$4 = {};
var path$1 = {};
var curve$3 = {};
@@ -9700,8 +9676,8 @@ PathProxy$4.prototype = {
}
};
PathProxy$4.CMD = CMD$2;
-var _default$L = PathProxy$4;
-var PathProxy_1 = _default$L;
+var _default$O = PathProxy$4;
+var PathProxy_1 = _default$O;
var path = {};
var line$2 = {};
function containStroke$4(x0, y0, x1, y1, lineWidth, x, y) {
@@ -10103,7 +10079,7 @@ function containStroke(pathData, lineWidth, x, y) {
path.contain = contain;
path.containStroke = containStroke;
var Displayable$1 = Displayable_1;
-var zrUtil$e = util$8;
+var zrUtil$f = util$8;
var PathProxy$2 = PathProxy_1;
var pathContain = path;
var Pattern = Pattern_1;
@@ -10323,7 +10299,7 @@ Path$e.prototype = {
setShape: function(key2, value) {
var shape = this.shape;
if (shape) {
- if (zrUtil$e.isObject(key2)) {
+ if (zrUtil$f.isObject(key2)) {
for (var name2 in key2) {
if (key2.hasOwnProperty(name2)) {
shape[name2] = key2[name2];
@@ -10359,7 +10335,7 @@ Path$e.extend = function(defaults2) {
}
defaults2.init && defaults2.init.call(this, opts);
};
- zrUtil$e.inherits(Sub, Path$e);
+ zrUtil$f.inherits(Sub, Path$e);
for (var name2 in defaults2) {
if (name2 !== "style" && name2 !== "shape") {
Sub.prototype[name2] = defaults2[name2];
@@ -10367,9 +10343,9 @@ Path$e.extend = function(defaults2) {
}
return Sub;
};
-zrUtil$e.inherits(Path$e, Displayable$1);
-var _default$K = Path$e;
-var Path_1 = _default$K;
+zrUtil$f.inherits(Path$e, Displayable$1);
+var _default$N = Path$e;
+var Path_1 = _default$N;
var PathProxy$1 = PathProxy_1;
var _vector$2 = requireVector();
var v2ApplyTransform = _vector$2.applyTransform;
@@ -10377,7 +10353,7 @@ var CMD = PathProxy$1.CMD;
var points$1 = [[], [], []];
var mathSqrt$1 = Math.sqrt;
var mathAtan2 = Math.atan2;
-function _default$J(path2, m2) {
+function _default$M(path2, m2) {
var data = path2.data;
var cmd;
var nPoint;
@@ -10447,7 +10423,7 @@ function _default$J(path2, m2) {
}
}
}
-var transformPath$1 = _default$J;
+var transformPath$1 = _default$M;
var Path$d = Path_1;
var PathProxy = PathProxy_1;
var transformPath = transformPath$1;
@@ -10761,8 +10737,8 @@ path$1.createFromString = createFromString$1;
path$1.extendFromString = extendFromString;
path$1.mergePath = mergePath$1;
var Displayable = Displayable_1;
-var zrUtil$d = util$8;
-var textContain$1 = text;
+var zrUtil$e = util$8;
+var textContain$2 = text;
var textHelper = text$1;
var _constant = constant;
var ContextCachedBy = _constant.ContextCachedBy;
@@ -10791,7 +10767,7 @@ Text$3.prototype = {
this.__dirty && textHelper.normalizeTextStyle(style2, true);
if (!this._rect) {
style2.text;
- var rect = textContain$1.getBoundingRect(style2.text + "", style2.font, style2.textAlign, style2.textVerticalAlign, style2.textPadding, style2.textLineHeight, style2.rich);
+ var rect = textContain$2.getBoundingRect(style2.text + "", style2.font, style2.textAlign, style2.textVerticalAlign, style2.textPadding, style2.textLineHeight, style2.rich);
rect.x += style2.x || 0;
rect.y += style2.y || 0;
if (textHelper.getStroke(style2.textStroke, style2.textStrokeWidth)) {
@@ -10806,11 +10782,11 @@ Text$3.prototype = {
return this._rect;
}
};
-zrUtil$d.inherits(Text$3, Displayable);
-var _default$I = Text$3;
-var Text_1 = _default$I;
+zrUtil$e.inherits(Text$3, Displayable);
+var _default$L = Text$3;
+var Text_1 = _default$L;
var Path$c = Path_1;
-var _default$H = Path$c.extend({
+var _default$K = Path$c.extend({
type: "circle",
shape: {
cx: 0,
@@ -10824,11 +10800,11 @@ var _default$H = Path$c.extend({
ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2, true);
}
});
-var Circle$2 = _default$H;
-var env$1 = env_1;
+var Circle$2 = _default$K;
+var env$2 = env_1;
var shadowTemp = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]];
-function _default$G(orignalBrush) {
- return env$1.browser.ie && env$1.browser.version >= 11 ? function() {
+function _default$J(orignalBrush) {
+ return env$2.browser.ie && env$2.browser.version >= 11 ? function() {
var clipPaths = this.__clipPaths;
var style2 = this.style;
var modified;
@@ -10855,10 +10831,10 @@ function _default$G(orignalBrush) {
}
} : orignalBrush;
}
-var fixClipWithShadow$1 = _default$G;
+var fixClipWithShadow$1 = _default$J;
var Path$b = Path_1;
var fixClipWithShadow = fixClipWithShadow$1;
-var _default$F = Path$b.extend({
+var _default$I = Path$b.extend({
type: "sector",
shape: {
cx: 0,
@@ -10890,9 +10866,9 @@ var _default$F = Path$b.extend({
ctx.closePath();
}
});
-var Sector$1 = _default$F;
+var Sector$1 = _default$I;
var Path$a = Path_1;
-var _default$E = Path$a.extend({
+var _default$H = Path$a.extend({
type: "ring",
shape: {
cx: 0,
@@ -10910,7 +10886,7 @@ var _default$E = Path$a.extend({
ctx.arc(x, y, shape.r0, 0, PI22, true);
}
});
-var Ring$1 = _default$E;
+var Ring$1 = _default$H;
var poly$1 = {};
var _vector$1 = requireVector();
var v2Distance$1 = _vector$1.distance;
@@ -10919,7 +10895,7 @@ function interpolate(p0, p1, p2, p3, t2, t22, t3) {
var v1 = (p3 - p1) * 0.5;
return (2 * (p1 - p2) + v0 + v1) * t3 + (-3 * (p1 - p2) - 2 * v0 - v1) * t22 + v0 * t2 + p1;
}
-function _default$D(points2, isLoop) {
+function _default$G(points2, isLoop) {
var len = points2.length;
var ret = [];
var distance = 0;
@@ -10951,7 +10927,7 @@ function _default$D(points2, isLoop) {
}
return ret;
}
-var smoothSpline$1 = _default$D;
+var smoothSpline$1 = _default$G;
var _vector = requireVector();
var v2Min = _vector.min;
var v2Max = _vector.max;
@@ -10960,7 +10936,7 @@ var v2Distance = _vector.distance;
var v2Add = _vector.add;
var v2Clone = _vector.clone;
var v2Sub = _vector.sub;
-function _default$C(points2, smooth, isLoop, constraint) {
+function _default$F(points2, smooth, isLoop, constraint) {
var cps = [];
var v = [];
var v1 = [];
@@ -11020,7 +10996,7 @@ function _default$C(points2, smooth, isLoop, constraint) {
}
return cps;
}
-var smoothBezier$1 = _default$C;
+var smoothBezier$1 = _default$F;
var smoothSpline = smoothSpline$1;
var smoothBezier = smoothBezier$1;
function buildPath(ctx, shape, closePath) {
@@ -11052,7 +11028,7 @@ function buildPath(ctx, shape, closePath) {
poly$1.buildPath = buildPath;
var Path$9 = Path_1;
var polyHelper$1 = poly$1;
-var _default$B = Path$9.extend({
+var _default$E = Path$9.extend({
type: "polygon",
shape: {
points: null,
@@ -11063,10 +11039,10 @@ var _default$B = Path$9.extend({
polyHelper$1.buildPath(ctx, shape, true);
}
});
-var Polygon$2 = _default$B;
+var Polygon$2 = _default$E;
var Path$8 = Path_1;
var polyHelper = poly$1;
-var _default$A = Path$8.extend({
+var _default$D = Path$8.extend({
type: "polyline",
shape: {
points: null,
@@ -11081,7 +11057,7 @@ var _default$A = Path$8.extend({
polyHelper.buildPath(ctx, shape, false);
}
});
-var Polyline$2 = _default$A;
+var Polyline$2 = _default$D;
var subPixelOptimize$2 = {};
var round = Math.round;
function subPixelOptimizeLine$2(outputShape, inputShape, style2) {
@@ -11143,7 +11119,7 @@ var roundRectHelper = roundRect;
var _subPixelOptimize$1 = subPixelOptimize$2;
var subPixelOptimizeRect$1 = _subPixelOptimize$1.subPixelOptimizeRect;
var subPixelOptimizeOutputShape$1 = {};
-var _default$z = Path$7.extend({
+var _default$C = Path$7.extend({
type: "rect",
shape: {
// 左上、右上、右下、左下角的半径依次为r1、r2、r3、r4
@@ -11185,12 +11161,12 @@ var _default$z = Path$7.extend({
return;
}
});
-var Rect$2 = _default$z;
+var Rect$2 = _default$C;
var Path$6 = Path_1;
var _subPixelOptimize = subPixelOptimize$2;
var subPixelOptimizeLine$1 = _subPixelOptimize.subPixelOptimizeLine;
var subPixelOptimizeOutputShape = {};
-var _default$y = Path$6.extend({
+var _default$B = Path$6.extend({
type: "line",
shape: {
// Start point
@@ -11243,7 +11219,7 @@ var _default$y = Path$6.extend({
return [shape.x1 * (1 - p) + shape.x2 * p, shape.y1 * (1 - p) + shape.y2 * p];
}
});
-var Line$2 = _default$y;
+var Line$2 = _default$B;
var Path$5 = Path_1;
var vec2 = requireVector();
var _curve = curve$3;
@@ -11263,7 +11239,7 @@ function someVectorAt(shape, t2, isTangent) {
return [(isTangent ? quadraticDerivativeAt : quadraticAt)(shape.x1, shape.cpx1, shape.x2, t2), (isTangent ? quadraticDerivativeAt : quadraticAt)(shape.y1, shape.cpy1, shape.y2, t2)];
}
}
-var _default$x = Path$5.extend({
+var _default$A = Path$5.extend({
type: "bezier-curve",
shape: {
x1: 0,
@@ -11337,9 +11313,9 @@ var _default$x = Path$5.extend({
return vec2.normalize(p, p);
}
});
-var BezierCurve$1 = _default$x;
+var BezierCurve$1 = _default$A;
var Path$4 = Path_1;
-var _default$w = Path$4.extend({
+var _default$z = Path$4.extend({
type: "arc",
shape: {
cx: 0,
@@ -11366,9 +11342,9 @@ var _default$w = Path$4.extend({
ctx.arc(x, y, r2, startAngle, endAngle, !clockwise);
}
});
-var Arc$1 = _default$w;
+var Arc$1 = _default$z;
var Path$3 = Path_1;
-var _default$v = Path$3.extend({
+var _default$y = Path$3.extend({
type: "compound",
shape: {
paths: null
@@ -11410,7 +11386,7 @@ var _default$v = Path$3.extend({
return Path$3.prototype.getBoundingRect.call(this);
}
});
-var CompoundPath$1 = _default$v;
+var CompoundPath$1 = _default$y;
var Gradient$3 = function(colorStops) {
this.colorStops = colorStops || [];
};
@@ -11423,9 +11399,9 @@ Gradient$3.prototype = {
});
}
};
-var _default$u = Gradient$3;
-var Gradient_1 = _default$u;
-var zrUtil$c = util$8;
+var _default$x = Gradient$3;
+var Gradient_1 = _default$x;
+var zrUtil$d = util$8;
var Gradient$2 = Gradient_1;
var LinearGradient$2 = function(x, y, x2, y2, colorStops, globalCoord) {
this.x = x == null ? 0 : x;
@@ -11439,10 +11415,10 @@ var LinearGradient$2 = function(x, y, x2, y2, colorStops, globalCoord) {
LinearGradient$2.prototype = {
constructor: LinearGradient$2
};
-zrUtil$c.inherits(LinearGradient$2, Gradient$2);
-var _default$t = LinearGradient$2;
-var LinearGradient_1 = _default$t;
-var zrUtil$b = util$8;
+zrUtil$d.inherits(LinearGradient$2, Gradient$2);
+var _default$w = LinearGradient$2;
+var LinearGradient_1 = _default$w;
+var zrUtil$c = util$8;
var Gradient$1 = Gradient_1;
var RadialGradient$1 = function(x, y, r2, colorStops, globalCoord) {
this.x = x == null ? 0.5 : x;
@@ -11455,9 +11431,9 @@ var RadialGradient$1 = function(x, y, r2, colorStops, globalCoord) {
RadialGradient$1.prototype = {
constructor: RadialGradient$1
};
-zrUtil$b.inherits(RadialGradient$1, Gradient$1);
-var _default$s = RadialGradient$1;
-var RadialGradient_1 = _default$s;
+zrUtil$c.inherits(RadialGradient$1, Gradient$1);
+var _default$v = RadialGradient$1;
+var RadialGradient_1 = _default$v;
var _util$a = util$8;
var inherits$1 = _util$a.inherits;
var Displayble = Displayable_1;
@@ -11561,9 +11537,9 @@ IncrementalDisplayble.prototype.contain = function(x, y) {
return false;
};
inherits$1(IncrementalDisplayble, Displayble);
-var _default$r = IncrementalDisplayble;
-var IncrementalDisplayable$1 = _default$r;
-var zrUtil$a = util$8;
+var _default$u = IncrementalDisplayble;
+var IncrementalDisplayable$1 = _default$u;
+var zrUtil$b = util$8;
var pathTool = path$1;
var colorTool = color$1;
var matrix$1 = requireMatrix();
@@ -11704,7 +11680,7 @@ var subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize;
function hasFillOrStroke(fillOrStroke) {
return fillOrStroke != null && fillOrStroke !== "none";
}
-var liftedColorMap = zrUtil$a.createHashMap();
+var liftedColorMap = zrUtil$b.createHashMap();
var liftedColorCount = 0;
function liftColor(color2) {
if (typeof color2 !== "string") {
@@ -11878,11 +11854,11 @@ function setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisModel, o
baseText = labelFetcher.getFormattedLabel(labelDataIndex, "normal", null, labelDimIndex, labelProp);
}
if (baseText == null) {
- baseText = zrUtil$a.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
+ baseText = zrUtil$b.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;
}
}
var normalStyleText = showNormal ? baseText : null;
- var emphasisStyleText = showEmphasis ? zrUtil$a.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, "emphasis", null, labelDimIndex, labelProp) : null, baseText) : null;
+ var emphasisStyleText = showEmphasis ? zrUtil$b.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, "emphasis", null, labelDimIndex, labelProp) : null, baseText) : null;
if (normalStyleText != null || emphasisStyleText != null) {
setTextStyle(normalStyle, normalModel, normalSpecified, opt);
setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true);
@@ -11900,13 +11876,13 @@ function modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) {
elStyle = el.__hoverStl;
if (emphasisStyleProps && elStyle) {
rollbackDefaultTextStyle(elStyle);
- zrUtil$a.extend(elStyle, emphasisStyleProps);
+ zrUtil$b.extend(elStyle, emphasisStyleProps);
applyDefaultTextStyle(elStyle);
}
}
function setTextStyle(textStyle2, textStyleModel, specifiedTextStyle, opt, isEmphasis) {
setTextStyleCommon(textStyle2, textStyleModel, opt, isEmphasis);
- specifiedTextStyle && zrUtil$a.extend(textStyle2, specifiedTextStyle);
+ specifiedTextStyle && zrUtil$b.extend(textStyle2, specifiedTextStyle);
return textStyle2;
}
function setText(textStyle2, labelModel, defaultColor) {
@@ -11936,7 +11912,7 @@ function setTextStyleCommon(textStyle2, textStyleModel, opt, isEmphasis) {
var labelRotate = textStyleModel.getShallow("rotate");
labelRotate != null && (labelRotate *= Math.PI / 180);
textStyle2.textRotation = labelRotate;
- textStyle2.textDistance = zrUtil$a.retrieve2(textStyleModel.getShallow("distance"), isEmphasis ? null : 5);
+ textStyle2.textDistance = zrUtil$b.retrieve2(textStyleModel.getShallow("distance"), isEmphasis ? null : 5);
}
var ecModel = textStyleModel.ecModel;
var globalTextStyle = ecModel && ecModel.option.textStyle;
@@ -11978,7 +11954,7 @@ function setTokenTextStyle(textStyle2, textStyleModel, globalTextStyle, opt, isE
globalTextStyle = !isEmphasis && globalTextStyle || EMPTY_OBJ;
textStyle2.textFill = getAutoColor(textStyleModel.getShallow("color"), opt) || globalTextStyle.color;
textStyle2.textStroke = getAutoColor(textStyleModel.getShallow("textBorderColor"), opt) || globalTextStyle.textBorderColor;
- textStyle2.textStrokeWidth = zrUtil$a.retrieve2(textStyleModel.getShallow("textBorderWidth"), globalTextStyle.textBorderWidth);
+ textStyle2.textStrokeWidth = zrUtil$b.retrieve2(textStyleModel.getShallow("textBorderWidth"), globalTextStyle.textBorderWidth);
if (!isEmphasis) {
if (isBlock) {
textStyle2.insideRollbackOpt = opt;
@@ -12058,7 +12034,7 @@ function rollbackDefaultTextStyle(style2) {
}
function getFont(opt, ecModel) {
var gTextStyleModel = ecModel && ecModel.getModel("textStyle");
- return zrUtil$a.trim([
+ return zrUtil$b.trim([
// FIXME in node-canvas fontWeight is before fontStyle
opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow("fontStyle") || "",
opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow("fontWeight") || "",
@@ -12105,7 +12081,7 @@ function getTransform(target, ancestor) {
return mat;
}
function applyTransform(target, transform2, invert) {
- if (transform2 && !zrUtil$a.isArrayLike(transform2)) {
+ if (transform2 && !zrUtil$b.isArrayLike(transform2)) {
transform2 = Transformable.getLocalTransform(transform2);
}
if (invert) {
@@ -12139,7 +12115,7 @@ function groupTransition(g1, g2, animatableModel, cb) {
rotation: el.rotation
};
if (el.shape) {
- obj.shape = zrUtil$a.extend({}, el.shape);
+ obj.shape = zrUtil$b.extend({}, el.shape);
}
return obj;
}
@@ -12156,7 +12132,7 @@ function groupTransition(g1, g2, animatableModel, cb) {
});
}
function clipPointsByRect(points2, rect) {
- return zrUtil$a.map(points2, function(point) {
+ return zrUtil$b.map(points2, function(point) {
var x = point[0];
x = mathMax(x, rect.x);
x = mathMin(x, rect.x + rect.width);
@@ -12181,7 +12157,7 @@ function clipRectByRect(targetRect, rect) {
}
}
function createIcon(iconStr, opt, rect) {
- opt = zrUtil$a.extend({
+ opt = zrUtil$b.extend({
rectHover: true
}, opt);
var style2 = opt.style = {
@@ -12194,7 +12170,7 @@ function createIcon(iconStr, opt, rect) {
height: 2
};
if (iconStr) {
- return iconStr.indexOf("image://") === 0 ? (style2.image = iconStr.slice(8), zrUtil$a.defaults(style2, rect), new ZImage$1(opt)) : makePath(iconStr.replace("path://", ""), opt, rect, "center");
+ return iconStr.indexOf("image://") === 0 ? (style2.image = iconStr.slice(8), zrUtil$b.defaults(style2, rect), new ZImage$1(opt)) : makePath(iconStr.replace("path://", ""), opt, rect, "center");
}
}
function linePolygonIntersect(a1x, a1y, a2x, a2y, points2) {
@@ -12276,209 +12252,185 @@ graphic$4.clipRectByRect = clipRectByRect;
graphic$4.createIcon = createIcon;
graphic$4.linePolygonIntersect = linePolygonIntersect;
graphic$4.lineLineIntersect = lineLineIntersect;
-var textStyle;
-var hasRequiredTextStyle;
-function requireTextStyle() {
- if (hasRequiredTextStyle)
- return textStyle;
- hasRequiredTextStyle = 1;
- var textContain2 = text;
- var graphicUtil2 = graphic$4;
- var PATH_COLOR = ["textStyle", "color"];
- var _default68 = {
- /**
- * Get color property or get color from option.textStyle.color
- * @param {boolean} [isEmphasis]
- * @return {string}
- */
- getTextColor: function(isEmphasis) {
- var ecModel = this.ecModel;
- return this.getShallow("color") || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);
- },
- /**
- * Create font string from fontStyle, fontWeight, fontSize, fontFamily
- * @return {string}
- */
- getFont: function() {
- return graphicUtil2.getFont({
- fontStyle: this.getShallow("fontStyle"),
- fontWeight: this.getShallow("fontWeight"),
- fontSize: this.getShallow("fontSize"),
- fontFamily: this.getShallow("fontFamily")
- }, this.ecModel);
- },
- getTextRect: function(text2) {
- return textContain2.getBoundingRect(text2, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"));
+var textContain$1 = text;
+var graphicUtil$1 = graphic$4;
+var PATH_COLOR = ["textStyle", "color"];
+var _default$t = {
+ /**
+ * Get color property or get color from option.textStyle.color
+ * @param {boolean} [isEmphasis]
+ * @return {string}
+ */
+ getTextColor: function(isEmphasis) {
+ var ecModel = this.ecModel;
+ return this.getShallow("color") || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);
+ },
+ /**
+ * Create font string from fontStyle, fontWeight, fontSize, fontFamily
+ * @return {string}
+ */
+ getFont: function() {
+ return graphicUtil$1.getFont({
+ fontStyle: this.getShallow("fontStyle"),
+ fontWeight: this.getShallow("fontWeight"),
+ fontSize: this.getShallow("fontSize"),
+ fontFamily: this.getShallow("fontFamily")
+ }, this.ecModel);
+ },
+ getTextRect: function(text2) {
+ return textContain$1.getBoundingRect(text2, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"));
+ }
+};
+var textStyle = _default$t;
+var makeStyleMapper = makeStyleMapper$3;
+var getItemStyle = makeStyleMapper([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]);
+var _default$s = {
+ getItemStyle: function(excludes, includes) {
+ var style2 = getItemStyle(this, excludes, includes);
+ var lineDash = this.getBorderLineDash();
+ lineDash && (style2.lineDash = lineDash);
+ return style2;
+ },
+ getBorderLineDash: function() {
+ var lineType = this.get("borderType");
+ return lineType === "solid" || lineType == null ? null : lineType === "dashed" ? [5, 5] : [1, 1];
+ }
+};
+var itemStyle = _default$s;
+var zrUtil$a = util$8;
+var env$1 = env_1;
+var _model$7 = model;
+var makeInner$3 = _model$7.makeInner;
+var _clazz$2 = clazz;
+var enableClassExtend = _clazz$2.enableClassExtend;
+var enableClassCheck = _clazz$2.enableClassCheck;
+var lineStyleMixin = lineStyle;
+var areaStyleMixin = areaStyle;
+var textStyleMixin = textStyle;
+var itemStyleMixin = itemStyle;
+var mixin$1 = zrUtil$a.mixin;
+var inner$4 = makeInner$3();
+function Model$2(option, parentModel, ecModel) {
+ this.parentModel = parentModel;
+ this.ecModel = ecModel;
+ this.option = option;
+}
+Model$2.prototype = {
+ constructor: Model$2,
+ /**
+ * Model 的初始化函数
+ * @param {Object} option
+ */
+ init: null,
+ /**
+ * 从新的 Option merge
+ */
+ mergeOption: function(option) {
+ zrUtil$a.merge(this.option, option, true);
+ },
+ /**
+ * @param {string|Array.<string>} path
+ * @param {boolean} [ignoreParent=false]
+ * @return {*}
+ */
+ get: function(path2, ignoreParent) {
+ if (path2 == null) {
+ return this.option;
}
- };
- textStyle = _default68;
- return textStyle;
-}
-var itemStyle;
-var hasRequiredItemStyle;
-function requireItemStyle() {
- if (hasRequiredItemStyle)
- return itemStyle;
- hasRequiredItemStyle = 1;
- var makeStyleMapper2 = requireMakeStyleMapper();
- var getItemStyle = makeStyleMapper2([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]);
- var _default68 = {
- getItemStyle: function(excludes, includes) {
- var style2 = getItemStyle(this, excludes, includes);
- var lineDash = this.getBorderLineDash();
- lineDash && (style2.lineDash = lineDash);
- return style2;
- },
- getBorderLineDash: function() {
- var lineType = this.get("borderType");
- return lineType === "solid" || lineType == null ? null : lineType === "dashed" ? [5, 5] : [1, 1];
+ return doGet(this.option, this.parsePath(path2), !ignoreParent && getParent(this, path2));
+ },
+ /**
+ * @param {string} key
+ * @param {boolean} [ignoreParent=false]
+ * @return {*}
+ */
+ getShallow: function(key2, ignoreParent) {
+ var option = this.option;
+ var val = option == null ? option : option[key2];
+ var parentModel = !ignoreParent && getParent(this, key2);
+ if (val == null && parentModel) {
+ val = parentModel.getShallow(key2);
}
- };
- itemStyle = _default68;
- return itemStyle;
-}
-var Model_1;
-var hasRequiredModel;
-function requireModel() {
- if (hasRequiredModel)
- return Model_1;
- hasRequiredModel = 1;
- var zrUtil2 = util$8;
- var env2 = env_1;
- var _model2 = model;
- var makeInner2 = _model2.makeInner;
- var _clazz2 = clazz;
- var enableClassExtend2 = _clazz2.enableClassExtend;
- var enableClassCheck2 = _clazz2.enableClassCheck;
- var lineStyleMixin = requireLineStyle();
- var areaStyleMixin = requireAreaStyle();
- var textStyleMixin = requireTextStyle();
- var itemStyleMixin = requireItemStyle();
- var mixin2 = zrUtil2.mixin;
- var inner2 = makeInner2();
- function Model2(option, parentModel, ecModel) {
- this.parentModel = parentModel;
- this.ecModel = ecModel;
- this.option = option;
- }
- Model2.prototype = {
- constructor: Model2,
- /**
- * Model 的初始化函数
- * @param {Object} option
- */
- init: null,
- /**
- * 从新的 Option merge
- */
- mergeOption: function(option) {
- zrUtil2.merge(this.option, option, true);
- },
- /**
- * @param {string|Array.<string>} path
- * @param {boolean} [ignoreParent=false]
- * @return {*}
- */
- get: function(path2, ignoreParent) {
- if (path2 == null) {
- return this.option;
- }
- return doGet(this.option, this.parsePath(path2), !ignoreParent && getParent(this, path2));
- },
- /**
- * @param {string} key
- * @param {boolean} [ignoreParent=false]
- * @return {*}
- */
- getShallow: function(key2, ignoreParent) {
- var option = this.option;
- var val = option == null ? option : option[key2];
- var parentModel = !ignoreParent && getParent(this, key2);
- if (val == null && parentModel) {
- val = parentModel.getShallow(key2);
- }
- return val;
- },
- /**
- * @param {string|Array.<string>} [path]
- * @param {module:echarts/model/Model} [parentModel]
- * @return {module:echarts/model/Model}
- */
- getModel: function(path2, parentModel) {
- var obj = path2 == null ? this.option : doGet(this.option, path2 = this.parsePath(path2));
- var thisParentModel;
- parentModel = parentModel || (thisParentModel = getParent(this, path2)) && thisParentModel.getModel(path2);
- return new Model2(obj, parentModel, this.ecModel);
- },
- /**
- * If model has option
- */
- isEmpty: function() {
- return this.option == null;
- },
- restoreData: function() {
- },
- // Pending
- clone: function() {
- var Ctor = this.constructor;
- return new Ctor(zrUtil2.clone(this.option));
- },
- setReadOnly: function(properties) {
- },
- // If path is null/undefined, return null/undefined.
- parsePath: function(path2) {
- if (typeof path2 === "string") {
- path2 = path2.split(".");
- }
- return path2;
- },
- /**
- * @param {Function} getParentMethod
- * param {Array.<string>|string} path
- * return {module:echarts/model/Model}
- */
- customizeGetParent: function(getParentMethod) {
- inner2(this).getParent = getParentMethod;
- },
- isAnimationEnabled: function() {
- if (!env2.node) {
- if (this.option.animation != null) {
- return !!this.option.animation;
- } else if (this.parentModel) {
- return this.parentModel.isAnimationEnabled();
- }
- }
+ return val;
+ },
+ /**
+ * @param {string|Array.<string>} [path]
+ * @param {module:echarts/model/Model} [parentModel]
+ * @return {module:echarts/model/Model}
+ */
+ getModel: function(path2, parentModel) {
+ var obj = path2 == null ? this.option : doGet(this.option, path2 = this.parsePath(path2));
+ var thisParentModel;
+ parentModel = parentModel || (thisParentModel = getParent(this, path2)) && thisParentModel.getModel(path2);
+ return new Model$2(obj, parentModel, this.ecModel);
+ },
+ /**
+ * If model has option
+ */
+ isEmpty: function() {
+ return this.option == null;
+ },
+ restoreData: function() {
+ },
+ // Pending
+ clone: function() {
+ var Ctor = this.constructor;
+ return new Ctor(zrUtil$a.clone(this.option));
+ },
+ setReadOnly: function(properties) {
+ },
+ // If path is null/undefined, return null/undefined.
+ parsePath: function(path2) {
+ if (typeof path2 === "string") {
+ path2 = path2.split(".");
}
- };
- function doGet(obj, pathArr, parentModel) {
- for (var i2 = 0; i2 < pathArr.length; i2++) {
- if (!pathArr[i2]) {
- continue;
- }
- obj = obj && typeof obj === "object" ? obj[pathArr[i2]] : null;
- if (obj == null) {
- break;
+ return path2;
+ },
+ /**
+ * @param {Function} getParentMethod
+ * param {Array.<string>|string} path
+ * return {module:echarts/model/Model}
+ */
+ customizeGetParent: function(getParentMethod) {
+ inner$4(this).getParent = getParentMethod;
+ },
+ isAnimationEnabled: function() {
+ if (!env$1.node) {
+ if (this.option.animation != null) {
+ return !!this.option.animation;
+ } else if (this.parentModel) {
+ return this.parentModel.isAnimationEnabled();
}
}
- if (obj == null && parentModel) {
- obj = parentModel.get(pathArr);
+ }
+};
+function doGet(obj, pathArr, parentModel) {
+ for (var i2 = 0; i2 < pathArr.length; i2++) {
+ if (!pathArr[i2]) {
+ continue;
+ }
+ obj = obj && typeof obj === "object" ? obj[pathArr[i2]] : null;
+ if (obj == null) {
+ break;
}
- return obj;
}
- function getParent(model2, path2) {
- var getParentMethod = inner2(model2).getParent;
- return getParentMethod ? getParentMethod.call(model2, path2) : model2.parentModel;
+ if (obj == null && parentModel) {
+ obj = parentModel.get(pathArr);
}
- enableClassExtend2(Model2);
- enableClassCheck2(Model2);
- mixin2(Model2, lineStyleMixin);
- mixin2(Model2, areaStyleMixin);
- mixin2(Model2, textStyleMixin);
- mixin2(Model2, itemStyleMixin);
- var _default68 = Model2;
- Model_1 = _default68;
- return Model_1;
+ return obj;
}
+function getParent(model2, path2) {
+ var getParentMethod = inner$4(model2).getParent;
+ return getParentMethod ? getParentMethod.call(model2, path2) : model2.parentModel;
+}
+enableClassExtend(Model$2);
+enableClassCheck(Model$2);
+mixin$1(Model$2, lineStyleMixin);
+mixin$1(Model$2, areaStyleMixin);
+mixin$1(Model$2, textStyleMixin);
+mixin$1(Model$2, itemStyleMixin);
+var _default$r = Model$2;
+var Model_1 = _default$r;
var component = {};
var zrUtil$9 = util$8;
var _clazz$1 = clazz;
@@ -13288,7 +13240,7 @@ var _default$q = {
};
var boxLayout = _default$q;
var zrUtil$7 = util$8;
-var Model$1 = requireModel();
+var Model$1 = Model_1;
var componentUtil$2 = component;
var _clazz = clazz;
var enableClassManagement = _clazz.enableClassManagement;
@@ -14036,7 +13988,7 @@ var merge$3 = _util$9.merge;
var extend$6 = _util$9.extend;
var mixin = _util$9.mixin;
var modelUtil$4 = model;
-var Model = requireModel();
+var Model = Model_1;
var ComponentModel$2 = Component$1;
var globalDefault = globalDefault$1;
var colorPaletteMixin$1 = colorPalette$1;
@@ -18083,7 +18035,7 @@ function requireList() {
return List_1;
hasRequiredList = 1;
var zrUtil2 = util$8;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var DataDiffer = requireDataDiffer();
var Source2 = requireSource();
var _dataProvider2 = dataProvider;
@@ -21399,7 +21351,7 @@ function requireHelper$4() {
var createListFromArray = requireCreateListFromArray();
var axisHelper2 = requireAxisHelper();
var axisModelCommonMixin2 = requireAxisModelCommonMixin();
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _layout2 = layout$1;
_layout2.getLayoutRect;
helper$5.getLayoutRect = _layout2.getLayoutRect;
@@ -22219,7 +22171,7 @@ function require_export() {
_export.parseGeoJSON = parseGeoJSON;
var _List = requireList();
_export.List = _List;
- var _Model = requireModel();
+ var _Model = Model_1;
_export.Model = _Model;
var _Axis = requireAxis$1();
_export.Axis = _Axis;
@@ -26258,7 +26210,7 @@ function requireAxisBuilder() {
var each2 = _util2.each;
var formatUtil2 = requireFormat();
var graphic2 = graphic$4;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _number2 = requireNumber();
var isRadianAroundZero = _number2.isRadianAroundZero;
var remRadian = _number2.remRadian;
@@ -26747,7 +26699,7 @@ function requireModelHelper() {
return modelHelper;
hasRequiredModelHelper = 1;
var zrUtil2 = util$8;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var each2 = zrUtil2.each;
var curry2 = zrUtil2.curry;
function collect(ecModel, api2) {
@@ -27546,7 +27498,7 @@ function requireBarItemStyle() {
if (hasRequiredBarItemStyle)
return barItemStyle;
hasRequiredBarItemStyle = 1;
- var makeStyleMapper2 = requireMakeStyleMapper();
+ var makeStyleMapper2 = makeStyleMapper$3;
var getBarItemStyle = makeStyleMapper2([
["fill", "color"],
["stroke", "borderColor"],
@@ -27635,7 +27587,7 @@ function requireBarView() {
var graphic2 = graphic$4;
var _helper = requireHelper$2();
var setLabel = _helper.setLabel;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var barItemStyle2 = requireBarItemStyle();
var Path2 = Path_1;
var Group2 = Group_1;
@@ -29875,7 +29827,7 @@ function requireRadarModel() {
var echarts2 = echarts$3;
var zrUtil2 = util$8;
var axisDefault = requireAxisDefault();
- var Model2 = requireModel();
+ var Model2 = Model_1;
var axisModelCommonMixin2 = requireAxisModelCommonMixin();
var valueAxisDefault = axisDefault.valueAxis;
function defaultsShow(opt, show2) {
@@ -32985,7 +32937,7 @@ function requireTreeSeries() {
var Tree2 = requireTree$1();
var _format2 = requireFormat();
var encodeHTML2 = _format2.encodeHTML;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _default68 = SeriesModel2.extend({
type: "series.tree",
layoutInfo: null,
@@ -34069,7 +34021,7 @@ function requireTreemapSeries() {
var zrUtil2 = util$8;
var SeriesModel2 = Series;
var Tree2 = requireTree$1();
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _format2 = requireFormat();
var encodeHTML2 = _format2.encodeHTML;
var addCommas2 = _format2.addCommas;
@@ -34614,7 +34566,7 @@ function requireTreemapView() {
var BoundingRect2 = BoundingRect_1;
var matrix2 = requireMatrix();
var animationUtil = requireAnimation();
- var makeStyleMapper2 = requireMakeStyleMapper();
+ var makeStyleMapper2 = makeStyleMapper$3;
var _format2 = requireFormat();
var windowOpen = _format2.windowOpen;
var bind2 = zrUtil2.bind;
@@ -36729,7 +36681,7 @@ function requireGraphSeries() {
var zrUtil2 = util$8;
var _model2 = model;
var defaultEmphasis2 = _model2.defaultEmphasis;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _format2 = requireFormat();
var encodeHTML2 = _format2.encodeHTML;
var createGraphFromNodeEdge2 = requireCreateGraphFromNodeEdge();
@@ -40208,7 +40160,7 @@ function requireAxisModel$2() {
hasRequiredAxisModel$2 = 1;
var zrUtil2 = util$8;
var ComponentModel2 = Component$1;
- var makeStyleMapper2 = requireMakeStyleMapper();
+ var makeStyleMapper2 = makeStyleMapper$3;
var axisModelCreator2 = requireAxisModelCreator();
var numberUtil = requireNumber();
var axisModelCommonMixin2 = requireAxisModelCommonMixin();
@@ -41734,7 +41686,7 @@ function requireSankeySeries() {
var createGraphFromNodeEdge2 = requireCreateGraphFromNodeEdge();
var _format2 = requireFormat();
var encodeHTML2 = _format2.encodeHTML;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var SankeySeries = SeriesModel2.extend({
type: "series.sankey",
layoutInfo: null,
@@ -48478,7 +48430,7 @@ function requireSunburstSeries() {
var zrUtil2 = util$8;
var SeriesModel2 = Series;
var Tree2 = requireTree$1();
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _treeHelper = requireTreeHelper();
var wrapTreePathInfo = _treeHelper.wrapTreePathInfo;
var _default68 = SeriesModel2.extend({
@@ -49507,7 +49459,7 @@ function requireCustom() {
var getLayoutOnAxis = _barGrid.getLayoutOnAxis;
var DataDiffer = requireDataDiffer();
var SeriesModel2 = Series;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var ChartView = Chart_1;
var _createClipPathFromCoordSys = requireCreateClipPathFromCoordSys();
var createClipPath = _createClipPathFromCoordSys.createClipPath;
@@ -50660,7 +50612,7 @@ function requireAngleAxisView() {
hasRequiredAngleAxisView = 1;
var zrUtil2 = util$8;
var graphic2 = graphic$4;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var AxisView = requireAxisView();
var AxisBuilder = requireAxisBuilder();
var elementList = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
@@ -51238,7 +51190,7 @@ function requireGeoModel() {
var zrUtil2 = util$8;
var modelUtil2 = model;
var ComponentModel2 = Component$1;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var selectableMixin2 = requireSelectableMixin();
var geoCreator = requireGeoCreator();
var GeoModel = ComponentModel2.extend({
@@ -52757,7 +52709,7 @@ function requireToolboxView() {
var textContain2 = text;
var featureManager2 = requireFeatureManager();
var graphic2 = graphic$4;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var DataDiffer = requireDataDiffer();
var listComponentHelper = requireListComponent();
var _default68 = echarts2.extendComponentView({
@@ -55698,7 +55650,7 @@ function requireTooltipView() {
var graphic2 = graphic$4;
var findPointFromSeries2 = requireFindPointFromSeries();
var layoutUtil = layout$1;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var globalListener2 = requireGlobalListener();
var axisHelper2 = requireAxisHelper();
var axisPointerViewHelper = requireViewHelper();
@@ -56765,7 +56717,7 @@ function requireBrushModel() {
var echarts2 = echarts$3;
var zrUtil2 = util$8;
var visualSolution2 = requireVisualSolution();
- var Model2 = requireModel();
+ var Model2 = Model_1;
var DEFAULT_OUT_OF_BRUSH_COLOR = ["#ddd"];
var BrushModel = echarts2.extendComponentModel({
type: "brush",
@@ -59347,7 +59299,7 @@ function requireLegendModel() {
hasRequiredLegendModel = 1;
var echarts2 = echarts$3;
var zrUtil2 = util$8;
- var Model2 = requireModel();
+ var Model2 = Model_1;
var _model2 = model;
var isNameSpecified2 = _model2.isNameSpecified;
var lang2 = lang$2;
@@ -102493,14 +102445,14 @@ function requireEcharts() {
// Option decal is in `DecalObject` but style.decal is in `PatternObject`.
// So do not transfer decal directly.
];
- var getAreaStyle = makeStyleMapper2(AREA_STYLE_KEY_MAP);
+ var getAreaStyle2 = makeStyleMapper2(AREA_STYLE_KEY_MAP);
var AreaStyleMixin = (
/** @class */
function() {
function AreaStyleMixin2() {
}
AreaStyleMixin2.prototype.getAreaStyle = function(excludes, includes) {
- return getAreaStyle(this, excludes, includes);
+ return getAreaStyle2(this, excludes, includes);
};
return AreaStyleMixin2;
}()
@@ -108422,7 +108374,7 @@ function requireEcharts() {
percent: 1
}, animatableModel, dataIndex, null, during);
}
- var PATH_COLOR = ["textStyle", "color"];
+ var PATH_COLOR2 = ["textStyle", "color"];
var textStyleParams = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"];
var tmpText = new ZRText();
var TextStyleMixin = (
@@ -108432,7 +108384,7 @@ function requireEcharts() {
}
TextStyleMixin2.prototype.getTextColor = function(isEmphasis) {
var ecModel = this.ecModel;
- return this.getShallow("color") || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);
+ return this.getShallow("color") || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR2) : null);
};
TextStyleMixin2.prototype.getFont = function() {
return getFont2({
@@ -108473,14 +108425,14 @@ function requireEcharts() {
// Option decal is in `DecalObject` but style.decal is in `PatternObject`.
// So do not transfer decal directly.
];
- var getLineStyle = makeStyleMapper2(LINE_STYLE_KEY_MAP);
+ var getLineStyle2 = makeStyleMapper2(LINE_STYLE_KEY_MAP);
var LineStyleMixin = (
/** @class */
function() {
function LineStyleMixin2() {
}
LineStyleMixin2.prototype.getLineStyle = function(excludes) {
- return getLineStyle(this, excludes);
+ return getLineStyle2(this, excludes);
};
return LineStyleMixin2;
}()
@@ -108502,14 +108454,14 @@ function requireEcharts() {
// Option decal is in `DecalObject` but style.decal is in `PatternObject`.
// So do not transfer decal directly.
];
- var getItemStyle = makeStyleMapper2(ITEM_STYLE_KEY_MAP);
+ var getItemStyle2 = makeStyleMapper2(ITEM_STYLE_KEY_MAP);
var ItemStyleMixin = (
/** @class */
function() {
function ItemStyleMixin2() {
}
ItemStyleMixin2.prototype.getItemStyle = function(excludes, includes) {
- return getItemStyle(this, excludes, includes);
+ return getItemStyle2(this, excludes, includes);
};
return ItemStyleMixin2;
}()
@@ -118907,7 +118859,7 @@ function requireEcharts() {
return SeriesDimensionDefine2;
}()
);
- var inner$4 = makeInner2();
+ var inner$42 = makeInner2();
var dimTypeShort = {
float: "f",
int: "i",
@@ -119035,7 +118987,7 @@ function requireEcharts() {
return dataDimNameMap;
}
function ensureSourceDimNameMap(source) {
- var innerSource = inner$4(source);
+ var innerSource = inner$42(source);
return innerSource.dimNameMap || (innerSource.dimNameMap = createDimNameMap(source.dimensionsDefine));
}
function shouldOmitUnusedDimensions(dimCount) {
@@ -173437,6 +173389,15 @@ const localeProblems$1 = {
"maintenance.problems.chain.logList": "Application Logs List",
"maintenance.problems.chain.callList": "Call Chain List"
};
+const localeExamples$1 = {
+ "menu.examples": "Examples Project",
+ "menu.examples.testMethodAuth": "User Authorization Test",
+ "examples.testMethodAuth.authTest": "User Authorization Test",
+ "test.method.auth.adminOnly": "Admin Only",
+ "test.method.auth.userOnly": "User Only",
+ "test.method.auth.adminOrUser": "Admin Or User",
+ "test.method.auth.everyone": "Every One"
+};
const localeSettings$1 = {
"settings.title": "Settings",
"settings.themeColor": "Theme Color",
@@ -173491,6 +173452,7 @@ const en = {
...localeUserInfo$1,
...localeUserSetting$1,
...localeManagement$1,
+ ...localeExamples$1,
...localeProblems$1,
...localeHttpError$1
};
@@ -173702,6 +173664,15 @@ const localeProblems = {
"maintenance.problems.chain.logList": "日志列表",
"maintenance.problems.chain.callList": "调用链列表"
};
+const localeExamples = {
+ "menu.examples": "示例项目",
+ "menu.examples.testMethodAuth": "用户权限测试",
+ "examples.testMethodAuth.authTest": "用户权限测试",
+ "test.method.auth.adminOnly": "Admin有权限",
+ "test.method.auth.guestOnly": "Guest有权限",
+ "test.method.auth.adminOrGuest": "Admin和Guest有权限",
+ "test.method.auth.everyone": "所有人都有权限"
+};
const localeSettings = {
"settings.title": "页面配置",
"settings.themeColor": "主题色",
@@ -173756,6 +173727,7 @@ const cn = {
...localeUserInfo,
...localeUserSetting,
...localeManagement,
+ ...localeExamples,
...localeProblems,
...localeHttpError
};
@@ -174671,7 +174643,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
index$G();
index$15();
const iconUser = index$F();
- index$Z();
+ const iconFiletext = index$Z();
const iconApplication = index$1c();
const tree2 = ref();
const expandeArr = ref();
@@ -174700,6 +174672,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
icon: null,
bold: "title"
},
+ {
+ value: "Examples",
+ name: "menu.examples",
+ icon: iconFiletext,
+ bold: "main-title"
+ },
+ {
+ value: "TestMethodAuth",
+ name: "menu.examples.testMethodAuth",
+ icon: null,
+ bold: "title"
+ },
{
value: "User",
name: "menu.user",
@@ -174810,8 +174794,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
};
}
});
-const index_vue_vue_type_style_index_0_scoped_22812e81_lang = "";
-const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-22812e81"]]);
+const index_vue_vue_type_style_index_0_scoped_aee1960e_lang = "";
+const Menu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-aee1960e"]]);
const _sfc_main$3 = {};
function _sfc_render(_ctx2, _cache) {
const _component_router_view = resolveComponent("router-view");
@@ -174958,12 +174942,43 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent$1({
});
const defaultLayout_vue_vue_type_style_index_0_scoped_6254482e_lang = "";
const DefaultLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6254482e"]]);
+const examples = {
+ path: "examples",
+ name: "Examples",
+ id: "Examples",
+ label: "Examples",
+ component: () => __vitePreload(() => import("./index2.js"), true ? ["assets/index2.js","assets/vue.js"] : void 0),
+ meta: {
+ locale: "menu.examples",
+ requiresAuth: true,
+ order: 8,
+ roles: []
+ },
+ children: [
+ {
+ path: "testMethodAuth",
+ name: "TestMethodAuth",
+ id: "TestMethodAuth",
+ label: "TestMethodAuth",
+ component: () => __vitePreload(() => import("./index3.js"), true ? ["assets/index3.js","assets/vue.js"] : void 0),
+ meta: {
+ locale: "menu.examples.testMethodAuth",
+ requiresAuth: true,
+ roles: []
+ }
+ }
+ ]
+};
+const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ default: examples
+}, Symbol.toStringTag, { value: "Module" }));
const maintenance = {
path: "maintenance",
name: "Maintenance",
id: "Maintenance",
label: "Maintenance",
- component: () => __vitePreload(() => import("./index2.js"), true ? ["assets/index2.js","assets/vue.js"] : void 0),
+ component: () => __vitePreload(() => import("./index4.js"), true ? ["assets/index4.js","assets/vue.js"] : void 0),
meta: {
locale: "menu.maintenance",
requiresAuth: true,
@@ -174976,7 +174991,7 @@ const maintenance = {
name: "Problems",
id: "Problems",
label: "Problems",
- component: () => __vitePreload(() => import("./index3.js"), true ? ["assets/index3.js","assets/vue.js","assets/index11.js","assets/index10.js","assets/index7.css","assets/time.js","assets/time.css","assets/index9.js","assets/index6.css","assets/warning-triangle.js","assets/index4.css"] : void 0),
+ component: () => __vitePreload(() => import("./index5.js"), true ? ["assets/index5.js","assets/vue.js","assets/index13.js","assets/index12.js","assets/index7.css","assets/time.js","assets/time.css","assets/index11.js","assets/index6.css","assets/warning-triangle.js","assets/index4.css"] : void 0),
meta: {
locale: "menu.maintenance.locate.problems",
requiresAuth: true,
@@ -174985,7 +175000,7 @@ const maintenance = {
}
]
};
-const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: maintenance
}, Symbol.toStringTag, { value: "Module" }));
@@ -175004,7 +175019,7 @@ const management = {
name: "Management",
id: "Management",
label: "Management",
- component: () => __vitePreload(() => import("./index4.js"), true ? ["assets/index4.js","assets/vue.js"] : void 0),
+ component: () => __vitePreload(() => import("./index6.js"), true ? ["assets/index6.js","assets/vue.js"] : void 0),
meta: {
locale: "menu.management",
requiresAuth: true,
@@ -175017,7 +175032,7 @@ const management = {
name: "Home",
id: "Home",
label: "Home",
- component: () => __vitePreload(() => import("./index5.js"), true ? ["assets/index5.js","assets/vue.js","assets/index11.js","assets/index10.js","assets/index7.css","assets/index9.js","assets/index6.css","assets/time.js","assets/time.css","assets/index5.css"] : void 0),
+ component: () => __vitePreload(() => import("./index7.js"), true ? ["assets/index7.js","assets/vue.js","assets/index13.js","assets/index12.js","assets/index7.css","assets/index11.js","assets/index6.css","assets/time.js","assets/time.css","assets/index5.css"] : void 0),
meta: {
locale: "menu.management.home",
requiresAuth: true,
@@ -175026,11 +175041,11 @@ const management = {
}
]
};
-const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: management
}, Symbol.toStringTag, { value: "Module" }));
-const modules = /* @__PURE__ */ Object.assign({ "./modules/maintenance.ts": __vite_glob_0_0, "./modules/management.ts": __vite_glob_0_1 });
+const modules = /* @__PURE__ */ Object.assign({ "./modules/examples.ts": __vite_glob_0_0, "./modules/maintenance.ts": __vite_glob_0_1, "./modules/management.ts": __vite_glob_0_2 });
const appRoutes = [];
Object.keys(modules).forEach((key2) => {
const defaultModule = modules[key2].default;
@@ -175133,7 +175148,7 @@ const router = createRouter({
{
path: "/ui/admin/login",
name: "login",
- component: () => __vitePreload(() => import("./index6.js"), true ? ["assets/index6.js","assets/vue.js","assets/index9.js","assets/index10.js","assets/index6.css","assets/warning-triangle.js","assets/index2.css"] : void 0),
+ component: () => __vitePreload(() => import("./index8.js"), true ? ["assets/index8.js","assets/vue.js","assets/index11.js","assets/index12.js","assets/index6.css","assets/warning-triangle.js","assets/index2.css"] : void 0),
meta: {
requiresAuth: false
}
@@ -175147,12 +175162,12 @@ const router = createRouter({
{
path: "/ui/admin/:pathMatch(.*)*",
name: "notFound",
- component: () => __vitePreload(() => import("./index7.js"), true ? ["assets/index7.js","assets/vue.js"] : void 0)
+ component: () => __vitePreload(() => import("./index9.js"), true ? ["assets/index9.js","assets/vue.js"] : void 0)
},
{
path: "/ui/admin/preview",
name: "preview",
- component: () => __vitePreload(() => import("./index8.js"), true ? ["assets/index8.js","assets/vue.js","assets/index11.js","assets/index10.js","assets/index7.css","assets/index3.css"] : void 0)
+ component: () => __vitePreload(() => import("./index10.js"), true ? ["assets/index10.js","assets/vue.js","assets/index13.js","assets/index12.js","assets/index7.css","assets/index3.css"] : void 0)
}
],
scrollBehavior() {
@@ -278734,98 +278749,98 @@ app.use(directive);
app.mount("#app");
export {
$prefix as $,
- extend$3 as A,
+ __spreadValues as A,
Button as B,
- isNumber$1 as C,
+ extend$3 as C,
DATEPICKER as D,
- toDate$1 as E,
+ isNumber$1 as E,
Footer as F,
- getWeekNumber as G,
- prevDate as H,
+ toDate$1 as G,
+ getWeekNumber as H,
Input as I,
- nextDate as J,
- isDate$1 as K,
+ prevDate as J,
+ nextDate as K,
Layout as L,
- clearMilliseconds as M,
- clearTime as N,
- prevMonth as O,
- nextMonth as P,
- prevYear as Q,
- nextYear as R,
- modifyTime as S,
+ isDate$1 as M,
+ clearMilliseconds as N,
+ clearTime as O,
+ prevMonth as P,
+ nextMonth as Q,
+ prevYear as R,
+ nextYear as S,
TINYModal as T,
- modifyWithTimeString as U,
- modifyDate as V,
- changeYearMonthAndClampDate as W,
- timeWithinRange as X,
- debounce_default as Y,
- fillChar as Z,
+ modifyTime as U,
+ modifyWithTimeString as V,
+ modifyDate as W,
+ changeYearMonthAndClampDate as X,
+ timeWithinRange as Y,
+ debounce_default as Z,
_export_sfc as _,
off as a,
POSITION as a$,
- extractTimeFormat as a0,
- extractDateFormat as a1,
- DATE as a2,
- limitTimeRange as a3,
- getRangeHours as a4,
- getRangeMinutes as a5,
- once as a6,
- directive$1 as a7,
- getFirstDayOfMonth as a8,
- getDayCountOfMonth as a9,
- isVue2 as aA,
- ListType as aB,
- isBrowser as aC,
- getObj as aD,
- omitText as aE,
- isKorean$1 as aF,
- find as aG,
- isEqual as aH,
- isEmptyObject as aI,
- getDataset as aJ,
- browser_default as aK,
- BROWSER_NAME as aL,
- isNull$2 as aM,
- index$19 as aN,
- index$18 as aO,
- index$y as aP,
- toObject as aQ,
- isObject$1 as aR,
- typeOf as aS,
- index$J as aT,
- index$1b as aU,
- throttle_default as aV,
- Tree as aW,
- index$X as aX,
- index$S as aY,
- axios$1 as aZ,
+ fillChar as a0,
+ extractTimeFormat as a1,
+ extractDateFormat as a2,
+ DATE as a3,
+ limitTimeRange as a4,
+ getRangeHours as a5,
+ getRangeMinutes as a6,
+ once as a7,
+ directive$1 as a8,
+ getFirstDayOfMonth as a9,
+ useDefer as aA,
+ isVue2 as aB,
+ ListType as aC,
+ isBrowser as aD,
+ getObj as aE,
+ omitText as aF,
+ isKorean$1 as aG,
+ find as aH,
+ isEqual as aI,
+ isEmptyObject as aJ,
+ getDataset as aK,
+ browser_default as aL,
+ BROWSER_NAME as aM,
+ isNull$2 as aN,
+ index$19 as aO,
+ index$18 as aP,
+ index$y as aQ,
+ toObject as aR,
+ isObject$1 as aS,
+ typeOf as aT,
+ index$J as aU,
+ index$1b as aV,
+ throttle_default as aW,
+ Tree as aX,
+ index$X as aY,
+ index$S as aZ,
VALIDATE_STATE as a_,
- getStartDateOfMonth as aa,
- hasClass as ab,
- range as ac,
- getDayCountOfYear as ad,
- clickoutside_default as ae,
- index$17 as af,
- language as ag,
- format$1 as ah,
- ActionSheet as ai,
- t$2 as aj,
- Tooltip as ak,
- KEY_CODE as al,
- index$W as am,
- Radio as an,
- getDomNode as ao,
- addClass as ap,
- removeClass as aq,
- merge$1 as ar,
- Popover as as,
- index$14 as at,
- index$11 as au,
- index$12 as av,
- appProperties as aw,
- Checkbox as ax,
- CheckboxGroup as ay,
- useDefer as az,
+ getDayCountOfMonth as aa,
+ getStartDateOfMonth as ab,
+ hasClass as ac,
+ range as ad,
+ getDayCountOfYear as ae,
+ clickoutside_default as af,
+ index$17 as ag,
+ language as ah,
+ format$1 as ai,
+ ActionSheet as aj,
+ t$2 as ak,
+ Tooltip as al,
+ KEY_CODE as am,
+ index$W as an,
+ Radio as ao,
+ getDomNode as ap,
+ addClass as aq,
+ removeClass as ar,
+ merge$1 as as,
+ Popover as at,
+ index$14 as au,
+ index$11 as av,
+ index$12 as aw,
+ appProperties as ax,
+ Checkbox as ay,
+ CheckboxGroup as az,
index$H as b,
parseVnode as b0,
guid as b1,
@@ -278869,24 +278884,24 @@ export {
defineComponent as d,
index$16 as e,
setup as f,
- props as g,
+ axios$1 as g,
h,
index$13 as i,
- index$E as j,
- $props as k,
- $setup as l,
- isDateObject as m,
- isDate$2 as n,
+ props as j,
+ index$E as k,
+ $props as l,
+ $setup as m,
+ isDateObject as n,
on as o,
popup_manager_default as p,
- formatDate as q,
- getDateWithNewTimezone as r,
+ isDate$2 as q,
+ formatDate as r,
svg as s,
- getLocalTimezone as t,
+ getDateWithNewTimezone as t,
useUserStore as u,
- getStrTimezone$1 as v,
- parseDate as w,
- vue_popper_default as x,
- __spreadProps as y,
- __spreadValues as z
+ getLocalTimezone as v,
+ getStrTimezone$1 as w,
+ parseDate as x,
+ vue_popper_default as y,
+ __spreadProps as z
};
diff --git a/admin-website/src/main/resources/static/assets/index10.js b/admin-website/src/main/resources/static/assets/index10.js
index 9579fae..a143989 100644
--- a/admin-website/src/main/resources/static/assets/index10.js
+++ b/admin-website/src/main/resources/static/assets/index10.js
@@ -1,947 +1,214 @@
-import { bx as log, by as hasOwn, z as __spreadValues, aM as isNull, bz as isFunction, y as __spreadProps, n as isDate, C as isNumber, aR as isObject, aS as typeOf, bA as isNullOrEmpty, ah as format$1, bB as getLength } from "./index.js";
-const formatRegExp = /%[sdj%]/g;
-const warning = () => void 0;
-function convertFieldsError(errors) {
- if (!errors || !errors.length) {
- return null;
- }
- const fields = {};
- errors.forEach((error) => {
- const field = error.field;
- fields[field] = fields[field] || [];
- fields[field].push(error);
- });
- return fields;
-}
-function format(i18nTemplate, ...rest) {
- if (typeof i18nTemplate === "function") {
- return i18nTemplate(...rest);
- }
- if (typeof i18nTemplate === "string") {
- let i = 0;
- const len = rest.length;
- let str = String(i18nTemplate).replace(formatRegExp, (matchChar) => {
- if (matchChar === "%%") {
- return "%";
- }
- if (i >= len) {
- return matchChar;
- }
- switch (matchChar) {
- case "%j":
- try {
- return JSON.stringify(rest[i++]);
- } catch (e) {
- return "[Circular]";
- }
- case "%d":
- return Number(rest[i++]);
- case "%s":
- return String(rest[i++]);
- default:
- return matchChar;
- }
- });
- return str;
- }
- return i18nTemplate;
-}
-function isNativeStringType(type) {
- return [
- "string",
- "url",
- "hex",
- "email",
- "pattern",
- "digits",
- "time",
- "dateYMD",
- "longDateTime",
- "dateTime",
- "dateYM",
- "version",
- "speczh",
- "specialch",
- "specialch2",
- "acceptImg",
- "acceptFile",
- "fileSize"
- ].includes(type);
-}
-function isEmptyValue(data, dataType) {
- if (isNull(data)) {
- return true;
- }
- if (dataType === "array" && Array.isArray(data) && !data.length) {
- return true;
- }
- if (isNativeStringType(dataType) && typeof data === "string" && !data) {
- return true;
- }
- return false;
-}
-function isEmptyObject(data) {
- return Object.keys(data).length === 0;
-}
-function asyncParallelArray(arrData, func, callback) {
- let count = 0;
- const results = [];
- const arrLength = arrData.length;
- function checkCount(errors) {
- results.push(...errors);
- count++;
- if (count === arrLength) {
- callback(results);
- }
- }
- arrData.forEach((rule) => {
- func(rule, checkCount);
- });
-}
-function asyncSerialArray(arr, fn, cb) {
- let idx = 0;
- const arrLength = arr.length;
- function checkNext(errorList) {
- if (errorList && errorList.length) {
- cb(errorList);
- return;
- }
- const original = idx;
- idx = idx + 1;
- if (original < arrLength) {
- fn(arr[original], checkNext);
- } else {
- cb([]);
- }
- }
- checkNext([]);
-}
-function flattenObjArr(objArr) {
- const result = [];
- Object.keys(objArr).forEach((item) => {
- result.push(...objArr[item]);
- });
- return result;
-}
-function asyncMap(objArray, option, func, callback) {
- if (option.first) {
- const pending2 = new Promise((resolve, reject) => {
- const errorFn = reject;
- const next = (errors) => {
- callback(errors);
- return errors.length ? errorFn({ errors, fields: convertFieldsError(errors) }) : resolve();
- };
- const flattenArr = flattenObjArr(objArray);
- asyncSerialArray(flattenArr, func, next);
- });
- pending2.catch((error) => error.errors && error.fields || log.logger.error(error));
- return pending2;
- }
- let firstFields = option.firstFields || [];
- if (firstFields === true) {
- firstFields = Object.keys(objArray);
- }
- let total = 0;
- const objArrayKeys = Object.keys(objArray);
- const objArrLength = objArrayKeys.length;
- const results = [];
- const pending = new Promise((resolve, reject) => {
- const errorFn = reject;
- const next = (errors) => {
- results.push(...errors);
- total++;
- if (total === objArrLength) {
- callback(results);
- return results.length ? errorFn({ errors: results, fields: convertFieldsError(results) }) : resolve();
- }
- };
- objArrayKeys.forEach((key) => {
- const arr = objArray[key];
- if (firstFields.includes(key)) {
- asyncSerialArray(arr, func, next);
- } else {
- asyncParallelArray(arr, func, next);
- }
- });
- });
- pending.catch((error) => error.errors && error.fields || log.logger.error(error));
- return pending;
-}
-function complementError(rule) {
- return (onError) => {
- if (onError && onError.message) {
- onError.field = onError.field || rule.fullField;
- return onError;
- }
- return {
- message: typeof onError === "function" ? onError() : onError,
- field: onError.field || rule.fullField
- };
- };
-}
-function deepMerge(target, sources) {
- if (!sources) {
- return target;
- }
- for (const source in sources) {
- if (hasOwn.call(sources, source)) {
- const value = sources[source];
- if (typeof value === "object" && typeof target[source] === "object") {
- target[source] = __spreadValues(__spreadValues({}, target[source]), value);
- } else {
- target[source] = value;
- }
- }
- }
- return target;
-}
-const util = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- asyncMap,
- complementError,
- convertFieldsError,
- deepMerge,
- format,
- isEmptyObject,
- isEmptyValue,
- warning
-}, Symbol.toStringTag, { value: "Module" }));
-function Schema(descriptor, translate) {
- Schema.getSystemMessage = () => Schema.getDefaultMessage(translate);
- Schema.messages = Schema.getSystemMessage(translate);
- Schema.systemMessages = Schema.messages;
- this.rules = null;
- this._messages = Schema.systemMessages;
- this.define(descriptor);
-}
-const getCompleteFn = (validCallback) => (results) => {
- let idx;
- let errors = [];
- let fields = {};
- function addValid(eror) {
- if (Array.isArray(eror)) {
- errors = errors.concat(...eror);
- } else {
- errors.push(eror);
- }
- }
- for (idx = 0; idx < results.length; idx++) {
- addValid(results[idx]);
- }
- if (errors.length) {
- fields = convertFieldsError(errors);
- } else {
- errors = null;
- fields = null;
- }
- validCallback(errors, fields);
+import { d as defineComponent, $ as useI18n, a7 as reactive, u as openBlock, v as createElementBlock, w as createBaseVNode, l as createVNode, H as withCtx, V as unref, E as toDisplayString, J as createTextVNode, Y as pushScopeId, Z as popScopeId } from "./vue.js";
+import { P as Pager, R as Row, C as Col, a as Column, G as Grid } from "./index13.js";
+import { L as Layout, _ as _export_sfc } from "./index.js";
+import "./index12.js";
+const _imports_0 = "/ui/admin/assets/home-main1.png";
+const _imports_1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAABP0lEQVQoU32Rv0vDQBzF38spTRBBcGtNcbKLOjgJCqJTJ3XwH9DNooJuOjm5qUhsRx07Ce3qqEMnEcRJHIpRwR+DIG0abPKV1CbEVrzl7t7d5/u+944iIAlBezSOUyNCVaJ4i/ra012ohzPjQM0yk5pCBWAaQNX3ZKpv3X6OQww3cjg80Eh4lwBHIw1yY7hqhpvVj8ghWNgHQ8ZgQjsnMd3ZAkQu3l3JmluPTnDWcqjnzRLJha7LbYHAmZ57WIqARiGZodajIDLuC4sxcEfTUJam1wwDiN7QciqkJglVifr1vUxnUr+AmmXOa4rlH0BujZw91hVrXHAK6W0Ae21gxcjZp/8C9Xz6isREkIz+Zs9yF34caP1ZKDiWuQzFEwLXX3Sz/asvr53VI+DTSs [...]
+const _imports_2 = "/ui/admin/assets/home-main2.png";
+const _imports_3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAABOUlEQVQoU33RPS9DURgH8P9z7hWRGMylL5MOwmAit1rdGomLRux8CyaTyeQDMDaRCKeNGCzNzaUTEjGJoVokTDaanHseOVfKdaM908l5/r/z8hxiBhVq6SKAXSZUhq2BvbOFhw56DDKACJyrJdcFi30AN0p9li7Lr2//GYou5qvpKwDTAHvedauIbeg4+gPmZGaTiHdMSJPe8BfbB31BXiZdkJDfIb7z3NZkX+BUMzMWuNENaaWyfvn5PorCKzkykRVsW7B5irSodAPMvAWGZB2oLgxBvpaSYHJ7tRLAkec+rpp6CGYPx4bsQXFORE4cMbOnOrrUWHv6+AFmMn+cGQks7RNoIoJuRUCF+krzPWyD+bPojo5MJgSJBgEpAM2AtXOx1H75fVMMmELudH [...]
+const _withScopeId = (n) => (pushScopeId("data-v-b51475b6"), n = n(), popScopeId(), n);
+const _hoisted_1 = { class: "preview-main" };
+const _hoisted_2 = { class: "preview-card" };
+const _hoisted_3 = { class: "col" };
+const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "img" }, [
+ /* @__PURE__ */ createBaseVNode("img", {
+ src: _imports_0,
+ class: "image"
+ })
+], -1));
+const _hoisted_5 = { class: "num" };
+const _hoisted_6 = { class: "up" };
+const _hoisted_7 = { class: "left" };
+const _hoisted_8 = {
+ id: "up",
+ class: "right"
};
-const isDeep = (rule, data) => {
- let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object");
- deep = deep && (rule.required || !rule.required && data.value);
- return deep;
+const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("img", {
+ src: _imports_1,
+ class: "image"
+}, null, -1));
+const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", null, "0.88%", -1));
+const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "down" }, [
+ /* @__PURE__ */ createBaseVNode("span", { class: "left" }, "3.23"),
+ /* @__PURE__ */ createBaseVNode("span", { class: "right" }, "/ s")
+], -1));
+const _hoisted_12 = { class: "col" };
+const _hoisted_13 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "img" }, [
+ /* @__PURE__ */ createBaseVNode("img", {
+ src: _imports_2,
+ class: "image"
+ })
+], -1));
+const _hoisted_14 = { class: "num" };
+const _hoisted_15 = { class: "up" };
+const _hoisted_16 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", { class: "left" }, "DOM Ready", -1));
+const _hoisted_17 = {
+ id: "down",
+ class: "right"
};
-const getFieldsSchema = (rule, data) => {
- let schema = {};
- function addFullfield(key, item) {
- return __spreadProps(__spreadValues({}, item), {
- fullField: `${rule.fullField}.${key}`
- });
- }
- if (rule.defaultField) {
- for (const k in data.value) {
- if (hasOwn.call(data.value, k)) {
- schema[k] = rule.defaultField;
- }
- }
- }
- schema = __spreadValues(__spreadValues({}, schema), data.rule.fields);
- for (const f in schema) {
- if (hasOwn.call(schema, f)) {
- const fieldSchema = Array.isArray(schema[f]) ? schema[f] : [schema[f]];
- schema[f] = fieldSchema.map(addFullfield.bind(null, f));
- }
- }
- return schema;
-};
-const arrayed = (failds) => {
- if (!Array.isArray(failds)) {
- failds = [failds];
- }
- return failds;
-};
-const getRequiredErrorFeilds = ({ rule, failds, options }) => {
- if (rule.message) {
- failds = [].concat(rule.message).map(complementError(rule));
- } else if (options.error) {
- failds = [options.error(rule, format(options.messages.required, rule.field))];
- } else {
- failds = [];
- }
- return failds;
-};
-const setDataRuleOptions = ({ data, options }) => {
- if (data.rule.options) {
- let { messages, error } = options;
- Object.assign(data.rule.options, { messages, error });
- }
-};
-const getValidateCallback = ({ failds, doIt }) => (errs) => {
- const finalErrors = [];
- if (failds && failds.length) {
- finalErrors.push(...failds);
- }
- if (errs && errs.length) {
- finalErrors.push(...errs);
- }
- doIt(finalErrors.length ? finalErrors : null);
-};
-const asyncCallback = (options, rule, errorFields, doIt, data) => (e = []) => {
- let failds = e;
- const deep = isDeep(rule, data);
- failds = arrayed(failds);
- if (!options.suppressWarning && failds.length) {
- Schema.warning("async-validator:", failds);
- }
- if (failds.length && rule.message) {
- failds = [].concat(rule.message);
- }
- failds = failds.map(complementError(rule));
- if (options.first && failds.length) {
- errorFields[rule.field] = 1;
- return doIt(failds);
- }
- if (deep) {
- if (rule.required && !data.value) {
- failds = getRequiredErrorFeilds({ rule, failds, options });
- return doIt(failds);
- }
- const schema = new Schema(getFieldsSchema(rule, data));
- schema.messages(options.messages);
- setDataRuleOptions({ data, options });
- schema.validate(data.value, data.rule.options || options, getValidateCallback({ failds, doIt }));
- } else {
- doIt(failds);
- }
-};
-Schema.prototype = {
- messages(messages) {
- if (messages) {
- this._messages = deepMerge(Schema.getSystemMessage(), messages);
- }
- return this._messages;
- },
- /** 格式化检验规则并添加到实例上。
- * rules格式化后的数据结构: { key: [ { type: 'xx', ...others } ] }
- */
- define(rules) {
- if (!rules) {
- throw new Error("Cannot configure a schema with no rules");
- }
- if (Array.isArray(rules) || typeof rules !== "object") {
- throw new TypeError("Rules must be an object");
- }
- this.rules = {};
- let rule;
- Object.keys(rules).forEach((key) => {
- if (hasOwn.call(rules, key)) {
- rule = rules[key];
- this.rules[key] = Array.isArray(rule) ? rule : [rule];
- }
- });
- },
- /** 将检验规则和源数据合并转化成新数据
- * rules: { key: [rule1, rule2] }, source: { key: sourceData, key2: sourceData2 }
- * series { key: [{ rule: rule1, value: sourceData, source, field: key }, ...] }
- */
- getSeries(options, source, source_) {
- let arr;
- let value;
- const series = {};
- const keys = options.keys || Object.keys(this.rules);
- keys.forEach((key) => {
- arr = this.rules[key];
- value = source[key];
- arr.forEach((r) => {
- let rule = r;
- if (typeof rule.transform === "function") {
- if (source === source_) {
- source = __spreadValues({}, source);
- }
- source[key] = rule.transform(value);
- value = source[key];
- }
- if (typeof rule === "function") {
- rule = { validator: rule };
- } else {
- rule = __spreadValues({}, rule);
- }
- rule.validator = this.getValidationMethod(rule);
- rule.field = key;
- rule.fullField = rule.fullField || key;
- rule.type = this.getType(rule);
- options.custom && Object.assign(rule, options.custom);
- if (!rule.validator) {
- return;
- }
- series[key] = series[key] || [];
- series[key].push({ rule, value, source, field: key });
- });
- });
- return series;
- },
- mergeMessage(options) {
- if (options.messages) {
- let messages = this.messages();
- if (messages === Schema.systemMessages) {
- messages = Schema.getSystemMessage();
- }
- deepMerge(messages, options.messages);
- options.messages = messages;
- } else {
- options.messages = this.messages();
- }
- },
- validate(source_, o = {}, oc = () => void 0) {
- let source = source_;
- let options = o;
- let validCallback = oc;
- if (typeof options === "function") {
- validCallback = options;
- options = {};
- }
- if (!this.rules || Object.keys(this.rules).length === 0) {
- validCallback && validCallback();
- return Promise.resolve();
- }
- const complete = getCompleteFn(validCallback);
- this.mergeMessage(options);
- const seriesData = this.getSeries(options, source, source_);
- const errorFields = {};
- return asyncMap(
- seriesData,
- options,
- (data, doIt) => {
- const rule = data.rule;
- const validHandler = asyncCallback(options, rule, errorFields, doIt, data);
- let validResult;
- if (rule.asyncValidator) {
- validResult = rule.asyncValidator(rule, data.value, validHandler, data.source, options);
- } else if (rule.validator) {
- validResult = rule.validator(rule, data.value, validHandler, data.source, options);
- if (validResult === true) {
- validHandler();
- } else if (validResult === false) {
- validHandler(rule.message || `${rule.field} fails`);
- } else if (Array.isArray(validResult)) {
- validHandler(validResult);
- } else if (validResult instanceof Error) {
- validHandler(validResult.message);
- }
- }
- if (validResult && validResult.then) {
- validResult.then(
- () => validHandler(),
- (e) => validHandler(e)
- );
- }
+const _hoisted_18 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("img", {
+ src: _imports_3,
+ class: "image"
+}, null, -1));
+const _hoisted_19 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("span", null, "0.88%", -1));
+const _hoisted_20 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("div", { class: "down" }, [
+ /* @__PURE__ */ createBaseVNode("span", { class: "left" }, "1.56"),
+ /* @__PURE__ */ createBaseVNode("span", { class: "right" }, "/ s")
+], -1));
+const _hoisted_21 = { class: "preview-table" };
+const _sfc_main = /* @__PURE__ */ defineComponent({
+ __name: "index",
+ setup(__props) {
+ const { t } = useI18n();
+ const tableData = [
+ {
+ id: "1",
+ space: "4G",
+ pv: "1767(97.77%)",
+ play: "0.44s"
},
- (results) => {
- complete(results);
- }
- );
- },
- getValidationMethod(rule) {
- if (isFunction(rule.validator)) {
- return rule.validator;
- }
- const ruleKeys = Object.keys(rule);
- const messageIndex = ruleKeys.indexOf("message");
- if (messageIndex > -1) {
- ruleKeys.splice(messageIndex, 1);
- }
- if (ruleKeys.length === 1 && ruleKeys[0] === "required") {
- return Schema.validators.required;
- }
- return Schema.validators[this.getType(rule)] || false;
- },
- getType(rule) {
- if (rule.type === void 0 && rule.pattern instanceof RegExp) {
- rule.type = "pattern";
- }
- if (typeof rule.validator !== "function" && rule.type && !hasOwn.call(Schema.validators, rule.type)) {
- throw new Error(format("Unknown rule type %s", rule.type));
- }
- return rule.type || "string";
- }
-};
-Schema.register = (type, validator) => {
- if (typeof validator !== "function") {
- throw new TypeError("Cannot register a validator by type, validator is not a function");
- }
- Schema.validators[type] = validator;
-};
-Schema.validators = {};
-Schema.warning = warning;
-Schema.messages = {};
-Schema.systemMessages = {};
-Schema.getDefaultMessage = () => void 0;
-var schema_default = Schema;
-function required_default$1({ rule, checkValue, source, errors, options, type }) {
- if (rule.required && (!hasOwn.call(source, rule.field) || isEmptyValue(checkValue, type || rule.type))) {
- errors.push(format(options.messages.required, ""));
- }
-}
-const emailReg1 = '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))';
-const emailReg = new RegExp(
- emailReg1 + "@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,6}))$"
-);
-const pattern = {
- acceptImg: /\.(png|jpe?g|gif)$/,
- acceptFile: /\.(doc?x|xls?x|ppt?x|txt)$/,
- email: emailReg,
- fileSize: /^\d+(\.\d+)?[KMGTPEZY]?B$/i,
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,
- speczh: /^[0-9a-zA-Z_\u4E00-\u9FA5]+$/,
- specialch: /^[0-9a-zA-Z_\-.]+$/,
- specialch2: /^[0-9a-zA-Z_-]+$/,
- url: /^(([a-zA-Z]{3,}):)?\/\/([\w-]+\.)+[\w]+(\/[a-zA-Z- ./?%&=]*)?/i,
- version: /^\d+\.\d+(\.\d+)*$/
-};
-const types = {
- integer: (value) => types.number(value) && /^[-]?[\d]+$/.test(value),
- float: (value) => types.number(value) && !types.integer(value),
- array: Array.isArray,
- regexp(value) {
- if (value instanceof RegExp) {
- return true;
- }
- try {
- return !!new RegExp(value);
- } catch (e) {
- return false;
- }
- },
- date: isDate,
- number: (value) => isNumber(Number(value)),
- object: (value) => isObject(value) && !types.array(value),
- method: (value) => typeOf(value) === "function",
- email: (value) => isNullOrEmpty(value) || !!value.match(pattern.email) && value.length < 255,
- url: (value) => isNullOrEmpty(value) || !!value.match(pattern.url),
- hex: (value) => isNullOrEmpty(value) || !!value.match(pattern.hex),
- digits: (value) => isNullOrEmpty(value) || /^\d+$/.test(value),
- time: (value) => isNullOrEmpty(value) || /^((0)[0-9]|1[0-9]|20|21|22|23):([0-5][0-9])$/.test(value),
- dateYM: (value) => isNullOrEmpty(value) || format$1(value, "yyyy-MM") === value,
- dateYMD: (value) => isNullOrEmpty(value) || format$1(value, "yyyy-MM-dd") === value,
- dateTime: (value) => isNullOrEmpty(value) || format$1(value, "yyyy-MM-dd hh:mm") === value,
- longDateTime: (value) => isNullOrEmpty(value) || format$1(value, "yyyy-MM-dd hh:mm:ss") === value,
- version: (value) => isNullOrEmpty(value) || !!value.match(pattern.version),
- speczh: (value) => isNullOrEmpty(value) || !!value.match(pattern.speczh),
- specialch: (value) => isNullOrEmpty(value) || !!value.match(pattern.specialch),
- specialch2: (value) => isNullOrEmpty(value) || !!value.match(pattern.specialch2),
- acceptImg: (value) => isNullOrEmpty(value) || !!value.match(pattern.acceptImg),
- acceptFile: (value) => isNullOrEmpty(value) || !!value.match(pattern.acceptFile),
- fileSize: (value) => isNullOrEmpty(value) || !!value.match(pattern.fileSize)
-};
-function type_default$1(rule, value, source, errors, options) {
- if (rule.required && value === void 0) {
- required_default$1(rule);
- return;
- }
- const custom = [
- "array",
- "acceptImg",
- "acceptFile",
- "date",
- "digits",
- "dateTime",
- "dateYM",
- "dateYMD",
- "email",
- "float",
- "fileSize",
- "hex",
- "integer",
- "longDateTime",
- "method",
- "number",
- "object",
- "regexp",
- "speczh",
- "specialch",
- "specialch2",
- "time",
- "version",
- "url"
- ];
- const ruleType = rule.type;
- if (custom.includes(ruleType)) {
- if (!types[ruleType](value)) {
- errors.push(format(options.messages.types[ruleType], "", rule.type));
- }
- } else if (ruleType && typeof value !== rule.type) {
- errors.push(format(options.messages.types[ruleType], "", rule.type));
- }
-}
-function getErro({ min, max, val, key, rule, errors, util: util2, options }) {
- if (min && !max && val < rule.min) {
- errors.push(util2.format(options.messages[key].min, "", rule.min));
- } else if (max && !min && val > rule.max) {
- errors.push(util2.format(options.messages[key].max, "", rule.max));
- } else if (min && max && (val < rule.min || val > rule.max)) {
- errors.push(util2.format(options.messages[key].range, "", rule.min, rule.max));
- }
-}
-function range_default(rule, checkValue, source, errors, options) {
- const len = isNumber(rule.len);
- const min = isNumber(rule.min);
- const max = isNumber(rule.max);
- let val = checkValue;
- let key = null;
- const num = isNumber(Number(checkValue));
- const str = typeof checkValue === "string";
- const arr = Array.isArray(checkValue);
- if (num) {
- key = "number";
- } else if (str) {
- key = "string";
- } else if (arr) {
- key = "array";
- }
- if (!key) {
- return false;
- }
- if (arr) {
- val = checkValue.length;
- }
- if (str) {
- val = getLength(checkValue, "string");
- }
- if (rule.type === "number") {
- val = checkValue;
- }
- if (len) {
- if (val !== rule.len) {
- errors.push(format(options.messages[key].len, "", rule.len));
- }
- } else {
- getErro({ min, max, val, key, rule, errors, util, options });
- }
-}
-const ENUM$1 = "enum";
-function enum_default$1(rule, checkValue, source, errors, options) {
- rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];
- if (!rule[ENUM$1].includes(checkValue)) {
- errors.push(format(options.messages[ENUM$1], "", rule[ENUM$1].join(", ")));
- }
-}
-function pattern_default$1(rule, checkValue, source, errors, options) {
- if (rule.pattern) {
- if (rule.pattern instanceof RegExp) {
- rule.pattern.lastIndex = 0;
- if (!rule.pattern.test(checkValue)) {
- errors.push(format(options.messages.pattern.mismatch, "", checkValue, rule.pattern));
- }
- } else if (typeof rule.pattern === "string") {
- const _pattern = new RegExp(rule.pattern);
- if (!_pattern.test(checkValue)) {
- errors.push(format(options.messages.pattern.mismatch, "", checkValue, rule.pattern));
- }
- }
- }
-}
-function whitespace_default(rule, checkValue, source, errors, options) {
- if (/^\s+$/.test(checkValue) || checkValue === "") {
- errors.push(format(options.messages.whitespace, ""));
- }
-}
-var rules_default = {
- type: type_default$1,
- range: range_default,
- pattern: pattern_default$1,
- required: required_default$1,
- whitespace: whitespace_default,
- enum: enum_default$1
-};
-function date_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- const isValidDateStr = (value) => value && typeof value === "string" && new Date(value).toString() !== "Invalid Date";
- if (validate) {
- if (isEmptyValue(checkValue) && !rule.required) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (!isEmptyValue(checkValue)) {
- let dateObject;
- if (typeof checkValue === "number" || isValidDateStr(checkValue)) {
- dateObject = new Date(checkValue);
- } else {
- dateObject = checkValue;
+ {
+ id: "2",
+ space: "2G",
+ pv: "22(1.77%)",
+ play: "0.43s"
+ },
+ {
+ id: "3",
+ space: t("home.round.unknow"),
+ pv: "32(1.77%)",
+ play: "0.44s"
+ },
+ {
+ id: "4",
+ space: t("home.round.unknow"),
+ pv: "32(1.77%)",
+ play: "0.44s"
}
- rules_default.type(rule, dateObject, source, errors, options);
- if (dateObject && typeof dateObject.getTime === "function") {
- rules_default.range(rule, dateObject.getTime(), source, errors, options);
+ ];
+ const pagerConfig = reactive({
+ component: Pager,
+ attrs: {
+ currentPage: 1,
+ pageSize: 5,
+ pageSizes: [5, 10],
+ total: 0,
+ layout: "total, prev, pager, next, jumper, sizes"
}
- }
- }
- callback(errors);
-}
-function type_default(rule, checkValue, callback, source, options) {
- const ruleType = rule.type;
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue, ruleType) && !rule.required) {
- return callback();
- }
- rules_default.required({
- rule,
- checkValue,
- source,
- errors,
- options,
- type: ruleType
});
- if (!isEmptyValue(checkValue, ruleType)) {
- rules_default.type(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function float_default(rule, checkValue, cb, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue) && !rule.required) {
- return cb();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (checkValue !== void 0) {
- rules_default.type(rule, checkValue, source, errors, options);
- rules_default.range(rule, checkValue, source, errors, options);
- }
- }
- cb(errors);
-}
-function array_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue, "array") && !rule.required) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options, type: "array" });
- if (!isEmptyValue(checkValue, "array")) {
- rules_default.type(rule, checkValue, source, errors, options);
- rules_default.range(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function string_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue, "string") && !rule.required) {
- return callback();
+ async function fetchData(params = {
+ pageIndex: 1,
+ pageSize: 10
+ }) {
+ const total = tableData.length;
+ return {
+ result: tableData,
+ page: { total }
+ };
}
- rules_default.required({
- rule,
- checkValue,
- source,
- errors,
- options,
- type: "string"
- });
- if (!isEmptyValue(checkValue, "string")) {
- rules_default.type(rule, checkValue, source, errors, options);
- rules_default.range(rule, checkValue, source, errors, options);
- rules_default.pattern(rule, checkValue, source, errors, options);
- if (rule.whitespace === true) {
- rules_default.whitespace(rule, checkValue, source, errors, options);
+ const fetchDataOption = reactive({
+ api: ({ page }) => {
+ const { currentPage, pageSize } = page;
+ return fetchData({
+ pageIndex: currentPage,
+ pageSize
+ });
}
- }
- }
- callback(errors);
-}
-function method_default(rule, checkValue, callback, source, options) {
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- const errors = [];
- if (validate) {
- if (!rule.required && isEmptyValue(checkValue)) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (checkValue !== void 0) {
- rules_default.type(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function number_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (checkValue === "") {
- checkValue = void 0;
- }
- if (!rule.required && isEmptyValue(checkValue)) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (checkValue !== void 0) {
- rules_default.type(rule, checkValue, source, errors, options);
- rules_default.range(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function integer_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue) && !rule.required) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (checkValue !== void 0 && checkValue !== "") {
- rules_default.type(rule, checkValue, source, errors, options);
- rules_default.range(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function pattern_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue, "string") && !rule.required) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (!isEmptyValue(checkValue, "string")) {
- rules_default.pattern(rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-function required_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const type = Array.isArray(checkValue) ? "array" : typeof checkValue;
- rules_default.required({ rule, checkValue, source, errors, options, type });
- callback(errors);
-}
-const ENUM = "enum";
-function enum_default(rule, checkValue, callback, source, options) {
- const errors = [];
- const validate = rule.required || !rule.required && hasOwn.call(source, rule.field);
- if (validate) {
- if (isEmptyValue(checkValue) && !rule.required) {
- return callback();
- }
- rules_default.required({ rule, checkValue, source, errors, options });
- if (checkValue !== void 0) {
- rules_default[ENUM](rule, checkValue, source, errors, options);
- }
- }
- callback(errors);
-}
-var validations_default = {
- date: date_default,
- float: float_default,
- array: array_default,
- string: string_default,
- method: method_default,
- number: number_default,
- integer: integer_default,
- pattern: pattern_default,
- required: required_default,
- hex: type_default,
- url: type_default,
- time: type_default,
- email: type_default,
- digits: type_default,
- dateYM: type_default,
- speczh: type_default,
- dateYMD: type_default,
- version: type_default,
- fileSize: type_default,
- regexp: method_default,
- object: method_default,
- dateTime: type_default,
- specialch: type_default,
- boolean: method_default,
- acceptImg: type_default,
- specialch2: type_default,
- acceptFile: type_default,
- longDateTime: type_default,
- enum: enum_default
-};
-const getTypesObj = (translate) => ({
- string: translate("validation.types.string"),
- method: translate("validation.types.method"),
- array: translate("validation.types.array"),
- object: translate("validation.types.object"),
- number: translate("validation.types.number"),
- date: translate("validation.types.date"),
- boolean: translate("validation.types.boolean"),
- integer: translate("validation.types.integer"),
- float: translate("validation.types.float"),
- regexp: translate("validation.types.regexp"),
- email: translate("validation.types.email"),
- url: translate("validation.types.url"),
- hex: translate("validation.types.hex"),
- digits: translate("validation.types.digits"),
- time: translate("validation.types.time"),
- dateYM: translate("validation.types.dateYM"),
- dateYMD: translate("validation.types.dateYMD"),
- dateTime: translate("validation.types.dateTime"),
- longDateTime: translate("validation.types.longDateTime"),
- version: translate("validation.types.version"),
- speczh: translate("validation.types.speczh"),
- specialch: translate("validation.types.specialch"),
- specialch2: translate("validation.types.hex"),
- acceptImg: translate("validation.types.acceptImg"),
- acceptFile: translate("validation.types.acceptFile"),
- fileSize: translate("validation.types.fileSize")
-});
-var messages_default = (translate = (value) => value) => ({
- default: translate("validation.default"),
- required: translate("validation.required"),
- enum: translate("validation.enum"),
- whitespace: translate("validation.whitespace"),
- date: {
- format: translate("validation.date.format"),
- parse: translate("validation.date.parse"),
- invalid: translate("validation.date.invalid")
- },
- types: getTypesObj(translate),
- string: {
- len: translate("validation.string.len"),
- min: translate("validation.string.min"),
- max: translate("validation.string.max"),
- range: translate("validation.string.range")
- },
- number: {
- len: translate("validation.number.len"),
- min: translate("validation.number.min"),
- max: translate("validation.number.max"),
- range: translate("validation.number.range")
- },
- array: {
- len: translate("validation.array.len"),
- min: translate("validation.array.min"),
- max: translate("validation.array.max"),
- range: translate("validation.array.range")
- },
- pattern: {
- mismatch: translate("validation.pattern.mismatch")
+ });
+ return (_ctx, _cache) => {
+ return openBlock(), createElementBlock("div", _hoisted_1, [
+ createBaseVNode("div", _hoisted_2, [
+ createVNode(unref(Layout), null, {
+ default: withCtx(() => [
+ createVNode(unref(Row), { flex: true }, {
+ default: withCtx(() => [
+ createVNode(unref(Col), { span: 6 }, {
+ default: withCtx(() => [
+ createBaseVNode("div", _hoisted_3, [
+ _hoisted_4,
+ createBaseVNode("div", _hoisted_5, [
+ createBaseVNode("div", _hoisted_6, [
+ createBaseVNode("span", _hoisted_7, toDisplayString(_ctx.$t("home.main.one")), 1),
+ createBaseVNode("span", _hoisted_8, [
+ createTextVNode(toDisplayString(_ctx.$t("home.main.day")) + " ", 1),
+ _hoisted_9,
+ _hoisted_10
+ ])
+ ]),
+ _hoisted_11
+ ])
+ ])
+ ]),
+ _: 1
+ }),
+ createVNode(unref(Col), { span: 6 }, {
+ default: withCtx(() => [
+ createBaseVNode("div", _hoisted_12, [
+ _hoisted_13,
+ createBaseVNode("div", _hoisted_14, [
+ createBaseVNode("div", _hoisted_15, [
+ _hoisted_16,
+ createBaseVNode("span", _hoisted_17, [
+ createTextVNode(toDisplayString(_ctx.$t("home.main.day")) + " ", 1),
+ _hoisted_18,
+ _hoisted_19
+ ])
+ ]),
+ _hoisted_20
+ ])
+ ])
+ ]),
+ _: 1
+ })
+ ]),
+ _: 1
+ }),
+ createVNode(unref(Row), {
+ flex: true,
+ justify: "center"
+ })
+ ]),
+ _: 1
+ })
+ ]),
+ createBaseVNode("div", _hoisted_21, [
+ createVNode(unref(Grid), {
+ ref: "grid",
+ "fetch-data": fetchDataOption,
+ pager: pagerConfig
+ }, {
+ default: withCtx(() => [
+ createVNode(unref(Column), {
+ field: "id",
+ title: _ctx.$t("home.roundtable.index"),
+ width: "160"
+ }, null, 8, ["title"]),
+ createVNode(unref(Column), {
+ field: "space",
+ title: _ctx.$t("home.roundtable.space"),
+ width: "180"
+ }, null, 8, ["title"]),
+ createVNode(unref(Column), {
+ field: "pv",
+ title: _ctx.$t("home.roundtable.pv"),
+ width: "180"
+ }, null, 8, ["title"]),
+ createVNode(unref(Column), {
+ field: "play",
+ title: _ctx.$t("home.roundtable.play"),
+ width: "200"
+ }, null, 8, ["title"])
+ ]),
+ _: 1
+ }, 8, ["fetch-data", "pager"])
+ ])
+ ]);
+ };
}
});
-schema_default.validators = validations_default;
-schema_default.getDefaultMessage = messages_default;
-var validate_default = schema_default;
+const index_vue_vue_type_style_index_0_scoped_b51475b6_lang = "";
+const index_vue_vue_type_style_index_1_scoped_b51475b6_lang = "";
+const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b51475b6"]]);
export {
- validate_default as v
+ index as default
};
diff --git a/admin-website/src/main/resources/static/assets/index11.js b/admin-website/src/main/resources/static/assets/index11.js
index d9cab16..9f0f75a 100644
--- a/admin-website/src/main/resources/static/assets/index11.js
+++ b/admin-website/src/main/resources/static/assets/index11.js
@@ -1,1142 +1,272 @@
-import { s as svg, ap as addClass, aq as removeClass, al as KEY_CODE, o as on, a as off, b1 as guid, d as defineComponent, g as props, as as Popover, B as Button$1, b2 as index$M, f as setup$1, k as $props, $ as $prefix, l as $setup, x as vue_popper_default, z as __spreadValues, ak as Tooltip$1, aM as isNull$1, e as index$N, a7 as directive$1, ae as clickoutside_default, b3 as index$O, aE as omitText, h, aU as index$P, b4 as isPlainObject, b5 as isRegExp, n as isDate, aK as browser_defau [...]
-import { u as openBlock, v as createElementBlock, w as createBaseVNode, x as createStaticVNode, k as resolveComponent, D as renderSlot, L as Fragment, M as renderList, A as normalizeClass, E as toDisplayString, G as normalizeStyle, y as createBlock, B as resolveDynamicComponent, z as createCommentVNode, l as createVNode, H as withCtx, J as createTextVNode, O as withModifiers, I as withDirectives, K as vShow, T as Transition, U as resolveDirective, n as nextTick, m as markRaw, g as getCur [...]
-import { v as validate_default } from "./index10.js";
-var _hoisted_1$I = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$F = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "chevron-down_svg__st0",
- d: "M21 7c0 .2-.1.5-.2.6l-8 9.9c-.2.4-.5.5-.8.5-.3 0-.6-.1-.8-.4L3.3 7.7c-.4-.4-.3-1.1.2-1.4.4-.4 1.1-.3 1.4.2l7.2 8.9 7.2-8.9c.4-.4 1-.5 1.4-.2.2.1.3.4.3.7z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$D = [_hoisted_2$F];
-function render$u(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$I, [].concat(_hoisted_3$D));
-}
-var ChevronDown = {
- render: render$u
-};
-var index$L = function index2() {
- return svg({
- name: "IconChevronDown",
- component: ChevronDown
- })();
-};
-var _hoisted_1$H = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$E = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "chevron-left_svg__st0",
- d: "M17 21c-.2 0-.5-.1-.6-.2l-9.9-8c-.4-.2-.5-.5-.5-.8 0-.3.1-.6.4-.8l9.9-7.9c.4-.4 1.1-.3 1.4.2.4.4.3 1.1-.2 1.4L8.7 12l8.9 7.2c.4.4.5 1 .2 1.4-.3.3-.5.4-.8.4z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$C = [_hoisted_2$E];
-function render$t(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$H, [].concat(_hoisted_3$C));
-}
-var ChevronLeft = {
- render: render$t
-};
-var index$K = function index22() {
- return svg({
- name: "IconChevronLeft",
- component: ChevronLeft
- })();
-};
-var _hoisted_1$G = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$D = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "chevron-up_svg__st0",
- d: "M3 17c0-.2.1-.5.2-.6l8-9.9c.2-.2.5-.4.8-.4s.6.1.8.4l7.9 9.9c.4.4.3 1.1-.2 1.4-.4.4-1.1.3-1.4-.2L12 8.7l-7.2 8.9c-.4.4-1 .5-1.4.2-.3-.2-.4-.5-.4-.8z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$B = [_hoisted_2$D];
-function render$s(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$G, [].concat(_hoisted_3$B));
-}
-var ChevronUp = {
- render: render$s
-};
-var index$J = function index23() {
- return svg({
- name: "IconChevronUp",
- component: ChevronUp
- })();
-};
-var _hoisted_1$F = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$C = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "conment-refresh_svg__st0",
- d: "M23.2 12c-.5 0-.9.3-.9.8-.2 2.6-1.4 5-3.3 6.8-1.9 1.8-4.4 2.8-7 2.8-2 0-4-.6-5.7-1.7-1.5-1-2.7-2.3-3.5-3.9h2.3c.5 0 .8-.4.8-.8.1-.6-.3-1-.7-1H.8c-.4 0-.8.4-.8.8v4.3c0 .5.4.9.8.9s.8-.4.8-.8v-2c1 1.5 2.3 2.8 3.8 3.8 2 1.3 4.3 2 6.6 2 3 0 6-1.1 8.2-3.2 2.2-2.1 3.6-4.9 3.8-7.9 0-.5-.3-.9-.8-.9zm0-9c-.5 0-.8.4-.8.8v2c-1-1.5-2.3-2.8-3.8-3.8-2-1.3-4.3-2-6.6-2-3 0-6 1.1-8.2 3.2C1.6 5.3.3 8.1 0 11.1c0 .5.3.9.8.9s.9-.3.9-.8C1.9 8.6 3 6.2 5 4.4c1.9-1.8 4.4-2.8 7-2.8 2 0 4 .6 5.7 1.7 1.5 1 2 [...]
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$A = [_hoisted_2$C];
-function render$r(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$F, [].concat(_hoisted_3$A));
-}
-var ConmentRefresh = {
- render: render$r
-};
-var index$I = function index24() {
- return svg({
- name: "IconConmentRefresh",
- component: ConmentRefresh
- })();
-};
-var _hoisted_1$E = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$B = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "delta-down_svg__st0",
- d: "M2 6h20L12 19z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$z = [_hoisted_2$B];
-function render$q(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$E, [].concat(_hoisted_3$z));
-}
-var DeltaDown = {
- render: render$q
-};
-var index$H = function index25() {
- return svg({
- name: "IconDeltaDown",
- component: DeltaDown
- })();
-};
-var _hoisted_1$D = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$A = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "delta-left_svg__st0",
- d: "M18 2v20L5 12z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$y = [_hoisted_2$A];
-function render$p(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$D, [].concat(_hoisted_3$y));
-}
-var DeltaLeft = {
- render: render$p
-};
-var index$G = function index26() {
- return svg({
- name: "IconDeltaLeft",
- component: DeltaLeft
- })();
-};
-var _hoisted_1$C = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$z = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "delta-up_svg__st0",
- d: "M2 19h20L12 6z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$x = [_hoisted_2$z];
-function render$o(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$C, [].concat(_hoisted_3$x));
-}
-var DeltaUp = {
- render: render$o
-};
-var index$F = function index27() {
- return svg({
- name: "IconDeltaUp",
- component: DeltaUp
- })();
-};
-var _hoisted_1$B = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$y = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "double-left_svg__st0",
- d: "M13 21c-.2 0-.5-.1-.6-.2l-9.9-8c-.4-.2-.5-.5-.5-.8 0-.3.1-.6.4-.8l9.9-7.9c.4-.4 1.1-.3 1.4.2.4.4.3 1.1-.2 1.4L4.7 12l8.9 7.2c.4.4.5 1 .2 1.4-.2.3-.5.4-.8.4z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$w = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "double-left_svg__st0",
- d: "M21 21c-.2 0-.5-.1-.6-.2l-9.9-8c-.4-.2-.5-.5-.5-.8 0-.3.1-.6.4-.8l9.9-7.9c.4-.4 1.1-.3 1.4.2.4.4.3 1.1-.2 1.4L12.7 12l8.9 7.2c.4.4.5 1 .2 1.4-.2.3-.5.4-.8.4z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_4$9 = [_hoisted_2$y, _hoisted_3$w];
-function render$n(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$B, [].concat(_hoisted_4$9));
-}
-var DoubleLeft = {
- render: render$n
-};
-var index$E = function index28() {
- return svg({
- name: "IconDoubleLeft",
- component: DoubleLeft
- })();
-};
-var _hoisted_1$A = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$x = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "double-right_svg__st0",
- d: "M11 21c.2 0 .5-.1.6-.2l9.9-8c.2-.2.4-.5.4-.8 0-.3-.1-.6-.4-.8l-9.9-7.9c-.4-.4-1.1-.3-1.4.2-.4.4-.3 1.1.2 1.4l8.9 7.2-8.9 7.2c-.4.4-.5 1-.2 1.4.2.2.5.3.8.3z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$v = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "double-right_svg__st0",
- d: "M3 21c.2 0 .5-.1.6-.2l9.9-8c.2-.2.4-.5.4-.8 0-.3-.1-.6-.4-.8l-9.8-8c-.4-.3-1.1-.3-1.4.2-.4.4-.3 1.1.1 1.4l8.9 7.2-8.9 7.2c-.4.4-.5 1-.2 1.4.2.3.5.4.8.4z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_4$8 = [_hoisted_2$x, _hoisted_3$v];
-function render$m(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$A, [].concat(_hoisted_4$8));
-}
-var DoubleRight = {
- render: render$m
-};
-var index$D = function index29() {
- return svg({
- name: "IconDoubleRight",
- component: DoubleRight
- })();
-};
-var _hoisted_1$z = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$w = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "down_svg__st0",
- d: "M2 6h20L12 19z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$u = [_hoisted_2$w];
-function render$l(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$z, [].concat(_hoisted_3$u));
-}
-var Down = {
- render: render$l
-};
-var index$C = function index210() {
- return svg({
- name: "IconDown",
- component: Down
- })();
-};
-var _hoisted_1$y = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$v = /* @__PURE__ */ createBaseVNode(
- "g",
- {
- transform: "translate(-4 -10)"
- },
- [/* @__PURE__ */ createBaseVNode("circle", {
- class: "ellipsis_svg__st0",
- cx: "9",
- cy: "22",
- r: "1.5"
- }), /* @__PURE__ */ createBaseVNode("circle", {
- class: "ellipsis_svg__st0",
- cx: "16",
- cy: "22",
- r: "1.5"
- }), /* @__PURE__ */ createBaseVNode("circle", {
- class: "ellipsis_svg__st0",
- cx: "23",
- cy: "22",
- r: "1.5"
- })],
- -1
- /* HOISTED */
-);
-var _hoisted_3$t = [_hoisted_2$v];
-function render$k(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$y, [].concat(_hoisted_3$t));
-}
-var Ellipsis = {
- render: render$k
-};
-var index$B = function index211() {
- return svg({
- name: "IconEllipsis",
- component: Ellipsis
- })();
-};
-var _hoisted_1$x = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$u = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "fullscreen_svg__st0",
- d: "M8 3H4.5l5.2 5.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0L3 4.3V8c0 .6-.4 1-1 1s-1-.4-1-1V2c0-.6.4-1 1-1h6c.5 0 1 .4 1 1s-.4 1-1 1zM8 21H4.5l5.2-5.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L3 19.7V16c0-.6-.4-1-1-1s-1 .4-1 1v6c0 .6.4 1 1 1h6c.5 0 1-.4 1-1s-.4-1-1-1zM16 3h3.5l-5.2 5.3c-.4.4-.4 1 0 1.4.4.4 1 .4 1.4 0L21 4.3V8c0 .6.4 1 1 1s1-.4 1-1V2c0-.6-.4-1-1-1h-6c-.5 0-1 .4-1 1s.4 1 1 1zM16 21h3.5l-5.2-5.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l5.3 5.4V16c0-.6.4-1 1-1s1 .4 1 1v6c0 .6-.4 1-1 1h-6c-.5 0- [...]
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$s = [_hoisted_2$u];
-function render$j(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$x, [].concat(_hoisted_3$s));
-}
-var Fullscreen = {
- render: render$j
-};
-var index$A = function index212() {
- return svg({
- name: "IconFullscreen",
- component: Fullscreen
- })();
-};
-var _hoisted_1$w = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$t = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "minscreen_svg__st0",
- d: "M3 8h3.5L1.3 2.7c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0L8 6.7V3c0-.6.4-1 1-1s1 .4 1 1v6c0 .6-.4 1-1 1H3c-.5 0-1-.4-1-1s.4-1 1-1zM3 16h3.5l-5.2 5.3c-.4.4-.4 1 0 1.4.4.4 1 .4 1.4 0L8 17.3V21c0 .6.4 1 1 1s1-.4 1-1v-6c0-.6-.4-1-1-1H3c-.5 0-1 .4-1 1s.4 1 1 1zM21 8h-3.5l5.2-5.3c.4-.4.4-1 0-1.4s-1-.4-1.4 0L16 6.7V3c0-.6-.4-1-1-1s-1 .4-1 1v6c0 .6.4 1 1 1h6c.5 0 1-.4 1-1s-.4-1-1-1zM21 16h-3.5l5.2 5.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0L16 17.3V21c0 .6-.4 1-1 1s-1-.4-1-1v-6c0-.6.4-1 1-1h6c.5 0 1 .4 [...]
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$r = [_hoisted_2$t];
-function render$i(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$w, [].concat(_hoisted_3$r));
-}
-var Minscreen = {
- render: render$i
-};
-var index$z = function index213() {
- return svg({
- name: "IconMinscreen",
- component: Minscreen
- })();
-};
-var _hoisted_1$v = {
- class: "popup_svg__icon",
- viewBox: "0 0 1024 1024",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$s = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- d: "M292.768 449.694c2.491.515 4.99.987 7.469 1.551 28.956 6.587 48.828 32.893 47.59 62.98-1.187 28.85-23.508 53.387-52.383 57.605-.904.132-1.784.433-2.676.655H280.21c-.773-.21-1.536-.498-2.323-.615-26.22-3.891-46.433-23.108-51.662-49.134-.36-1.793-.753-3.579-1.13-5.369V504.81c.233-.992.536-1.973.694-2.977 3.902-24.797 21.983-44.51 46.302-50.418 2.688-.653 5.413-1.151 8.12-1.722 4.185.002 8.371.002 12.557.002zm212.46 122.792c-2.49-.515-4.99-.988-7.469-1.55-28.956-6.589-48.828-32.895- [...]
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$q = [_hoisted_2$s];
-function render$h(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$v, [].concat(_hoisted_3$q));
-}
-var Popup$1 = {
- render: render$h
-};
-var index$y = function index214() {
- return svg({
- name: "IconPopup",
- component: Popup$1
- })();
-};
-var _hoisted_1$u = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$r = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "sort_svg__st0",
- d: "M2 14h20L12 24 2 14zm0-4L12 0l10 10H2z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$p = [_hoisted_2$r];
-function render$g(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$u, [].concat(_hoisted_3$p));
-}
-var Sort$1 = {
- render: render$g
-};
-var index$x = function index215() {
- return svg({
- name: "IconSort",
- component: Sort$1
- })();
-};
-var _hoisted_1$t = {
- viewBox: "0 0 16 16",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$q = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- d: "M12.243 6 8.14 10.101a.2.2 0 0 1-.282 0L3.757 6h0",
- stroke: "currentColor",
- fill: "none",
- "fill-rule": "evenodd",
- "stroke-linecap": "round",
- "stroke-linejoin": "round"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$o = [_hoisted_2$q];
-function render$f(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$t, [].concat(_hoisted_3$o));
-}
-var TriangleDown = {
- render: render$f
-};
-var index$w = function index216() {
- return svg({
- name: "IconTriangleDown",
- component: TriangleDown
- })();
-};
-var _hoisted_1$s = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 126 151",
- "xml:space": "preserve"
-};
-var _hoisted_2$p = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- d: "M112.524 12.653 75.041 62.736l-.023 74.905 12.502 12.484V62.736l37.507-50.083V.193H.002v12.46L37.51 62.736v62.42l12.502 12.485V62.736L12.505 12.653z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$n = [_hoisted_2$p];
-function render$e(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$s, [].concat(_hoisted_3$n));
-}
-var Unfilter = {
- render: render$e
-};
-var index$v = function index217() {
- return svg({
- name: "IconUnfilter",
- component: Unfilter
- })();
-};
-var _hoisted_1$r = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 24 24",
- "xml:space": "preserve"
-};
-var _hoisted_2$o = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "up_svg__st0",
- d: "M2 19h20L12 6z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$m = [_hoisted_2$o];
-function render$d(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$r, [].concat(_hoisted_3$m));
-}
-var Up = {
- render: render$d
-};
-var index$u = function index218() {
- return svg({
- name: "IconUp",
- component: Up
- })();
-};
-var _hoisted_1$q = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 16 16",
- style: {
- "enable-background": "new 0 0 16 16"
- },
- "xml:space": "preserve"
-};
-var _hoisted_2$n = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "down-ward_svg__st0",
- d: "M8 11.43c-.15 0-.31-.06-.42-.18L1.92 5.6c-.23-.23-.23-.61 0-.85s.61-.23.85 0L8 9.98l5.23-5.23a.61.61 0 0 1 .85 0c.23.23.23.61 0 .85l-5.66 5.66c-.11.11-.27.17-.42.17z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$l = [_hoisted_2$n];
-function render$c(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$q, [].concat(_hoisted_3$l));
-}
-var DownWard = {
- render: render$c
-};
-var index$t = function index219() {
- return svg({
- name: "IconDownWard",
- component: DownWard
- })();
-};
-var _hoisted_1$p = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 16 16",
- style: {
- "enable-background": "new 0 0 16 16"
- },
- "xml:space": "preserve"
-};
-var _hoisted_2$m = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "sort-triangle_svg__st0",
- d: "M11.75 9.43 7.99 13.5 4.25 9.43h7.5M8 1.5c-.28 0-.55.11-.75.32L3.44 5.97c-.16.18-.25.4-.25.64 0 .53.45.97 1 .97h7.61c.24 0 .48-.09.66-.24.41-.35.45-.96.09-1.36l-3.8-4.16a.647.647 0 0 1-.09-.08c-.19-.16-.42-.24-.66-.24l.01 1 3.74 4.07h-7.5L7.99 2.5H8v-1zm3.81 6.93H4.19c-.24 0-.48.09-.66.24-.41.35-.45.96-.08 1.36l3.81 4.14c.03.03.06.06.09.08.18.17.41.25.65.25.28 0 .55-.11.75-.32l3.81-4.14c.16-.18.25-.4.25-.64 0-.54-.45-.97-1-.97z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$k = [_hoisted_2$m];
-function render$b(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$p, [].concat(_hoisted_3$k));
-}
-var SortTriangle = {
- render: render$b
-};
-var index$s = function index220() {
- return svg({
- name: "IconSortTriangle",
- component: SortTriangle
- })();
-};
-var _hoisted_1$o = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 16 16",
- style: {
- "enable-background": "new 0 0 16 16"
- },
- "xml:space": "preserve"
-};
-var _hoisted_2$l = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "sort-triangle-ascending_svg__st0",
- d: "M8 1.5c.24 0 .47.08.66.24.03.03.06.06.09.08l3.81 4.14a.93.93 0 0 1-.09 1.36c-.18.16-.42.24-.66.24H4.19c-.55 0-1-.43-1-.97 0-.24.09-.46.25-.64l3.81-4.14c.2-.2.47-.31.75-.31m4.81 7.89c0 .24-.09.46-.25.64l-3.81 4.14c-.2.22-.47.33-.75.33-.24 0-.47-.08-.66-.24-.03-.03-.06-.05-.09-.08l-3.81-4.14a.938.938 0 0 1 .08-1.36c.18-.16.42-.24.66-.24h7.61c.57-.01 1.02.42 1.02.95zm-1.06.04h-7.5l3.74 4.07 3.76-4.07z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$j = [_hoisted_2$l];
-function render$a(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$o, [].concat(_hoisted_3$j));
-}
-var SortTriangleAscending = {
- render: render$a
-};
-var index$r = function index221() {
- return svg({
- name: "IconSortTriangleAscending",
- component: SortTriangleAscending
- })();
-};
-var _hoisted_1$n = {
- xmlns: "http://www.w3.org/2000/svg",
- viewBox: "0 0 16 16",
- style: {
- "enable-background": "new 0 0 16 16"
- },
- "xml:space": "preserve"
-};
-var _hoisted_2$k = /* @__PURE__ */ createBaseVNode(
- "path",
- {
- class: "sort-triangle-descending_svg__st0",
- d: "M8 14.5c-.24 0-.47-.08-.66-.24-.03-.03-.06-.05-.09-.08l-3.81-4.14a.93.93 0 0 1 .09-1.36c.18-.16.42-.24.66-.24h7.61c.55 0 1 .43 1 .97 0 .24-.09.46-.25.64l-3.81 4.14c-.19.2-.46.31-.74.31M3.19 6.61c0-.24.09-.46.25-.64l3.81-4.14c.2-.22.47-.33.75-.33.24 0 .47.08.66.24.03.03.06.06.09.08l3.81 4.14c.37.4.33 1.01-.08 1.36-.18.16-.42.24-.66.24H4.19c-.55.01-1-.42-1-.95zm1.06-.04h7.51L8.01 2.5 4.25 6.57z"
- },
- null,
- -1
- /* HOISTED */
-);
-var _hoisted_3$i = [_hoisted_2$k];
-function render$9(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$n, [].concat(_hoisted_3$i));
-}
-var SortTriangleDescending = {
- render: render$9
-};
-var index$q = function index222() {
- return svg({
- name: "IconSortTriangleDescending",
- component: SortTriangleDescending
- })();
-};
-var _hoisted_1$m = {
- viewBox: "0 0 96 96",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$j = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 1h96v96H0z"></path><path d="M3 .5h90v90H3z"></path><path d="M18.3 29.3h61.406c.88 0 1.594.714 1.594 1.594v44.25a4.555 4.555 0 0 1-4.555 4.556h-53.89a4.555 4.555 0 0 1-4.555-4.555V29.3Z" fill="#EEE"></path><path d="M15.394 29.3H64.2v45.845a4.555 4.555 0 0 1-4.555 4.555h-41.29a4.555 4.555 0 0 1-4.555-4.555v-44.25c0-.881.714-1.595 1.594-1.595Z" fill="#FFF"></path><path d="M64.2 29.3H14.74c-. [...]
-var _hoisted_3$h = [_hoisted_2$j];
-function render$8(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$m, [].concat(_hoisted_3$h));
-}
-var NoData = {
- render: render$8
-};
-var index$p = function index223() {
- return svg({
- name: "IconNoData",
- component: NoData
- })();
-};
-var _hoisted_1$l = {
- viewBox: "0 0 96 96",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$i = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h96v96H0z"></path><path d="m13.076 37.224 31.573-22.36a4.555 4.555 0 0 1 5.265 0l31.574 22.36a4.555 4.555 0 0 1 1.922 3.718V80.36a3.417 3.417 0 0 1-3.416 3.417H14.57a3.417 3.417 0 0 1-3.417-3.417V40.942c0-1.478.717-2.864 1.923-3.718Z" fill="#FFF"></path><path d="m49.612 14.65 32.114 22.743a3.98 3.98 0 0 1 1.684 3.247v40.146a3 3 0 0 1-3.01 2.99H14.164a3 3 0 0 1-3.01-2.99V40.64a3.98 3.98 0 [...]
-var _hoisted_3$g = [_hoisted_2$i];
-function render$7(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$l, [].concat(_hoisted_3$g));
-}
-var NoNews = {
- render: render$7
-};
-var index$o = function index224() {
- return svg({
- name: "IconNoNews",
- component: NoNews
- })();
-};
-var _hoisted_1$k = {
- viewBox: "0 0 96 96",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$h = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h96v96H0z"></path><g transform="translate(3 17)"><rect fill="#FFF" width="81.173" height="61.765" rx="4.218"></rect><path d="M77.432 0c2.066 0 3.741 1.656 3.741 3.698v54.368c0 2.043-1.675 3.699-3.74 3.699H3.74C1.675 61.765 0 60.109 0 58.066V3.698C0 1.656 1.675 0 3.74 0h73.692Zm0 1H3.741C2.233 1 1.01 2.208 1.01 3.698v54.368c0 1.49 1.222 2.7 2.73 2.7h73.691c1.508 0 2.73-1.21 2.73-2.7V3.698 [...]
-var _hoisted_3$f = [_hoisted_2$h];
-function render$6(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$k, [].concat(_hoisted_3$f));
-}
-var NoPerm = {
- render: render$6
-};
-var index$n = function index225() {
- return svg({
- name: "IconNoPerm",
- component: NoPerm
- })();
-};
-var _hoisted_1$j = {
- viewBox: "0 0 96 96",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$g = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h96v96H0z"></path><path d="M59.584 11h8.796a5.062 5.062 0 0 1 5.062 5.062v9.875c0 .698-.567 1.265-1.266 1.265H59.584V11Z" fill="#EEE"></path><path d="M68.822 11a4.624 4.624 0 0 1 4.62 4.63v10.415c0 .639-.517 1.157-1.155 1.157H59.584V11h9.238Zm0 1.043h-8.197v14.116h11.662a.115.115 0 0 0 .114-.114V15.629a3.583 3.583 0 0 0-3.579-3.586Z" fill="#818181" fill-rule="nonzero"></path><path d="M14 [...]
-var _hoisted_3$e = [_hoisted_2$g];
-function render$5(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$j, [].concat(_hoisted_3$e));
-}
-var NoResult = {
- render: render$5
-};
-var index$m = function index226() {
- return svg({
- name: "IconNoResult",
- component: NoResult
- })();
-};
-var _hoisted_1$i = {
- viewBox: "0 0 120 120",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$f = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h120v120H0z"></path><g fill-rule="nonzero"><g transform="translate(4 21)"><rect fill="#FFF" width="102.819" height="78" rx="4.218"></rect><path d="M98.08 0c2.618 0 4.74 2.091 4.74 4.67v68.66c0 2.579-2.122 4.67-4.74 4.67H4.739C2.121 78 0 75.909 0 73.33V4.67C0 2.092 2.121 0 4.738 0h93.343Zm0 1.262H4.739c-1.91 0-3.457 1.526-3.457 3.409v68.658c0 1.883 1.548 3.409 3.457 3.409h93.343c1.91 0 3. [...]
-var _hoisted_3$d = [_hoisted_2$f];
-function render$4(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$i, [].concat(_hoisted_3$d));
-}
-var PageNoperm = {
- render: render$4
-};
-var index$l = function index227() {
- return svg({
- name: "IconPageNoperm",
- component: PageNoperm
- })();
-};
-var _hoisted_1$h = {
- viewBox: "0 0 120 120",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$e = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h120v120H0z"></path><g fill-rule="nonzero" transform="translate(3 21)"><rect fill="#FFF" width="102.903" height="78.69" rx="4.218"></rect><path d="M98.16 0c2.62 0 4.743 2.11 4.743 4.712v69.266c0 2.603-2.123 4.712-4.742 4.712H4.742C2.123 78.69 0 76.58 0 73.978V4.712C0 2.11 2.123 0 4.742 0h93.419Zm0 1.274H4.743c-1.911 0-3.46 1.539-3.46 3.438v69.266c0 1.9 1.549 3.439 3.46 3.439h93.419c1.91 [...]
-var _hoisted_3$c = [_hoisted_2$e];
-function render$3(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$h, [].concat(_hoisted_3$c));
-}
-var PageNothing = {
- render: render$3
-};
-var index$k = function index228() {
- return svg({
- name: "IconPageNothing",
- component: PageNothing
- })();
-};
-var _hoisted_1$g = {
- viewBox: "0 0 155 126",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$d = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h155v126H0z"></path><g fill-rule="nonzero"><g transform="translate(83.562 20.562)"><path d="M58.876 55.25v26.94c0 .465-.189.887-.494 1.192a1.68 1.68 0 0 1-1.192.494H1.686a1.68 1.68 0 0 1-1.192-.494A1.68 1.68 0 0 1 0 82.19V55.25h58.876Z" stroke="#818181" stroke-width="1.124" fill="#FFF"></path><path stroke="#818181" stroke-width="1.124" fill="#FFF" d="M0 27.625h58.876v28.626H0z"></path><p [...]
-var _hoisted_3$b = [_hoisted_2$d];
-function render$2(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$g, [].concat(_hoisted_3$b));
-}
-var PageServererror = {
- render: render$2
-};
-var index$j = function index229() {
- return svg({
- name: "IconPageServererror",
- component: PageServererror
- })();
-};
-var _hoisted_1$f = {
- viewBox: "0 0 120 120",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$c = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h120v120H0z"></path><g fill-rule="nonzero"><g transform="translate(4 24)"><rect fill="#FFF" width="102.903" height="78.69" rx="4.218"></rect><path d="M98.16 0c2.62 0 4.743 2.11 4.743 4.712v69.266c0 2.603-2.123 4.712-4.742 4.712H4.742C2.123 78.69 0 76.58 0 73.978V4.712C0 2.11 2.123 0 4.742 0h93.419Zm0 1.274H4.743c-1.911 0-3.46 1.539-3.46 3.438v69.266c0 1.9 1.549 3.439 3.46 3.439h93.419c1. [...]
-var _hoisted_3$a = [_hoisted_2$c];
-function render$1(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$f, [].concat(_hoisted_3$a));
-}
-var PageWeaknet = {
- render: render$1
-};
-var index$i = function index230() {
- return svg({
- name: "IconPageWeaknet",
- component: PageWeaknet
- })();
-};
-var _hoisted_1$e = {
- viewBox: "0 0 96 96",
- xmlns: "http://www.w3.org/2000/svg"
-};
-var _hoisted_2$b = /* @__PURE__ */ createStaticVNode('<g fill="none" fill-rule="evenodd"><path d="M0 0h96v96H0z"></path><g transform="translate(3 17)"><rect fill="#FFF" width="81.055" height="61.765" rx="4.218"></rect><path d="M77.32 0c2.062 0 3.735 1.656 3.735 3.698v54.368c0 2.043-1.673 3.699-3.736 3.699H3.735C1.672 61.765 0 60.109 0 58.066V3.698C0 1.656 1.672 0 3.735 0H77.32Zm0 1H3.734C2.23 1 1.01 2.208 1.01 3.698v54.368c0 1.49 1.22 2.7 2.725 2.7H77.32c1.506 0 2.726-1.21 2.726-2.7V3.69 [...]
-var _hoisted_3$9 = [_hoisted_2$b];
-function render(_ctx, _cache) {
- return openBlock(), createElementBlock("svg", _hoisted_1$e, [].concat(_hoisted_3$9));
-}
-var Weaknet = {
- render
+import { as as merge, d as defineComponent, al as Tooltip, j as props, f as setup, l as $props, $ as $prefix, m as $setup, aN as isNull, a_ as VALIDATE_STATE, a$ as POSITION, Z as debounce_default, aF as omitText, h, b0 as parseVnode, an as index$4 } from "./index.js";
+import { k as resolveComponent, u as openBlock, v as createElementBlock, D as renderSlot, y as createBlock, z as createCommentVNode, A as normalizeClass, O as withModifiers, l as createVNode, t as Text, H as withCtx, G as normalizeStyle, w as createBaseVNode, J as createTextVNode, E as toDisplayString, I as withDirectives, K as vShow } from "./vue.js";
+import { v as validate_default } from "./index12.js";
+const watchRules = ({ api: api2, props: props2, state }) => (newRules = {}, oldRules = {}) => {
+ const newValidFields = Object.keys(newRules);
+ const oldValidFields = Object.keys(oldRules);
+ const removeValidFields = oldValidFields.filter((item) => !newValidFields.includes(item));
+ api2.clearValidate(removeValidFields);
+ state.fields.forEach((field) => {
+ field.removeValidateEvents();
+ field.addValidateEvents();
+ });
+ if (props2.validateOnRuleChange) {
+ api2.validate(() => void 0);
+ }
+};
+const computedAutoLabelWidth = ({ state }) => () => {
+ if (!state.potentialLabelWidthArr.length) {
+ return "0";
+ }
+ const max = Math.max(...state.potentialLabelWidthArr);
+ return max ? `${max}px` : "";
};
-var index$h = function index231() {
- return svg({
- name: "IconWeaknet",
- component: Weaknet
- })();
+const computedHideRequiredAsterisk = ({ props: props2, designConfig }) => () => {
+ var _a, _b;
+ return (_b = (_a = props2.hideRequiredAsterisk) != null ? _a : designConfig == null ? void 0 : designConfig.hideRequiredAsterisk) != null ? _b : false;
};
-const watchVisible = ({ broadcast, emit, nextTick: nextTick2 }) => (value) => {
- broadcast("TinyDropdownMenu", "visible", value);
- nextTick2(() => emit("visible-change", value));
+const computedValidateIcon$1 = ({ props: props2, designConfig }) => () => {
+ var _a, _b, _c;
+ return (_c = (_b = props2.validateIcon) != null ? _b : (_a = designConfig == null ? void 0 : designConfig.icons) == null ? void 0 : _a.validateIcon) != null ? _c : null;
};
-const watchFocusing = (parent) => (value) => {
- const selfDefine = parent.$el.querySelector(".tiny-dropdown-selfdefine");
- if (selfDefine) {
- value ? addClass(selfDefine, "focusing") : removeClass(selfDefine, "focusing");
+const computedIsErrorInline$1 = ({ props: props2, designConfig }) => () => {
+ if (props2.messageType) {
+ return props2.messageType === "inline";
}
-};
-const show = ({ props: props2, state }) => () => {
- if (props2.disabled) {
- return;
+ if (typeof props2.inlineMessage === "boolean") {
+ return props2.inlineMessage;
}
- clearTimeout(Number(state.timeout));
- state.timeout = setTimeout(
- () => {
- state.visible = true;
- },
- state.trigger === "click" ? 0 : props2.showTimeout
- );
+ return (designConfig == null ? void 0 : designConfig.messageType) === "inline" || false;
};
-const hide = ({ api: api2, props: props2, state }) => () => {
- if (props2.disabled) {
- return;
+const computedIsErrorBlock$1 = ({ props: props2, designConfig }) => () => {
+ if (props2.messageType) {
+ return props2.messageType === "block";
}
- api2.removeTabindex();
- if (props2.tabindex >= 0 && state.triggerElm) {
- api2.resetTabindex(state.triggerElm);
- }
- clearTimeout(Number(state.timeout));
- state.timeout = setTimeout(
- () => {
- state.visible = false;
- },
- state.trigger === "click" ? 0 : props2.hideTimeout
- );
+ return (designConfig == null ? void 0 : designConfig.messageType) === "block" || false;
+};
+const created = ({ parent, state }) => () => {
+ parent.$on("form:addField", (field) => {
+ if (field) {
+ state.fields.push(field);
+ }
+ });
+ parent.$on("form:removeField", (field) => {
+ if (field.prop) {
+ state.fields.splice(state.fields.indexOf(field), 1);
+ }
+ });
};
-const handleClick$3 = ({ api: api2, props: props2, state, emit }) => () => {
- if (props2.disabled) {
+const resetFields = ({ props: props2, state }) => () => {
+ if (!props2.model) {
return;
}
- emit("handle-click", state.visible);
- state.visible ? api2.hide() : api2.show();
+ state.fields.forEach((field) => {
+ field.resetField();
+ });
};
-const handleTriggerKeyDown = ({ api: api2, state }) => (event) => {
- const keyCode = event.keyCode;
- if (~[KEY_CODE.ArrowUp, KEY_CODE.ArrowDown].indexOf(keyCode)) {
- api2.removeTabindex();
- if (state.menuItems) {
- api2.resetTabindex(state.menuItems[0]);
- state.menuItems[0].focus();
- }
- event.preventDefault();
- event.stopPropagation();
- } else if (keyCode === KEY_CODE.Enter) {
- api2.handleClick();
- } else if (~[KEY_CODE.Tab, KEY_CODE.Escape].indexOf(keyCode)) {
- api2.hide();
+const updateTip$1 = ({ props: props2, state }) => () => {
+ if (!props2.model) {
+ return;
}
+ state.fields.forEach((field) => {
+ field.updateTip();
+ });
};
-const handleItemKeyDown = ({ api: api2, props: props2, state }) => (event) => {
- const keyCode = event.keyCode;
- const target = event.target;
- const currentIndex = state.menuItemsArray.indexOf(target);
- const max = state.menuItemsArray.length - 1;
- let nextIndex;
- if (~[KEY_CODE.ArrowUp, KEY_CODE.ArrowDown].indexOf(keyCode)) {
- if (keyCode === KEY_CODE.ArrowUp) {
- nextIndex = currentIndex !== 0 ? currentIndex - 1 : 0;
- } else {
- nextIndex = currentIndex < max ? currentIndex + 1 : max;
- }
- api2.removeTabindex();
- if (state.menuItems) {
- api2.resetTabindex(state.menuItems[nextIndex]);
- state.menuItems[nextIndex].focus();
- }
- event.preventDefault();
- event.stopPropagation();
- } else if (keyCode === KEY_CODE.Enter) {
- api2.triggerElmFocus();
- target == null ? void 0 : target.click();
- if (props2.hideOnClick) {
- state.visible = false;
- }
- } else if (~[KEY_CODE.Tab, KEY_CODE.Escape].indexOf(keyCode)) {
- api2.hide();
- api2.triggerElmFocus();
+const clearValidate$1 = (state) => (props2 = []) => {
+ let fields;
+ if (props2.length) {
+ fields = typeof props2 === "string" ? state.fields.filter((field) => props2 === field.prop) : state.fields.filter((field) => field.prop && props2.includes(field.prop));
+ } else {
+ fields = state.fields;
}
-};
-const resetTabindex = (api2) => (el) => {
- api2.removeTabindex();
- el.setAttribute("tabindex", "0");
-};
-const removeTabindex = (state) => () => {
- var _a, _b;
- (_a = state.triggerElm) == null ? void 0 : _a.setAttribute("tabindex", "-1");
- (_b = state.menuItemsArray) == null ? void 0 : _b.forEach((item) => {
- item.setAttribute("tabindex", "-1");
+ fields.forEach((field) => {
+ field.clearValidate();
});
};
-const initAria = ({ state, props: props2 }) => () => {
- var _a, _b, _c, _d, _e;
- (_a = state.dropdownElm) == null ? void 0 : _a.setAttribute("id", state.listId);
- (_b = state.triggerElm) == null ? void 0 : _b.setAttribute("aria-haspopup", "list");
- (_c = state.triggerElm) == null ? void 0 : _c.setAttribute("aria-controls", state.listId);
- if (!props2.splitButton || !props2.singleButton) {
- (_d = state.triggerElm) == null ? void 0 : _d.setAttribute("role", "button");
- (_e = state.triggerElm) == null ? void 0 : _e.setAttribute("tabindex", String(props2.tabindex));
- addClass(state.triggerElm, "tiny-dropdown-selfdefine");
+const validate$1 = ({ props: props2, state }) => (callback) => {
+ if (!props2.model) {
+ return;
}
-};
-const toggleFocus = ({ state, value }) => () => {
- state.focusing = value;
-};
-const initEvent = ({ api: api2, props: props2, state, vm, mode }) => () => {
- var _a;
- let buttonValue = props2.splitButton || props2.singleButton;
- state.triggerElm = buttonValue ? vm.$refs.trigger.$el : props2.border ? vm.$refs.trigger.$el : vm.$refs.trigger;
- on(state.triggerElm, "keydown", api2.handleTriggerKeyDown);
- (_a = state.dropdownElm) == null ? void 0 : _a.addEventListener("keydown", api2.handleItemKeyDown, true);
- if (!props2.splitButton || !props2.singleButton) {
- on(state.triggerElm, "focus", toggleFocus({ state, value: true }));
- on(state.triggerElm, "blur", toggleFocus({ state, value: false }));
- on(state.triggerElm, "click", toggleFocus({ state, value: false }));
+ let promise;
+ if (typeof callback !== "function" && window.Promise) {
+ promise = new window.Promise((resolve, reject) => {
+ callback = (valid2) => {
+ valid2 ? resolve(valid2) : reject(valid2);
+ };
+ });
}
- if (state.trigger === "hover") {
- on(state.triggerElm, "mouseenter", api2.show);
- on(state.triggerElm, "mouseleave", api2.hide);
- on(state.dropdownElm, "mouseenter", api2.show);
- on(state.dropdownElm, "mouseleave", api2.hide);
- } else if (state.trigger === "click") {
- on(state.triggerElm, "click", api2.handleClick);
+ let valid = true;
+ let count = 0;
+ if (state.fields.length === 0 && callback) {
+ callback(true);
}
- if (mode === "mobile-first") {
- if (props2.splitButton || props2.singleButton) {
- on(state.triggerElm, "click", api2.handleClick);
- }
+ let invalidFields = {};
+ state.fields.forEach((field) => {
+ field.validate("", (message, field2) => {
+ if (message) {
+ valid = false;
+ }
+ invalidFields = merge({}, invalidFields, field2);
+ if (typeof callback === "function" && ++count === state.fields.length) {
+ callback(valid, invalidFields);
+ }
+ });
+ });
+ if (promise) {
+ return promise;
}
};
-const handleMenuItemClick$1 = ({ props: props2, state, emit }) => ({ itemData, vm, disabled }) => {
- if (props2.hideOnClick && !disabled) {
- state.visible = false;
- }
- if (!disabled) {
- const data8 = { itemData, vm };
- emit("item-click", data8);
+const validateField = (state) => (props2, cb) => {
+ props2 = [].concat(props2);
+ const fields = state.fields.filter((field) => props2.includes(field.prop));
+ if (!fields.length) {
+ return;
}
+ fields.forEach((field) => {
+ field.validate("", cb);
+ });
};
-const triggerElmFocus = (state) => () => {
- var _a;
- ((_a = state.triggerElm) == null ? void 0 : _a.focus) && state.triggerElm.focus();
+const getLabelWidthIndex = (state) => (width) => {
+ const index2 = state.potentialLabelWidthArr.indexOf(width);
+ if (index2 === -1) {
+ throw new Error("unpected width ", width);
+ }
+ return index2;
};
-const initDomOperation = ({ api: api2, state, vm }) => () => {
- var _a;
- state.dropdownElm = vm.popperElm;
- state.menuItems = (_a = state.dropdownElm) == null ? void 0 : _a.querySelectorAll('[tabindex="-1"]');
- state.menuItemsArray = [].slice.call(state.menuItems);
- api2.initEvent();
- api2.initAria();
+const registerLabelWidth = ({ api: api2, state }) => (val, oldVal) => {
+ if (val && oldVal) {
+ const index2 = api2.getLabelWidthIndex(oldVal);
+ state.potentialLabelWidthArr.splice(index2, 1, val);
+ } else if (val) {
+ state.potentialLabelWidthArr.push(val);
+ }
};
-const handleMainButtonClick = ({ api: api2, emit }) => (event) => {
- emit("button-click", event);
- api2.hide();
+const deregisterLabelWidth = ({ api: api2, state }) => (val) => {
+ const index2 = api2.getLabelWidthIndex(val);
+ state.potentialLabelWidthArr.splice(index2, 1);
};
-const mounted$1 = ({ api: api2, vm, state, broadcast }) => () => {
- if (state.showSelfIcon) {
- state.showIcon = false;
+const bindDialogEvent = ({ api: api2, dialog, state }) => {
+ let unbindDialogEvent = () => {
+ };
+ if (dialog) {
+ const boxCloseHandler = (isFormReset = true) => {
+ isFormReset ? api2.resetFields() : api2.clearValidate();
+ };
+ const boxDragHandler = () => {
+ if (!state.timer) {
+ state.timer = window.setTimeout(() => {
+ state.timer = 0;
+ api2.updateTip();
+ }, 10);
+ }
+ };
+ dialog.state.emitter.on("boxclose", boxCloseHandler);
+ dialog.state.emitter.on("boxdrag", boxDragHandler);
+ unbindDialogEvent = () => {
+ dialog.state.emitter.off("boxclose", boxCloseHandler);
+ dialog.state.emitter.off("boxdrag", boxDragHandler);
+ };
}
- vm.$on("menu-item-click", api2.handleMenuItemClick);
- vm.$on("current-item-click", api2.handleMenuItemClick);
- vm.$on("selected-index", (selectedIndex) => {
- broadcast("TinyDropdownMenu", "menu-selected-index", selectedIndex);
- });
- vm.$on("is-disabled", api2.clickOutside);
+ return unbindDialogEvent;
};
-const beforeDistory = ({ api: api2, state }) => () => {
- if (state.triggerElm) {
- off(state.triggerElm, "keydown", api2.handleTriggerKeyDown);
- off(state.triggerElm, "focus", toggleFocus({ state, value: true }));
- off(state.triggerElm, "blur", toggleFocus({ state, value: false }));
- off(state.triggerElm, "click", toggleFocus({ state, value: false }));
- off(state.triggerElm, "mouseenter", api2.show);
- off(state.triggerElm, "mouseleave", api2.hide);
- off(state.triggerElm, "click", api2.handleClick);
- state.triggerElm = null;
- }
- if (state.dropdownElm) {
- state.dropdownElm.removeEventListener("keydown", api2.handleItemKeyDown, true);
- off(state.dropdownElm, "mouseenter", api2.show);
- off(state.dropdownElm, "mouseleave", api2.hide);
- state.dropdownElm = null;
- }
+const showTooltip = ({ vm, state }) => (dom, val) => {
+ const tooltip = vm.$refs.tooltip;
+ tooltip.state.referenceElm = dom;
+ tooltip.state.popperElm && (tooltip.state.popperElm.style.display = "none");
+ tooltip.doDestroy();
+ state.tooltipVisible = true;
+ state.displayedValue = val;
+ setTimeout(tooltip.updatePopper, 20);
};
-const clickOutside$2 = ({ props: props2, api: api2 }) => (disabled) => {
- if (props2.hideOnClick) {
- disabled ? api2.show() : api2.hide();
- }
+const hideTooltip = ({ state }) => () => {
+ state.tooltipVisible = false;
};
-const api$c = ["state", "handleMainButtonClick", "hide", "show", "initDomOperation", "handleClick", "clickOutside"];
-const renderless$c = (props2, { reactive: reactive2, watch: watch2, provide: provide5, onMounted, computed }, { emit, parent, broadcast, vm, nextTick: nextTick2, mode, designConfig }) => {
+const api$1 = [
+ "state",
+ "resetFields",
+ "clearValidate",
+ "validate",
+ "validateField",
+ "getLabelWidthIndex",
+ "registerLabelWidth",
+ "deregisterLabelWidth",
+ "updateTip",
+ "showTooltip",
+ "hideTooltip"
+];
+const renderless$1 = (props2, { computed, inject, provide: provide2, reactive, watch, onBeforeUnmount }, { vm, parent, designConfig }) => {
const api2 = {};
- const state = reactive2({
- visible: false,
- timeout: null,
- focusing: false,
- menuItems: [],
- menuItemsArray: [],
- triggerElm: null,
- dropdownElm: null,
- listId: `dropdown-menu-${guid()}`,
- showIcon: props2.showIcon,
- showSelfIcon: props2.showSelfIcon,
- designConfig,
- trigger: computed(() => {
+ const dialog = inject("dialog", null);
+ const state = reactive({
+ showAutoWidth: props2.showAutoWidth,
+ fields: [],
+ timer: 0,
+ tooltipVisible: false,
+ displayedValue: "",
+ potentialLabelWidthArr: [],
+ autoLabelWidth: computed(() => api2.computedAutoLabelWidth()),
+ hideRequiredAsterisk: computed(() => api2.computedHideRequiredAsterisk()),
+ validateIcon: computed(() => api2.computedValidateIcon()),
+ isErrorInline: computed(() => api2.computedIsErrorInline()),
+ isErrorBlock: computed(() => api2.computedIsErrorBlock()),
+ isDisplayOnly: computed(() => props2.displayOnly),
+ hasRequired: computed(() => {
+ if (props2.rules) {
+ return Object.values(props2.rules).find((ruleOrRules) => {
+ if (Array.isArray(ruleOrRules)) {
+ return ruleOrRules.some((r) => r.required);
+ } else {
+ return ruleOrRules.required;
+ }
+ });
+ } else {
+ return false;
+ }
+ }),
+ labelWidth: computed(() => {
+ var _a;
+ return props2.labelWidth || ((_a = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _a.labelWidth) || "80px";
+ }),
+ tooltipType: computed(() => {
var _a;
- return props2.trigger || ((_a = designConfig == null ? void 0 : designConfig.props) == null ? void 0 : _a.trigger) || "hover";
+ return ((_a = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _a.tooltipType) || "normal";
})
});
- provide5("dropdownVm", vm);
Object.assign(api2, {
state,
- watchVisible: watchVisible({ broadcast, emit, nextTick: nextTick2 }),
- watchFocusing: watchFocusing(parent),
- show: show({ props: props2, state }),
- hide: hide({ api: api2, props: props2, state }),
- mounted: mounted$1({ api: api2, vm, state, broadcast }),
- handleClick: handleClick$3({ api: api2, props: props2, state, emit }),
- handleTriggerKeyDown: handleTriggerKeyDown({ api: api2, state }),
- handleItemKeyDown: handleItemKeyDown({ api: api2, props: props2, state }),
- resetTabindex: resetTabindex(api2),
- removeTabindex: removeTabindex(state),
- initAria: initAria({ state, props: props2 }),
- initEvent: initEvent({ api: api2, props: props2, state, vm, mode }),
- handleMenuItemClick: handleMenuItemClick$1({ props: props2, state, emit }),
- handleMainButtonClick: handleMainButtonClick({ api: api2, emit }),
- triggerElmFocus: triggerElmFocus(state),
- initDomOperation: initDomOperation({ api: api2, state, vm }),
- beforeDistory: beforeDistory({ api: api2, state }),
- clickOutside: clickOutside$2({ state, props: props2, api: api2 })
- });
- watch2(() => state.visible, api2.watchVisible);
- watch2(() => state.focusing, api2.watchFocusing);
- onMounted(api2.mounted);
- return api2;
-};
-const handleChange = ({ emit, state }) => () => {
- if (!state.disabled) {
- emit("change", state.value);
- }
-};
-const handleClick$2 = ({ emit, props: props2, state }) => (node) => {
- if (!state.disabled && !node.disabled) {
- state.value = node[props2.valueField];
- emit("update:modelValue", state.value);
- }
-};
-const moreNodeClick = ({ emit, props: props2, state }) => (node) => {
- if (!state.disabled) {
- const index3 = state.moreData.indexOf(node);
- state.moreData.splice(index3, 1, state.buttonData[state.buttonData.length - 1]);
- state.buttonData.splice(state.buttonData.length - 1, 1, node);
- state.value = node[props2.valueField];
- emit("update:modelValue", state.value);
- }
-};
-const getItemClass = ({ props: props2, state }) => (node) => {
- if (state.disabled || node.disabled) {
- return { disabled: true };
- }
- return props2.plain ? { plain: props2.plain } : {};
-};
-const api$b = ["state", "handleClick", "moreNodeClick", "handleChange", "getItemClass"];
-const renderless$b = (props2, { computed, reactive: reactive2, watch: watch2, inject: inject2 }, { emit, parent }) => {
- var _a, _b;
- parent.tinyForm = parent.tinyForm || inject2("form", null);
- const state = reactive2({
- value: props2.modelValue,
- buttonData: ((_a = props2.data) == null ? void 0 : _a.slice(0, props2.showMore)) || [],
- moreData: ((_b = props2.data) == null ? void 0 : _b.slice(props2.showMore, props2.data.length)) || [],
- formDisabled: computed(() => (parent.tinyForm || {}).disabled),
- disabled: computed(() => props2.disabled || state.formDisabled)
- });
- watch2(
- () => props2.modelValue,
- (value) => {
- if (!state.disabled && state.value !== value) {
- state.value = value;
- }
- },
- { immediate: true }
- );
- watch2(
- () => state.value,
- () => api2.handleChange()
- );
- const api2 = {
- state,
- handleClick: handleClick$2({ emit, props: props2, state }),
- moreNodeClick: moreNodeClick({ emit, props: props2, state }),
- handleChange: handleChange({ emit, state }),
- getItemClass: getItemClass({ props: props2, state })
- };
+ updateTip: updateTip$1({ props: props2, state }),
+ computedAutoLabelWidth: computedAutoLabelWidth({ state }),
+ computedHideRequiredAsterisk: computedHideRequiredAsterisk({ props: props2, designConfig }),
+ computedValidateIcon: computedValidateIcon$1({ props: props2, designConfig }),
+ computedIsErrorInline: computedIsErrorInline$1({ props: props2, designConfig }),
+ computedIsErrorBlock: computedIsErrorBlock$1({ props: props2, designConfig }),
+ created: created({ parent, state }),
+ resetFields: resetFields({ props: props2, state }),
+ clearValidate: clearValidate$1(state),
+ validate: validate$1({ props: props2, state }),
+ validateField: validateField(state),
+ getLabelWidthIndex: getLabelWidthIndex(state),
+ registerLabelWidth: registerLabelWidth({ api: api2, state }),
+ deregisterLabelWidth: deregisterLabelWidth({ api: api2, state }),
+ watchRules: watchRules({ api: api2, props: props2, state }),
+ showTooltip: showTooltip({ vm, state }),
+ hideTooltip: hideTooltip({ state })
+ });
+ api2.created();
+ provide2("form", parent);
+ provide2("showAutoWidth", state.showAutoWidth);
+ const unbindDialogEvent = bindDialogEvent({ api: api2, dialog, state });
+ onBeforeUnmount(unbindDialogEvent);
+ watch(() => props2.rules, api2.watchRules);
return api2;
};
-function _createForOfIteratorHelperLoose$j(o, allowArrayLike) {
+const index$3 = "";
+const index$2 = "";
+function _createForOfIteratorHelperLoose$3(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it)
return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$j(o)) || allowArrayLike && o && typeof o.length === "number") {
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it)
o = it;
var i = 0;
@@ -1148,752 +278,91 @@ function _createForOfIteratorHelperLoose$j(o, allowArrayLike) {
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
-function _unsupportedIterableToArray$j(o, minLen) {
+function _unsupportedIterableToArray$3(o, minLen) {
if (!o)
return;
if (typeof o === "string")
- return _arrayLikeToArray$j(o, minLen);
+ return _arrayLikeToArray$3(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor)
n = o.constructor.name;
if (n === "Map" || n === "Set")
return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$j(o, minLen);
+ return _arrayLikeToArray$3(o, minLen);
}
-function _arrayLikeToArray$j(arr, len) {
+function _arrayLikeToArray$3(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
-var _export_sfc$j = function _export_sfc2(sfc, props2) {
+var _export_sfc$3 = function _export_sfc2(sfc, props2) {
var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$j(props2), _step; !(_step = _iterator()).done; ) {
+ for (var _iterator = _createForOfIteratorHelperLoose$3(props2), _step; !(_step = _iterator()).done; ) {
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
target[key] = val;
}
return target;
};
-var _sfc_main$u = defineComponent({
- emits: ["change", "edit", "update:modelValue"],
- props: [].concat(props, ["size", "data", "plain", "modelValue", "disabled", "valueField", "textField", "showMore", "showEdit", "border"]),
+var _sfc_main$4 = /* @__PURE__ */ defineComponent({
components: {
- TinyPopover: Popover,
- TinyButton: Button$1,
- IconPopup: index$y(),
- IconWriting: index$M()
+ TinyTooltip: Tooltip
},
- setup: function setup$1$1(props2, context) {
- return setup$1({
+ props: [].concat(props, ["validateOnRuleChange", "hideRequiredAsterisk", "model", "rules", "inlineMessage", "messageType", "statusIcon", "labelPosition", "labelAlign", "showMessage", "size", "disabled", "labelWidth", "contentOffset", "labelSuffix", "inline", "responsiveLayout", "validateType", "validateIcon", "manual", "appendToBody", "popperOptions", "displayOnly", "showAutoWidth", "showEmptyValue", "validateTag", "overflowTitle"]),
+ setup: function setup$1(props2, context) {
+ return setup({
props: props2,
context,
- renderless: renderless$b,
- api: api$b
+ renderless: renderless$1,
+ api: api$1
});
}
});
-var _hoisted_1$d = {
- key: 0,
- class: "tiny-group-item"
-};
-var _hoisted_2$a = ["tabindex", "onClick"];
-var _hoisted_3$8 = {
- key: 2
-};
-var _hoisted_4$7 = {
- key: 1,
- class: "tiny-group-item show-more"
-};
-var _hoisted_5$7 = {
- key: 2
-};
-var _hoisted_6$4 = {
- key: 0,
- class: "tiny-group-item__more"
-};
-var _hoisted_7$3 = {
- class: "more-list"
-};
-var _hoisted_8$2 = ["onClick"];
-var _hoisted_9$2 = {
- key: 1,
- class: "tiny-group-item__edit"
-};
-var _hoisted_10$2 = {
- key: 1,
- class: "tiny-button-group--empty"
-};
-function _sfc_render$k(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_tiny_button = resolveComponent("tiny-button");
- var _component_icon_popup = resolveComponent("icon-popup");
- var _component_tiny_popover = resolveComponent("tiny-popover");
- var _component_icon_writing = resolveComponent("icon-writing");
+function _sfc_render$3(_ctx, _cache, $props2, $setup2, $data, $options) {
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
return openBlock(), createElementBlock(
- "div",
+ "form",
{
- class: normalizeClass(["tiny-button-group", [_ctx.size ? "tiny-button-group--" + _ctx.size : "", _ctx.border ? "" : "tiny-button-group--borderless"]])
- },
- [renderSlot(_ctx.$slots, "default", {}, function() {
- return [_ctx.data.length > 0 ? (openBlock(), createElementBlock(
- Fragment,
- {
- key: 0
- },
- [!(_ctx.showMore && _ctx.showMore > 0) ? (openBlock(), createElementBlock("ul", _hoisted_1$d, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.data, function(node, index3) {
- return openBlock(), createElementBlock(
- "li",
- {
- key: index3,
- class: normalizeClass({
- active: _ctx.state.value === node[_ctx.valueField]
- })
- },
- [createBaseVNode("button", {
- class: normalizeClass(_ctx.getItemClass(node)),
- style: normalizeStyle({
- height: _ctx.size === "medium" ? "42px" : _ctx.size === "small" ? "32px" : _ctx.size === "mini" ? "24px" : "",
- "line-height": _ctx.size === "medium" ? "40px" : _ctx.size === "small" ? "30px" : _ctx.size === "mini" ? "22px" : ""
- }),
- type: "button",
- tabindex: _ctx.getItemClass(node).disabled ? "-1" : "0",
- onClick: function onClick($event) {
- return _ctx.handleClick(node);
- }
- }, toDisplayString(node[_ctx.textField]), 15, _hoisted_2$a), node.sup ? (openBlock(), createElementBlock(
- "span",
- {
- key: 0,
- class: normalizeClass(["tiny-group-item__sup", {
- "tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text,
- "tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon
- }, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : []))
- },
- [node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, {
- key: 0,
- sup: node.sup
- }) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), {
- key: 1
- })) : node.sup.text ? (openBlock(), createElementBlock(
- "span",
- _hoisted_3$8,
- toDisplayString(node.sup.text),
- 1
- /* TEXT */
- )) : createCommentVNode("v-if", true)],
- 2
- /* CLASS */
- )) : createCommentVNode("v-if", true)],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- ))])) : (openBlock(), createElementBlock("ul", _hoisted_4$7, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.state.buttonData, function(node, index3) {
- return openBlock(), createElementBlock(
- "li",
- {
- key: index3,
- class: normalizeClass({
- active: _ctx.state.value === node[_ctx.valueField]
- })
- },
- [createVNode(_component_tiny_button, {
- class: normalizeClass(_ctx.getItemClass(node)),
- onClick: function onClick($event) {
- return _ctx.handleClick(node);
- }
- }, {
- default: withCtx(function() {
- return [createTextVNode(
- toDisplayString(node[_ctx.textField]),
- 1
- /* TEXT */
- )];
- }),
- _: 2
- /* DYNAMIC */
- }, 1032, ["class", "onClick"]), node.sup ? (openBlock(), createElementBlock(
- "span",
- {
- key: 0,
- class: normalizeClass(["tiny-group-item__sup", {
- "tiny-group-item__sup-text": !node.sup.slot && !node.sup.icon && node.sup.text,
- "tiny-group-item__sup-icon": !node.sup.slot && node.sup.icon
- }, typeof node.sup.class === "string" ? node.sup.class : ""].concat(Array.isArray(node.sup.class) ? node.sup.class : []))
- },
- [node.sup.slot ? renderSlot(_ctx.$slots, node.sup.slot, {
- key: 0,
- sup: node.sup
- }) : node.sup.icon ? (openBlock(), createBlock(resolveDynamicComponent(node.sup.icon), {
- key: 1
- })) : node.sup.text ? (openBlock(), createElementBlock(
- "span",
- _hoisted_5$7,
- toDisplayString(node.sup.text),
- 1
- /* TEXT */
- )) : createCommentVNode("v-if", true)],
- 2
- /* CLASS */
- )) : createCommentVNode("v-if", true)],
- 2
- /* CLASS */
- );
- }),
- 128
- /* KEYED_FRAGMENT */
- )), _ctx.data.length > _ctx.showMore ? (openBlock(), createElementBlock("li", _hoisted_6$4, [createVNode(_component_tiny_popover, {
- "visible-arrow": false,
- width: "200",
- "popper-class": "tiny-group-item__more-popover"
- }, {
- reference: withCtx(function() {
- return [createVNode(_component_tiny_button, {
- class: "more-button"
- }, {
- default: withCtx(function() {
- return [createVNode(_component_icon_popup)];
- }),
- _: 1
- /* STABLE */
- })];
- }),
- default: withCtx(function() {
- return [createBaseVNode("ul", _hoisted_7$3, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.state.moreData, function(moreNode, index3) {
- return openBlock(), createElementBlock("li", {
- key: index3,
- class: normalizeClass({
- active: _ctx.state.value === moreNode[_ctx.valueField],
- "more-item": true
- }),
- onClick: function onClick($event) {
- return _ctx.moreNodeClick(moreNode);
- }
- }, toDisplayString(moreNode[_ctx.textField]), 11, _hoisted_8$2);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))])];
- }),
- _: 1
- /* STABLE */
- })])) : createCommentVNode("v-if", true), _ctx.showEdit ? (openBlock(), createElementBlock("li", _hoisted_9$2, [createVNode(_component_tiny_button, {
- onClick: _cache[0] || (_cache[0] = function($event) {
- return _ctx.$emit("edit");
- }),
- class: "edit-button"
- }, {
- default: withCtx(function() {
- return [createVNode(_component_icon_writing)];
- }),
- _: 1
- /* STABLE */
- })])) : createCommentVNode("v-if", true)]))],
- 64
- /* STABLE_FRAGMENT */
- )) : (openBlock(), createElementBlock("span", _hoisted_10$2, " 暂无数据 "))];
- })],
- 2
- /* CLASS */
+ class: normalizeClass(["tiny-form", [_ctx.labelPosition ? "tiny-form--label-" + _ctx.labelPosition : "", {
+ "tiny-form--inline": _ctx.inline
+ }, {
+ "label-align": _ctx.labelAlign
+ }, {
+ "has-required": _ctx.state.hasRequired
+ }, {
+ "asterisk-form": _ctx.labelPosition === "top" && !_ctx.state.hideRequiredAsterisk
+ }, {
+ "is-display-only": _ctx.state.isDisplayOnly
+ }]]),
+ onSubmit: _cache[1] || (_cache[1] = withModifiers(function() {
+ }, ["prevent"]))
+ },
+ [renderSlot(_ctx.$slots, "default"), _ctx.overflowTitle ? (openBlock(), createBlock(_component_tiny_tooltip, {
+ key: 0,
+ ref: "tooltip",
+ modelValue: _ctx.state.tooltipVisible,
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
+ return _ctx.state.tooltipVisible = $event;
+ }),
+ manual: true,
+ effect: "light",
+ content: _ctx.state.displayedValue,
+ placement: "top"
+ }, null, 8, ["modelValue", "content"])) : createCommentVNode("v-if", true)],
+ 34
+ /* CLASS, NEED_HYDRATION */
);
}
-var pc$7 = /* @__PURE__ */ _export_sfc$j(_sfc_main$u, [["render", _sfc_render$k]]);
-const index$g = "";
-function _extends$h() {
- _extends$h = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$h.apply(this, arguments);
-}
-var template$b = function template2(mode) {
- var _process$env;
- typeof process === "object" ? (_process$env = {}) == null ? void 0 : _process$env.TINY_MODE : null;
- return pc$7;
-};
-var buttonGroupProps = _extends$h({}, $props, {
- size: String,
- data: {
- type: Array,
- default: function _default() {
- return [];
- }
- },
- plain: Boolean,
- modelValue: [String, Number],
- disabled: Boolean,
- valueField: {
- type: String,
- default: "value"
- },
- textField: {
- type: String,
- default: "text"
- },
- showMore: Number,
- showEdit: {
- type: Boolean,
- default: false
- },
- border: {
- type: Boolean,
- default: true
- }
-});
-var ButtonGroup = defineComponent({
- name: $prefix + "ButtonGroup",
- provide: function provide() {
- return {
- buttonGroup: this
- };
- },
- props: buttonGroupProps,
- setup: function setup(props2, context) {
- return $setup({
- props: props2,
- context,
- template: template$b
- });
- }
-});
-var version$c = "3.16.0";
-ButtonGroup.model = {
- prop: "modelValue",
- event: "update:modelValue"
-};
-ButtonGroup.install = function(Vue) {
- Vue.component(ButtonGroup.name, ButtonGroup);
-};
-ButtonGroup.version = version$c;
-const toggleItem = (state) => (active, item) => {
- if (item.disabled) {
- return;
- }
- if (item.type === "sort") {
- if (!item.modelValue || item.modelValue === "desc") {
- item.state.sort = "asc";
- item.$emit("update:modelValue", "asc");
- item.$emit("click", "asc");
- } else {
- item.state.sort = "desc";
- item.$emit("update:modelValue", "desc");
- item.$emit("click", "desc");
- }
- } else {
- const singleton = state.children.length === 1 && item.state.showPopup;
- state.children.forEach((item2, index3) => {
- if (index3 === active && !singleton) {
- item2.toggle(true);
- } else if (item2.state.showPopup) {
- item2.toggle(false, { immediate: true });
- }
- });
- }
-};
-const updateOffset = ({ props: props2, state, vm }) => () => {
- if (!vm.$refs.menu) {
- return;
- }
- const rect = vm.$refs.menu.getBoundingClientRect();
- if (props2.direction === "down") {
- state.offset = rect.bottom;
- } else {
- state.offset = window.innerHeight - rect.top;
- }
-};
-const clickOutside$1 = ({ props: props2, state }) => () => {
- if (props2.closeOnClickOutside && props2.closeOnClickOverlay) {
- state.children.forEach((item) => {
- item.type !== "filter" && item.toggle(false);
- });
- }
-};
-const getScroller = (el, root) => {
- const overflowScrollReg = /scroll|auto/i;
- let node = el;
- let getComputedStyle = window.getComputedStyle;
- while (node && node.tagName !== "HTML" && node.nodeType === 1 && node !== root) {
- const { overflowY } = getComputedStyle(node);
- if (overflowScrollReg.test(overflowY)) {
- if (node.tagName !== "BODY") {
- return node;
- }
- const { overflowY: htmlOverflowY } = getComputedStyle(node.parentNode);
- if (overflowScrollReg.test(htmlOverflowY)) {
- return node;
- }
- }
- node = node.parentNode;
- }
- return root || null;
-};
-const useVuePopper = ({
- api: api2,
- props: props2,
- hooks,
- instance,
- state,
- dropdownVm,
- designConfig
-}) => {
- var _a, _b;
- const { nextTick: nextTick2, onBeforeUnmount: onBeforeUnmount2, onDeactivated: onDeactivated2, onMounted, reactive: reactive2, toRefs, watch: watch2 } = hooks;
- const { emit, slots, vm, parent } = instance;
- const designProps = {
- placement: props2.placement || ((_a = designConfig == null ? void 0 : designConfig.props) == null ? void 0 : _a.placement) || "bottom-end",
- visibleArrow: props2.visibleArrow || ((_b = designConfig == null ? void 0 : designConfig.props) == null ? void 0 : _b.visibleArrow) || false
- };
- const popper = vue_popper_default({
- emit,
- nextTick: nextTick2,
- onBeforeUnmount: onBeforeUnmount2,
- onDeactivated: onDeactivated2,
- props: __spreadValues(__spreadValues({
- popperOptions: { boundariesPadding: 0, gpuAcceleration: false },
- offset: 0,
- boundariesPadding: 5
- }, props2), designProps),
- reactive: reactive2,
- vm,
- slots,
- toRefs,
- watch: watch2
- });
- onMounted(() => {
- if (!dropdownVm)
- return;
- dropdownVm.popperElm = popper.popperElm.value = vm.$el;
- nextTick2(() => popper.referenceElm.value = dropdownVm.$el);
- !props2.multiStage && dropdownVm.initDomOperation();
- if (dropdownVm.inheritWidth) {
- dropdownVm.popperElm.style.minWidth = dropdownVm.$el.clientWidth + "px";
- }
- });
- onBeforeUnmount2(() => {
- popper.destroyPopper("remove");
- popper.popperElm = null;
- popper.referenceElm = null;
- });
- api2.doDestroy = popper.doDestroy;
- state.size = (dropdownVm == null ? void 0 : dropdownVm.size) || "";
- state.showPopper = popper.showPopper.value;
- parent.$on("updatePopper", () => {
- if (state.showPopper) {
- popper.updatePopper();
- }
- });
- parent.$on("visible", (value) => {
- state.showPopper = value;
- popper.showPopper.value = value;
- });
- watch2(
- () => props2.placement,
- (value) => {
- popper.currentPlacement.value = value;
- }
- );
-};
-const mounted = ({ api: api2, parent, state }) => () => {
- parent.$on("menu-selected-index", (selectedIndex) => {
- state.selectedIndex = selectedIndex;
- });
- parent.$on("menu-item-click", api2.handleMenuItemClick);
- parent.$on("mouseenter-tips", (showContent, label) => {
- state.label = label;
- state.showContent = showContent;
- });
- parent.$on("mouseleave-tips", (showContent, label) => {
- state.label = label;
- state.showContent = showContent;
- });
-};
-const handleMenuItemClick = ({ state, dispatch }) => ({ itemData, vm, label, showContent, disabled }) => {
- state.label = label;
- state.showContent = showContent;
- const data8 = { itemData, vm, disabled };
- dispatch("TinyDropdown", "current-item-click", data8);
-};
-const handleMouseenter = (emit) => ($event) => {
- emit("mouseenter", $event);
-};
-const handleMouseleave = (emit) => ($event) => {
- emit("mouseleave", $event);
-};
-const api$a = [
- "state",
- "toggleItem",
- "updateOffset",
- "clickOutside",
- "doDestroy",
- "handleMouseenter",
- "handleMouseleave"
-];
-const renderless$a = (props2, hooks, instance) => {
- const api2 = {};
- const { reactive: reactive2, provide: provide5, onMounted, inject: inject2 } = hooks;
- const { nextTick: nextTick2, mode, vm, parent, dispatch, emit, designConfig } = instance;
- const state = reactive2({
- offset: 0,
- scroller: null,
- children: [],
- size: "",
- showPopper: false,
- label: "",
- showContent: false,
- selected: false,
- selectedIndex: -1,
- canvasHeight: inject2("change-size", null)
- });
- provide5("dropdownMenuVm", vm);
- provide5("multiStage", props2.multiStage);
- const dropdownVm = inject2("dropdownVm");
- if (mode === "mobile") {
- nextTick2(() => {
- state.scroller = getScroller(vm.$refs.menu);
- });
- } else {
- useVuePopper({ api: api2, hooks, props: props2, instance, state, dropdownVm, designConfig });
- }
- Object.assign(api2, {
- state,
- toggleItem: toggleItem(state),
- clickOutside: clickOutside$1({ props: props2, state }),
- updateOffset: updateOffset({ props: props2, state, vm }),
- mounted: mounted({ api: api2, parent, state }),
- handleMouseenter: handleMouseenter(emit),
- handleMouseleave: handleMouseleave(emit),
- handleMenuItemClick: handleMenuItemClick({ dispatch, state })
- });
- onMounted(api2.mounted);
- return api2;
-};
-const getTitle = (props2) => () => {
- if (props2.title) {
- return props2.title;
- }
- const match = props2.options.filter((option) => option.value === props2.modelValue);
- return match.length ? match[0].text : "";
-};
-const bindScroll = ({ api: api2, parent }) => (value) => {
- const action = value ? on : off;
- action(parent.state.scroller, "scroll", api2.onScroll, true);
-};
-const toggle = ({ parent, props: props2, state }) => (show3) => {
- if (show3 === state.showPopup) {
- return;
- }
- state.transition = !props2.options.immediate;
- state.showPopup = show3;
- if (show3) {
- parent.updateOffset();
- state.showWrapper = true;
- }
-};
-const onScroll = (parent) => () => parent.updateOffset();
-const clickWrapper = (parent) => (event) => parent.$el && event.stopPropagation();
-const clickItem = ({ emit, props: props2, state }) => (value) => {
- state.showPopup = false;
- if (value !== props2.modelValue) {
- emit("update:modelValue", value);
- emit("change", value);
- }
-};
-const getItemStyle = ({ parent, state }) => () => ({
- zIndex: parent.zIndex,
- top: parent.direction === "down" ? state.offset + "px" : "",
- bottom: parent.direction !== "down" ? state.offset + "px" : ""
-});
-const getOptionStyle = (state) => (tag, tags) => {
- if (tags.includes(tag.value)) {
- return {
- color: state.activeColor ? state.activeColor : "#f36f64",
- border: `1px solid ${state.activeColor ? state.activeColor : "#f36f64"}`
- };
- } else {
- return {
- color: "#333"
- };
- }
-};
-const closed$1 = ({ emit, state }) => () => {
- state.showWrapper = false;
- emit("closed");
-};
-const open$1 = (emit) => () => emit("open");
-const opened$1 = (emit) => () => emit("opened");
-const close$2 = (emit) => () => emit("close");
-const tagClick = ({ emit, props: props2 }) => (key, tag, event) => {
- event.preventDefault();
- event.stopPropagation();
- const filterValue = props2.modelValue.slice();
- const value = filterValue[key];
- const index3 = value.indexOf(tag.value);
- if (index3 === -1) {
- value.push(tag.value);
- } else {
- value.splice(index3, 1);
- }
- filterValue[key] = value;
- emit("update:modelValue", filterValue);
-};
-const confirm = ({ emit, props: props2, state }) => () => {
- state.showPopup = false;
- emit("confirm", props2.modelValue);
-};
-const reset = ({ emit, props: props2 }) => () => {
- const len = props2.modelValue.length;
- const array = [];
- for (let i = 0; i < len; i++) {
- array.push([]);
- }
- emit("update:modelValue", array);
- emit("reset", array);
-};
-const clickOutside = (parent) => () => {
- if (parent.closeOnClickOutside && parent.closeOnClickOverlay) {
- parent.state.children.forEach((item) => {
- item.toggle(false);
- });
- }
-};
-const handleClick$1 = ({
- state,
- props: props2,
- dispatch,
- vm,
- emit
-}) => (event) => {
- event.stopPropagation();
- state.currentIndex = `${props2.currentIndex}`;
- const data8 = { itemData: props2.itemData, vm, disabled: props2.disabled };
- if (!props2.disabled) {
- emit("item-click", data8);
- }
- dispatch("TinyDropdown", "menu-item-click", data8);
- dispatch("TinyDropdown", "is-disabled", [props2.disabled]);
- dispatch("TinyDropdown", "selected-index", [state.currentIndex]);
-};
-const computedGetIcon = ({ constants: constants2, designConfig }) => (name = "leftWardArrow") => {
- return (designConfig == null ? void 0 : designConfig.icons[name]) || (constants2 == null ? void 0 : constants2.ICON_MAP[name]);
-};
-const getTip = ({ props: props2, vm }) => {
- if (props2.tip && typeof props2.tip === "function") {
- return props2.tip({ itemData: props2.itemData, vm });
- }
- return props2.tip || "";
-};
-const api$9 = [
- "state",
- "confirm",
- "clickOutside",
- "getOptionStyle",
- "reset",
- "tagClick",
- "clickItem",
- "clickWrapper",
- "toggle",
- "open",
- "opened",
- "close",
- "closed",
- "handleClick",
- "getTip"
-];
-const initState$1 = ({ reactive: reactive2, computed, api: api2, props: props2, parent, dropdownMenuVm }) => {
- const state = reactive2({
- checkedStatus: dropdownMenuVm == null ? void 0 : dropdownMenuVm.checkedStatus,
- sort: props2.modelValue,
- transition: true,
- getTitle: false,
- showWrapper: false,
- showPopup: false,
- duration: parent.duration,
- overlay: computed(() => parent.overlay),
- offset: computed(() => parent.state.offset),
- direction: computed(() => parent.direction),
- displayTitle: computed(() => api2.getTitle()),
- itemStyle: computed(() => api2.getItemStyle()),
- activeColor: computed(() => parent.activeColor),
- closeOnClickOverlay: computed(() => parent.closeOnClickOverlay),
- dropdownMenuVm,
- currentIndex: props2.currentIndex,
- textField: (dropdownMenuVm == null ? void 0 : dropdownMenuVm.textField) || props2.textField,
- popperClass: (dropdownMenuVm == null ? void 0 : dropdownMenuVm.popperClass) || "",
- getIcon: computed(() => api2.computedGetIcon()),
- children: []
- });
- return state;
-};
-const initApi$1 = ({ api: api2, state, emit, props: props2, parent, dispatch, vm, constants: constants2, designConfig }) => {
- Object.assign(api2, {
- state,
- open: open$1(emit),
- opened: opened$1(emit),
- close: close$2(emit),
- getTitle: getTitle(props2),
- onScroll: onScroll(parent),
- reset: reset({ emit, props: props2 }),
- closed: closed$1({ emit, state }),
- clickWrapper: clickWrapper(parent),
- clickOutside: clickOutside(parent),
- tagClick: tagClick({ emit, props: props2 }),
- getOptionStyle: getOptionStyle(state),
- toggle: toggle({ parent, props: props2, state }),
- clickItem: clickItem({ emit, props: props2, state }),
- getItemStyle: getItemStyle({ parent, state }),
- bindScroll: bindScroll({ api: api2, parent }),
- confirm: confirm({ emit, props: props2, state }),
- handleClick: handleClick$1({ state, props: props2, dispatch, vm, emit }),
- computedGetIcon: computedGetIcon({ constants: constants2, designConfig }),
- getTip: getTip({ props: props2, vm })
- });
-};
-const renderless$9 = (props2, { computed, onMounted, reactive: reactive2, watch: watch2, inject: inject2 }, { parent, emit, vm, dispatch, constants: constants2, designConfig }) => {
- const api2 = {};
- const dropdownMenuVm = inject2("dropdownMenuVm", null);
- const state = initState$1({ reactive: reactive2, computed, api: api2, props: props2, parent, dropdownMenuVm });
- initApi$1({ api: api2, state, emit, props: props2, parent, dispatch, vm, constants: constants2, designConfig });
- watch2(() => state.showPopup, api2.bindScroll);
- onMounted(() => {
- const realParent = parent.$parent.$parent || {};
- if (realParent.state && realParent.state.children) {
- realParent.state.children.push(vm);
- } else {
- if (dropdownMenuVm) {
- dropdownMenuVm.state.children = [...dropdownMenuVm.state.children, vm];
- }
- }
- if (props2.disabled) {
- state.checkedStatus = false;
- }
- });
- return api2;
-};
-const index$f = "";
-function _createForOfIteratorHelperLoose$i(o, allowArrayLike) {
+var pc = /* @__PURE__ */ _export_sfc$3(_sfc_main$4, [["render", _sfc_render$3]]);
+const index$1 = "";
+const index = "";
+function _createForOfIteratorHelperLoose$2(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it)
return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$i(o)) || allowArrayLike && o && typeof o.length === "number") {
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it)
o = it;
var i = 0;
@@ -1905,311 +374,68 @@ function _createForOfIteratorHelperLoose$i(o, allowArrayLike) {
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
-function _unsupportedIterableToArray$i(o, minLen) {
+function _unsupportedIterableToArray$2(o, minLen) {
if (!o)
return;
if (typeof o === "string")
- return _arrayLikeToArray$i(o, minLen);
+ return _arrayLikeToArray$2(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor)
n = o.constructor.name;
if (n === "Map" || n === "Set")
return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$i(o, minLen);
+ return _arrayLikeToArray$2(o, minLen);
}
-function _arrayLikeToArray$i(arr, len) {
+function _arrayLikeToArray$2(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
-var _export_sfc$i = function _export_sfc22(sfc, props2) {
+var _export_sfc$2 = function _export_sfc22(sfc, props2) {
var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$i(props2), _step; !(_step = _iterator()).done; ) {
+ for (var _iterator = _createForOfIteratorHelperLoose$2(props2), _step; !(_step = _iterator()).done; ) {
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
target[key] = val;
}
return target;
};
-var _sfc_main$t = defineComponent({
- name: $prefix + "DropdownItem",
- componentName: $prefix + "DropdownItem",
- emits: ["item-click", "update:modelValue", "change", "closed", "open", "opened", "close", "confirm", "reset"],
- props: [].concat(props, [
- "disabled",
- "divided",
- "icon",
- "itemData",
- "selected",
- "currentIndex",
- "title",
- "titleClass",
- "options",
- "type",
- "label",
- "selectedField",
- "multiStage",
- // tiny新增
- "appendToBody",
- "textField",
- "tip",
- "tipPosition"
- ]),
- components: {
- IconDeltaLeft: index$G(),
- TinyTooltip: Tooltip$1
- },
- setup: function setup$1$12(props2, context) {
- return setup$1({
+var _sfc_main$3 = /* @__PURE__ */ defineComponent({
+ props: [].concat(props, ["validatePosition", "validateOnRuleChange", "hideRequiredAsterisk", "model", "rules", "inlineMessage", "messageType", "statusIcon", "labelPosition", "labelAlign", "showMessage", "size", "disabled", "labelWidth", "contentOffset", "labelSuffix", "inline", "responsiveLayout", "validateType", "validateIcon", "manual"]),
+ setup: function setup$12(props2, context) {
+ return setup({
props: props2,
context,
- renderless: renderless$9,
- api: api$9
+ renderless: renderless$1,
+ api: api$1
});
}
});
-var _hoisted_1$c = ["aria-disabled", "tabindex"];
-var _hoisted_2$9 = {
- class: "tiny-dropdown-item__wrap"
-};
-var _hoisted_3$7 = {
- key: 0,
- class: "tiny-dropdown-item__expand tiny-dropdown-menu__item-expand"
-};
-var _hoisted_4$6 = {
- class: "tiny-dropdown-item__content tiny-dropdown-menu__item-content"
-};
-var _hoisted_5$6 = {
- class: "tiny-dropdown-item__label"
-};
-function _sfc_render$j(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
- var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
- return openBlock(), createBlock(_component_tiny_tooltip, {
- content: _ctx.getTip,
- placement: _ctx.tipPosition
- }, {
- default: withCtx(function() {
- return [createBaseVNode("li", {
- class: normalizeClass(["tiny-dropdown-item tiny-dropdown-menu__item", {
- "is-disabled": _ctx.disabled,
- "tiny-dropdown-item--divided tiny-dropdown-menu__item--divided": _ctx.divided,
- "tiny-dropdown-item--check-status": _ctx.state.checkedStatus && _ctx.selected,
- "has-children": _ctx.itemData.children && _ctx.itemData.children.length
- }]),
- ref: "dropdownItem",
- onClick: _cache[0] || (_cache[0] = withModifiers(function() {
- return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
- }, ["stop"])),
- onMousedown: _cache[1] || (_cache[1] = withModifiers(function() {
- }, ["stop"])),
- "aria-disabled": _ctx.disabled,
- tabindex: _ctx.disabled ? null : -1
- }, [createBaseVNode("div", _hoisted_2$9, [_ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock("span", _hoisted_3$7, [(openBlock(), createBlock(resolveDynamicComponent(_ctx.state.getIcon)))])) : createCommentVNode("v-if", true), createBaseVNode("div", _hoisted_4$6, [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
- key: 0,
- class: "tiny-svg-size"
- })) : createCommentVNode("v-if", true), createBaseVNode("span", _hoisted_5$6, [renderSlot(_ctx.$slots, "default", {
- itemData: _ctx.itemData
- }, function() {
- return [createBaseVNode(
- "span",
- null,
- toDisplayString(_ctx.label),
- 1
- /* TEXT */
- )];
- })])]), _ctx.itemData.children && _ctx.itemData.children.length ? (openBlock(), createElementBlock(
- "ul",
- {
- key: 1,
- class: normalizeClass(["tiny-dropdown-menu", "tiny-dropdown-item--child tiny-dropdown-menu__item--child", _ctx.state.popperClass])
- },
- [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.itemData.children, function(item, index3) {
- return openBlock(), createBlock(_component_tiny_dropdown_item, {
- key: index3,
- label: item[_ctx.state.textField],
- "item-data": item,
- icon: item.icon,
- disabled: item.disabled,
- divided: item.divided,
- tip: item.tip,
- "tip-position": item.tipPosition
- }, {
- default: withCtx(function() {
- return [renderSlot(_ctx.$slots, "default", {
- itemData: item
- })];
- }),
- _: 2
- /* DYNAMIC */
- }, 1032, ["label", "item-data", "icon", "disabled", "divided", "tip", "tip-position"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))],
- 2
- /* CLASS */
- )) : createCommentVNode("v-if", true)])], 42, _hoisted_1$c)];
- }),
- _: 3
- /* FORWARDED */
- }, 8, ["content", "placement"]);
+function _sfc_render$2(_ctx, _cache, $props2, $setup2, $data, $options) {
+ return openBlock(), createElementBlock(
+ "form",
+ {
+ class: normalizeClass(["tiny-mobile-form", [_ctx.labelPosition ? "tiny-mobile-form--label-" + _ctx.labelPosition : "", {
+ "tiny-mobile-form--inline": _ctx.inline
+ }, {
+ "label-align": _ctx.labelAlign
+ }]]),
+ onSubmit: _cache[0] || (_cache[0] = withModifiers(function() {
+ }, ["prevent"]))
+ },
+ [renderSlot(_ctx.$slots, "default")],
+ 34
+ /* CLASS, NEED_HYDRATION */
+ );
}
-var pc$6 = /* @__PURE__ */ _export_sfc$i(_sfc_main$t, [["render", _sfc_render$j]]);
-const touchStart = (state) => (event) => {
- resetTouchStatus(state);
- state.startX = event.touches[0].clientX;
- state.startY = event.touches[0].clientY;
-};
-const resetTouchStatus = (state) => {
- state.direction = "";
- state.deltaX = 0;
- state.deltaY = 0;
- state.offsetX = 0;
- state.offsetY = 0;
-};
-const getStyle$1 = (props2) => () => {
- const style = __spreadValues({}, props2.popupStyle);
- if (!isNull$1(props2.duration)) {
- const key = props2.position === "center" ? "animationDuration" : "transitionDuration";
- style[key] = `${props2.duration}s`;
- }
- return style;
-};
-const watchValue = (api2) => (value) => {
- const type = value ? "open" : "close";
- api2[type]();
-};
-const open = ({ api: api2, constants: constants2, emit, props: props2, state }) => () => {
- if (state.opened) {
- return;
- }
- if (props2.zIndex !== void 0) {
- state.context.zIndex = props2.zIndex;
- }
- api2.renderOverlay();
- state.opened = true;
- emit("open");
- if (props2.lockScroll) {
- on(document, "touchstart", touchStart);
- on(document, "touchmove", api2.onTouchMove);
- if (!state.context.lockCount) {
- document.body.classList.add(constants2.OVERFLOWHIDDEN);
- }
- state.context.lockCount++;
- }
-};
-const close$1 = ({ api: api2, constants: constants2, emit, props: props2, state }) => () => {
- if (!state.opened) {
- return;
- }
- if (props2.lockScroll) {
- state.context.lockCount--;
- off(document, "touchstart", touchStart);
- off(document, "touchmove", api2.onTouchMove);
- if (!state.context.lockCount) {
- document.body.classList.remove(constants2.OVERFLOWHIDDEN);
- }
- }
- state.opened = false;
- emit("update:modelValue", false);
- emit("close");
-};
-const onTouchMove = ({ vm, state }) => (event) => {
- const direction = state.deltaY > 0 ? "10" : "01";
- const el = getScroller()(event.target, vm.$refs.$el);
- const { scrollHeight, offsetHeight, scrollTop } = el;
- let status = "11";
- if (scrollTop === 0) {
- status = offsetHeight >= scrollHeight ? "00" : "01";
- } else if (scrollTop + offsetHeight >= scrollHeight) {
- status = "10";
- }
- if (status !== "11" && state.direction === "vertical" && !(parseInt(status, 2) & parseInt(direction, 2))) {
- event.preventDefault();
- }
-};
-const renderOverlay = ({ api: api2, nextTick: nextTick2, props: props2, state }) => () => {
- if (!props2.modelValue) {
- return;
- }
- nextTick2(() => {
- api2.updateZIndex(props2.overlay ? 1 : 0);
- if (props2.overlay) {
- state.zIndex = state.context.zIndex++;
- }
- });
-};
-const updateZIndex = ({ vm, state }) => (value = 0) => vm.$refs.popup.style.zIndex = ++state.context.zIndex + value;
-const clickOverlay = ({ api: api2, props: props2, emit }) => () => {
- if (props2.closeOnClickOverlay) {
- api2.close();
- emit("click-overlay");
- }
-};
-const closed = (emit) => () => emit("closed");
-const opened = (emit) => () => emit("opened");
-const api$8 = ["state", "open", "close", "clickOverlay", "onTouchMove", "opened", "closed"];
-const initState = ({ reactive: reactive2, computed, props: props2, api: api2 }) => {
- const state = reactive2({
- transitionName: computed(
- () => props2.transition || props2.position === "center" ? "tiny-fade" : `tiny-popup-slide-${props2.position}`
- ),
- style: computed(() => api2.getStyle()),
- inited: computed(() => state.inited || props2.modelValue),
- opened: false,
- startX: 0,
- startY: 0,
- deltaX: 0,
- deltaY: 0,
- offsetX: 0,
- offsetY: 0,
- direction: "",
- shouldRender: computed(() => state.inited || props2.lazyRender),
- context: { zIndex: 2e3, lockCount: 0, stack: [] },
- zIndex: props2.zIndex,
- overlayStyle: computed(() => __spreadValues({
- zIndex: state.zIndex
- }, props2.overlayStyle))
- });
- return state;
-};
-const initApi = ({ api: api2, props: props2, state, vm, emit, nextTick: nextTick2, constants: constants2 }) => {
- Object.assign(api2, {
- state,
- opened: opened(emit),
- closed: closed(emit),
- getStyle: getStyle$1(props2),
- watchValue: watchValue(api2),
- updateZIndex: updateZIndex({ vm, state }),
- clickOverlay: clickOverlay({ api: api2, emit, props: props2 }),
- renderOverlay: renderOverlay({ api: api2, nextTick: nextTick2, props: props2, state }),
- onTouchMove: onTouchMove({ vm, state }),
- open: open({ api: api2, constants: constants2, emit, props: props2, state }),
- close: close$1({ api: api2, constants: constants2, emit, props: props2, state })
- });
-};
-const renderless$8 = (props2, { computed, onMounted, reactive: reactive2, watch: watch2, nextTick: nextTick2 }, { constants: constants2, vm, emit }) => {
- const api2 = {};
- const state = initState({ reactive: reactive2, computed, props: props2, api: api2 });
- initApi({ api: api2, props: props2, state, vm, emit, nextTick: nextTick2, constants: constants2 });
- watch2(() => props2.modelValue, api2.watchValue, { immediate: true });
- onMounted(() => {
- props2.modelValue && api2.open();
- });
- return api2;
-};
-const index$e = "";
-function _createForOfIteratorHelperLoose$h(o, allowArrayLike) {
+var mobile = /* @__PURE__ */ _export_sfc$2(_sfc_main$3, [["render", _sfc_render$2]]);
+function _createForOfIteratorHelperLoose$1(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it)
return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$h(o)) || allowArrayLike && o && typeof o.length === "number") {
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it)
o = it;
var i = 0;
@@ -2221,564 +447,86 @@ function _createForOfIteratorHelperLoose$h(o, allowArrayLike) {
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
-function _unsupportedIterableToArray$h(o, minLen) {
+function _unsupportedIterableToArray$1(o, minLen) {
if (!o)
return;
if (typeof o === "string")
- return _arrayLikeToArray$h(o, minLen);
+ return _arrayLikeToArray$1(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor)
n = o.constructor.name;
if (n === "Map" || n === "Set")
return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$h(o, minLen);
+ return _arrayLikeToArray$1(o, minLen);
}
-function _arrayLikeToArray$h(arr, len) {
+function _arrayLikeToArray$1(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
-var _export_sfc$h = function _export_sfc23(sfc, props2) {
+var _export_sfc$1 = function _export_sfc23(sfc, props2) {
var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$h(props2), _step; !(_step = _iterator()).done; ) {
+ for (var _iterator = _createForOfIteratorHelperLoose$1(props2), _step; !(_step = _iterator()).done; ) {
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
target[key] = val;
}
return target;
};
-function _extends$g() {
- _extends$g = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$g.apply(this, arguments);
-}
-var $constants$2 = {
- OVERFLOWHIDDEN: "tiny-overflow-hidde"
-};
-var _sfc_main$s = defineComponent({
- name: $prefix + "Popup",
- emits: ["open", "close", "update:modelValue", "click-overlay", "closed", "opened", "click"],
+var _sfc_main$2 = defineComponent({
components: {
- IconClose: index$N()
+ TinyTooltip: Tooltip
},
- props: _extends$g({}, $props, {
- _constants: {
- type: Object,
- default: function _default2() {
- return $constants$2;
- }
- },
- closeIcon: {
- type: String,
- default: "cross"
- },
- closeIconPosition: {
- type: String,
- default: "top-right"
- },
- closeOnClickOverlay: {
- type: Boolean,
- default: true
- },
- closeable: {
- type: Boolean,
- default: true
- },
- duration: [Number, String],
- lazyRender: {
- type: Boolean,
- default: true
- },
- lockScroll: {
- type: Boolean,
- default: true
- },
- modelValue: Boolean,
- overlay: {
- type: Boolean,
- default: true
- },
- overlayClass: String,
- overlayStyle: Object,
- popupClass: String,
- popupStyle: Object,
- position: {
- type: String,
- default: "center"
- },
- round: Boolean,
- safeAreaInsetBottom: Boolean,
- transition: String,
- zIndex: [Number, String]
- }),
- setup: function setup$1$13(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$8,
- api: api$8,
- mono: true
- });
- }
-});
-function _sfc_render$i(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_icon_close = resolveComponent("icon-close");
- return openBlock(), createElementBlock("div", null, [createVNode(Transition, {
- name: _ctx.state.transitionName,
- onAfterEnter: _ctx.opened,
- onAfterLeave: _ctx.closed,
- persisted: ""
- }, {
- default: withCtx(function() {
- return [withDirectives(createBaseVNode(
- "div",
- {
- ref: "popup",
- class: normalizeClass(["tiny-popup", [_ctx.round ? "tiny-popup--round" : "", _ctx.position ? "tiny-popup--" + _ctx.position : "", _ctx.popupClass]]),
- style: normalizeStyle(_ctx.state.style),
- onClick: _cache[0] || (_cache[0] = function($event) {
- return _ctx.$emit("click");
- })
- },
- [renderSlot(_ctx.$slots, "default"), _ctx.closeable ? (openBlock(), createBlock(_component_icon_close, {
- key: 0,
- class: "tiny-popup__close-icon tiny-popup__close-icon--top-right",
- fill: "#c8c9cc",
- tabindex: "0",
- onClick: _ctx.close
- }, null, 8, ["onClick"])) : createCommentVNode("v-if", true)],
- 6
- /* CLASS, STYLE */
- ), [[vShow, _ctx.modelValue]])];
- }),
- _: 3
- /* FORWARDED */
- }, 8, ["name", "onAfterEnter", "onAfterLeave"]), createVNode(Transition, {
- name: "tiny-fade",
- persisted: ""
- }, {
- default: withCtx(function() {
- return [withDirectives(createBaseVNode(
- "div",
- {
- style: normalizeStyle(_ctx.state.overlayStyle),
- class: normalizeClass([_ctx.overlayClass, "tiny-overlay"]),
- onClick: _cache[1] || (_cache[1] = function() {
- return _ctx.clickOverlay && _ctx.clickOverlay.apply(_ctx, arguments);
- })
- },
- [renderSlot(_ctx.$slots, "overlay")],
- 6
- /* CLASS, STYLE */
- ), [[vShow, _ctx.state.opened && _ctx.overlay]])];
- }),
- _: 3
- /* FORWARDED */
- })]);
-}
-var Popup = /* @__PURE__ */ _export_sfc$h(_sfc_main$s, [["render", _sfc_render$i]]);
-var version$b = "3.16.0";
-Popup.model = {
- prop: "modelValue",
- event: "update:modelValue"
-};
-Popup.install = function(Vue) {
- Vue.component(Popup.name, Popup);
-};
-Popup.version = version$b;
-const index$d = "";
-function _createForOfIteratorHelperLoose$g(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$g(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
+ provide: function provide() {
+ return {
+ TinyMode: "mobile-first"
};
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$g(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$g(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$g(o, minLen);
-}
-function _arrayLikeToArray$g(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$g = function _export_sfc24(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$g(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$r = defineComponent({
- directives: directive$1({
- Clickoutside: clickoutside_default
- }),
- props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
- components: {
- IconYes: index$O(),
- TinyPopup: Popup,
- TinyButton: Button$1
},
- emits: ["update:modelValue", "open", "opened", "click", "change", "closed", "close", "reset", "confirm", "item-click"],
- setup: function setup$1$14(props2, context) {
- return setup$1({
+ props: [].concat(props, ["validateOnRuleChange", "hideRequiredAsterisk", "model", "rules", "inlineMessage", "messageType", "statusIcon", "labelPosition", "showMessage", "size", "disabled", "labelWidth", "contentOffset", "labelSuffix", "inline", "responsiveLayout", "validateType", "validateIcon", "manual", "appendToBody", "popperOptions", "displayOnly", "showEmptyValue"]),
+ setup: function setup$13(props2, context) {
+ return setup({
props: props2,
context,
- renderless: renderless$9,
- api: api$9
+ renderless: renderless$1,
+ api: api$1
});
}
});
-var _hoisted_1$b = {
- key: 0,
- class: "tiny-mobile-dropdown-item__options"
-};
-var _hoisted_2$8 = ["onClick"];
-var _hoisted_3$6 = {
- class: "tiny-mobile-dropdown-item__option-icon"
-};
-var _hoisted_4$5 = {
- class: "tiny-mobile-dropdown-item__option-title"
-};
-var _hoisted_5$5 = {
- class: "tiny-mobile-dropdown-item__option-value"
-};
-var _hoisted_6$3 = {
- key: 1,
- class: "tiny-mobile-dropdown-item__filter"
-};
-var _hoisted_7$2 = {
- class: "tiny-mobile-dropdown-item__filter-wrap"
-};
-var _hoisted_8$1 = {
- class: "tiny-mobile-dropdown-item__filter-title"
-};
-var _hoisted_9$1 = ["onClick"];
-var _hoisted_10$1 = {
- class: "tiny-mobile-dropdown-item__filter-operate"
-};
-function _sfc_render$h(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_icon_yes = resolveComponent("icon-yes");
- var _component_tiny_button = resolveComponent("tiny-button");
- var _component_tiny_popup = resolveComponent("tiny-popup");
- var _directive_clickoutside = resolveDirective("clickoutside");
- return withDirectives((openBlock(), createElementBlock(
- "div",
+function _sfc_render$1(_ctx, _cache, $props2, $setup2, $data, $options) {
+ var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
+ return openBlock(), createElementBlock(
+ "form",
{
- ref: "wrapper",
- class: normalizeClass(["tiny-mobile-dropdown-item--" + _ctx.state.direction, "tiny-mobile-dropdown-item"]),
- onClick: _cache[1] || (_cache[1] = function() {
- return _ctx.clickWrapper && _ctx.clickWrapper.apply(_ctx, arguments);
- }),
- style: normalizeStyle(_ctx.state.itemStyle)
- },
- [createVNode(_component_tiny_popup, {
- modelValue: _ctx.state.showPopup,
+ "data-tag": "tiny-form",
+ class: normalizeClass(["w-full overflow-hidden", {
+ "overflow-x-visible": _ctx.labelPosition === "top" && !_ctx.hideRequiredAsterisk,
+ "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4": _ctx.inline
+ }]),
+ onSubmit: _cache[1] || (_cache[1] = withModifiers(function() {
+ }, ["prevent"]))
+ },
+ [renderSlot(_ctx.$slots, "default"), _ctx.displayOnly ? (openBlock(), createBlock(_component_tiny_tooltip, {
+ key: 0,
+ ref: "tooltip",
+ modelValue: _ctx.state.tooltipVisible,
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
- return _ctx.state.showPopup = $event;
+ return _ctx.state.tooltipVisible = $event;
}),
- "popup-class": "tiny-mobile-dropdown-item__content",
- overlay: _ctx.state.overlay,
- "close-on-click-overlay": _ctx.state.closeOnClickOverlay,
- closeable: false,
- position: _ctx.state.direction === "down" ? "top" : "bottom",
- duration: _ctx.state.transition ? _ctx.state.duration : 0,
- onOpen: _ctx.open,
- onClose: _ctx.close,
- onOpened: _ctx.opened,
- onClosed: _ctx.closed
- }, {
- default: withCtx(function() {
- return [renderSlot(_ctx.$slots, "default", {}, function() {
- return [_ctx.type === "selection" ? (openBlock(), createElementBlock("div", _hoisted_1$b, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.options, function(item, index3) {
- return openBlock(), createElementBlock("div", {
- class: normalizeClass(["tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__option", item.value === _ctx.modelValue ? "is-active" : ""]),
- key: index3,
- tabindex: "0",
- onClick: function onClick($event) {
- return _ctx.clickItem(item.value);
- }
- }, [createBaseVNode("div", _hoisted_3$6, [renderSlot(_ctx.$slots, "icon", {}, function() {
- return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))];
- })]), createBaseVNode("div", _hoisted_4$5, [renderSlot(_ctx.$slots, "title", {
- titleData: item
- }, function() {
- return [createBaseVNode(
- "span",
- {
- style: normalizeStyle({
- color: item.value === _ctx.modelValue && _ctx.state.activeColor ? _ctx.state.activeColor : ""
- })
- },
- toDisplayString(item.text),
- 5
- /* TEXT, STYLE */
- )];
- })]), createBaseVNode("div", _hoisted_5$5, [item.value === _ctx.modelValue ? (openBlock(), createBlock(_component_icon_yes, {
- key: 0,
- fill: _ctx.state.activeColor ? _ctx.state.activeColor : "#f36f64"
- }, null, 8, ["fill"])) : createCommentVNode("v-if", true)])], 10, _hoisted_2$8);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))])) : createCommentVNode("v-if", true), _ctx.type === "filter" ? withDirectives((openBlock(), createElementBlock("div", _hoisted_6$3, [createBaseVNode("div", _hoisted_7$2, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.options, function(item, key) {
- return openBlock(), createElementBlock("div", {
- key,
- class: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__filter-item"
- }, [createBaseVNode(
- "span",
- _hoisted_8$1,
- toDisplayString(item.title),
- 1
- /* TEXT */
- ), createBaseVNode("ul", null, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.options.length === 0 ? item.data = [] : item.data, function(tag, tagkey) {
- return openBlock(), createElementBlock("li", {
- class: normalizeClass(["tiny-mobile-dropdown-item__filter-li", [_ctx.modelValue[key].indexOf(tag.value) > -1 ? "checked" : ""]]),
- style: normalizeStyle(_ctx.getOptionStyle(tag, _ctx.modelValue[key])),
- onClick: function onClick($event) {
- return _ctx.tagClick(key, tag, $event);
- },
- key: tagkey
- }, toDisplayString(tag.text), 15, _hoisted_9$1);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))])]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))]), createBaseVNode("div", _hoisted_10$1, [createVNode(_component_tiny_button, {
- onClick: _ctx.reset
- }, {
- default: withCtx(function() {
- return [createTextVNode(" Reset ")];
- }),
- _: 1
- /* STABLE */
- }, 8, ["onClick"]), createVNode(_component_tiny_button, {
- type: "primary",
- onClick: _ctx.confirm
- }, {
- default: withCtx(function() {
- return [createTextVNode(" OK ")];
- }),
- _: 1
- /* STABLE */
- }, 8, ["onClick"])])])), [[_directive_clickoutside, _ctx.clickOutside]]) : createCommentVNode("v-if", true)];
- })];
- }),
- _: 3
- /* FORWARDED */
- }, 8, ["modelValue", "overlay", "close-on-click-overlay", "position", "duration", "onOpen", "onClose", "onOpened", "onClosed"])],
- 6
- /* CLASS, STYLE */
- )), [[vShow, _ctx.state.showWrapper]]);
-}
-var mobile$4 = /* @__PURE__ */ _export_sfc$g(_sfc_main$r, [["render", _sfc_render$h]]);
-const api$7 = ["dataStore", "handleClick", "dataStore", "mouseEnter", "mouseLeave"];
-const renderless$7 = (props2, { reactive: reactive2, inject: inject2 }, { dispatch, vm }) => {
- const api2 = {};
- const dropdownMenuVm = inject2("dropdownMenuVm", null);
- let dataStore = reactive2({
- checkedStatus: dropdownMenuVm == null ? void 0 : dropdownMenuVm.checkedStatus,
- multiStageMenu: "",
- multiStage: inject2("multiStage", null),
- itemData: "",
- itemLabel: "",
- showContent: false,
- dropdownMenuVm,
- currentIndex: props2.currentIndex,
- level: props2.level
- });
- const handleClick3 = ({ dataStore: dataStore2, props: props22, vm: vm2 }) => () => {
- if (props22.disabled) {
- dataStore2.checkedStatus = false;
- }
- dataStore2.itemData = props22.itemData;
- dataStore2.itemLabel = "";
- dataStore2.showContent = false;
- if (props22.level === "2") {
- dataStore2.currentIndex = `${props22.level}-${props22.currentIndex}`;
- } else {
- dataStore2.currentIndex = `${props22.currentIndex}`;
- }
- dispatch("TinyDropdown", "selected-index", [dataStore2.currentIndex]);
- const data8 = {
- itemData: dataStore2.itemData,
- vm: vm2,
- label: dataStore2.itemLabel,
- showContent: dataStore2.showContent,
- disabled: props22.disabled
- };
- dispatch("TinyDropdownMenu", "menu-item-click", data8);
- dispatch("TinyDropdown", "is-disabled", [props22.disabled]);
- };
- const mouseLeave = ({ dataStore: dataStore2 }) => () => {
- dataStore2.itemLabel = "";
- dataStore2.showContent = false;
- dispatch("TinyDropdownMenu", "mouseleave-tips", [dataStore2.showContent, dataStore2.itemLabel]);
- };
- const mouseEnter = ({ vm: vm2, dataStore: dataStore2, props: props22 }) => (e) => {
- const dom = e.target;
- const text = dom.textContent;
- const font = window.getComputedStyle(dom).font;
- const rect = dom.getBoundingClientRect();
- const res = omitText(text, font, rect.width);
- const tooltip = dataStore2.dropdownMenuVm.$refs.tooltip;
- if (res.o) {
- tooltip.state.referenceElm = dom;
- tooltip.state.popperElm && (tooltip.state.popperElm.style.display = "none");
- tooltip.doDestroy();
- dataStore2.itemLabel = props22.tooltipContent || text;
- if (vm2.$refs.level.scrollWidth > vm2.$refs.level.offsetWidth) {
- dataStore2.showContent = true;
- }
- setTimeout(tooltip.updatePopper, 20);
- }
- dispatch("TinyDropdownMenu", "mouseenter-tips", [dataStore2.showContent, dataStore2.itemLabel]);
- };
- Object.assign(api2, {
- dataStore,
- handleClick: handleClick3({ dataStore, props: props2, vm }),
- mouseEnter: mouseEnter({ dataStore, vm }),
- mouseLeave: mouseLeave({ dataStore })
- });
- return api2;
-};
-function _createForOfIteratorHelperLoose$f(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$f(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$f(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$f(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$f(o, minLen);
-}
-function _arrayLikeToArray$f(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$f = function _export_sfc25(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$f(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$q = defineComponent({
- emits: ["update:modelValue", "change", "closed", "open", "opened", "close", "confirm", "reset"],
- props: [].concat(props, ["disabled", "icon", "itemData", "selected", "label", "level", "currentIndex", "tooltipContent"]),
- setup: function setup$1$15(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$7,
- api: api$7
- });
- }
-});
-var _hoisted_1$a = ["aria-disabled", "tabindex"];
-function _sfc_render$g(_ctx, _cache, $props2, $setup2, $data, $options) {
- return openBlock(), createElementBlock("li", {
- "data-tag": "tiny-dropdown-item",
- onMouseenter: _cache[0] || (_cache[0] = function() {
- return _ctx.mouseEnter && _ctx.mouseEnter.apply(_ctx, arguments);
- }),
- onMouseleave: _cache[1] || (_cache[1] = function() {
- return _ctx.mouseLeave && _ctx.mouseLeave.apply(_ctx, arguments);
- }),
- class: normalizeClass(_ctx.m("rounded-sm list-none leading-10 sm:leading-8 outline-0 min-w-[theme(spacing.18)] max-w-[theme(spacing.52)] w-full [&_svg]:sm:w-3.5 [&_svg]:sm:h-3.5 [&_svg]:sm:mr-1.5 [&_svg]:mr-2 [&_svg]:align-text-bottom", _ctx.disabled ? "cursor-not-allowed text-color-text-disabled [&_svg]:fill-color-text-disabled" : "text-color-text-primary active:bg-color-bg-4 visited:text-color-brand hover:bg-color-bg-2 focus:bg-color-bg-4 cursor-pointer", {
- "text-color-brand-focus bg-color-fill-6": _ctx.dataStore.checkedStatus && _ctx.selected
- }, _ctx.dataStore.multiStage ? "!px-0 mb-1" : "[&:not(:last-of-type)]:mb-1")),
- onClick: _cache[2] || (_cache[2] = withModifiers(function() {
- return _ctx.handleClick && _ctx.handleClick.apply(_ctx, arguments);
- }, ["stop"])),
- "aria-disabled": _ctx.disabled,
- tabindex: _ctx.disabled ? null : -1
- }, [createBaseVNode(
- "div",
- {
- "data-tag": "tiny-dropdown-level",
- ref: "level",
- class: normalizeClass(["sm:text-xs text-sm", _ctx.level === "2" ? "mx-6 overflow-hidden text-ellipsis whitespace-nowrap" : "mx-4 sm:mx-3 overflow-hidden text-ellipsis whitespace-nowrap"])
- },
- [_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
- key: 0,
- class: "sm:w-3.5 sm:h-3.5 sm:mr-1.5 mr-2 align-text-bottom"
- })) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")],
- 2
- /* CLASS */
- )], 42, _hoisted_1$a);
+ "popper-class": "absolute",
+ manual: true,
+ effect: "light",
+ content: _ctx.state.displayedValue,
+ placement: "top"
+ }, null, 8, ["modelValue", "content"])) : createCommentVNode("v-if", true)],
+ 34
+ /* CLASS, NEED_HYDRATION */
+ );
}
-var mobileFirst$4 = /* @__PURE__ */ _export_sfc$f(_sfc_main$q, [["render", _sfc_render$g]]);
-function _extends$f() {
- _extends$f = Object.assign ? Object.assign.bind() : function(target) {
+var mobileFirst$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render$1]]);
+function _extends$4() {
+ _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
@@ -2789,22420 +537,710 @@ function _extends$f() {
}
return target;
};
- return _extends$f.apply(this, arguments);
+ return _extends$4.apply(this, arguments);
}
-var template$a = function template22(mode) {
+var template$1 = function template2(mode) {
var _process$env;
var tinyMode = typeof process === "object" ? (_process$env = {}) == null ? void 0 : _process$env.TINY_MODE : null;
if ("pc" === (tinyMode || mode)) {
- return pc$6;
+ return pc;
}
if ("mobile" === (tinyMode || mode)) {
- return mobile$4;
+ return mobile;
}
if ("mobile-first" === (tinyMode || mode)) {
- return mobileFirst$4;
- }
- return pc$6;
-};
-var $constants$1 = {
- ICON_MAP: {
- leftWardArrow: "icon-delta-left"
+ return mobileFirst$1;
}
+ return pc;
};
-var dropdownItemProps = _extends$f({}, $props, {
- _constants: {
- type: Object,
- default: function _default3() {
- return $constants$1;
- }
+var formProps = _extends$4({}, $props, {
+ model: Object,
+ rules: Object,
+ inlineMessage: {
+ type: Boolean,
+ default: void 0
+ },
+ messageType: String,
+ statusIcon: Boolean,
+ showMessage: {
+ type: Boolean,
+ default: true
+ },
+ validatePosition: {
+ type: String,
+ default: "right"
},
- icon: [String, Object],
+ size: String,
disabled: Boolean,
- divided: Boolean,
- itemData: {
- type: [String, Object],
- default: ""
+ validateOnRuleChange: {
+ type: Boolean,
+ default: true
},
- title: String,
- label: String,
- level: String,
- titleClass: String,
- options: {
- type: Array,
- default: function _default22() {
- return [];
+ hideRequiredAsterisk: {
+ type: Boolean,
+ default: void 0
+ },
+ labelPosition: {
+ type: String,
+ default: "right",
+ validator: function validator(value) {
+ return ["left", "top", "right"].includes(value);
}
},
- // mobile 属性,可选值 selection | filter | sort
- type: {
+ labelWidth: {
type: String,
- default: "selection"
+ // 默认值挪到design中
+ default: ""
},
- // 是否选中,勾选状态功能
- selected: {
+ labelAlign: {
type: Boolean,
default: false
},
- // 暂没找到使用的地方
- selectedField: {
+ contentOffset: Number,
+ labelSuffix: {
type: String,
- default: "selected"
+ default: ""
},
- // 暂没找到使用的地方
- multiStage: {
+ inline: {
type: Boolean,
default: false
},
- currentIndex: {
- type: Number,
- default: function _default32() {
- return -1;
- }
+ responsiveLayout: {
+ type: Boolean,
+ default: false
},
- tooltipContent: {
+ validateType: {
type: String,
- default: ""
+ default: "tip",
+ validator: function validator2(value) {
+ return Boolean(~["tip", "text"].indexOf(value));
+ }
+ },
+ validateIcon: Object,
+ manual: {
+ type: Boolean,
+ default: false
},
- // 以下为 tiny 新增
appendToBody: {
type: Boolean,
- default: true
+ default: void 0
},
- textField: {
- type: String,
- default: "label"
+ popperOptions: {
+ type: Object,
+ default: function _default() {
+ return {};
+ }
},
- tip: {
- type: [String, Function],
- default: ""
+ displayOnly: {
+ type: Boolean,
+ default: false
},
- tipPosition: {
- type: String,
- default: "right"
+ showAutoWidth: {
+ type: Boolean,
+ default: false
+ },
+ showEmptyValue: {
+ type: Boolean,
+ default: true
+ },
+ validateTag: {
+ type: Boolean,
+ default: false
+ },
+ overflowTitle: {
+ type: Boolean,
+ default: false
}
});
-var DropdownItem = defineComponent({
- name: $prefix + "DropdownItem",
- componentName: "TinyDropdownItem",
- props: dropdownItemProps,
+var Form = defineComponent({
+ name: $prefix + "Form",
+ componentName: "Form",
+ props: formProps,
setup: function setup2(props2, context) {
return $setup({
props: props2,
context,
- template: template$a
+ template: template$1
});
}
});
-var version$a = "3.16.0";
-DropdownItem.model = {
- prop: "modelValue",
- event: "update:modelValue"
+var version = "3.16.0";
+Form.install = function(Vue) {
+ Vue.component(Form.name, Form);
};
-DropdownItem.install = function(Vue) {
- Vue.component(DropdownItem.name, DropdownItem);
+Form.version = version;
+const watchError = (state) => (value) => {
+ if (!isNull(value) && state.getValidateType === "tip") {
+ state.canShowTip = true;
+ }
+ state.validateMessage = value;
+ state.validateState = value ? VALIDATE_STATE.Error : "";
};
-DropdownItem.version = version$a;
-const index$c = "";
-function _createForOfIteratorHelperLoose$e(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$e(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$e(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$e(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$e(o, minLen);
-}
-function _arrayLikeToArray$e(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$e = function _export_sfc26(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$e(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$p = defineComponent({
- components: {
- TinyDropdownItem: DropdownItem
- },
- emits: ["mouseenter", "mouseleave", "click", "update:modelValue", "created"],
- props: [].concat(props, [
- "visibleArrow",
- "arrowOffset",
- "placement",
- "popperClass",
- "popperAppendToBody",
- "checkedStatus",
- // tiny 新增
- "textField",
- "options"
- ]),
- setup: function setup$1$16(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$a,
- api: api$a
- });
- }
-});
-function _sfc_render$f(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_tiny_dropdown_item = resolveComponent("tiny-dropdown-item");
- return openBlock(), createBlock(Transition, {
- name: "tiny-zoom-in-top",
- onAfterLeave: _ctx.doDestroy,
- persisted: ""
- }, {
- default: withCtx(function() {
- return [withDirectives(createBaseVNode(
- "ul",
- {
- class: normalizeClass(["tiny-dropdown-menu tiny-popper", [_ctx.state.size && "tiny-dropdown-menu--" + _ctx.state.size, _ctx.popperClass]]),
- onMouseenter: _cache[0] || (_cache[0] = function() {
- return _ctx.handleMouseenter && _ctx.handleMouseenter.apply(_ctx, arguments);
- }),
- onMouseleave: _cache[1] || (_cache[1] = function() {
- return _ctx.handleMouseleave && _ctx.handleMouseleave.apply(_ctx, arguments);
- })
- },
- [renderSlot(_ctx.$slots, "default", {
- selectedIndex: _ctx.state.selectedIndex
- }, function() {
- return [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.options, function(item, index3) {
- return openBlock(), createBlock(_component_tiny_dropdown_item, {
- "item-data": item,
- label: item[_ctx.textField],
- key: index3,
- icon: item.icon,
- disabled: item.disabled,
- divided: item.divided,
- tip: item.tip,
- "tip-position": item.tipPosition
- }, null, 8, ["item-data", "label", "icon", "disabled", "divided", "tip", "tip-position"]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))];
- })],
- 34
- /* CLASS, NEED_HYDRATION */
- ), [[vShow, _ctx.state.showPopper]])];
- }),
- _: 3
- /* FORWARDED */
- }, 8, ["onAfterLeave"]);
-}
-var pc$5 = /* @__PURE__ */ _export_sfc$e(_sfc_main$p, [["render", _sfc_render$f]]);
-const index$b = "";
-function _createForOfIteratorHelperLoose$d(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$d(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$d(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$d(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$d(o, minLen);
-}
-function _arrayLikeToArray$d(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$d = function _export_sfc27(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$d(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$o = defineComponent({
- props: [].concat(props, ["activeColor", "closeOnClickOutside", "closeOnClickOverlay", "direction", "duration", "overlay", "zIndex"]),
- components: {
- IconUp: index$u(),
- IconDown: index$C(),
- IconUnfilter: index$v(),
- IconSort: index$x(),
- IconDeltaDown: index$H(),
- IconDeltaUp: index$F()
- },
- directives: directive$1({
- Clickoutside: clickoutside_default
- }),
- emits: ["open", "created"],
- setup: function setup$1$17(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$a,
- api: api$a
- });
- }
-});
-var _hoisted_1$9 = {
- ref: "menu",
- class: "tiny-mobile-dropdown-menu"
-};
-var _hoisted_2$7 = {
- class: "tiny-mobile-dropdown-menu__bar tiny-mobile-dropdown-menu__bar--opened"
-};
-var _hoisted_3$5 = ["tabindex", "onClick"];
-var _hoisted_4$4 = {
- class: "tiny-mobile-dropdown-menu__title-wrap"
-};
-var _hoisted_5$4 = {
- key: 0
-};
-var _hoisted_6$2 = {
- class: "tiny-mobile-dropdown-menu__title-text"
-};
-var _hoisted_7$1 = {
- key: 0,
- class: "tiny-mobile-dropdown-menu__title-icon"
-};
-function _sfc_render$e(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_icon_delta_up = resolveComponent("icon-delta-up");
- var _component_icon_delta_down = resolveComponent("icon-delta-down");
- var _directive_clickoutside = resolveDirective("clickoutside");
- return openBlock(), createElementBlock(
- "div",
- _hoisted_1$9,
- [createBaseVNode("div", _hoisted_2$7, [(openBlock(true), createElementBlock(
- Fragment,
- null,
- renderList(_ctx.state.children, function(item, index3) {
- return withDirectives((openBlock(), createElementBlock("div", {
- key: index3,
- role: "button",
- tabindex: item.disabled ? -1 : 0,
- class: normalizeClass(["tiny-mobile-dropdown-menu__item", [item.disabled ? "is-disabled" : "", item.titleClass]]),
- onClick: function onClick($event) {
- return _ctx.toggleItem(index3, item);
- }
- }, [createBaseVNode(
- "div",
- {
- class: normalizeClass(["tiny-mobile-dropdown-menu__title", {
- "is-active": item.state.showPopup,
- "is-down": item.state.showPopup === (_ctx.direction === "down")
- }]),
- style: normalizeStyle({
- color: item.state.showPopup ? _ctx.activeColor : ""
- })
- },
- [createBaseVNode("div", _hoisted_4$4, [!_ctx.slots.title ? (openBlock(), createElementBlock("span", _hoisted_5$4, [createBaseVNode(
- "span",
- _hoisted_6$2,
- toDisplayString(item.state.displayTitle),
- 1
- /* TEXT */
- ), item.type === "sort" ? (openBlock(), createElementBlock("span", _hoisted_7$1, [createVNode(_component_icon_delta_up, {
- class: "up",
- fill: item.state.sort === "asc" ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc"
- }, null, 8, ["fill"]), createVNode(_component_icon_delta_down, {
- class: "down",
- fill: item.state.sort === "desc" ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc"
- }, null, 8, ["fill"])])) : (openBlock(), createBlock(resolveDynamicComponent(item.type === "filter" ? "IconUnfilter" : item.type === "selection" && item.state.showPopup ? "IconUp" : "IconDown"), {
- key: 1,
- fill: item.state.showPopup ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc",
- class: normalizeClass([item.type === "filter" ? "filter-icon" : ""])
- }, null, 8, ["fill", "class"]))])) : renderSlot(_ctx.$slots, "title", {
- key: 1
- })])],
- 6
- /* CLASS, STYLE */
- )], 10, _hoisted_3$5)), [[_directive_clickoutside, _ctx.clickOutside]]);
- }),
- 128
- /* KEYED_FRAGMENT */
- ))]), renderSlot(_ctx.$slots, "default")],
- 512
- /* NEED_PATCH */
- );
-}
-var mobile$3 = /* @__PURE__ */ _export_sfc$d(_sfc_main$o, [["render", _sfc_render$e]]);
-function _createForOfIteratorHelperLoose$c(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$c(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$c(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$c(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$c(o, minLen);
-}
-function _arrayLikeToArray$c(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$c = function _export_sfc28(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$c(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$n = defineComponent({
- props: [].concat(props, ["visibleArrow", "arrowOffset", "placement", "popperClass", "popperAppendToBody", "checkedStatus", "multiStage", "maxHeight"]),
- emits: ["menu-item-click", "created"],
- components: {
- TinyTooltip: Tooltip$1
- },
- setup: function setup$1$18(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$a,
- api: api$a
- });
- }
-});
-function _sfc_render$d(_ctx, _cache, $props2, $setup2, $data, $options) {
- var _component_tiny_tooltip = resolveComponent("tiny-tooltip");
- return openBlock(), createBlock(Transition, {
- name: "tiny-zoom-in-top",
- duration: 150,
- onAfterLeave: _ctx.doDestroy,
- persisted: ""
- }, {
- default: withCtx(function() {
- return [withDirectives(createBaseVNode(
- "ul",
- {
- "data-tag": "tiny-dropdown-menu",
- class: normalizeClass(_ctx.m("min-w-[theme(spacing.18)] max-w-[theme(spacing.52)] absoulte bg-color-bg-1", {
- "py-1.5": _ctx.state.size === "medium"
- }, {
- "py-1.5": _ctx.state.size === "small"
- }, {
- "py-0.75": _ctx.state.size === "mini"
- }, {
- "overflow-x-hidden scrollbar-size-0": _ctx.maxHeight
- }, _ctx.multiStage ? "!block rounded-none" : "rounded py-1 shadow-sm sm:shadow-md px-1", _ctx.state.canvasHeight ? "sm:mb-6" : !_ctx.multiStage && "sm:my-1 my-2", _ctx.popperClass)),
- style: normalizeStyle({
- maxHeight: _ctx.maxHeight + "px"
- })
- },
- [createVNode(_component_tiny_tooltip, {
- ref: "tooltip",
- effect: "light",
- content: _ctx.state.label,
- placement: "top-start",
- manual: true,
- modelValue: _ctx.state.showContent,
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
- return _ctx.state.showContent = $event;
- })
- }, null, 8, ["content", "modelValue"]), renderSlot(_ctx.$slots, "default", {
- selectedIndex: _ctx.state.selectedIndex
- })],
- 6
- /* CLASS, STYLE */
- ), [[vShow, _ctx.state.showPopper]])];
- }),
- _: 3
- /* FORWARDED */
- }, 8, ["onAfterLeave"]);
-}
-var mobileFirst$3 = /* @__PURE__ */ _export_sfc$c(_sfc_main$n, [["render", _sfc_render$d]]);
-function _extends$e() {
- _extends$e = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$e.apply(this, arguments);
-}
-var template$9 = function template23(mode) {
- var _process$env;
- var tinyMode = typeof process === "object" ? (_process$env = {}) == null ? void 0 : _process$env.TINY_MODE : null;
- if ("pc" === (tinyMode || mode)) {
- return pc$5;
- }
- if ("mobile" === (tinyMode || mode)) {
- return mobile$3;
- }
- if ("mobile-first" === (tinyMode || mode)) {
- return mobileFirst$3;
- }
- return pc$5;
-};
-var dropdownMenuProps = _extends$e({}, $props, {
- multiStage: {
- type: Boolean,
- default: false
- },
- checkedStatus: {
- type: Boolean,
- default: false
- },
- visibleArrow: Boolean,
- arrowOffset: {
- type: Number,
- default: 0
- },
- placement: String,
- // 默认主题 'bottom-end'
- popperClass: String,
- popperAppendToBody: {
- type: Boolean,
- default: true
- },
- activeColor: String,
- closeOnClickOutside: {
- type: Boolean,
- default: true
- },
- closeOnClickOverlay: {
- type: Boolean,
- default: true
- },
- direction: {
- type: String,
- default: "down"
- },
- duration: {
- type: [Number, String],
- default: 0.2
- },
- overlay: {
- type: Boolean,
- default: true
- },
- zIndex: [Number, String],
- maxHeight: {
- type: [Number, String],
- default: "400"
- },
- // tiny新增
- options: {
- type: Array,
- default: function _default4() {
- return [];
- }
- },
- textField: {
- type: String,
- default: "label"
- }
-});
-var DropdownMenu = defineComponent({
- name: $prefix + "DropdownMenu",
- componentName: $prefix + "DropdownMenu",
- props: dropdownMenuProps,
- setup: function setup3(props2, context) {
- return $setup({
- props: props2,
- context,
- template: template$9
- });
- }
-});
-var version$9 = "3.16.0";
-DropdownMenu.install = function(Vue) {
- Vue.component(DropdownMenu.name, DropdownMenu);
-};
-DropdownMenu.version = version$9;
-function _extends$d() {
- _extends$d = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$d.apply(this, arguments);
-}
-var _sfc_main$m = /* @__PURE__ */ defineComponent({
- name: $prefix + "Dropdown",
- componentName: "TinyDropdown",
- components: {
- TinyButton: Button$1,
- TinyButtonGroup: ButtonGroup,
- TinyDropdownMenu: DropdownMenu,
- IconDownWard: index$t()
- },
- directives: directive$1({
- Clickoutside: clickoutside_default
- }),
- props: _extends$d({}, $props, {
- type: String,
- trigger: String,
- size: {
- type: String,
- default: ""
- },
- disabled: {
- type: Boolean,
- default: false
- },
- splitButton: Boolean,
- showTimeout: {
- type: Number,
- default: 250
- },
- hideTimeout: {
- type: Number,
- default: 150
- },
- hideOnClick: {
- type: Boolean,
- default: true
- },
- tabindex: {
- type: Number,
- default: 0
- },
- border: {
- type: Boolean,
- default: false
- },
- round: {
- type: Boolean,
- default: false
- },
- showIcon: {
- type: Boolean,
- default: true
- },
- menuOptions: {
- type: Object,
- default: function _default5() {
- return {
- options: [],
- textField: "label",
- popperClass: "",
- placement: "bottom-end"
- };
- }
- },
- title: {
- type: String,
- default: "下拉菜单"
- // TINY-TODO: 国际化
- },
- inheritWidth: {
- type: Boolean,
- default: false
- },
- suffixIcon: Object
- }),
- emits: ["visible-change", "item-click", "button-click", "menu-item-click", "handle-click", "is-disabled", "selected-index"],
- setup: function setup4(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$c,
- api: api$c,
- h
- });
- },
- render: function render2() {
- var _state$designConfig, _state$designConfig$i, _state$designConfig2, _state$designConfig2$;
- var splitButton = this.splitButton, type = this.type, disabled = this.disabled, handleMainButtonClick2 = this.handleMainButtonClick, menuOptions = this.menuOptions, title = this.title, suffixIcon = this.suffixIcon;
- var slots = this.slots, size = this.size, state = this.state, border = this.border, showIcon = this.showIcon, round = this.round, clickOutside2 = this.clickOutside;
- var params = {
- visible: state.visible
- };
- var triggerElm = null;
- var triggerClass = "tiny-dropdown__trigger tiny-dropdown-trigger";
- var visibleClass = state.visible ? "tiny-dropdown--visible tiny-dropdown-visible" : "";
- var IconDown = suffixIcon || ((_state$designConfig = state.designConfig) == null ? void 0 : (_state$designConfig$i = _state$designConfig.icons) == null ? void 0 : _state$designConfig$i.dropdownIcon) || index$H();
- var ButtonIconDown = ((_state$designConfig2 = state.designConfig) == null ? void 0 : (_state$designConfig2$ = _state$designConfig2.icons) == null ? void 0 : _state$designConfig2$.dropdownIcon) || index$t();
- var defaultSlot = slots.default && slots.default(params);
- if (splitButton) {
- triggerElm = createVNode(resolveComponent("tiny-button-group"), null, {
- default: function _default28() {
- return [createVNode(resolveComponent("tiny-button"), {
- "type": type,
- "size": size,
- "onClick": handleMainButtonClick2,
- "disabled": disabled,
- "class": "tiny-dropdown__title-button"
- }, {
- default: function _default37() {
- return [defaultSlot || createVNode("span", null, [title])];
- }
- }), createVNode(resolveComponent("tiny-button"), {
- "ref": "trigger",
- "type": type,
- "size": size,
- "class": "tiny-dropdown__caret-button " + triggerClass,
- "disabled": disabled,
- "reset-time": 0
- }, {
- default: function _default37() {
- return [createVNode(ButtonIconDown, {
- "class": visibleClass
- }, null)];
- }
- })];
- }
- });
- } else {
- var _defaultSlot$;
- var suffixSlot = slots["suffix-icon"] && slots["suffix-icon"]();
- var vnodeData = defaultSlot && ((_defaultSlot$ = defaultSlot[0]) == null ? void 0 : _defaultSlot$.data) || {};
- var _vnodeData$attrs = vnodeData.attrs, attrs = _vnodeData$attrs === void 0 ? {} : _vnodeData$attrs;
- if (disabled && !attrs.disabled) {
- attrs.disabled = true;
- vnodeData.attrs = attrs;
- }
- var suffixInner = showIcon ? createVNode("span", {
- "class": "tiny-dropdown__suffix-inner " + visibleClass
- }, [suffixSlot || createVNode(IconDown, null, null)]) : "";
- var defaultTriggerElm = defaultSlot || title ? createVNode("span", {
- "class": "tiny-dropdown__title"
- }, [defaultSlot || title]) : null;
- triggerElm = border ? createVNode(resolveComponent("tiny-button"), {
- "ref": "trigger",
- "round": round,
- "disabled": disabled,
- "class": "tiny-dropdown__border " + (state.visible ? "is-expand" : "") + (showIcon ? " is-show-icon " : ""),
- "reset-time": 0
- }, {
- default: function _default28() {
- return [defaultTriggerElm, suffixInner];
- }
- }) : createVNode("span", {
- "ref": "trigger",
- "class": "is-text" + (state.visible ? " is-expand" : " is-hide") + (disabled ? " is-disabled" : "") + " " + triggerClass
- }, [defaultTriggerElm, suffixInner]);
- }
- var defaulMenuElm = createVNode(resolveComponent("tiny-dropdown-menu"), {
- "options": menuOptions.options,
- "text-field": menuOptions.textField || menuOptions["text-field"],
- "popper-class": menuOptions.popperClass || menuOptions["popper-class"],
- "placement": menuOptions.placement
- }, null);
- var menuElm = disabled ? null : slots.dropdown && slots.dropdown() || defaulMenuElm;
- return withDirectives(createVNode("div", {
- "class": "tiny-dropdown",
- "aria-disabled": disabled
- }, [triggerElm, menuElm]), [[resolveDirective("clickoutside"), clickOutside2]]);
- }
-});
-function _extends$c() {
- _extends$c = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$c.apply(this, arguments);
-}
-var _sfc_main$l = /* @__PURE__ */ defineComponent({
- name: $prefix + "Dropdown",
- componentName: "TinyDropdown",
- components: {
- TinyButton: Button$1,
- TinyButtonGroup: ButtonGroup,
- IconChevronDown: index$L(),
- IconChevronUp: index$J(),
- IconArrowBottom: index$P()
- },
- directives: directive$1({
- Clickoutside: clickoutside_default
- }),
- props: _extends$c({}, $props, {
- type: String,
- trigger: String,
- size: {
- type: String,
- default: ""
- },
- disabled: {
- type: Boolean,
- default: false
- },
- singleButton: {
- type: Boolean,
- default: false
- },
- showTimeout: {
- type: Number,
- default: 250
- },
- hideTimeout: {
- type: Number,
- default: 150
- },
- hideOnClick: {
- type: Boolean,
- default: true
- },
- tabindex: {
- type: Number,
- default: 0
- },
- border: {
- type: Boolean,
- default: false
- },
- round: {
- type: Boolean,
- default: false
- },
- showIcon: {
- type: Boolean,
- default: true
- },
- modelValue: [String, Number],
- showSelfIcon: {
- type: Boolean,
- default: false
- }
- }),
- emits: ["visible-change", "item-click", "button-click", "selectedIndex", "current-item-click", "is-disabled"],
- setup: function setup5(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$c,
- api: api$c,
- mono: true,
- h
- });
- },
- render: function render3() {
- var type = this.type, disabled = this.disabled, handleMainButtonClick2 = this.handleMainButtonClick, slots = this.slots, size = this.size, state = this.state, border = this.border, round = this.round, m = this.m, clickOutside2 = this.clickOutside, singleButton = this.singleButton;
- var params = {
- visible: state.visible
- };
- var triggerElm = null;
- if (singleButton) {
- triggerElm = createVNode(resolveComponent("tiny-button"), {
- "ref": "trigger",
- "type": type === "primary" ? type : "",
- "size": size,
- "customClass": m(["rounded active:rounded flex items-center justify-center", state.visible && type !== "primary" && "active:border-color-border-focus text-color-text-primary active:text-color-brand-focus focus:border-color-border-focus focus:text-color-brand-focus"]),
- "disabled": disabled,
- "reset-time": 0,
- "onClick": handleMainButtonClick2
- }, {
- default: function _default28() {
- return [createVNode("div", {
- "class": "overflow-hidden overflow-ellipsis whitespace-nowrap w-full"
- }, [slots.default && slots.default(params)])];
- }
- });
- } else {
- var defaultSlot = slots.default && slots.default(params);
- var suffixSlot = slots["suffix-icon"] && slots["suffix-icon"]();
- var vnodeData = (defaultSlot == null ? void 0 : defaultSlot[0].data) || {};
- var _vnodeData$attrs = vnodeData.attrs, attrs = _vnodeData$attrs === void 0 ? {} : _vnodeData$attrs;
- if (disabled && !attrs.disabled) {
- attrs.disabled = true;
- vnodeData.attrs = attrs;
- }
- var defaultIcon = createVNode("span", {
- "class": "block text-[0]"
- }, [createVNode(resolveComponent("icon-chevron-down"), {
- "class": "sm:block hidden will-change-transform"
- }, null), createVNode(resolveComponent("icon-arrow-bottom"), {
- "class": "sm:hidden block will-change-transform"
- }, null)]);
- var suffixInner = state.showIcon && createVNode("span", {
- "data-tag": "tiny-dropdown-showicon",
- "class": ["ml-1 sm:ml-2 [&_svg:nth-of-type(1)]:align-top w-4 h-4 inline-block [&_svg]:transition-transform [&_svg]:duration-300", {
- "fill-color-brand-focus [&_svg:nth-of-type(1)]:hover:fill-color-brand-hover [&_svg:nth-of-type(1)]:active:fill-color-brand-focus leading-4": !disabled && !border
- }, border && (state.visible ? "[&_svg]:rotate-180" : "[&_svg]:rotate-0"), border && type !== "primary" && state.visible && "[&_svg]:fill-color-border-focus visited:[&_svg]:fill-color-border-focus active:[&_svg]:fill-color-border-focus"]
- }, [suffixSlot || defaultIcon]);
- triggerElm = border ? createVNode(resolveComponent("tiny-button"), {
- "ref": "trigger",
- "round": round,
- "size": size,
- "type": type === "primary" ? type : "",
- "disabled": disabled,
- "class": ["rounded inline-flex items-center justify-center", type === "primary" ? "[&_svg]:fill-color-bg-1" : state.visible ? "active:border-color-border-focus text-color-text-primary active:text-color-brand-focus focus:border-color-border-focus focus:text-color-brand-focus" : "[&_svg]:fill-color-icon-placeholder"],
- "reset-time": 0
- }, {
- default: function _default28() {
- return [defaultSlot, suffixInner];
- }
- }) : createVNode("span", {
- "ref": "trigger",
- "class": [state.visible && !state.showSelfIcon ? "[&_svg]:rotate-180" : "[&_svg]:rotate-0", disabled && "cursor-not-allowed [&_svg]:fill-color-text-disabled", "inline-flex [&_svg]:transition-transform [&_svg]:duration-300"]
- }, [createVNode("span", {
- "class": ["inline-flex h-4 leading-4", disabled ? "text-color-text-disabled" : "hover:text-color-brand-hover active:text-color-brand-focus"]
- }, [defaultSlot]), createVNode("span", {
- "class": "align-bottom leading-4 h-4"
- }, [suffixInner])]);
- }
- var menuElm = disabled ? null : slots.dropdown && slots.dropdown();
- return withDirectives(createVNode("div", {
- "class": ["relative inline-block [&>span:nth-of-type(1)]:text-color-brand-focus [&>span:nth-of-type(1)]:text-sm sm:[&>span:nth-of-type(1)]:text-xs", disabled && "[&>span:nth-of-type(1)]:text-color-brand-focus", state.showSelfIcon && "leading-4 h-4 [&_svg]:align-top [&_svg]:rotate-0"],
- "aria-disabled": disabled,
- "data-tag": "tiny-dropdown"
- }, [triggerElm, menuElm]), [[resolveDirective("clickoutside"), clickOutside2]]);
- }
-});
-const index$a = "";
-function _extends$b() {
- _extends$b = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$b.apply(this, arguments);
-}
-var template$8 = function template24(mode) {
- var _process$env;
- var tinyMode = typeof process === "object" ? (_process$env = {}) == null ? void 0 : _process$env.TINY_MODE : null;
- if ("pc" === (tinyMode || mode)) {
- return _sfc_main$m;
- }
- if ("mobile-first" === (tinyMode || mode)) {
- return _sfc_main$l;
- }
- return _sfc_main$m;
-};
-var dropdownProps = _extends$b({}, $props, {
- modelValue: [String, Number],
- type: String,
- trigger: String,
- // 默认主题为 'hover'
- size: {
- type: String,
- default: ""
- },
- disabled: {
- type: Boolean,
- default: false
- },
- splitButton: Boolean,
- singleButton: {
- type: Boolean,
- default: false
- },
- showTimeout: {
- type: Number,
- default: 250
- },
- hideTimeout: {
- type: Number,
- default: 150
- },
- hideOnClick: {
- type: Boolean,
- default: true
- },
- tabindex: {
- type: Number,
- default: 0
- },
- border: {
- type: Boolean,
- default: false
- },
- round: {
- type: Boolean,
- default: false
- },
- showIcon: {
- type: Boolean,
- default: true
- },
- showSelfIcon: {
- type: Boolean,
- default: false
- },
- // tiny新增
- menuOptions: {
- type: Object,
- default: function _default6() {
- return {
- options: [],
- textField: "label",
- popperClass: "",
- placement: "bottom-end"
- };
- }
- },
- title: {
- type: String,
- default: "下拉菜单"
- },
- inheritWidth: {
- type: Boolean,
- default: false
- },
- suffixIcon: Object
-});
-var Dropdown = defineComponent({
- name: $prefix + "Dropdown",
- componentName: "TinyDropdown",
- props: dropdownProps,
- setup: function setup6(props2, context) {
- return $setup({
- props: props2,
- context,
- template: template$8
- });
- }
-});
-var version$8 = "3.16.0";
-Dropdown.install = function(Vue) {
- Vue.component(Dropdown.name, Dropdown);
-};
-Dropdown.version = version$8;
-const arrayEach = (obj, iterate, context) => {
- if (obj) {
- if (obj.forEach) {
- obj.forEach(iterate, context);
- } else {
- for (let index3 = 0, len = obj.length; index3 < len; index3++) {
- iterate.call(context, obj[index3], index3, obj);
- }
- }
- }
-};
-var arrayEach_default = arrayEach;
-const hasOwnProp = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
-var hasOwnProp_default = hasOwnProp;
-const objectEach = (obj, iterate, context) => {
- if (obj) {
- Object.keys(obj).forEach((key) => {
- if (hasOwnProp_default(obj, key)) {
- iterate.call(context, obj[key], key, obj);
- }
- });
- }
-};
-var objectEach_default = objectEach;
-const each = (obj, iterate, context) => {
- if (obj) {
- return Array.isArray(obj) ? arrayEach_default(obj, iterate, context) : objectEach_default(obj, iterate, context);
- }
- return obj;
-};
-var each_default = each;
-const helperCreateGetObjects = (name, getIndex) => {
- let proMethod = Object[name];
- return (obj) => {
- let result = [];
- if (!obj) {
- return result;
- }
- if (proMethod) {
- return proMethod(obj);
- }
- let eachCallback;
- if (getIndex > 1) {
- eachCallback = (key) => {
- result.push([String(key), obj[key]]);
- };
- } else {
- eachCallback = function() {
- result.push(arguments[getIndex]);
- };
- }
- each_default(obj, eachCallback);
- return result;
- };
-};
-var helperCreateGetObjects_default = helperCreateGetObjects;
-const keys = helperCreateGetObjects_default("keys", 1);
-var keys_default = keys;
-var isPlainObject_default = isPlainObject;
-const isFunction = (obj) => typeof obj === "function";
-var isFunction_default = isFunction;
-const isNull = (object) => object === null;
-var isNull_default = isNull;
-const property = (key, defs) => (object) => isNull_default(object) ? defs : object[key];
-var property_default = property;
-const objectMap = (obj, iterate, context) => {
- let result = {};
- if (obj) {
- if (iterate) {
- if (!isFunction_default(iterate)) {
- iterate = property_default(iterate);
- }
- each_default(obj, (val, index3) => {
- result[index3] = iterate.call(context, val, index3, obj);
- });
- } else {
- return obj;
- }
- }
- return result;
-};
-var objectMap_default = objectMap;
-const map = function(obj, iterate, context) {
- let result = [];
- if (obj && arguments.length > 1) {
- if (!isFunction_default(iterate)) {
- iterate = property_default(iterate);
- }
- if (obj.map) {
- return obj.map(iterate, context);
- } else {
- each_default(obj, (...args) => {
- result.push(iterate.apply(context, args));
- });
- }
- }
- return result;
-};
-var map_default = map;
-let deepClone;
-const startClone = (func, obj, deep) => func(obj, deep ? (val) => deepClone(val, deep) : (val) => val);
-deepClone = (val, deep) => isPlainObject_default(val) ? startClone(objectMap_default, val, deep) : Array.isArray(val) ? startClone(map_default, val, deep) : val;
-const clone = (obj, deep) => obj ? deepClone(obj, deep) : obj;
-var clone_default = clone;
-let objectAssignFns = Object.assign;
-const handleAssign = (destination, args, isClone) => {
- let len = args.length;
- for (let source, index3 = 1; index3 < len; index3++) {
- source = args[index3];
- let eachCallback;
- if (isClone) {
- eachCallback = (key) => {
- destination[key] = clone_default(source[key], isClone);
- };
- } else {
- eachCallback = (key) => {
- destination[key] = source[key];
- };
- }
- arrayEach_default(keys_default(args[index3]), eachCallback);
- }
- return destination;
-};
-const assign = function(target) {
- if (target) {
- let args = arguments;
- if (target === true) {
- if (args.length > 1) {
- target = Array.isArray(target[1]) ? [] : {};
- return handleAssign(target, args, true);
- }
- } else {
- return objectAssignFns ? objectAssignFns.apply(Object, args) : handleAssign(target, args);
- }
- }
- return target;
-};
-var assign_default = assign;
-const lastArrayEach = (obj, iterate, context) => {
- for (let len = obj.length - 1; len >= 0; len--) {
- iterate.call(context, obj[len], len, obj);
- }
-};
-var lastArrayEach_default = lastArrayEach;
-const lastObjectEach = (obj, iterate, context) => {
- lastArrayEach_default(keys_default(obj), (key) => {
- iterate.call(context, obj[key], key, obj);
- });
-};
-var lastObjectEach_default = lastObjectEach;
-const handle = ({ useArray, obj, iterate, context, matchValue, restIndex }) => {
- let value;
- let flag = 0;
- if (useArray && Array.isArray(obj)) {
- for (let index3 = 0, len = obj.length; index3 < len; index3++) {
- if (!!iterate.call(context, obj[index3], index3, obj) === matchValue) {
- value = [true, false, index3, obj[index3]][restIndex];
- flag = 1;
- break;
- }
- }
- } else {
- for (let key of Object.keys(obj)) {
- if (hasOwnProp_default(obj, key)) {
- if (!!iterate.call(context, obj[key], key, obj) === matchValue) {
- value = [true, false, key, obj[key]][restIndex];
- flag = 2;
- break;
- }
- }
- }
- }
- return { value, flag };
-};
-const helperCreateIterateHandle = (prop, useArray, restIndex, matchValue, defaultValue) => (obj, iterate, context) => {
- if (!obj || !iterate) {
- return defaultValue;
- }
- if (prop && obj[prop]) {
- return obj[prop](iterate, context);
- } else {
- const ret = handle({
- useArray,
- obj,
- iterate,
- context,
- matchValue,
- restIndex
- });
- if (ret.flag) {
- return ret.value;
- }
- }
- return defaultValue;
-};
-var helperCreateIterateHandle_default = helperCreateIterateHandle;
-var every_default = helperCreateIterateHandle_default("every", 1, 1, false, true);
-const find = helperCreateIterateHandle_default("find", 1, 3, true);
-var find_default = find;
-const toArray = (arr) => map_default(arr, (item) => item);
-var toArray_default = toArray;
-const isUndefined = (obj) => typeof obj === "undefined";
-var isUndefined_default = isUndefined;
-const eqNull = (object) => isNull_default(object) || isUndefined_default(object);
-var eqNull_default = eqNull;
-const helperGetHGSKeys = (property2) => (
- // 以最快的方式判断数组,可忽略准确性
- property2 ? property2.splice && property2.join ? property2 : String(property2).split(".") : []
-);
-var helperGetHGSKeys_default = helperGetHGSKeys;
-const staticHGKeyRE = /(.+)?\[(\d+)\]$/;
-var staticHGKeyRE_default = staticHGKeyRE;
-const valGet = (obj, key) => {
- const matchs = key ? key.match(staticHGKeyRE_default) : "";
- return matchs ? matchs[1] ? obj[matchs[1]] ? obj[matchs[1]][matchs[2]] : void 0 : obj[matchs[2]] : obj[key];
-};
-const pathGet = (obj, property2) => {
- if (!obj) {
- return;
- }
- let rest;
- let index3 = 0;
- const getRest = (len, props2) => {
- for (rest = obj; index3 < len; index3++) {
- rest = valGet(rest, props2[index3]);
- if (eqNull_default(rest)) {
- return;
- }
- }
- };
- if (obj[property2] || hasOwnProp_default(obj, property2)) {
- return obj[property2];
- } else {
- const props2 = helperGetHGSKeys_default(property2);
- const len = props2.length;
- if (len) {
- getRest(len, props2);
- }
- return rest;
- }
-};
-const get = (obj, property2, defaultValue) => {
- if (eqNull_default(obj)) {
- return defaultValue;
- }
- const result = pathGet(obj, property2);
- return isUndefined_default(result) ? defaultValue : result;
-};
-var get_default = get;
-const sortByDef = (v1, v2) => {
- if (isUndefined_default(v1) || isUndefined_default(v2)) {
- return isUndefined_default(v2) ? 1 : -1;
- }
- if (isNull_default(v1) || isNull_default(v2)) {
- return isNull_default(v2) ? 1 : -1;
- }
- return v1 && v1.localeCompare ? v1.localeCompare(v2) : v1 > v2 ? 1 : -1;
-};
-const sortMultis = (name, compares) => (item1, item2) => {
- let v1 = item1[name];
- let v2 = item2[name];
- if (v1 === v2) {
- return compares ? compares(item1, item2) : 0;
- }
- return sortByDef(v1, v2);
-};
-const getSortPros = (arr, list, iterate, context) => {
- iterate = Array.isArray(iterate) ? iterate : [iterate];
- arrayEach_default(iterate, (prop, index3) => {
- let eachCallback;
- if (isFunction_default(prop)) {
- eachCallback = (val, key) => {
- val[index3] = prop.call(context, val.data, key, arr);
- };
- } else {
- eachCallback = (val) => {
- val[index3] = get_default(val.data, prop);
- };
- }
- arrayEach_default(list, eachCallback);
- });
- return iterate;
-};
-const sortBy = (arr, iterate, context, STR_UNDEFINED) => {
- if (arr) {
- if (iterate === STR_UNDEFINED) {
- return toArray_default(arr).sort(sortByDef);
- }
- let compares;
- let list = map_default(arr, (item) => ({ data: item }));
- let sortPros = getSortPros(arr, list, iterate, context);
- let len = sortPros.length;
- if (len) {
- while (len >= 0) {
- compares = sortMultis(len, compares);
- len--;
- }
- list = list.sort(compares);
- }
- return map_default(list, property_default("data"));
- }
- return [];
-};
-var sortBy_default = sortBy;
-const slice = (array, startIndex, endIndex) => {
- let result = [];
- if (array) {
- for (startIndex = startIndex || 0, endIndex = endIndex || array.length; startIndex < endIndex; startIndex++) {
- result.push(array[startIndex]);
- }
- }
- return result;
-};
-var slice_default = slice;
-const helperCreateIndexOf = (name, callback) => (obj, val) => {
- if (!obj) {
- return -1;
- }
- if (typeof obj === "string" || Array.isArray(obj)) {
- if (obj[name]) {
- return obj[name](val);
- }
- return callback(obj, val);
- }
- for (let key of Object.keys(obj)) {
- if (val === obj[key]) {
- return key;
- }
- }
- return -1;
-};
-var helperCreateIndexOf_default = helperCreateIndexOf;
-const arrayIndexOf = (obj, val) => {
- if (obj.indexOf) {
- return obj.indexOf(val);
- }
- for (let index3 = 0, len = obj.length; index3 < len; index3++) {
- if (val === obj[index3]) {
- return index3;
- }
- }
-};
-var arrayIndexOf_default = arrayIndexOf;
-var indexOf_default = helperCreateIndexOf_default("indexOf", arrayIndexOf_default);
-const includes = (obj, val) => ~indexOf_default(obj, val);
-var includes_default = includes;
-const helperCreateToNumber = (handle2) => (str) => {
- if (str) {
- let num = handle2(str);
- if (!isNaN(num)) {
- return num;
- }
- }
- return 0;
-};
-var helperCreateToNumber_default = helperCreateToNumber;
-const toNumber = helperCreateToNumber_default(parseFloat);
-var toNumber_default = toNumber;
-const sum = (array, iterate, context) => {
- let result = 0;
- let eachCallback;
- if (iterate) {
- if (isFunction_default(iterate)) {
- eachCallback = (...args) => {
- result += toNumber_default(iterate.apply(context, args));
- };
- } else {
- eachCallback = (val) => {
- result += toNumber_default(val[iterate]);
- };
- }
- } else {
- eachCallback = (val) => {
- result += toNumber_default(val);
- };
- }
- each_default(array, eachCallback);
- return result;
-};
-var sum_default = sum;
-const defaultOptions$1 = { parentKey: "parentId", key: "id", children: "children" };
-const unTreeList = (result, array, opts) => {
- let optChildren = opts.children;
- let optData = opts.data;
- each_default(array, (item) => {
- const children = item[optChildren];
- if (optData) {
- item = item[optData];
- }
- result.push(item);
- children && unTreeList(result, children, opts);
- });
- return result;
-};
-const toTreeArray = (array, options) => unTreeList([], array, assign_default({}, defaultOptions$1, options));
-var toTreeArray_default = toTreeArray;
-const helperCreateTreeFunc = (handle2) => (obj, iterate, options, context) => {
- let opts = options || {};
- let optChildren = opts.children || "children";
- const params = {
- item: null,
- obj,
- iterate,
- context,
- path: [],
- node: [],
- parseChildren: optChildren,
- opts
- };
- return handle2(params);
-};
-var helperCreateTreeFunc_default = helperCreateTreeFunc;
-const findTreeItem = ({ parent, obj, iterate, context, path, node, parseChildren, opts }) => {
- if (obj) {
- for (let index3 = 0, len = obj.length; index3 < len; index3++) {
- const item = obj[index3];
- const paths = path.concat([`${index3}`]);
- const nodes = node.concat([item]);
- if (iterate.call(context, item, index3, obj, paths, parent, nodes)) {
- return { index: index3, item, path, items: obj, parent, nodes };
- }
- if (parseChildren && item) {
- const newPath = paths.concat([parseChildren]);
- const match = findTreeItem({
- parent: item,
- obj: item[parseChildren],
- iterate,
- context,
- path: newPath,
- node: nodes,
- parseChildren,
- opts
- });
- if (match) {
- return match;
- }
- }
- }
- }
-};
-const findTree = helperCreateTreeFunc_default(findTreeItem);
-var findTree_default = findTree;
-const eachTreeItem = ({ parent, obj, iterate, context, path, node, parseChildren, opts }) => {
- each_default(obj, (item, index3) => {
- const paths = path.concat([`${index3}`]);
- const nodes = node.concat([item]);
- iterate.call(context, item, index3, obj, paths, parent, nodes);
- if (item && parseChildren) {
- paths.push(parseChildren);
- eachTreeItem({
- item,
- obj: item[parseChildren],
- context,
- iterate,
- node: nodes,
- parseChildren,
- path: paths,
- opts
- });
- }
- });
-};
-const eachTree = helperCreateTreeFunc_default(eachTreeItem);
-var eachTree_default = eachTree;
-const mapTreeItem = ({ parent, obj, iterate, context, path, node, parseChildren, opts }) => {
- let mapChildren = opts.mapChildren || parseChildren;
- return map_default(obj, (item, index3) => {
- const paths = path.concat([`${index3}`]);
- const nodes = node.concat([item]);
- const rest = iterate.call(context, item, index3, obj, paths, parent, nodes);
- if (rest && item && parseChildren && item[parseChildren]) {
- rest[mapChildren] = mapTreeItem({
- item,
- obj: item[parseChildren],
- iterate,
- context,
- path: paths,
- node: nodes,
- parseChildren,
- opts
- });
- }
- return rest;
- });
-};
-const mapTree = helperCreateTreeFunc_default(mapTreeItem);
-var mapTree_default = mapTree;
-const filterTree = (obj, iterate, options, context) => {
- let result = [];
- if (obj && iterate) {
- eachTree_default(
- obj,
- (...args) => {
- if (iterate.apply(context, args)) {
- result.push(args[0]);
- }
- },
- options
- );
- }
- return result;
-};
-var filterTree_default = filterTree;
-const isObject = (obj) => typeof obj === "object" && obj !== null;
-var isObject_default = isObject;
-const isString = (obj) => typeof obj === "string";
-var isString_default = isString;
-const lastEach = (obj, iterate, context) => {
- if (obj) {
- return Array.isArray(obj) ? lastArrayEach_default(obj, iterate, context) : lastObjectEach_default(obj, iterate, context);
- }
- return obj;
-};
-var lastEach_default = lastEach;
-const helperDeleteProperty = (obj, property2) => {
- try {
- delete obj[property2];
- } catch (e) {
- obj[property2] = void 0;
- }
-};
-var helperDeleteProperty_default = helperDeleteProperty;
-const clear = function(obj, defs, assigns) {
- if (!obj) {
- return obj;
- }
- let isDefs = arguments.length > 1 && (isNull_default(defs) || !isObject_default(defs));
- let extds = isDefs ? assigns : defs;
- if (isPlainObject_default(obj)) {
- let eachCallback;
- if (isDefs) {
- eachCallback = (val, key) => {
- obj[key] = defs;
- };
- } else {
- eachCallback = (val, key) => {
- helperDeleteProperty_default(obj, key);
- };
- }
- objectEach_default(obj, eachCallback);
- if (extds) {
- assign_default(obj, extds);
- }
- } else if (Array.isArray(obj)) {
- if (isDefs) {
- let len = obj.length;
- while (len > 0) {
- len--;
- obj[len] = defs;
- }
- } else {
- obj.length = 0;
- }
- if (extds) {
- obj.push.apply(obj, extds);
- }
- }
- return obj;
-};
-var clear_default = clear;
-const pluckProperty = (name) => (obj, key) => key === name;
-const remove$1 = (obj, iterate, context) => {
- if (obj) {
- if (!eqNull_default(iterate)) {
- let removeIndexs = [];
- let rest = [];
- if (!isFunction_default(iterate)) {
- iterate = pluckProperty(iterate);
- }
- each_default(obj, (item, index3, rest2) => {
- if (iterate.call(context, item, index3, rest2)) {
- removeIndexs.push(index3);
- }
- });
- if (Array.isArray(obj)) {
- lastEach_default(removeIndexs, (item) => {
- rest.push(obj[item]);
- obj.splice(item, 1);
- });
- } else {
- rest = {};
- arrayEach_default(removeIndexs, (key) => {
- rest[key] = obj[key];
- helperDeleteProperty_default(obj, key);
- });
- }
- return rest;
- }
- return clear_default(obj);
- }
- return obj;
-};
-var remove_default = remove$1;
-const isBoolean = (obj) => typeof obj === "boolean";
-var isBoolean_default = isBoolean;
-const isNumber = (obj) => typeof obj === "number";
-var isNumber_default = isNumber;
-let equalVal;
-const helperEqualCompare = ({ val1, val2, compare, func, key, obj1, obj2 }) => {
- if (val1 === val2) {
- return true;
- }
- if (val1 && val2 && !isNumber_default(val1) && !isNumber_default(val2) && !isString_default(val1) && !isString_default(val2)) {
- if (isRegExp(val1)) {
- return compare(String(val1), String(val2), key, obj1, obj2);
- }
- if (isDate(val1) || isBoolean_default(val1)) {
- return compare(Number(val1), Number(val2), key, obj1, obj2);
- }
- return equalVal(val1, val2, func, key, compare);
- }
- return compare(val1, val2, key, obj1, obj2);
-};
-equalVal = (val1, val2, func, key, compare) => {
- let result, val1Keys, val2Keys;
- let isObj1Arr = Array.isArray(val1);
- let isObj2Arr = Array.isArray(val2);
- if (isObj1Arr || isObj2Arr ? isObj1Arr && isObj2Arr : val1.constructor === val2.constructor) {
- val1Keys = keys_default(val1);
- val2Keys = keys_default(val2);
- if (func) {
- result = func(val1, val2, key);
- }
- if (val1Keys.length === val2Keys.length) {
- if (isUndefined_default(result)) {
- return every_default(
- val1Keys,
- (key2, index3) => key2 === val2Keys[index3] && helperEqualCompare({
- val1: val1[key2],
- val2: val2[val2Keys[index3]],
- compare,
- func,
- key: isObj1Arr || isObj2Arr ? index3 : key2,
- obj1: val1,
- obj2: val2
- })
- );
- }
- return !!result;
- }
- return false;
- }
-};
-var helperEqualCompare_default = helperEqualCompare;
-const isEqual = (obj1, obj2) => helperEqualCompare_default({
- val1: obj1,
- val2: obj2,
- compare: (v1, v2) => v1 === v2
-});
-var isEqual_default = isEqual;
-let __uniqueId = 0;
-const uniqueId = (prefix) => (prefix ? String(prefix) : 0) + ++__uniqueId;
-var uniqueId_default = uniqueId;
-const helperCreateiterateIndexOf = (callback) => (obj, iterate, context) => {
- if (!obj || !isFunction_default(iterate)) {
- return -1;
- }
- if (Array.isArray(obj) || isString_default(obj)) {
- return callback(obj, iterate, context);
- }
- for (let key of Object.keys(obj)) {
- if (hasOwnProp_default(obj, key) && iterate.call(context, obj[key], key, obj)) {
- return key;
- }
- }
- return -1;
-};
-var helperCreateiterateIndexOf_default = helperCreateiterateIndexOf;
-const findIndexOf = helperCreateiterateIndexOf_default((obj, iterate, context) => {
- for (let index3 = 0, len = obj.length; index3 < len; index3++) {
- if (iterate.call(context, obj[index3], index3, obj)) {
- return index3;
- }
- }
- return -1;
-});
-var findIndexOf_default = findIndexOf;
-const toStringJSON = (str) => {
- if (isObject_default(str)) {
- return str;
- } else if (isString_default(str)) {
- try {
- return JSON.parse(str);
- } catch (error2) {
- }
- }
- return {};
-};
-var toStringJSON_default = toStringJSON;
-const formatterArgs = (matchs, rest, isHas) => {
- let arrIndex = matchs[1];
- let objProp = matchs[2];
- if (arrIndex) {
- if (rest[arrIndex]) {
- if (hasOwnProp_default(rest[arrIndex], objProp)) {
- isHas = true;
- rest = rest[arrIndex][objProp];
- }
- }
- } else {
- if (hasOwnProp_default(rest, objProp)) {
- isHas = true;
- rest = rest[objProp];
- }
- }
- return { isHas, rest };
-};
-const has = (obj, property2) => {
- if (!obj) {
- return;
- }
- const compare = (property22) => {
- let prop, matchs, rest, isHas;
- let props2 = helperGetHGSKeys_default(property22);
- let index3 = 0;
- let len = props2.length;
- let flag = false;
- for (rest = obj; index3 < len; index3++) {
- isHas = false;
- prop = props2[index3];
- matchs = prop ? prop.match(staticHGKeyRE_default) : "";
- if (matchs) {
- const args = formatterArgs(matchs, rest, isHas);
- isHas = args.isHas;
- rest = args.rest;
- } else {
- hasOwnProp_default(rest, prop) && (isHas = true, rest = rest[prop]);
- }
- if (isHas) {
- index3 === len - 1 && (flag = true);
- } else {
- break;
- }
- }
- return flag;
- };
- if (hasOwnProp_default(obj, property2)) {
- return true;
- } else {
- return compare(property2);
- }
-};
-var has_default = has;
-const sKeyRE = /(.+)\[(\d+)\]$/;
-const valSet = (obj, key, isSet, value) => {
- if (obj[key]) {
- if (isSet) {
- obj[key] = value;
- }
- } else {
- const matchs = key ? key.match(sKeyRE) : null;
- const rest = isSet ? value : {};
- if (matchs) {
- const key2 = matchs[1];
- const index3 = parseInt(matchs[2]);
- if (obj[key2]) {
- obj[key2][index3] = rest;
- } else {
- obj[key2] = new Array(index3 + 1);
- obj[key2][index3] = rest;
- }
- } else {
- obj[key] = rest;
- }
- return rest;
- }
- return obj[key];
-};
-const set = (obj, property2, value) => {
- if (obj) {
- if (obj[property2] || hasOwnProp_default(obj, property2)) {
- obj[property2] = value;
- } else {
- let rest = obj;
- let props2 = helperGetHGSKeys_default(property2);
- let len = props2.length;
- for (let index3 = 0; index3 < len; index3++) {
- rest = valSet(rest, props2[index3], index3 === len - 1, value);
- }
- }
- }
- return obj;
-};
-var set_default = set;
-const destructuring = function(destination, sources) {
- if (destination && sources) {
- let rest = assign_default.apply(this, [{}].concat(slice_default(arguments, 1)));
- let restKeys = keys_default(rest);
- arrayEach_default(keys_default(destination), (key) => {
- if (includes_default(restKeys, key)) {
- destination[key] = rest[key];
- }
- });
- }
- return destination;
-};
-var destructuring_default = destructuring;
-const toValString = (obj) => {
- if (isNumber_default(obj)) {
- if (String(obj).includes("e-")) {
- let isNegative = obj < 0;
- return (isNegative ? "-" : "") + "0" + String((isNegative ? Math.abs(obj) : obj) + 1).substr(1);
- }
- }
- return String(eqNull_default(obj) ? "" : obj);
-};
-var toString_default = toValString;
-const template$7 = (str, obj) => {
- let rest = toString_default(str);
- if (rest && obj) {
- return rest.replace(/\{{2}([.\w[\]\s]+)\}{2}/g, (match, keys2) => get_default(obj, keys2));
- }
- return rest;
-};
-var template_default = template$7;
-const isArray = Array.isArray;
-const RAF = window.requestAnimationFrame;
-const scheduleFlush = (fastdom) => {
- if (!fastdom.scheduled) {
- fastdom.scheduled = true;
- fastdom.raf(flush.bind(null, fastdom));
- }
-};
-const flush = (fastdom) => {
- const { reads, writes } = fastdom;
- let error2;
- try {
- fastdom.runTasks(reads);
- fastdom.runTasks(writes);
- } catch (e) {
- error2 = e;
- }
- fastdom.scheduled = false;
- if (reads.length || writes.length)
- scheduleFlush(fastdom);
- if (error2) {
- if (fastdom.catch) {
- fastdom.catch(error2);
- } else {
- throw error2;
- }
- }
-};
-const remove = (array, item) => {
- const index3 = array.indexOf(item);
- return !!~index3 && !!array.splice(index3, 1);
-};
-const mixin = (target, source) => {
- for (let key in source) {
- if (Object.hasOwnProperty.call(source, key))
- target[key] = source[key];
- }
-};
-class FastDom {
- constructor() {
- this.reads = [];
- this.writes = [];
- this.raf = RAF.bind(window);
- }
- runTasks(tasks) {
- let task;
- while (task = tasks.shift())
- task();
- }
- measure(fn, ctx) {
- const task = !ctx ? fn : fn.bind(ctx);
- this.reads.push(task);
- scheduleFlush(this);
- return task;
- }
- mutate(fn, ctx) {
- const task = !ctx ? fn : fn.bind(ctx);
- this.writes.push(task);
- scheduleFlush(this);
- return task;
- }
- clear(task) {
- return remove(this.reads, task) || remove(this.writes, task);
- }
- extend(props2) {
- if (!props2 || typeof props2 !== "object")
- throw new Error("[TINY][FastDom] expected object");
- const child = Object.create(this);
- mixin(child, props2);
- child.fastdom = this;
- if (child.initialize)
- child.initialize();
- return child;
- }
-}
-const fastdomSingleton = new FastDom();
-var singleton_default = fastdomSingleton;
-const handleClose = ({ emit, props: props2, state }) => (event) => {
- if (props2.disabled)
- return;
- event.stopPropagation();
- state.show = false;
- const close3 = () => emit("close", event);
- props2.beforeDelete ? props2.beforeDelete(close3) : close3();
-};
-const handleClick = ({ emit, props: props2, parent, state }) => (event) => {
- if (props2.selectable || props2.disabled)
- return;
- parent.$parent && parent.$parent.tagSelectable && event.stopPropagation();
- state.selected = !state.selected;
- emit("click", event);
-};
-const api$6 = ["state", "handleClose", "handleClick"];
-const renderless$6 = (props2, { reactive: reactive2, computed }, { emit, parent }) => {
- const state = reactive2({
- type: computed(() => props2.theme || props2.type),
- show: true,
- selected: false,
- mini: props2.mini,
- color: props2.color,
- text: props2.text,
- maxWidth: props2.maxWidth
- });
- const api2 = {
- state,
- handleClose: handleClose({ emit, props: props2, state }),
- handleClick: handleClick({ emit, props: props2, parent, state })
- };
- return api2;
-};
-var _sfc_main$k = /* @__PURE__ */ defineComponent({
- components: {
- IconClose: index$N()
- },
- emits: ["click", "close"],
- props: [].concat(props, ["text", "closable", "type", "hit", "disabled", "color", "size", "effect", "value", "beforeDelete"]),
- setup: function setup7(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$6,
- api: api$6,
- h
- });
- },
- render: function render4() {
- var type = this.type, size = this.size, hit = this.hit, effect = this.effect, slots = this.slots, closable = this.closable, color = this.color, handleClose2 = this.handleClose, handleClick3 = this.handleClick, disabled = this.disabled;
- this.state;
- var value = this.value;
- var styles = {};
- var classes2 = ["tiny-tag", type ? "tiny-tag--" + type : "", size ? "tiny-tag--" + size : "", effect ? "tiny-tag--" + effect : "", hit && "is-hit", disabled ? "is-disabled" : ""];
- if (color) {
- if (Array.isArray(color)) {
- styles = {
- background: color[0],
- color: color[1]
- };
- } else if (["red", "orange", "green", "blue", "purple", "brown", "grey", "gold"].includes(color)) {
- classes2.push("tiny-tag--" + color);
- } else {
- styles = {
- background: color
- };
- }
- }
- var tagElement = value || slots.default && slots.default() ? createVNode("span", {
- "data-tag": "tiny-tag",
- "class": classes2,
- "style": styles,
- "onClick": handleClick3
- }, [value ? createVNode("span", null, [value]) : slots.default && slots.default(), closable && createVNode(resolveComponent("icon-close"), {
- "class": "tiny-svg-size tiny-tag__close ",
- "onClick": handleClose2
- }, null)]) : createVNode("span", null, null);
- return tagElement;
- }
-});
-const index$9 = "";
-function _createForOfIteratorHelperLoose$b(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$b(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$b(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$b(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$b(o, minLen);
-}
-function _arrayLikeToArray$b(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$b = function _export_sfc29(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$b(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$j = defineComponent({
- emits: ["click", "close"],
- props: [].concat(props, ["text", "color", "width", "mini", "maxWidth"]),
- setup: function setup$1$19(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$6,
- api: api$6,
- h
- });
- }
-});
-function _sfc_render$c(_ctx, _cache, $props2, $setup2, $data, $options) {
- return openBlock(), createElementBlock(
- "div",
- {
- class: normalizeClass(["tiny-mobile-tag", "tiny-mobile-tag-" + _ctx.state.color, _ctx.state.mini ? "tiny-mobile-tag-mini" : null]),
- style: normalizeStyle({
- maxWidth: _ctx.state.maxWidth ? _ctx.state.maxWidth + "px" : null
- })
- },
- [renderSlot(_ctx.$slots, "default", {}, function() {
- return [createTextVNode(
- toDisplayString(_ctx.state.text),
- 1
- /* TEXT */
- )];
- })],
- 6
- /* CLASS, STYLE */
- );
-}
-var mobile$2 = /* @__PURE__ */ _export_sfc$b(_sfc_main$j, [["render", _sfc_render$c]]);
-var classes$3 = {
- "dark-success": "text-color-text-inverse bg-color-success",
- "dark-alerting": "text-color-text-inverse bg-color-alert",
- "dark-warning": "text-color-text-inverse bg-color-warning",
- "dark-error": "text-color-text-inverse bg-color-error",
- "dark-default": "text-color-text-inverse bg-color-info-primary",
- "dark-info": "text-color-text-inverse bg-color-text-placeholder",
- "dark-pink": "text-color-text-inverse bg-color-chart-17",
- "dark-purple": "text-color-text-inverse bg-color-chart-11",
- "dark-cyan": "text-color-text-inverse bg-color-chart-2",
- "light-success": "text-color-success bg-color-success-subtler",
- "light-alerting": "text-color-alert bg-color-alert-subtler",
- "light-warning": "text-color-warning bg-color-warning-subtler",
- "light-error": "text-color-error bg-color-error-subtler",
- "light-default": "text-color-info-primary bg-color-info-primary-subtler",
- "light-info": "text-color-text-primary bg-color-bg-2",
- "light-pink": "text-color-chart-17 bg-color-chart-17-subtler",
- "light-purple": "text-color-chart-11 bg-color-chart-11-subtler",
- "light-cyan": "text-color-chart-2 bg-color-chart-2-subtler",
- "plain-success": "text-color-success bg-color-bg-1",
- "plain-alerting": "text-color-alert bg-color-bg-1",
- "plain-warning": "text-color-warning bg-color-bg-1",
- "plain-error": "text-color-error bg-color-bg-1",
- "plain-default": "text-color-info-primary bg-color-bg-1",
- "plain-info": "text-color-text-primary bg-color-bg-1",
- "plain-pink": "text-color-chart-17 bg-color-bg-1",
- "plain-purple": "text-color-chart-11 bg-color-bg-1",
- "plain-cyan": "text-color-chart-2 bg-color-bg-1",
- "success-border": "border-color-success-subtle",
- "alerting-border": "border-color-alert-subtle",
- "warning-border": "border-color-warning-subtle",
- "error-border": "border-color-error-subtle",
- "default-border": "border-color-info-primary-subtle",
- "info-border": "border-color-none",
- "pink-border": "border-color-chart-17-subtle",
- "purple-border": "border-color-chart-11-subtle",
- "cyan-border": "border-color-chart-2-subtle",
- "fill-dark": "fill-color-bg-6 hover:fill-color-icon-inverse",
- "fill-light-success": "fill-color-success-subtle hover:fill-color-success",
- "fill-light-alerting": "fill-color-alert-subtle hover:fill-color-alert",
- "fill-light-warning": "fill-color-warning-subtle hover:fill-color-warning",
- "fill-light-error": "fill-color-error-subtle hover:fill-color-error",
- "fill-light-default": "fill-color-info-primary-subtle hover:fill-color-info-primary",
- "fill-light-info": "fill-color-none hover:fill-color-none",
- "fill-light-pink": "fill-color-chart-17-subtle hover:fill-color-chart-17",
- "fill-light-purple": "fill-color-chart-11-subtle hover:fill-color-chart-11",
- "fill-light-cyan": "fill-color-chart-2-subtle hover:fill-color-chart-2",
- "selectable-unselect": "h-9 sm:h-7 text-color-text-primary bg-color-bg-4 cursor-pointer hover:bg-color-fill-1",
- "selectable-selected": "h-9 sm:h-7 text-color-brand border-current bg-color-info-primary-subtler cursor-pointer hover:text-color-brand-hover",
- "tag-disabled": "h-9 sm:h-7 text-color-text-disabled bg-color-bg-4 border-transparent cursor-not-allowed hover:text-color-text-disabled hover:bg-color-bg-4",
- "tag-operable": "h-7 sm:h-6 cursor-pointer",
- "medium": "h-7 px-3",
- "small": "h-6 px-2",
- "mini": "h-5 px-1"
-};
-var _sfc_main$i = /* @__PURE__ */ defineComponent({
- components: {
- IconClose: index$N()
- },
- emits: ["click", "close"],
- props: [].concat(props, ["text", "closable", "operable", "selectable", "type", "theme", "hit", "disabled", "color", "size", "effect", "customClass", "value"]),
- setup: function setup8(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$6,
- api: api$6,
- h,
- classes: classes$3
- });
- },
- render: function render5() {
- var slots = this.slots, selectable = this.selectable, disabled = this.disabled, color = this.color, handleClose2 = this.handleClose, handleClick3 = this.handleClick, customClass = this.customClass, hit = this.hit, m = this.m, gcls = this.gcls, state = this.state, value = this.value;
- var size = selectable ? "medium" : this.size || "small";
- var type = selectable ? "info" : state.type || "info";
- var effect = selectable ? "light" : this.effect || "light";
- var closable = selectable ? false : this.closable;
- var operable = selectable ? false : this.operable;
- var classes2 = m("text-xs inline-flex items-center rounded box-border border-0.5 sm:border mr-2", effect === "plain" || hit ? gcls(type + "-border") : "border-transparent", gcls(effect + "-" + type), gcls(size), {
- hidden: !state.show
- }, selectable ? state.selected ? gcls("selectable-selected") : gcls("selectable-unselect") : "", selectable && disabled ? gcls("tag-disabled") : "", operable ? gcls("tag-operable") : "", customClass);
- var tagElement = value || slots.default && slots.default() ? createVNode("span", {
- "data-tag": "tiny-tag",
- "class": classes2,
- "style": {
- backgroundColor: color
- },
- "onClick": handleClick3
- }, [value ? createVNode("span", null, [value]) : slots.default && slots.default(), closable && createVNode(resolveComponent("icon-close"), {
- "class": ["w-3 h-3 ml-1 cursor-pointer", effect === "dark" ? gcls("fill-dark") : gcls("fill-light-" + type)],
- "onClick": handleClose2
- }, null)]) : createVNode("span", null, null);
- return tagElement;
- }
-});
-const index$8 = "";
-function _extends$a() {
- _extends$a = Object.assign ? Object.assign.bind() : function(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
- return target;
- };
- return _extends$a.apply(this, arguments);
-}
-var template$6 = function template25(mode) {
- var _process$env;
- var tinyMode = typeof process === "object" ? (_process$env = {}) == null ? void 0 : _process$env.TINY_MODE : null;
- if ("pc" === (tinyMode || mode)) {
- return _sfc_main$k;
- }
- if ("mobile" === (tinyMode || mode)) {
- return mobile$2;
- }
- if ("mobile-first" === (tinyMode || mode)) {
- return _sfc_main$i;
- }
- return _sfc_main$k;
-};
-var tagProps = _extends$a({}, $props, {
- hit: Boolean,
- text: String,
- type: String,
- theme: String,
- size: String,
- color: {
- type: [String, Array],
- default: ""
- },
- closable: Boolean,
- operable: Boolean,
- disabled: Boolean,
- selectable: Boolean,
- customClass: {
- type: String,
- default: ""
- },
- effect: {
- type: String,
- default: "light",
- validator: function validator(value) {
- return Boolean(~["dark", "light", "plain"].indexOf(value));
- }
- },
- beforeDelete: Function,
- value: [Number, String],
- // mobile
- mini: {
- type: Boolean,
- default: false
- },
- maxWidth: {
- type: [String, Number],
- default: null
- }
-});
-var Tag = defineComponent({
- name: $prefix + "Tag",
- props: tagProps,
- setup: function setup9(props2, context) {
- return $setup({
- props: props2,
- context,
- template: template$6
- });
- }
-});
-var version$7 = "3.16.0";
-Tag.install = function(Vue) {
- Vue.component(Tag.name, Tag);
-};
-Tag.version = version$7;
-const index$7 = "";
-const _storeMap$1 = {};
-const storeMap = {
- mixin(map2) {
- Object.assign(_storeMap$1, map2);
- return storeMap;
- },
- get(type) {
- return _storeMap$1[type];
- },
- add(type, callback) {
- _storeMap$1[type] = callback;
- return storeMap;
- },
- delete(type) {
- delete _storeMap$1[type];
- return storeMap;
- }
-};
-var storeMap_default = storeMap;
-const toType = (type) => toString_default(type).replace("_", "").toLowerCase();
-const eventTypes = [
- "created",
- "mounted",
- "activated",
- "beforeDestroy",
- "destroyed",
- "event.clearActived",
- "event.clearFilter",
- "event.showMenu",
- "event.keydown"
-].map(toType);
-const _storeMap = {};
-const Interceptor = {
- mixin(map2) {
- each_default(map2, (callback, type) => Interceptor.add(type, callback));
- return Interceptor;
- },
- get(type) {
- return _storeMap[toType(type)] || [];
- },
- add(type, callback) {
- const selfType = toType(type);
- if (callback && ~eventTypes.indexOf(selfType)) {
- _storeMap[selfType] = _storeMap[selfType] ? _storeMap[selfType] : [];
- _storeMap[selfType].push(callback);
- }
- return Interceptor;
- },
- delete(type, callback) {
- const eList = _storeMap[toType(type)];
- if (eList) {
- remove_default(eList, (cb) => cb === callback);
- }
- return Interceptor;
- }
-};
-var interceptor_default = Interceptor;
-const wheelName = browser_default.isDoc && /Firefox/i.test(navigator.userAgent) ? "DOMMouseScroll" : "mousewheel";
-const eventStore$1 = [];
-const GlobalEvent = {
- on(comp, type, cb) {
- if (cb) {
- eventStore$1.push({ comp, type, cb });
- }
- },
- off(comp, type) {
- remove_default(eventStore$1, (item) => item.comp === comp && item.type === type);
- },
- trigger(event) {
- eventStore$1.forEach(({ comp, type, cb }) => {
- if (type === event.type || type === "mousewheel" && event.type === wheelName) {
- cb.call(comp, event);
- }
- });
- }
-};
-if (browser_default.isDoc) {
- on(document, "keydown", GlobalEvent.trigger);
- on(document, "contextmenu", GlobalEvent.trigger);
- on(window, "mousedown", GlobalEvent.trigger);
- on(window, "blur", GlobalEvent.trigger);
- on(window, "resize", GlobalEvent.trigger);
- on(window, wheelName, GlobalEvent.trigger);
-}
-var event_default = GlobalEvent;
-const getFuncText = (content) => isFunction_default(content) ? content() : content;
-const getRowkey = ($table) => $table.rowId;
-const getRowid = ($table, row3) => {
- const rowId = get_default(row3, getRowkey($table));
- return rowId ? encodeURIComponent(rowId) : "";
-};
-const getColumnList = (columns2) => {
- const result = [];
- columns2.forEach((column) => {
- if (column.children && column.children.length) {
- result.push(...getColumnList(column.children));
- } else {
- result.push(column);
- }
- });
- return result;
-};
-const getClass = (property2, params) => property2 ? isFunction_default(property2) ? property2(params) : property2 : "";
-const getFilters = (filters) => (filters || []).map(({ label, value, data: data8, checked }) => ({
- label,
- value,
- data: data8,
- _data: data8,
- checked: !!checked
-}));
-const initFilter = (filter2) => {
- return __spreadValues({
- condition: {
- input: "",
- relation: "equals",
- empty: null,
- type: null,
- value: []
- },
- hasFilter: false,
- custom: null
- }, filter2);
-};
-const formatText = (value) => `${isNull$1(value) ? "" : value}`;
-const setCellValue = (row3, column, value) => {
- const { format: format2, property: property2 } = column;
- if (format2 && format2.async && Array.isArray(format2.data) && format2.data.length > 0 && value) {
- let labelText = "";
- const { enabled, valueSplit, textSplit } = format2.async.splitConfig || {};
- const findCellValue = (optionValue) => find$1(format2.data, (col) => {
- if (typeof col === "object") {
- const colLabel = get_default(col, format2.async.text || "label");
- const colValue = get_default(col, format2.async.value || "value");
- col.label = colLabel;
- return optionValue === colValue || optionValue === colLabel;
- }
- return optionValue === col;
- });
- if (enabled) {
- const labelTexts = [];
- value.split(valueSplit || ",").forEach((item) => {
- const findValue = findCellValue(item);
- if (findValue) {
- labelTexts.push(findValue.label);
- }
- });
- labelText = labelTexts.join(textSplit || ",");
- } else {
- labelText = findCellValue(value);
- }
- set_default(row3, column.asyncPrefix + property2, labelText ? labelText.label : labelText);
- }
- set_default(row3, property2, value);
-};
-const hasChildrenList = (item) => item && item.children && item.children.length > 0;
-const destroyColumn = ($table, { columnConfig }) => {
- const matchObj = findTree_default($table.collectColumn, (column) => column === columnConfig);
- if (matchObj) {
- matchObj.items.splice(matchObj.index, 1);
- }
- $table.collectColumn = $table.collectColumn.slice(0);
-};
-const emitEvent$1 = (vm, type, args) => {
- if (vm.tableListeners[type]) {
- const params = [].concat(args);
- vm.$emit(type, ...params);
- }
-};
-const assemColumn = ($table, $column, instance) => {
- const { columnConfig, $el: elm, slots, $parent } = instance;
- const { collectColumn: collectColumn2 } = $table;
- columnConfig.slots = slots;
- const parentNode = elm.parentNode;
- const insertIndex = [].indexOf.call(parentNode.children, elm);
- if (!$column || $column !== $parent) {
- collectColumn2.splice(insertIndex, 0, columnConfig);
- } else {
- const parentConfig = $column.columnConfig;
- if (!parentConfig.children) {
- parentConfig.children = [];
- }
- parentConfig.children.splice(insertIndex, 0, columnConfig);
- }
- $table.collectColumn = collectColumn2.slice(0);
-};
-const getCellValue = (row3, column) => {
- const { field, prop } = column.own;
- const property2 = field || prop;
- return get_default(row3, property2);
-};
-const getListeners = ($attrs, $listeners) => {
- const regHyphenate = /\B([A-Z])/g;
- const regEventPrefix = /^on[A-Z]/;
- const listeners = {};
- if ($listeners) {
- return $listeners;
- }
- Object.keys($attrs).forEach((name) => {
- const event = $attrs[name];
- if (regEventPrefix.test(name) && typeof event === "function") {
- listeners[name.slice(2).replace(regHyphenate, "-$1").toLowerCase()] = event;
- }
- });
- return listeners;
-};
-let columnUniqueId = 0;
-function setBasicProperty(column, context) {
- column.id = `col_${++columnUniqueId}`;
- column.type = context.type;
- column.prop = context.prop;
- column.rules = context.rules;
- column.required = context.required;
- column.property = context.field || context.prop;
- column.title = context.title;
- column.label = context.label;
- column.width = context.width;
- column.minWidth = context.minWidth;
- column.resizable = context.resizable;
- column.fixed = context.fixed;
- column.align = context.align;
- column.headerAlign = context.headerAlign;
- column.footerAlign = context.footerAlign;
- column.showOverflow = context.showOverflow;
- column.showHeaderOverflow = context.showHeaderOverflow;
- column.showTip = context.showTip;
- column.showHeaderTip = context.showHeaderTip;
- column.className = context.class || context.className;
- column.headerClassName = context.headerClassName;
- column.footerClassName = context.footerClassName;
- column.indexMethod = context.indexMethod;
- column.formatText = context.formatText;
- column.formatValue = context.formatValue;
- column.format = context.formatConfig;
- column.sortable = context.sortable;
- column.sortBy = context.sortBy;
- column.sortMethod = context.sortMethod;
- column.remoteSort = context.remoteSort;
- column.filterMultiple = isBoolean_default(context.filterMultiple) ? context.filterMultiple : true;
- column.filterMethod = context.filterMethod;
- column.filterRender = context.filterRender;
- column.filter = context.filter && initFilter(context.filter);
- column.treeNode = context.treeNode;
- column.renderer = context.renderer;
- column.editor = context.editor;
- column.operationConfig = context.operationConfig;
- column.equals = context.equals;
-}
-function ColumnConfig(context, { renderHeader: renderHeader2, renderCell: renderCell2, renderData } = {}, config2 = {}) {
- setBasicProperty(this, context);
- this.params = context.params;
- this.visible = true;
- this.level = 1;
- this.rowSpan = 1;
- this.colSpan = 1;
- this.order = null;
- this.renderWidth = 0;
- this.renderHeight = 0;
- this.resizeWidth = 0;
- this.renderLeft = 0;
- this.model = {};
- this.renderHeader = renderHeader2 || context.renderHeader;
- this.renderCell = renderCell2 || context.renderCell;
- this.renderData = renderData;
- this.showIcon = isBoolean_default(context.showIcon) ? context.showIcon : true;
- this.loading = false;
- this.slots = context.slots;
- this.own = context;
- this.asyncPrefix = config2.constant.asyncPrefix;
-}
-const getColumnConfig = (context, options, config2) => context instanceof ColumnConfig ? context : new ColumnConfig(context, options, config2);
-const emitEvent = (emit, name, ...args) => {
- let cancel = false;
- if (typeof emit === "function" && typeof name === "string") {
- const event = document.createEvent("HTMLEvents");
- event.initEvent(name, false, true);
- event.preventDefault = () => {
- cancel = true;
- };
- args.unshift(event);
- args.unshift(name);
- emit.apply(null, args);
- }
- return !cancel;
-};
-const getActualTarget = (e) => {
- if (!e || !e.target) {
- return null;
- }
- return e.target.shadowRoot && e.composed ? e.composedPath()[0] || e.target : e.target;
-};
-const ATTR_NAME = "data-rowid";
-const CELL_CLS = ".tiny-grid-cell";
-const ROW_CLS = ".tiny-grid-body__row";
-const isPx = (val) => val && /^\d+(px)?$/.test(val);
-const isScale = (val) => val && /^\d+%$/.test(val);
-const updateCellTitle = (event) => {
- const cellEl = event.currentTarget.querySelector(CELL_CLS);
- const content = cellEl.innerText;
- if (cellEl.getAttribute("title") !== content) {
- cellEl.setAttribute("title", content);
- }
-};
-const rowToVisible = ($table, row3) => {
- $table.$nextTick(() => {
- const tableBodyVnode = $table.$refs.tableBody;
- if (tableBodyVnode) {
- const gridbodyEl = tableBodyVnode.$el;
- const trEl = gridbodyEl.querySelector(`[${ATTR_NAME}="${getRowid($table, row3)}"]`);
- if (trEl) {
- const bodyHeight = gridbodyEl.clientHeight;
- const bodySrcollTop = gridbodyEl.scrollTop;
- const trOffsetTop = trEl.offsetTop + (trEl.offsetParent ? trEl.offsetParent.offsetTop : 0);
- const trHeight = trEl.clientHeight;
- if (trOffsetTop < bodySrcollTop || trOffsetTop > bodySrcollTop + bodyHeight) {
- gridbodyEl.scrollTop = trOffsetTop;
- } else if (trOffsetTop + trHeight >= bodyHeight + bodySrcollTop) {
- gridbodyEl.scrollTop = bodySrcollTop + trHeight;
- }
- } else {
- if ($table.scrollYLoad) {
- gridbodyEl.scrollTop = ($table.afterFullData.indexOf(row3) - 1) * $table.scrollYStore.rowHeight;
- }
- }
- }
- });
-};
-function getFixedLeft($table, from, column, body, offset) {
- let scrollLeft = $table.elemStore["main-body-wrapper"].scrollLeft + offset;
- if (!column.fixed) {
- from.fixed === "left" && (scrollLeft = 0);
- from.fixed === "right" && (scrollLeft = body.scrollWidth);
- }
- return scrollLeft;
-}
-function computeScrollLeft($table, td) {
- const { tableBody } = $table.$refs;
- const { visibleColumn } = $table;
- const { scrollLeft: bodyLeft, clientWidth: bodyWidth } = tableBody.$el;
- let leftWidth = 0;
- let rightWidth = 0;
- visibleColumn.forEach((column) => {
- if (column.fixed === "left") {
- leftWidth += column.renderWidth;
- } else if (column.fixed === "right") {
- rightWidth += column.renderWidth;
- }
- });
- const tdLeft = td._accumulateRenderWidth || td.offsetLeft + (td.offsetParent ? td.offsetParent.offsetLeft : 0);
- const tdWidth = td._renderWidth || td.clientWidth;
- let scrollLeft;
- if (tdLeft < bodyLeft + leftWidth) {
- scrollLeft = tdLeft - leftWidth;
- } else if (tdLeft + tdWidth > bodyLeft + bodyWidth - rightWidth) {
- scrollLeft = tdLeft + tdWidth - bodyWidth + rightWidth;
- } else {
- scrollLeft = bodyLeft;
- }
- return scrollLeft;
-}
-function setBodyLeft(body, td, $table, column, move) {
- const { isLeftArrow, isRightArrow, from } = move || {};
- body.scrollLeft = computeScrollLeft($table, td);
- if (from) {
- const direction = isLeftArrow ? "left" : isRightArrow ? "right" : null;
- const fixedDom = $table.elemStore[`${direction}-body-list`];
- const mainBody = $table.elemStore["main-body-wrapper"];
- const { left, right } = td.getBoundingClientRect();
- let offset = 0;
- if (isLeftArrow && fixedDom) {
- const div = fixedDom.querySelector("td.fixed__column");
- const division = div ? div.getBoundingClientRect().left : fixedDom.getBoundingClientRect().right;
- division > left && (offset = left - division);
- }
- if (isRightArrow && fixedDom) {
- const div = fixedDom.querySelector("td:not(.fixed__column)") || fixedDom;
- const division = div.getBoundingClientRect().left;
- division < right && (offset = right - division);
- }
- mainBody.scrollLeft = getFixedLeft($table, from, column, body, offset);
- }
-}
-const colToVisible = ($table, column, move) => {
- $table.$nextTick(() => {
- const gridbodyEl = $table.$refs.tableBody.$el;
- const tdElem = gridbodyEl.querySelector(`.${column.id}`);
- if (tdElem) {
- setBodyLeft(gridbodyEl, tdElem, $table, column, move);
- } else if ($table.scrollXLoad) {
- const visibleColumn = $table.visibleColumn;
- let scrollLeft = 0;
- for (let index3 = 0; index3 < visibleColumn.length; index3++) {
- if (visibleColumn[index3] === column) {
- break;
- }
- scrollLeft += visibleColumn[index3].renderWidth;
- }
- gridbodyEl.scrollLeft = computeScrollLeft($table, {
- _accumulateRenderWidth: scrollLeft,
- _renderWidth: column.renderWidth
- });
- }
- });
-};
-const hasDataTag = (el, value) => {
- if (!el || !value || !el.getAttribute) {
- return false;
- }
- return (" " + el.getAttribute("data-tag") + " ").includes(" " + value + " ");
-};
-const getEventTargetNode = (event, container, queryCls) => {
- let targetEl;
- let target = getActualTarget(event);
- while (target && target.nodeType && target !== document) {
- if (queryCls && (hasClass(target, queryCls) || hasDataTag(target, queryCls))) {
- targetEl = target;
- } else if (target === container) {
- return {
- flag: queryCls ? !!targetEl : true,
- container,
- targetElem: targetEl
- };
- }
- target = target.parentNode;
- }
- return { flag: false };
-};
-function getNodeOffset(el, container, rest) {
- if (el) {
- const htmlEl = document.querySelector("html");
- const bodyEl = document.body;
- const parentEl = el.parentNode;
- rest.top += el.offsetTop;
- rest.left += el.offsetLeft;
- if (parentEl && parentEl !== htmlEl && parentEl !== bodyEl) {
- rest.top -= parentEl.scrollTop;
- rest.left -= parentEl.scrollLeft;
- }
- if (container && (el === container || el.offsetParent === container) ? 0 : el.offsetParent) {
- return getNodeOffset(el.offsetParent, container, rest);
- }
- }
- return rest;
-}
-const getOffsetPos = (el, container) => getNodeOffset(el, container, { left: 0, top: 0 });
-const getCellNodeIndex = (cell) => {
- const trEl = cell.parentNode;
- const columnIndex = arrayIndexOf_default(trEl.children, cell);
- const rowIndex = arrayIndexOf_default(trEl.parentNode.children, trEl);
- return { columnIndex, rowIndex };
-};
-const getRowNodes = (trList, cellNode, targetCellNode) => {
- const startColIndex = cellNode.columnIndex;
- const startRowIndex = cellNode.rowIndex;
- const targetColIndex = targetCellNode.columnIndex;
- const targetRowIndex = targetCellNode.rowIndex;
- const rows = [];
- for (let rowIndex = Math.min(startRowIndex, targetRowIndex), rowLen = Math.max(startRowIndex, targetRowIndex); rowIndex <= rowLen; rowIndex++) {
- const cells = [];
- const trEl = trList[rowIndex];
- for (let colIndex = Math.min(startColIndex, targetColIndex), colLen = Math.max(startColIndex, targetColIndex); colIndex <= colLen; colIndex++) {
- cells.push(trEl.children[colIndex]);
- }
- rows.push(cells);
- }
- return rows;
-};
-const getCell = ($table, { row: row3, column }) => new Promise((resolve) => {
- $table.$nextTick(() => {
- const bodyElem = $table.$refs[`${column.fixed || "table"}Body`];
- resolve(
- (bodyElem || $table.$refs.tableBody).$el.querySelector(
- `${ROW_CLS}[${ATTR_NAME}="${getRowid($table, row3)}"] .${column.id}`
- )
- );
- });
-});
-const AfterLave = "after-leave";
-const Speed = 300;
-var after_leave_default = (instance, callback, speed = Speed, once = false) => {
- if (!instance || !callback) {
- throw new Error("instance & callback is required");
- }
- let called = false;
- const eventCallback = function() {
- if (called) {
- return;
- }
- called = true;
- if (typeof callback === "function") {
- callback.apply(null, arguments);
- }
- };
- if (once) {
- instance.$once(AfterLave, eventCallback);
- } else {
- instance.$on(AfterLave, eventCallback);
- }
- setTimeout(eventCallback, speed + 100);
-};
-const handleAfterLeave = (emit) => () => {
- emit("after-leave");
-};
-const setText = (state) => (text) => {
- state.text = text;
-};
-const close = ({ state, constants: constants2, vm }) => () => {
- after_leave_default(
- vm,
- () => {
- const target = state.fullscreen || state.body ? document.body : state.target;
- if (vm.$el && vm.$el.parentNode) {
- removeClass(target, constants2.PARENT_RELATIVE_CLS);
- removeClass(target, constants2.PARENT_HIDDEN_CLS);
- vm.$el.parentNode.removeChild(vm.$el);
- }
- state.closed = true;
- },
- 300
- );
- state.visible = false;
-};
-const api$5 = ["state", "handleAfterLeave", "setText", "close"];
-const renderless$5 = (props2, { reactive: reactive2, computed }, { constants: constants2, vm, emit, designConfig }) => {
- const state = reactive2({
- text: null,
- spinner: null,
- visible: false,
- customClass: "",
- background: null,
- fullscreen: true,
- closed: false,
- size: "",
- iconSize: "",
- loadingImg: computed(() => {
- var _a;
- return props2.loadingImg || ((_a = designConfig == null ? void 0 : designConfig.props) == null ? void 0 : _a.loadingImg);
- }),
- iconStyle: computed(() => state.iconSize ? { width: state.iconSize + "px", height: state.iconSize + "px" } : {})
- });
- const api2 = {
- state,
- setText: setText(state),
- handleAfterLeave: handleAfterLeave(emit),
- close: close({ state, constants: constants2, vm })
- };
- return api2;
-};
-const index$6 = "";
-function _createForOfIteratorHelperLoose$a(o, allowArrayLike) {
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
- if (it)
- return (it = it.call(o)).next.bind(it);
- if (Array.isArray(o) || (it = _unsupportedIterableToArray$a(o)) || allowArrayLike && o && typeof o.length === "number") {
- if (it)
- o = it;
- var i = 0;
- return function() {
- if (i >= o.length)
- return { done: true };
- return { done: false, value: o[i++] };
- };
- }
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
-}
-function _unsupportedIterableToArray$a(o, minLen) {
- if (!o)
- return;
- if (typeof o === "string")
- return _arrayLikeToArray$a(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor)
- n = o.constructor.name;
- if (n === "Map" || n === "Set")
- return Array.from(o);
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
- return _arrayLikeToArray$a(o, minLen);
-}
-function _arrayLikeToArray$a(arr, len) {
- if (len == null || len > arr.length)
- len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++)
- arr2[i] = arr[i];
- return arr2;
-}
-var _export_sfc$a = function _export_sfc210(sfc, props2) {
- var target = sfc.__vccOpts || sfc;
- for (var _iterator = _createForOfIteratorHelperLoose$a(props2), _step; !(_step = _iterator()).done; ) {
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
- target[key] = val;
- }
- return target;
-};
-var _sfc_main$h = defineComponent({
- inheritAttrs: false,
- name: $prefix + "Loading",
- emits: ["after-leave"],
- props: [].concat(props, ["_constants", "loadingImg", "size"]),
- setup: function setup$1$110(props2, context) {
- return setup$1({
- props: props2,
- context,
- renderless: renderless$5,
- api: api$5
- });
- }
-});
-var _hoisted_1$8 = ["src"];
-var _hoisted_2$6 = {
- key: 2,
- class: "circular",
- viewBox: "25 25 50 50"
... 73026 lines suppressed ...