Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 5 years ago
parent
commit
5704c1a378
  1. 7
      changelog.md
  2. 71
      dist/2.0/fineui.ie.js
  3. 71
      dist/2.0/fineui.js
  4. 71
      dist/bundle.ie.js
  5. 71
      dist/bundle.js
  6. 71
      dist/fineui.ie.js
  7. 71
      dist/fineui.js
  8. 71
      dist/fineui_without_jquery_polyfill.js
  9. 71
      dist/widget.js
  10. 3
      src/base/layer/layer.popover.js
  11. 10
      src/base/list/listview.js
  12. 2
      src/base/single/button/button.basic.js
  13. 6
      src/base/single/single.js
  14. 7
      src/case/colorchooser/colorchooser.js
  15. 2
      src/case/colorchooser/colorchooser.trigger.js
  16. 2
      src/case/colorchooser/colorchooser.trigger.long.js
  17. 2
      src/case/combo/bubblecombo/popup.bubble.js
  18. 2
      src/component/treevaluechooser/abstract.treevaluechooser.js
  19. 2
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  20. 193
      src/component/valuechooser/__test__/combo.valuechooser.insert.test.js
  21. 163
      src/component/valuechooser/__test__/combo.valuechooser.test.js
  22. 111
      src/component/valuechooser/__test__/pane.valuechooser.test.js
  23. 3
      src/css/base/view/popover.css
  24. 1
      src/less/base/view/popover.less
  25. 1
      src/widget/datepane/datepane.js
  26. 2
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  27. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  28. 21
      src/widget/multiselectlist/multiselectlist.insert.js
  29. 21
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  30. 21
      src/widget/multiselectlist/multiselectlist.js
  31. 5
      src/widget/multitree/multi.tree.list.combo.js
  32. 12
      typescript/base/pane.ts
  33. 5
      typescript/case/loading/loading_pane.ts
  34. 4
      typescript/index.ts

7
changelog.md

@ -1,4 +1,11 @@
# 更新日志
2.0(2019-09)
- [视觉]popover弹出框增加圆角
- 文本列表通过复制粘贴的形式选中值的时候发送事件
- 修复tree_value_chooser选中节点的唯一子节点后搜索该子节点,无法取消选中的问题
- button的bubble创建的popup在收起的时候会destroy
- 修复了dynamic_date_pane在切换静态时间和动态时间的时候不会发事件的问题
2.0(2019-08)
- 修复valueChooser系列不支持value属性的问题
- 更新了若干icon-font的样式

71
dist/2.0/fineui.ie.js vendored

@ -68565,7 +68565,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -69747,7 +69747,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -74606,16 +74606,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -74716,8 +74714,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -74949,16 +74945,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75061,8 +75055,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75268,16 +75260,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75408,8 +75398,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -76380,7 +76368,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -76409,7 +76398,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88153,6 +88142,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/2.0/fineui.js vendored

@ -68969,7 +68969,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -70151,7 +70151,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -75010,16 +75010,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75120,8 +75118,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75353,16 +75349,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75465,8 +75459,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75672,16 +75664,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75812,8 +75802,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -76784,7 +76772,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -76813,7 +76802,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88557,6 +88546,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/bundle.ie.js vendored

@ -68565,7 +68565,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -69747,7 +69747,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -74606,16 +74606,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -74716,8 +74714,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -74949,16 +74945,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75061,8 +75055,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75268,16 +75260,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75408,8 +75398,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -76380,7 +76368,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -76409,7 +76398,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88153,6 +88142,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/bundle.js vendored

@ -68969,7 +68969,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -70151,7 +70151,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -75010,16 +75010,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75120,8 +75118,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75353,16 +75349,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75465,8 +75459,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75672,16 +75664,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75812,8 +75802,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -76784,7 +76772,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -76813,7 +76802,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88557,6 +88546,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/fineui.ie.js vendored

