Browse Source

Merge pull request #1012 in VISUAL/fineui from ~GUY/fineui:master to master

* commit '7d09dc9e4b7001198c9e361838cac6d68888d50e':
  bugfix
es6
guy 6 years ago
parent
commit
b61ce23e6e
  1. 61
      dist/2.0/fineui.css
  2. 72
      dist/2.0/fineui.ie.js
  3. 52
      dist/2.0/fineui.ie.min.js
  4. 72
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 60
      dist/2.0/fineui.min.js
  7. 31
      dist/base.js
  8. 61
      dist/bundle.css
  9. 72
      dist/bundle.ie.js
  10. 52
      dist/bundle.ie.min.js
  11. 72
      dist/bundle.js
  12. 2
      dist/bundle.min.css
  13. 60
      dist/bundle.min.js
  14. 13
      dist/case.js
  15. 15
      dist/core.css
  16. 18
      dist/core.js
  17. 15
      dist/core_without_normalize.css
  18. 61
      dist/fineui.css
  19. 72
      dist/fineui.ie.js
  20. 52
      dist/fineui.ie.min.js
  21. 72
      dist/fineui.js
  22. 2
      dist/fineui.min.css
  23. 58
      dist/fineui.min.js
  24. 59
      dist/fineui_without_jquery_polyfill.js
  25. 2
      dist/resource.css
  26. 5
      dist/utils.js
  27. 2
      dist/utils.min.js
  28. 44
      dist/widget.css
  29. 10
      dist/widget.js
  30. 1483
      package-lock.json
  31. 10
      src/base/single/iframe/iframe.js

61
dist/2.0/fineui.css vendored

