Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~dailer/fineui

es6
dailer 5 years ago
parent
commit
08088749f3
  1. 4
      changelog.md
  2. 61
      dist/2.0/fineui.css
  3. 80
      dist/2.0/fineui.ie.js
  4. 60
      dist/2.0/fineui.ie.min.js
  5. 80
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.min.css
  7. 60
      dist/2.0/fineui.min.js
  8. 39
      dist/base.js
  9. 61
      dist/bundle.css
  10. 80
      dist/bundle.ie.js
  11. 60
      dist/bundle.ie.min.js
  12. 80
      dist/bundle.js
  13. 2
      dist/bundle.min.css
  14. 60
      dist/bundle.min.js
  15. 13
      dist/case.js
  16. 15
      dist/core.css
  17. 18
      dist/core.js
  18. 15
      dist/core_without_normalize.css
  19. 61
      dist/fineui.css
  20. 80
      dist/fineui.ie.js
  21. 58
      dist/fineui.ie.min.js
  22. 80
      dist/fineui.js
  23. 2
      dist/fineui.min.css
  24. 58
      dist/fineui.min.js
  25. 67
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/resource.css
  27. 5
      dist/utils.js
  28. 2
      dist/utils.min.js
  29. 44
      dist/widget.css
  30. 10
      dist/widget.js
  31. 1483
      package-lock.json
  32. 2
      package.json
  33. 7
      public/css/background.css
  34. 6
      src/base/combination/combo.js
  35. 5
      src/base/grid/grid.js
  36. 5
      src/base/list/virtuallist.js
  37. 5
      src/base/pane.js
  38. 10
      src/base/single/iframe/iframe.js
  39. 20
      src/base/single/input/input.js
  40. 13
      src/case/colorchooser/colorpicker/editor.colorpicker.simple.js
  41. 5
      src/core/utils/prefixIntervalTree.js
  42. 5
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  43. 5
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  44. 7
      src/css/base/colorchooser/colorpicker/editor.css
  45. 7
      src/css/base/pane.css
  46. 15
      src/css/core/utils/common.css
  47. 7
      src/css/resource/background.css
  48. 22
      src/css/widget/multilayerselecttree/multilayerselecttree.css
  49. 22
      src/css/widget/multilayersingletree/multilayersingletree.css
  50. 6
      src/less/base/pane.less
  51. 16
      src/less/core/utils/common.less
  52. 2
      src/less/resource/background.less
  53. 20
      src/less/widget/multilayerselecttree/multilayerselecttree.combo.less
  54. 20
      src/less/widget/multilayersingletree/multilayersingletree.combo.less
  55. 2
      src/widget/downlist/combo.downlist.js
  56. 2
      src/widget/multilayerdownlist/combo.downlist.js
  57. 2
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  58. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  59. 2
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  60. 3
      typescript/core/func/date.ts
  61. 5
      typescript/core/func/index.ts
  62. 42
      typescript/core/ob.ts
  63. 393
      typescript/core/widget.ts
  64. 11
      typescript/index.ts
  65. 7
      ui/css/background.css

4
changelog.md

@ -1,4 +1,8 @@
# 更新日志
2.0(2019-06)
- 单选下拉树支持搜索与异步加载节点
- 提供了AES加密方法
2.0(2019-05)
- editor类控件新增EVENT_CHANGE_CONFIRM事件
- 复选下拉控件和树下拉控件支持trigger是否可编辑

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;

80
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);
})
@ -48334,7 +48349,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -48366,9 +48381,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -48386,10 +48398,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55283,6 +55294,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 +55335,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 +63580,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68111,7 +68135,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68691,7 +68715,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 +69478,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 +69689,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";

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

File diff suppressed because one or more lines are too long

80
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);
})
@ -48738,7 +48753,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -48770,9 +48785,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -48790,10 +48802,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55687,6 +55698,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 +55739,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 +63984,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68515,7 +68539,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69095,7 +69119,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 +69882,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 +70093,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