@ -68810,7 +68810,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -69992,7 +69992,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -74851,16 +74851,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -74961,8 +74959,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75194,16 +75190,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75306,8 +75300,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75513,16 +75505,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75653,8 +75643,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -76625,7 +76613,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -76654,7 +76643,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88398,6 +88387,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/fineui.js vendored

@ -69214,7 +69214,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -70396,7 +70396,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -75255,16 +75255,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75365,8 +75363,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75598,16 +75594,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -75710,8 +75704,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -75917,16 +75909,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -76057,8 +76047,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -77029,7 +77017,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -77058,7 +77047,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -88802,6 +88791,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/fineui_without_jquery_polyfill.js vendored

@ -51513,7 +51513,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -52695,7 +52695,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -57554,16 +57554,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -57664,8 +57662,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -57897,16 +57893,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -58009,8 +58003,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -58216,16 +58208,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -58356,8 +58346,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -59328,7 +59316,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -59357,7 +59346,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -71101,6 +71090,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

71
dist/widget.js vendored

@ -6594,7 +6594,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -7776,7 +7776,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]
@ -12635,16 +12635,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -12745,8 +12743,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -12978,16 +12974,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -13090,8 +13084,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -13297,16 +13289,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -13437,8 +13427,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}
@ -14409,7 +14397,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -14438,7 +14427,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},
@ -26182,6 +26171,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

3
src/base/layer/layer.popover.js

@ -15,7 +15,7 @@ BI.Popover = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-popover bi-card",
baseCls: "bi-popover bi-card bi-border-radius",
// width: 600,
// height: 500,
size: "normal", // small, normal, big
@ -63,6 +63,7 @@ BI.Popover = BI.inherit(BI.Widget, {
cls: "bi-font-bold",
height: this._constant.HEADER_HEIGHT,
text: o.header,
title: o.header,
textAlign: "left"
},
left: 20,

10
src/base/list/listview.js

@ -45,8 +45,16 @@ BI.ListView = BI.inherit(BI.Widget, {
o.scrollTop = self.element.scrollTop();
self._calculateBlocksToRender();
});
var lastWidth = this.element.width(),
lastHeight = this.element.height();
BI.ResizeDetector.addResizeListener(this, function () {
self._calculateBlocksToRender();
var width = self.element.width(),
height = self.element.height();
if (width !== lastWidth || height !== lastHeight) {
lastWidth = width;
lastHeight = height;
self._calculateBlocksToRender();
}
});
},

2
src/base/single/button/button.basic.js

@ -229,6 +229,8 @@ BI.BasicButton = BI.inherit(BI.Single, {
el: {
type: "bi.bubble_combo",
trigger: "",
// bubble的提示不需要一直存在在界面上
destroyWhenHide: true,
ref: function () {
self.combo = this;
},

6
src/base/single/single.js

@ -111,7 +111,11 @@ BI.Single = BI.inherit(BI.Widget, {
clearTimeout(self.hideTimeout);
self.hideTimeout = null;
}
self._showToolTip(self._e || e, opt);
// CHART-10611 在拖拽的情况下, 鼠标拖拽着元素离开了拖拽元素的容器,但是子元素在dom结构上仍然属于容器
// 这样会认为鼠标仍然在容器中, 500ms内放开的话,会在容器之外显示鼠标停留处显示容器的title
if (self.element.__isMouseInBounds__(self._e || e)) {
self._showToolTip(self._e || e, opt);
}
}
}, 500);

7
src/case/colorchooser/colorchooser.js

@ -10,7 +10,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser",
value: ""
value: "",
height: 24
});
},
@ -30,8 +31,8 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.trigger = _ref;
},
width: o.width,
height: o.height
width: o.width - 2,
height: o.height - 2
}, o.el),
popup: {
el: BI.extend({

2
src/case/colorchooser/colorchooser.trigger.js

@ -11,7 +11,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-border",
height: 24
height: 22
});
},

2
src/case/colorchooser/colorchooser.trigger.long.js

@ -11,7 +11,7 @@ BI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {
var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-border",
height: 24
height: 22
});
},

2
src/case/combo/bubblecombo/popup.bubble.js