@ -500,22 +500,25 @@ textarea {
border-left: 1px solid #292f45;
}
.bi-font-helvetica-neue {
font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "Helvetica Neue", Arial, Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-verdana {
font-family: Verdana, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-arial {
font-family: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: Arial, "Helvetica Neue", Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-PingFang {
font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "PingFang SC", "Helvetica Neue", Verdana, Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-hiragino-sans {
font-family: "Hiragino Sans GB", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
font-family: "Hiragino Sans GB", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
}
.bi-font-microsoft-yaHei {
font-family: "Microsoft YaHei", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
font-family: "Microsoft YaHei", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
}
.bi-font-heiti {
font-family: Heiti, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
font-family: Heiti, "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
}
.bi-border-radius {
-webkit-border-radius: 2px;
@ -4244,9 +4247,53 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view {
min-width: 100%;
}
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view {
min-width: 100%;
}
@ -4600,7 +4647,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
font: normal 12px "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

72
dist/2.0/fineui.ie.js vendored

@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -41413,6 +41423,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -43731,7 +43747,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -43777,7 +43793,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -43945,7 +43962,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -44770,7 +44788,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -44781,6 +44799,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -47427,6 +47448,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -47437,6 +47459,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -47456,14 +47479,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48260,7 +48275,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55283,6 +55298,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55323,6 +55339,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -63556,7 +63584,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68111,7 +68139,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68691,7 +68719,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -69454,7 +69482,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -69665,7 +69693,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

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

File diff suppressed because one or more lines are too long

72
dist/2.0/fineui.js vendored

@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -41817,6 +41827,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -44135,7 +44151,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -44181,7 +44197,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -44349,7 +44366,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -45174,7 +45192,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -45185,6 +45203,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -47831,6 +47852,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -47841,6 +47863,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -47860,14 +47883,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48664,7 +48679,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55687,6 +55702,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55727,6 +55743,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -63960,7 +63988,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68515,7 +68543,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69095,7 +69123,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -69858,7 +69886,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -70069,7 +70097,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

60
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

31
dist/base.js vendored

@ -3585,6 +3585,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -5903,7 +5909,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -5949,7 +5955,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -6117,7 +6124,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -6942,7 +6950,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -6953,6 +6961,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -9599,6 +9610,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -9609,6 +9621,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -9628,14 +9641,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -10432,7 +10437,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})

61
dist/bundle.css vendored

@ -500,22 +500,25 @@ textarea {
border-left: 1px solid #292f45;
}
.bi-font-helvetica-neue {
font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "Helvetica Neue", Arial, Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-verdana {
font-family: Verdana, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-arial {
font-family: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: Arial, "Helvetica Neue", Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-PingFang {
font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "PingFang SC", "Helvetica Neue", Verdana, Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-hiragino-sans {
font-family: "Hiragino Sans GB", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
font-family: "Hiragino Sans GB", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
}
.bi-font-microsoft-yaHei {
font-family: "Microsoft YaHei", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
font-family: "Microsoft YaHei", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
}
.bi-font-heiti {
font-family: Heiti, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
font-family: Heiti, "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
}
.bi-border-radius {
-webkit-border-radius: 2px;
@ -4244,9 +4247,53 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view {
min-width: 100%;
}
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view {
min-width: 100%;
}
@ -4600,7 +4647,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
font: normal 12px "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

72
dist/bundle.ie.js vendored

@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -41413,6 +41423,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -43731,7 +43747,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -43777,7 +43793,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -43945,7 +43962,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -44770,7 +44788,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -44781,6 +44799,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -47427,6 +47448,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -47437,6 +47459,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -47456,14 +47479,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48260,7 +48275,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55283,6 +55298,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55323,6 +55339,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -63556,7 +63584,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68111,7 +68139,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68691,7 +68719,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -69454,7 +69482,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -69665,7 +69693,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

52
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

72
dist/bundle.js vendored

@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -41817,6 +41827,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -44135,7 +44151,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -44181,7 +44197,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -44349,7 +44366,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -45174,7 +45192,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -45185,6 +45203,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -47831,6 +47852,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -47841,6 +47863,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -47860,14 +47883,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48664,7 +48679,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55687,6 +55702,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55727,6 +55743,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -63960,7 +63988,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68515,7 +68543,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69095,7 +69123,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -69858,7 +69886,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -70069,7 +70097,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

60
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/case.js vendored

@ -3341,6 +3341,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -3381,6 +3382,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));

15
dist/core.css vendored

@ -500,22 +500,25 @@ textarea {
border-left: 1px solid #292f45;
}
.bi-font-helvetica-neue {
font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "Helvetica Neue", Arial, Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-verdana {
font-family: Verdana, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-arial {
font-family: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: Arial, "Helvetica Neue", Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-PingFang {
font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "PingFang SC", "Helvetica Neue", Verdana, Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-hiragino-sans {
font-family: "Hiragino Sans GB", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
font-family: "Hiragino Sans GB", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
}
.bi-font-microsoft-yaHei {
font-family: "Microsoft YaHei", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
font-family: "Microsoft YaHei", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
}
.bi-font-heiti {
font-family: Heiti, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
font-family: Heiti, "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
}
.bi-border-radius {
-webkit-border-radius: 2px;

18
dist/core.js vendored

@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}

15
dist/core_without_normalize.css vendored

@ -220,22 +220,25 @@ textarea {
border-left: 1px solid #292f45;
}
.bi-font-helvetica-neue {
font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "Helvetica Neue", Arial, Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-verdana {
font-family: Verdana, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-arial {
font-family: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: Arial, "Helvetica Neue", Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-PingFang {
font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "PingFang SC", "Helvetica Neue", Verdana, Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-hiragino-sans {
font-family: "Hiragino Sans GB", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
font-family: "Hiragino Sans GB", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
}
.bi-font-microsoft-yaHei {
font-family: "Microsoft YaHei", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
font-family: "Microsoft YaHei", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
}
.bi-font-heiti {
font-family: Heiti, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
font-family: Heiti, "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
}
.bi-border-radius {
-webkit-border-radius: 2px;

61
dist/fineui.css vendored

@ -500,22 +500,25 @@ textarea {
border-left: 1px solid #292f45;
}
.bi-font-helvetica-neue {
font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "Helvetica Neue", Arial, Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-verdana {
font-family: Verdana, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-arial {
font-family: Arial, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: Arial, "Helvetica Neue", Verdana, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-PingFang {
font-family: "PingFang SC", "Helvetica Neue", Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
font-family: "PingFang SC", "Helvetica Neue", Verdana, Arial, "Hiragino Sans GB", "Microsoft YaHei", Heiti, serif;
}
.bi-font-hiragino-sans {
font-family: "Hiragino Sans GB", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
font-family: "Hiragino Sans GB", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Microsoft YaHei", Heiti, serif;
}
.bi-font-microsoft-yaHei {
font-family: "Microsoft YaHei", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
font-family: "Microsoft YaHei", "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", Heiti, serif;
}
.bi-font-heiti {
font-family: Heiti, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
font-family: Heiti, "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
}
.bi-border-radius {
-webkit-border-radius: 2px;
@ -4244,9 +4247,53 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view {
min-width: 100%;
}
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view {
min-width: 100%;
}
@ -4600,7 +4647,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
font: normal 12px "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

72
dist/fineui.ie.js vendored

@ -16322,13 +16322,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16336,6 +16338,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17870,7 +17873,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34408,7 +34412,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34543,7 +34550,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -41658,6 +41668,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -43976,7 +43992,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -44022,7 +44038,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -44190,7 +44207,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -45015,7 +45033,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -45026,6 +45044,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -47672,6 +47693,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -47682,6 +47704,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -47701,14 +47724,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48505,7 +48520,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55528,6 +55543,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55568,6 +55584,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -63801,7 +63829,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68356,7 +68384,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68936,7 +68964,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -69699,7 +69727,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -69910,7 +69938,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

52
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

72
dist/fineui.js vendored

@ -16322,13 +16322,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -16336,6 +16338,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17870,7 +17873,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -34408,7 +34412,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -34543,7 +34550,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -42062,6 +42072,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -44380,7 +44396,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -44426,7 +44442,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -44594,7 +44611,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -45419,7 +45437,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -45430,6 +45448,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -48076,6 +48097,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -48086,6 +48108,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -48105,14 +48128,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -48909,7 +48924,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -55932,6 +55947,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -55972,6 +55988,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
@ -64205,7 +64233,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68760,7 +68788,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69340,7 +69368,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -70103,7 +70131,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -70314,7 +70342,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

58
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

59
dist/fineui_without_jquery_polyfill.js vendored

@ -15823,13 +15823,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -15837,6 +15839,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;
@ -17371,7 +17374,8 @@ BI.Layout = BI.inherit(BI.Widget, {
}
});
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {};
BI.shortcut("bi.layout", BI.Layout);
BI.Plugin = BI.Plugin || {};
!(function () {
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
@ -22987,7 +22991,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i]);
}
@ -23122,7 +23129,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"});
w.element.css({
position: "relative",
"flex-shrink": "0"
});
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i]);
}
@ -29182,6 +29192,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);
@ -31500,7 +31516,7 @@ BI.GridView = BI.inherit(BI.Widget, {
_columnIndex: columnIndex,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment
}));
}), this);
renderedCells.push({
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
@ -31546,7 +31562,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
this.container.addItems(addedItems);
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;
this.container.attr("items", renderedCells);
@ -31714,7 +31731,8 @@ BI.GridView = BI.inherit(BI.Widget, {
}
});
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL";
BI.shortcut("bi.grid_view", BI.GridView);/**
BI.shortcut("bi.grid_view", BI.GridView);
/**
* Popover弹出层
* @class BI.Popover
* @extends BI.Widget
@ -32539,7 +32557,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -32550,6 +32568,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {
@ -35196,6 +35217,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -35206,6 +35228,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -35225,14 +35248,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});
@ -35398,7 +35413,7 @@ BI.Input = BI.inherit(BI.Single, {
this.element
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
@ -46534,7 +46549,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -51089,7 +51104,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -51669,7 +51684,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -52432,7 +52447,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -52643,7 +52658,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

2
dist/resource.css vendored

@ -18,7 +18,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
font: normal 12px "Helvetica Neue", Verdana, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Heiti, "黑体", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

5
dist/utils.js vendored

@ -17189,13 +17189,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -17203,6 +17205,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

44
dist/widget.css vendored

@ -31,9 +31,53 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view {
min-width: 100%;
}
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view {
min-width: 100%;
}

10
dist/widget.js vendored

@ -1705,7 +1705,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -6260,7 +6260,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -6840,7 +6840,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
@ -7603,7 +7603,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",
@ -7814,7 +7814,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

1483
package-lock.json generated

File diff suppressed because it is too large Load Diff

10
src/base/single/iframe/iframe.js

@ -11,6 +11,7 @@ BI.Iframe = BI.inherit(BI.Single, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
name: "",
attributes: {},
width: "100%",
height: "100%"
@ -21,6 +22,7 @@ BI.Iframe = BI.inherit(BI.Single, {
var o = this.options;
o.attributes.frameborder = "0";
o.attributes.src = o.src;
o.attributes.name = o.name;
BI.Iframe.superclass._init.apply(this, arguments);
},
@ -40,14 +42,6 @@ BI.Iframe = BI.inherit(BI.Single, {
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width;
},
getHeight: function () {
return this.options.height;
}
});

Loading…
Cancel
Save