Browse Source

auto upgrade version to 2.0.20210106165154

es6
data 4 years ago
parent
commit
e7cad984e9
  1. 2
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 93
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 93
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 93
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 93
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 10
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 2
      dist/font.css
  28. 2
      dist/resource.css
  29. 2
      dist/utils.js
  30. 2
      dist/utils.min.js
  31. 2
      package.json

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

93
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -43635,11 +43635,17 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_getLevel: function () {
var child = BI.first(this.options.childValues);
return BI.isNotNull(child) ? (child + "").split("_").length : 0;
},
_digest: function (v) { _digest: function (v) {
var self = this, o = this.options; var self = this, o = this.options;
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
var level = this._getLevel();
return BI.any(v, function (idx, value) { return BI.any(v, function (idx, value) {
return BI.contains(o.childValues, value); return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_"));
}); });
}, },
@ -74560,18 +74566,30 @@ BI.prepares.push(function () {
return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top; return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { _getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
} }
return left;
},
getLeftAlignPosition: function (combo, popup, extraWidth) {
var left = this._getLeftAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用RightAlign, 如果RightAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getRightAlignPosition(combo, popup, extraWidth);
dir = "left";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "right"
}; };
}, },
@ -74584,14 +74602,25 @@ BI.prepares.push(function () {
}; };
}, },
getRightAlignPosition: function (combo, popup, extraWidth) { _getRightAlignPosition: function (combo, popup, extraWidth) {
var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds(); var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();
var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth; return combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;
},
getRightAlignPosition: function (combo, popup, extraWidth) {
var left = this._getRightAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用LeftAlign, 如果LeftAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getLeftAlignPosition(combo, popup, extraWidth);
dir = "right";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "left"
}; };
}, },
@ -74608,12 +74637,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
adaptHeight = windowBounds.height - top; adaptHeight = windowBounds.height - top;
} else if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 下方空间不足且不允许调整高度的情况下,优先使用上对齐
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
dir = "top";
} else { } else {
top = windowBounds.height - popupBounds.height; top = windowBounds.height - popupBounds.height;
if (top < extraHeight) { if (top < extraHeight) {
@ -74625,9 +74658,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "bottom"
} : { } : {
top: top top: top,
dir: dir || "bottom"
}; };
}, },
@ -74658,12 +74693,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight; top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = 0; top = 0;
adaptHeight = comboOffset.top + comboBounds.height - extraHeight; adaptHeight = comboOffset.top + comboBounds.height - extraHeight;
} else if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 上方空间不足且不允许调整高度的情况下,优先使用下对齐
top = comboOffset.top + extraHeight;
dir = "bottom";
} else { } else {
top = 0; top = 0;
if (popupBounds.height + extraHeight > windowBounds.height) { if (popupBounds.height + extraHeight > windowBounds.height) {
@ -74675,9 +74714,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "top"
} : { } : {
top: top top: top,
dir: dir || "top"
}; };
}, },
@ -74781,11 +74822,10 @@ BI.prepares.push(function () {
left = BI.DOM.getLeftPosition(combo, popup, tW).left; left = BI.DOM.getLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,top";
} }
pos.dir = "left," + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "left"; pos.change = "left";
} }
@ -74802,11 +74842,10 @@ BI.prepares.push(function () {
left = BI.DOM.getRightPosition(combo, popup, tW).left; left = BI.DOM.getRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,top";
} }
pos.dir = "right" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "right"; pos.change = "right";
} }
@ -74822,11 +74861,10 @@ BI.prepares.push(function () {
top = BI.DOM.getTopPosition(combo, popup, tH).top; top = BI.DOM.getTopPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "top,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "top,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "top"; pos.change = "top";
} }
@ -74844,11 +74882,10 @@ BI.prepares.push(function () {
top = BI.DOM.getBottomPosition(combo, popup, tH).top; top = BI.DOM.getBottomPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "bottom,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "bottom,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "bottom"; pos.change = "bottom";
} }
@ -74867,11 +74904,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left; left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerLeft"; pos.change = "innerLeft";
} }
@ -74888,11 +74924,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left; left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerRight"; pos.change = "innerRight";
} }
@ -74920,12 +74955,12 @@ BI.prepares.push(function () {
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",bottom"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",top"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
default : default :
if (BI.DOM.isBottomSpaceLarger(combo)) { if (BI.DOM.isBottomSpaceLarger(combo)) {
@ -74938,12 +74973,12 @@ BI.prepares.push(function () {
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",right"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",left"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
}, },

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

93
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -43635,11 +43635,17 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_getLevel: function () {
var child = BI.first(this.options.childValues);
return BI.isNotNull(child) ? (child + "").split("_").length : 0;
},
_digest: function (v) { _digest: function (v) {
var self = this, o = this.options; var self = this, o = this.options;
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
var level = this._getLevel();
return BI.any(v, function (idx, value) { return BI.any(v, function (idx, value) {
return BI.contains(o.childValues, value); return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_"));
}); });
}, },
@ -74560,18 +74566,30 @@ BI.prepares.push(function () {
return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top; return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { _getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
} }
return left;
},
getLeftAlignPosition: function (combo, popup, extraWidth) {
var left = this._getLeftAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用RightAlign, 如果RightAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getRightAlignPosition(combo, popup, extraWidth);
dir = "left";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "right"
}; };
}, },
@ -74584,14 +74602,25 @@ BI.prepares.push(function () {
}; };
}, },
getRightAlignPosition: function (combo, popup, extraWidth) { _getRightAlignPosition: function (combo, popup, extraWidth) {
var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds(); var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();
var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth; return combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;
},
getRightAlignPosition: function (combo, popup, extraWidth) {
var left = this._getRightAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用LeftAlign, 如果LeftAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getLeftAlignPosition(combo, popup, extraWidth);
dir = "right";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "left"
}; };
}, },
@ -74608,12 +74637,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
adaptHeight = windowBounds.height - top; adaptHeight = windowBounds.height - top;
} else if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 下方空间不足且不允许调整高度的情况下,优先使用上对齐
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
dir = "top";
} else { } else {
top = windowBounds.height - popupBounds.height; top = windowBounds.height - popupBounds.height;
if (top < extraHeight) { if (top < extraHeight) {
@ -74625,9 +74658,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "bottom"
} : { } : {
top: top top: top,
dir: dir || "bottom"
}; };
}, },
@ -74658,12 +74693,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight; top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = 0; top = 0;
adaptHeight = comboOffset.top + comboBounds.height - extraHeight; adaptHeight = comboOffset.top + comboBounds.height - extraHeight;
} else if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 上方空间不足且不允许调整高度的情况下,优先使用下对齐
top = comboOffset.top + extraHeight;
dir = "bottom";
} else { } else {
top = 0; top = 0;
if (popupBounds.height + extraHeight > windowBounds.height) { if (popupBounds.height + extraHeight > windowBounds.height) {
@ -74675,9 +74714,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "top"
} : { } : {
top: top top: top,
dir: dir || "top"
}; };
}, },
@ -74781,11 +74822,10 @@ BI.prepares.push(function () {
left = BI.DOM.getLeftPosition(combo, popup, tW).left; left = BI.DOM.getLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,top";
} }
pos.dir = "left," + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "left"; pos.change = "left";
} }
@ -74802,11 +74842,10 @@ BI.prepares.push(function () {
left = BI.DOM.getRightPosition(combo, popup, tW).left; left = BI.DOM.getRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,top";
} }
pos.dir = "right" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "right"; pos.change = "right";
} }
@ -74822,11 +74861,10 @@ BI.prepares.push(function () {
top = BI.DOM.getTopPosition(combo, popup, tH).top; top = BI.DOM.getTopPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "top,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "top,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "top"; pos.change = "top";
} }
@ -74844,11 +74882,10 @@ BI.prepares.push(function () {
top = BI.DOM.getBottomPosition(combo, popup, tH).top; top = BI.DOM.getBottomPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "bottom,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "bottom,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "bottom"; pos.change = "bottom";
} }
@ -74867,11 +74904,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left; left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerLeft"; pos.change = "innerLeft";
} }
@ -74888,11 +74924,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left; left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerRight"; pos.change = "innerRight";
} }
@ -74920,12 +74955,12 @@ BI.prepares.push(function () {
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",bottom"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",top"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
default : default :
if (BI.DOM.isBottomSpaceLarger(combo)) { if (BI.DOM.isBottomSpaceLarger(combo)) {
@ -74938,12 +74973,12 @@ BI.prepares.push(function () {
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",right"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",left"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
}, },

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

93
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -43635,11 +43635,17 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_getLevel: function () {
var child = BI.first(this.options.childValues);
return BI.isNotNull(child) ? (child + "").split("_").length : 0;
},
_digest: function (v) { _digest: function (v) {
var self = this, o = this.options; var self = this, o = this.options;
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
var level = this._getLevel();
return BI.any(v, function (idx, value) { return BI.any(v, function (idx, value) {
return BI.contains(o.childValues, value); return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_"));
}); });
}, },
@ -74560,18 +74566,30 @@ BI.prepares.push(function () {
return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top; return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { _getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
} }
return left;
},
getLeftAlignPosition: function (combo, popup, extraWidth) {
var left = this._getLeftAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用RightAlign, 如果RightAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getRightAlignPosition(combo, popup, extraWidth);
dir = "left";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "right"
}; };
}, },
@ -74584,14 +74602,25 @@ BI.prepares.push(function () {
}; };
}, },
getRightAlignPosition: function (combo, popup, extraWidth) { _getRightAlignPosition: function (combo, popup, extraWidth) {
var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds(); var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();
var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth; return combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;
},
getRightAlignPosition: function (combo, popup, extraWidth) {
var left = this._getRightAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用LeftAlign, 如果LeftAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getLeftAlignPosition(combo, popup, extraWidth);
dir = "right";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "left"
}; };
}, },
@ -74608,12 +74637,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
adaptHeight = windowBounds.height - top; adaptHeight = windowBounds.height - top;
} else if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 下方空间不足且不允许调整高度的情况下,优先使用上对齐
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
dir = "top";
} else { } else {
top = windowBounds.height - popupBounds.height; top = windowBounds.height - popupBounds.height;
if (top < extraHeight) { if (top < extraHeight) {
@ -74625,9 +74658,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "bottom"
} : { } : {
top: top top: top,
dir: dir || "bottom"
}; };
}, },
@ -74658,12 +74693,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight; top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = 0; top = 0;
adaptHeight = comboOffset.top + comboBounds.height - extraHeight; adaptHeight = comboOffset.top + comboBounds.height - extraHeight;
} else if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 上方空间不足且不允许调整高度的情况下,优先使用下对齐
top = comboOffset.top + extraHeight;
dir = "bottom";
} else { } else {
top = 0; top = 0;
if (popupBounds.height + extraHeight > windowBounds.height) { if (popupBounds.height + extraHeight > windowBounds.height) {
@ -74675,9 +74714,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "top"
} : { } : {
top: top top: top,
dir: dir || "top"
}; };
}, },
@ -74781,11 +74822,10 @@ BI.prepares.push(function () {
left = BI.DOM.getLeftPosition(combo, popup, tW).left; left = BI.DOM.getLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,top";
} }
pos.dir = "left," + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "left"; pos.change = "left";
} }
@ -74802,11 +74842,10 @@ BI.prepares.push(function () {
left = BI.DOM.getRightPosition(combo, popup, tW).left; left = BI.DOM.getRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,top";
} }
pos.dir = "right" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "right"; pos.change = "right";
} }
@ -74822,11 +74861,10 @@ BI.prepares.push(function () {
top = BI.DOM.getTopPosition(combo, popup, tH).top; top = BI.DOM.getTopPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "top,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "top,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "top"; pos.change = "top";
} }
@ -74844,11 +74882,10 @@ BI.prepares.push(function () {
top = BI.DOM.getBottomPosition(combo, popup, tH).top; top = BI.DOM.getBottomPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "bottom,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "bottom,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "bottom"; pos.change = "bottom";
} }
@ -74867,11 +74904,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left; left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerLeft"; pos.change = "innerLeft";
} }
@ -74888,11 +74924,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left; left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerRight"; pos.change = "innerRight";
} }
@ -74920,12 +74955,12 @@ BI.prepares.push(function () {
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",bottom"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",top"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
default : default :
if (BI.DOM.isBottomSpaceLarger(combo)) { if (BI.DOM.isBottomSpaceLarger(combo)) {
@ -74938,12 +74973,12 @@ BI.prepares.push(function () {
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",right"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",left"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
}, },

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

93
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -43635,11 +43635,17 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_getLevel: function () {
var child = BI.first(this.options.childValues);
return BI.isNotNull(child) ? (child + "").split("_").length : 0;
},
_digest: function (v) { _digest: function (v) {
var self = this, o = this.options; var self = this, o = this.options;
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
var level = this._getLevel();
return BI.any(v, function (idx, value) { return BI.any(v, function (idx, value) {
return BI.contains(o.childValues, value); return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_"));
}); });
}, },
@ -74560,18 +74566,30 @@ BI.prepares.push(function () {
return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top; return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;
}, },
getLeftAlignPosition: function (combo, popup, extraWidth) { _getLeftAlignPosition: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(), var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var left = combo.element.offset().left + extraWidth; var left = combo.element.offset().left + extraWidth;
if (left + viewBounds.width > windowBounds.width) { if (left + viewBounds.width > windowBounds.width) {
left = windowBounds.width - viewBounds.width; left = windowBounds.width - viewBounds.width;
} }
return left;
},
getLeftAlignPosition: function (combo, popup, extraWidth) {
var left = this._getLeftAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用RightAlign, 如果RightAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getRightAlignPosition(combo, popup, extraWidth);
dir = "left";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "right"
}; };
}, },
@ -74584,14 +74602,25 @@ BI.prepares.push(function () {
}; };
}, },
getRightAlignPosition: function (combo, popup, extraWidth) { _getRightAlignPosition: function (combo, popup, extraWidth) {
var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds(); var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();
var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth; return combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;
},
getRightAlignPosition: function (combo, popup, extraWidth) {
var left = this._getRightAlignPosition(combo, popup, extraWidth);
var dir = "";
// 如果放不下,优先使用LeftAlign, 如果LeftAlign也放不下, 再使用left=0
if (left < 0) {
left = this._getLeftAlignPosition(combo, popup, extraWidth);
dir = "right";
}
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return { return {
left: left left: left,
dir: dir || "left"
}; };
}, },
@ -74608,12 +74637,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = comboOffset.top + extraHeight; top = comboOffset.top + extraHeight;
adaptHeight = windowBounds.height - top; adaptHeight = windowBounds.height - top;
} else if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 下方空间不足且不允许调整高度的情况下,优先使用上对齐
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
dir = "top";
} else { } else {
top = windowBounds.height - popupBounds.height; top = windowBounds.height - popupBounds.height;
if (top < extraHeight) { if (top < extraHeight) {
@ -74625,9 +74658,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "bottom"
} : { } : {
top: top top: top,
dir: dir || "bottom"
}; };
}, },
@ -74658,12 +74693,16 @@ BI.prepares.push(function () {
var comboOffset = combo.element.offset(); var comboOffset = combo.element.offset();
var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(), var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds(); windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
var top, adaptHeight; var top, adaptHeight, dir;
if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) { if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight; top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;
} else if (needAdaptHeight) { } else if (needAdaptHeight) {
top = 0; top = 0;
adaptHeight = comboOffset.top + comboBounds.height - extraHeight; adaptHeight = comboOffset.top + comboBounds.height - extraHeight;
} else if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {
// 上方空间不足且不允许调整高度的情况下,优先使用下对齐
top = comboOffset.top + extraHeight;
dir = "bottom";
} else { } else {
top = 0; top = 0;
if (popupBounds.height + extraHeight > windowBounds.height) { if (popupBounds.height + extraHeight > windowBounds.height) {
@ -74675,9 +74714,11 @@ BI.prepares.push(function () {
} }
return adaptHeight ? { return adaptHeight ? {
top: top, top: top,
adaptHeight: adaptHeight adaptHeight: adaptHeight,
dir: dir || "top"
} : { } : {
top: top top: top,
dir: dir || "top"
}; };
}, },
@ -74781,11 +74822,10 @@ BI.prepares.push(function () {
left = BI.DOM.getLeftPosition(combo, popup, tW).left; left = BI.DOM.getLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "left,top";
} }
pos.dir = "left," + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "left"; pos.change = "left";
} }
@ -74802,11 +74842,10 @@ BI.prepares.push(function () {
left = BI.DOM.getRightPosition(combo, popup, tW).left; left = BI.DOM.getRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "right,top";
} }
pos.dir = "right" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "right"; pos.change = "right";
} }
@ -74822,11 +74861,10 @@ BI.prepares.push(function () {
top = BI.DOM.getTopPosition(combo, popup, tH).top; top = BI.DOM.getTopPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "top,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "top,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "top"; pos.change = "top";
} }
@ -74844,11 +74882,10 @@ BI.prepares.push(function () {
top = BI.DOM.getBottomPosition(combo, popup, tH).top; top = BI.DOM.getBottomPosition(combo, popup, tH).top;
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight); pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);
pos.dir = "bottom,right";
} else { } else {
pos = BI.DOM.getRightAlignPosition(combo, popup, tW); pos = BI.DOM.getRightAlignPosition(combo, popup, tW);
pos.dir = "bottom,left";
} }
pos.dir = "bottom," + pos.dir;
if (lrFirst) { if (lrFirst) {
pos.change = "bottom"; pos.change = "bottom";
} }
@ -74867,11 +74904,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left; left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerLeft"; pos.change = "innerLeft";
} }
@ -74888,11 +74924,10 @@ BI.prepares.push(function () {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left; left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else { } else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
} }
pos.dir = "innerLeft" + pos.dir;
if (tbFirst) { if (tbFirst) {
pos.change = "innerRight"; pos.change = "innerRight";
} }
@ -74920,12 +74955,12 @@ BI.prepares.push(function () {
if (topBottom[0] === "bottom") { if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",bottom"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight); pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);
pos.left = left; pos.left = left;
pos.dir = firstDir + ",top"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
default : default :
if (BI.DOM.isBottomSpaceLarger(combo)) { if (BI.DOM.isBottomSpaceLarger(combo)) {
@ -74938,12 +74973,12 @@ BI.prepares.push(function () {
if (leftRight[0] === "right") { if (leftRight[0] === "right") {
left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left; left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",right"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left; left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;
pos.left = left; pos.left = left;
pos.dir = firstDir + ",left"; pos.dir = firstDir + "," + pos.dir;
return pos; return pos;
} }
}, },

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

10
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -39662,11 +39662,17 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_getLevel: function () {
var child = BI.first(this.options.childValues);
return BI.isNotNull(child) ? (child + "").split("_").length : 0;
},
_digest: function (v) { _digest: function (v) {
var self = this, o = this.options; var self = this, o = this.options;
v = BI.isArray(v) ? v : [v]; v = BI.isArray(v) ? v : [v];
var level = this._getLevel();
return BI.any(v, function (idx, value) { return BI.any(v, function (idx, value) {
return BI.contains(o.childValues, value); return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_"));
}); });
}, },

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-1-6 10:30:23 */ /*! time: 2021-1-6 16:50:23 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20210106103221", "version": "2.0.20210106165154",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

Loading…
Cancel
Save