@ -110,9 +110,11 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
buttons: [{
level: "ignore",
value: false,
stopPropagation: true,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
stopPropagation: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};

2
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -220,7 +220,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
path.push(split);
childrenCount.push(expanded.length);
// 如果只有一个值且取消的就是这个值
if (i === parents.length - 1 && expanded.length === 1 && expanded[0] === notSelectedValue) {
if (i === parents.length - 1 && expanded.length === 1 && expanded[0].value === notSelectedValue) {
for (var j = childrenCount.length - 1; j >= 0; j--) {
if (childrenCount[j] === 1) {
self._deleteNode(selectedValues, path[j]);

2
src/component/treevaluechooser/combo.listtreevaluechooser.js

@ -29,6 +29,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
text: o.text,
value: o.value,
watermark: o.watermark,
allowInsertValue: o.allowInsertValue,
allowEdit: o.allowEdit,
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,

193
src/component/valuechooser/__test__/combo.valuechooser.insert.test.js

@ -0,0 +1,193 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/23
*/
describe("value_chooser_insert_combo", function () {
var items = BI.map(BI.makeArray(1000, null), function(idx, v) {
return {
text: idx,
value: idx,
title: idx
};
});
var itemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".bi-multi-select-popup-view .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
var searchItemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".bi-multi-select-search-pane .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
/**
* test_author_windy
**/
it("setValue", function () {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.setValue({
type: 1,
value: [1, 2]
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [1, 2]
});
widget.destroy();
});
/**
* test_author_windy
**/
it("getValue", function () {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
},
value: {
type: 2,
value: [1, 2, 3]
}
});
expect(widget.getValue()).to.deep.equal({
type: 2,
value: [1, 2, 3]
});
widget.destroy();
});
/**
* test_author_windy
**/
it("点选选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.element.find(".bi-multi-select-trigger").click();
// 为什么要delay 300呢,因为按钮有debounce
BI.delay(function () {
// 点选1、2、3
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
// 点全选
widget.element.find(".bi-multi-select-popup-view .bi-label:contains(全选)").click();
// 取消勾选1、2、3
BI.delay(function () {
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 2,
value: [0, 1, 2]
});
widget.destroy();
done();
}, 300);
}, 300);
});
/**
* test_author_windy
**/
it("搜索选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
BI.nextTick(function () {
widget.element.find(".bi-multi-select-trigger .tip-text-style").click();
// 这边为啥要加呢,因为input的setValue中有nextTick
BI.nextTick(function () {
BI.Test.triggerKeyDown(widget.element.find(".bi-multi-select-trigger .bi-input"), "2", 50, function () {
BI.nextTick(function () {
BI.each(searchItemSelectorGetter([1,2]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [2, 12]
});
widget.destroy();
done();
});
});
});
});
});
/**
* test_author_windy
**/
it("新增值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
BI.nextTick(function () {
widget.element.find(".bi-multi-select-trigger .tip-text-style").click();
// 这边为啥要加呢,因为input的setValue中有nextTick
BI.nextTick(function () {
BI.Test.triggerKeyDown(widget.element.find(".bi-multi-select-trigger .bi-input"), "z", 50, function () {
BI.nextTick(function () {
widget.element.find(".bi-text-button:contains(+点击新增\"z\")").click();
expect(widget.getValue()).to.deep.equal({
type: 1,
value: ["z"]
});
widget.destroy();
done();
});
});
});
});
});
/**
* test_author_windy
**/
it("查看已选", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_insert_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
},
value: {
type: 1,
value: [1, 2]
}
});
BI.nextTick(function () {
widget.element.find(".bi-multi-select-check-selected-button").click();
BI.delay(function () {
expect(widget.element.find(".display-list-item").length).to.equal(2);
widget.destroy();
done();
}, 300);
});
});
});

163
src/component/valuechooser/__test__/combo.valuechooser.test.js