39
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);
})
@ -10506,7 +10511,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -10538,9 +10543,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -10558,10 +10560,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);

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;

80
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);
})
@ -48334,7 +48349,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -48366,9 +48381,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -48386,10 +48398,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55283,6 +55294,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 +55335,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 +63580,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68111,7 +68135,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68691,7 +68715,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 +69478,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 +69689,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";

60
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

80
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);
})
@ -48738,7 +48753,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -48770,9 +48785,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -48790,10 +48802,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55687,6 +55698,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 +55739,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 +63984,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68515,7 +68539,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69095,7 +69119,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 +69882,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 +70093,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;

80
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);
})
@ -48579,7 +48594,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -48611,9 +48626,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -48631,10 +48643,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55528,6 +55539,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 +55580,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 +63825,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68356,7 +68380,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -68936,7 +68960,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 +69723,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 +69934,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";

58
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

80
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);
})
@ -48983,7 +48998,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -49015,9 +49030,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -49035,10 +49047,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -55932,6 +55943,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 +55984,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 +64229,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -68760,7 +68784,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -69340,7 +69364,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 +70127,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 +70338,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

67
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);
})
@ -35472,7 +35487,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -35504,9 +35519,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -35524,10 +35536,9 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
if (BI.isEndWithBlank(this.getValue())) {
if (BI.isEndWithBlank(this.getValue()) && BI.trim(this.getValue()) === BI.trim(this._lastValue || "")) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
@ -46534,7 +46545,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}
@ -51089,7 +51100,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});
@ -51669,7 +51680,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 +52443,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 +52654,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

2
package.json

@ -2,7 +2,7 @@
"name": "fineui",
"version": "1.1.2",
"description": "fineui",
"main": "index.js",
"main": "typescript/index.ts",
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.11.0",

7
public/css/background.css

@ -210,3 +210,10 @@
.trans-color-disabled-background.hack {
background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/trans_disable.png') no-repeat center center;
}
.wave-loading {
background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/2x/icon/wave_loading.gif') no-repeat center center;
background-size: contain;
}
.wave-loading.hack {
background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/wave_loading.gif') no-repeat center center;
}

6
src/base/combination/combo.js

@ -266,6 +266,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]);

5
src/base/grid/grid.js

@ -162,7 +162,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,
@ -208,7 +208,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);

5
src/base/list/virtuallist.js

@ -151,7 +151,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", []);
@ -162,6 +162,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) {

5
src/base/pane.js

@ -36,14 +36,15 @@ BI.Pane = BI.inherit(BI.Widget, {
loading: function () {
var self = this, o = this.options;
var isIE = BI.isIE();
var loadingAnimation = BI.createWidget({
type: "bi.horizontal",
cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""),
height: 30,
width: 30,
hgap: 5,
vgap: 2.5,
items: [{
items: isIE ? [] : [{
type: "bi.layout",
cls: "animate-rect rect1",
height: 25,

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;
}
});

20
src/base/single/input/input.js

@ -41,7 +41,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);
})
@ -58,10 +58,10 @@ BI.Input = BI.inherit(BI.Single, {
// 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓)
var originalEvent = e.originalEvent;
if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === "value") {
keyCode = null;
inputEventValid = true;
self._keydown_ = true;
_keydown(keyCode);
keyCode = null;
}
})
.click(function (e) {
@ -115,7 +115,7 @@ BI.Input = BI.inherit(BI.Single, {
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
if (self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
@ -147,9 +147,6 @@ BI.Input = BI.inherit(BI.Single, {
this.fireEvent(BI.Input.EVENT_START);
}
}
if (ctrlKey === true && keyCode === 86) {// ctrlKey+V
this._valueChange();
} else {
if (keyCode == BI.KeyCode.ENTER) {
if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {
this.blur();
@ -167,21 +164,22 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE);
}
}
this.fireEvent(BI.Input.EVENT_KEY_DOWN);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue;
if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || "")){
this._valueChange();
}
if (BI.isEndWithBlank(this.getValue())) {
this._pause = true;
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, "", this);
this.fireEvent(BI.Input.EVENT_PAUSE);
this._defaultState();
} else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&
BI.trim(this.getValue()) === "" && (this._lastValue !== null && BI.trim(this._lastValue) !== "")) {
BI.trim(this.getValue()) === "" && (lastValue !== null && BI.trim(lastValue) !== "")) {
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);
this.fireEvent(BI.Input.EVENT_STOP);
this._valueChange();
} else {
this._valueChange();
}
},

13
src/case/colorchooser/colorpicker/editor.colorpicker.simple.js

@ -50,6 +50,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);
@ -90,6 +91,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));