@ -0,0 +1,163 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/23
*/
describe("value_chooser_combo", function () {
var items = BI.map(BI.makeArray(1000, null), function(idx, v) {
return {
text: idx,
value: idx,
title: idx
};
});
var itemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".bi-multi-select-popup-view .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
var searchItemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".bi-multi-select-search-pane .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
/**
* test_author_windy
**/
it("setValue", function () {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.setValue({
type: 1,
value: [1, 2]
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [1, 2]
});
widget.destroy();
});
/**
* test_author_windy
**/
it("getValue", function () {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
},
value: {
type: 2,
value: [1, 2, 3]
}
});
expect(widget.getValue()).to.deep.equal({
type: 2,
value: [1, 2, 3]
});
widget.destroy();
});
/**
* test_author_windy
**/
it("点选选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.element.find(".bi-multi-select-trigger").click();
// 为什么要delay 300呢,因为按钮有debounce
BI.delay(function () {
// 点选1、2、3
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
// 点全选
widget.element.find(".bi-multi-select-popup-view .bi-label:contains(全选)").click();
// 取消勾选1、2、3
BI.delay(function () {
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 2,
value: [0, 1, 2]
});
widget.destroy();
done();
}, 300);
}, 300);
});
/**
* test_author_windy
**/
it("搜索选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
BI.nextTick(function () {
widget.element.find(".bi-multi-select-trigger .tip-text-style").click();
// 这边为啥要加呢,因为input的setValue中有nextTick
BI.nextTick(function () {
BI.Test.triggerKeyDown(widget.element.find(".bi-multi-select-trigger .bi-input"), "2", 50, function () {
BI.nextTick(function () {
BI.each(searchItemSelectorGetter([1,2]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [2, 12]
});
widget.destroy();
done();
});
});
});
});
});
/**
* test_author_windy
**/
it("查看已选", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_combo",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
},
value: {
type: 1,
value: [1, 2]
}
});
BI.nextTick(function () {
widget.element.find(".bi-multi-select-check-selected-button").click();
BI.delay(function () {
expect(widget.element.find(".display-list-item").length).to.equal(2);
widget.destroy();
done();
}, 300);
});
});
});

111
src/component/valuechooser/__test__/pane.valuechooser.test.js

@ -0,0 +1,111 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/23
*/
describe("value_chooser_pane", function () {
var items = BI.map(BI.makeArray(1000, null), function(idx, v) {
return {
text: idx,
value: idx,
title: idx
};
});
var itemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".popup-multi-select-list .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
var searchItemSelectorGetter = function (array) {
return BI.map(array, function (idx, num) {
return ".bi-multi-select-search-pane .bi-loader .bi-button-group .bi-multi-select-item:nth-child(" + num + ")";
});
};
/**
* test_author_windy
**/
it("setValue", function () {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_pane",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.setValue({
type: 1,
value: [1, 2]
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [1, 2]
});
widget.destroy();
});
/**
* test_author_windy
**/
it("点选选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_pane",
width: 220,
items: items
});
BI.nextTick(function () {
// 点选1、2、3
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
// 点全选
widget.element.find(".popup-multi-select-list .bi-label:contains(全选)").click();
// 取消勾选1、2、3
BI.delay(function () {
BI.each(itemSelectorGetter([1,2,3]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 2,
value: [0, 1, 2]
});
widget.destroy();
done();
}, 300);
});
});
/**
* test_author_windy
**/
it("搜索选值", function (done) {
var widget = BI.Test.createWidget({
type: "bi.value_chooser_pane",
width: 220,
itemsCreator: function (op, callback) {
callback(items);
}
});
widget.element.find(".bi-water-mark").click();
// 这边为啥要加呢,因为input的setValue中有nextTick
BI.nextTick(function () {
BI.Test.triggerKeyDown(widget.element.find(".bi-input"), "2", 50, function () {
BI.nextTick(function () {
BI.each(searchItemSelectorGetter([1,2]), function (idx, selector) {
widget.element.find(selector).click();
});
expect(widget.getValue()).to.deep.equal({
type: 1,
value: [2, 12]
});
widget.destroy();
done();
});
});
});
});
});