5
src/core/utils/prefixIntervalTree.js

@ -23,13 +23,15 @@
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];
}
@ -37,6 +39,7 @@
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;

5
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -32,7 +32,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]);
}

5
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -32,7 +32,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]);
}

7
src/css/base/colorchooser/colorpicker/editor.css

@ -210,6 +210,13 @@
.trans-color-disabled-background.hack {
background: url('images/1x/background/trans_disable.png') no-repeat center center;
}
.wave-loading {
background: url('images/2x/icon/wave_loading.gif') no-repeat center center;
background-size: contain;
}
.wave-loading.hack {
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
}
.bi-color-picker-editor .color-picker-editor-display {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

7
src/css/base/pane.css

@ -122,10 +122,3 @@
transform: scaleY(1);
}
}
.bi-loading-widget.hack {
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
}
.bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
}

15
src/css/core/utils/common.css

@ -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;

7
src/css/resource/background.css

@ -210,3 +210,10 @@
.trans-color-disabled-background.hack {
background: url('images/1x/background/trans_disable.png') no-repeat center center;
}
.wave-loading {
background: url('images/2x/icon/wave_loading.gif') no-repeat center center;
background-size: contain;
}
.wave-loading.hack {
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
}

22
src/css/widget/multilayerselecttree/multilayerselecttree.css

@ -1,3 +1,25 @@
.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%;
}

22
src/css/widget/multilayersingletree/multilayersingletree.css

@ -1,3 +1,25 @@
.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%;
}

6
src/less/base/pane.less

@ -33,10 +33,4 @@
.transform (scaleY(1));
}
});
&.hack {
.imagePath(@icon-wave-loading);
& .animate-rect {
.background-color(@background-color-highlight, 0%);
}
}
}

16
src/less/core/utils/common.less

@ -280,27 +280,31 @@ textarea {
// 字体
.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 {

2
src/less/resource/background.less

@ -308,3 +308,5 @@
.imagePath(@background-trans-color-disabled);
}
}
.background(wave-loading, @icon-wave-loading);

20
src/less/widget/multilayerselecttree/multilayerselecttree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-select-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

20
src/less/widget/multilayersingletree/multilayersingletree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-single-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

2
src/widget/downlist/combo.downlist.js

@ -54,7 +54,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}

2
src/widget/multilayerdownlist/combo.downlist.js

@ -54,7 +54,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});

2
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -37,7 +37,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";

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -9,7 +9,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: "",

2
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -37,7 +37,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";

3
typescript/core/func/date.ts

@ -88,7 +88,7 @@ export declare type _getWeekEndDate = (date: Date) => Date;
*/
export declare type _print = (date: Date, str: string) => string;
declare type _date = {
export declare type _date = {
getTimezone: _getTimezone;
getMonthDays: _getMonthDays;
getLastDateOfMonth: _getLastDateOfMonth;
@ -105,4 +105,3 @@ declare type _date = {
getWeekEndDate: _getWeekEndDate;
print: _print;
}
export default _date;

5
typescript/core/func/index.ts

@ -2,9 +2,8 @@ import _array from "./array";
import _string from "./string";
import _number from "./number";
import _function from "./function";
import _date, {_Date} from "./date";
import { _Date } from "./date";
interface _func extends _array, _string, _number, _function {
export interface _func extends _array, _string, _number, _function {
Date: _Date;
}
export default _func;

42
typescript/core/ob.ts

@ -1,39 +1,45 @@
export declare class _OB {
protected props: Props | (<T>(config: T) => Props & T);
export interface OBConstructor {
new(config: any): _OB;
(config: any): _OB;
readonly prototype: _OB;
}
export interface _OB {
props: Props | (<T>(config: T) => Props & T);
protected options: Props;
options: Props;
private events?: {
events?: {
[eventName: string]: Function[];
};
public init: Function | null;
init?(): void;
public destroyed: Function | null;
destroyed?(): void;
protected _defaultConfig: (..._args: any[]) => { [key: string]: any } | {};
_defaultConfig(..._args: any[]): { [key: string]: any } | {};
protected _init: () => void;
_init(): void;
private _initListeners: () => void;
_initListeners(): void;
private _getEvents: () => { [eventName: string]: Function[] };
_getEvents(): { [eventName: string]: Function[] };
public on: (eventName: string, fn: Function) => void;
on(eventName: string, fn: Function): void;
public once: (eventName: string, fn: Function) => void;
once(eventName: string, fn: Function): void;
public un: (eName: string, fn: Function) => void;
un(eName: string, fn: Function): void;
protected _initRef: () => void;
_initRef(): void;
protected _purgeRef: () => void;
_purgeRef(): void;
public purgeListeners: () => void;
purgeListeners(): void;
public fireEvent: (eName: string, ...args: any[]) => boolean;
fireEvent(eName: string, ...args: any[]): boolean | null;
public destroy: () => void;
destroy(): void;
}
interface Props {

393
typescript/core/widget.ts

@ -0,0 +1,393 @@
import { _OB } from "./ob";
export interface WidgetConstructor {
new(config: any): _Widget;
(config: any): _Widget;
readonly prototype: _Widget;
/**
*
* @param engine
*/
registerRenderEngine(engine: RenderEngine): void;
}
export interface _Widget extends _OB {
/**
* loading的锁
*/
__asking: boolean;
/**
*
*/
__async: boolean;
/**
* widget类标识符
*/
widgetName: string | null;
/**
*
*/
_isRoot: boolean;
/**
*
*/
_parent: _Widget | null;
// TODO: 完成jquery文件夹后把这块改了
/**
* dom的类jQuery对象
*/
element: any;
/**
*
*/
_children: {
[key: string]: _Widget;
};
/**
*
*/
_isMounted: boolean;
/**
* enable
*/
_manualSetEnable: boolean;
/**
* valid
*/
_manualSetValid: boolean;
/**
*
*/
_renderEngine: RenderEngine;
_store(): any;
model: any;
// 生命周期函数
/**
*
*/
beforeInit?(cb: Function): void;
/**
*
*/
beforeCreate?(): void;
/**
*
*/
created?(): void;
/**
*
*/
render?(): any;
/**
*
*/
beforeMount?(): void;
/**
*
*/
mounted?(): void;
/**
*
*/
shouldUpdate?(): void;
/**
*
*/
update?(): void;
/**
*
*/
beforeDestroy?(): void;
/**
*
*/
destroyed?(): void;
/**
* render函数
*/
_initRender: () => void;
/**
* render函数
*/
_render: () => void;
/**
*
*/
_initRoot: () => void;
/**
*
*/
_initElementWidth: () => void;
/**
*
*/
_initElementHeight: () => void;
/**
*
*/
_initVisual: () => void;
/**
*
*/
_initEffects: () => void;
/**
* mounted锁
*/
_initState: () => void;
/**
* dom
*/
_initElement: () => void;
/**
*
*/
_setParent: () => void;
/**
* @param force
* @param deep force处理
* @param lifeHook
* @param predicate widget的回调
*/
_mount(force?: boolean, deep?: boolean, lifeHook?: boolean, predicate?: Function): boolean;
/**
*
*/
_mountChildren?(): void;
/**
*
*/
isMounted(): boolean;
/**
*
*/
setWidth(w: number): void;
/**
*
*/
setHeight(h: number): void;
/**
*
*/
_setEnable(enable: boolean): void;
/**
*
*/
_setValid(valid: boolean): void;
/**
*
*/
_setVisible(visible: boolean): void;
/**
*
*/
setEnable(enable: boolean): void;
/**
*
*/
setVisible(visible: boolean): void;
/**
*
*/
setValid(valid: boolean): void;
/**
*
* @param args arguments参数
*/
doBehavior(...args: any[]): void;
/**
*
*/
getWidth(): number;
/**
*
*/
getHeight(): number;
/**
*
*/
isValid(): boolean;
/**
*
*/
addWidget(_name: any, _widget: _Widget): _Widget;
/**
* wigetname获取子元素实例
*/
getWidgetByName(_name: string): _Widget;
/**
*
* @param nameOrWidget widgetName或widget实例
*/
removeWidget(nameOrWidget: string | _Widget): void;
/**
*
*/
hasWidget(name: string): boolean;
/**
* widgetName
*/
getName(): string;
/**
* tag
* @param tag html tag
*/
setTag(tag: string): void;
/**
* tag
*/
getTag(): string;
/**
*
* @param key
* @param value
*/
attr(key: string | { [key: string]: any }, value: any): any;
/**
* text
*/
getText(): string;
/**
* text
*/
setText(): void;
/**
*
*/
getValue(): any;
/**
*
*/
setValue(...args: any[]): void;
/**
* enable
*/
isEnabled(): boolean;
/**
*
*/
isVisible(): boolean;
/**
* disable元素
*/
disable(): void;
/**
* enable元素
*/
enable(): void;
/**
* widget合法
*/
valid(): void;
/**
* 使
*/
invalid(): void;
/**
* 使
*/
invisible(): void;
/**
*
*/
visible(): void;
/**
*
*/
__d(): void;
/**
*
*/
_unMount(): void;
/**
* hang元素
*/
isolate(): void;
/**
*
*/
empty(): void;
/**
* destory方法
*/
_destroy(): void;
/**
* destory元素
*/
destroy(): void;
}
interface RenderEngine {
// TODO: 完成jquery文件夹后把这块改了
/**
* jQuery对象
* @param widget widget对象
*/
createElement: (widget: any) => any;
/**
* DocumentFragment对象
*/
createFragment: () => DocumentFragment;
}

11
typescript/index.ts

@ -1,8 +1,9 @@
import { _i18n } from "./core/i18n";
import { _OB } from "./core/ob";
import _func from "./core/func";
import { OBConstructor } from "./core/ob";
import { _func } from "./core/func";
import { WidgetConstructor } from "./core/widget";
export interface BI extends _func {
i18n: _i18n;
OB: _OB;
export interface _BI extends _func, _i18n {
OB: OBConstructor;
Widget: WidgetConstructor;
}

7
ui/css/background.css

@ -210,3 +210,10 @@
.trans-color-disabled-background.hack {
background: url('resources?path=/com/fr/web/ui/images/1x/background/trans_disable.png') no-repeat center center;
}
.wave-loading {
background: url('resources?path=/com/fr/web/ui/images/2x/icon/wave_loading.gif') no-repeat center center;
background-size: contain;
}
.wave-loading.hack {
background: url('resources?path=/com/fr/web/ui/images/1x/icon/wave_loading.gif') no-repeat center center;
}

Loading…
Cancel
Save