3
src/css/base/view/popover.css

@ -0,0 +1,3 @@
.bi-popover {
border: 1px solid transparent;
}

1
src/less/base/view/popover.less

@ -1,4 +1,5 @@
@import "../../index";
.bi-popover {
border: 1px solid transparent;
}

1
src/widget/datepane/datepane.js

@ -44,6 +44,7 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
default:
break;
}
self.fireEvent("EVENT_CHANGE");
}
}],
ref: function () {

2
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -141,7 +141,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]

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

@ -144,7 +144,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,
action: function () {
var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue(value);
self.combo.setValue([value]);
self.combo.hideView();
}
}]

21
src/widget/multiselectlist/multiselectlist.insert.js

@ -137,6 +137,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
self.adapter.setValue(self.storeValue);
assertShowValue();
}
self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);
});
}
}
@ -210,16 +211,14 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -320,8 +319,6 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}

21
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -142,6 +142,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
self.adapter.setValue(self.storeValue);
assertShowValue();
}
self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);
});
}
}
@ -218,16 +219,14 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -330,8 +329,6 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}

21
src/widget/multiselectlist/multiselectlist.js

@ -120,6 +120,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue);
assertShowValue();
}
self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);
});
}
}
@ -192,16 +193,14 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinKeywords: function (keywords, callback) {
var self = this, o = this.options;
this._assertValue(this.storeValue);
if (!this._allData) {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA
}, function (ob) {
self._allData = BI.map(ob.items, "value");
digest(self._allData);
});
} else {
digest(this._allData);
}
// 和复选下拉框同步,allData做缓存是会爆炸的
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
digest(values);
});
function digest (items) {
var selectedMap = self._makeMap(items);
@ -332,8 +331,6 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
},
populate: function () {
this._count = null;
this._allData = null;
this.adapter.populate.apply(this.adapter, arguments);
this.trigger.populate.apply(this.trigger, arguments);
}

5
src/widget/multitree/multi.tree.list.combo.js

@ -21,7 +21,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
allowEdit: true
allowEdit: true,
allowInsertValue: true
});
},
@ -50,7 +51,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
type: "bi.multi_list_tree_searcher",
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",
type: o.allowInsertValue ? "bi.multi_tree_search_insert_pane" : "bi.multi_tree_search_pane",
el: {
type: "bi.list_part_tree"
},

12
typescript/base/pane.ts

@ -0,0 +1,12 @@
import { _Widget } from "../core/widget";
export interface _Pane extends _Widget {
_assertTip: (..._args: any[]) => void;
loading: (..._args: any[]) => void;
loaded: (..._args: any[]) => void;
check: (..._args: any[]) => void;
}
export interface _PaneStatic {
EVENT_LOADED: "EVENT_LOADED";
}

5
typescript/case/loading/loading_pane.ts

@ -0,0 +1,5 @@
import { _Pane } from "../../base/pane";
export interface _LoadingPane extends _Pane {
__loaded: (...args: any[]) => void;
}

4
typescript/index.ts

@ -11,6 +11,8 @@ import { _ShowAction } from "./core/action/action.show";
import { _Behavior, _BehaviorFactory } from "./core/behavior/behavior";
import { _HighlightBehavior } from "./core/behavior/behavior.highlight";
import { _RedMarkBehavior } from "./core/behavior/behavior.redmark";
import { _Pane, _PaneStatic } from "./base/pane";
import { _LoadingPane } from "./case/loading/loading_pane";
type ClassConstructor<T extends {}> = T & {
@ -32,4 +34,6 @@ export interface _BI extends _func, _i18n, _base {
BehaviorFactory: ClassConstructor<_BehaviorFactory>;
HighlightBehavior: ClassConstructor<_HighlightBehavior>;
RedMarkBehavior: ClassConstructor<_RedMarkBehavior>;
Pane: ClassConstructor<_Pane> & _PaneStatic;
LoadingPane: ClassConstructor<_LoadingPane>;
}

Loading…
Cancel
Save