Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~claire.tang/fineui

es6
Claire 3 years ago
parent
commit
4c5181b691
  1. 15
      bi.lessconfig.json
  2. 6
      demo/js/base/tip/demo.toast.js
  3. 5
      dist/fix/fix.js
  4. 11
      dist/fix/fix.proxy.js
  5. 3
      jsy.lessconfig.json
  6. 2
      package.json
  7. 25
      src/base/combination/bubble.js
  8. 69
      src/base/combination/combo.js
  9. 8
      src/base/combination/searcher.js
  10. 25
      src/base/foundation/message.js
  11. 194
      src/base/layer/layer.popup.js
  12. 6
      src/base/single/button/button.basic.js
  13. 12
      src/base/single/button/buttons/button.js
  14. 14
      src/base/single/button/listitem/icontextitem.js
  15. 14
      src/base/single/button/node/icontextnode.js
  16. 1
      src/base/single/tip/tip.toast.js
  17. 12
      src/case/button/item.multiselect.js
  18. 18
      src/case/button/item.singleselect.icontext.js
  19. 12
      src/case/button/item.singleselect.js
  20. 12
      src/case/button/item.singleselect.radio.js
  21. 12
      src/case/button/switch.js
  22. 117
      src/case/combo/bubblecombo/combo.bubble.js
  23. 43
      src/case/combo/bubblecombo/popup.bubble.js
  24. 2
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  25. 3
      src/component/allvaluechooser/abstract.allvaluechooser.js
  26. 3
      src/component/treevaluechooser/abstract.treevaluechooser.js
  27. 8
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  28. 8
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  29. 8
      src/component/treevaluechooser/combo.treevaluechooser.js
  30. 3
      src/component/valuechooser/abstract.valuechooser.js
  31. 2
      src/less/base/combo/combo.bubble.less
  32. 23
      src/less/base/single/button/button.less
  33. 3
      src/less/base/single/button/switch.less
  34. 2
      src/less/base/single/tip/tip.toast.less
  35. 49
      src/less/base/view/popupview.less
  36. 2
      src/less/core/utils/common.less
  37. 2
      src/less/lib/constant.less
  38. 5
      src/less/lib/theme.less
  39. 9
      src/less/resource/font.less
  40. 11
      src/less/widget/interactivearrangement/interactivearrangement.less
  41. 12
      src/widget/dynamicdate/dynamicdate.combo.js
  42. 13
      src/widget/dynamicdate/dynamicdate.trigger.js
  43. 12
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  44. 13
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  45. 13
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  46. 8
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  47. 13
      src/widget/multilayersingletree/multilayersingletree.combo.js
  48. 8
      src/widget/multilayersingletree/multilayersingletree.trigger.js
  49. 2
      src/widget/multiselect/multiselect.combo.js
  50. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  51. 2
      src/widget/multiselect/multiselect.insert.combo.js
  52. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  53. 6
      src/widget/multiselect/multiselect.popup.view.js
  54. 6
      src/widget/multiselect/multiselect.popup.view.nobar.js
  55. 8
      src/widget/multiselect/multiselect.trigger.js
  56. 8
      src/widget/multiselect/trigger/searcher.multiselect.js
  57. 10
      src/widget/multitree/multi.tree.combo.js
  58. 10
      src/widget/multitree/multi.tree.insert.combo.js
  59. 10
      src/widget/multitree/multi.tree.list.combo.js
  60. 4
      src/widget/multitree/multi.tree.popup.js
  61. 8
      src/widget/multitree/trigger/searcher.list.multi.tree.js
  62. 8
      src/widget/multitree/trigger/searcher.multi.tree.js
  63. 6
      src/widget/searchmultitextvaluecombo/multitextvalue.popup.view.search.js
  64. 2
      src/widget/singleselect/singleselect.combo.js
  65. 2
      src/widget/singleselect/singleselect.insert.combo.js
  66. 8
      src/widget/singleselect/singleselect.popup.view.js
  67. 12
      src/widget/time/time.combo.js
  68. 13
      src/widget/time/time.trigger.js
  69. 1
      typescript/base/combination/combo.ts
  70. 2
      typescript/base/single/button/button.basic.ts
  71. 4
      typescript/component/treevaluechooser/combo.listtreevaluechooser.ts
  72. 4
      typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts
  73. 4
      typescript/component/treevaluechooser/combo.treevaluechooser.ts
  74. 1
      typescript/core/widget.ts
  75. 6
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  76. 6
      typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
  77. 4
      typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts
  78. 4
      typescript/widget/multilayersingletree/multilayersingletree.combo.ts
  79. 4
      typescript/widget/multitree/multi.tree.combo.ts
  80. 4
      typescript/widget/multitree/multi.tree.insert.combo.ts
  81. 4
      typescript/widget/multitree/multi.tree.list.combo.ts
  82. 6
      typescript/widget/time/time.combo.ts

15
bi.lessconfig.json

@ -7,7 +7,7 @@
"@color-black": "#000A19", "@color-black": "#000A19",
"@color-light-gray": "#ECEEF3", "@color-light-gray": "#ECEEF3",
"@color-light-gray-theme-dark": "#292F45", "@color-light-gray-theme-dark": "#292F45",
"@color-dim-gray": "#2E3A4D", "@border-color-dark-line": "#2E3A4D",
"@color-sliver-theme-dark": "363E55", "@color-sliver-theme-dark": "363E55",
"@border-color-disabled": "#E7E8EB", "@border-color-disabled": "#E7E8EB",
@ -16,5 +16,16 @@
"@color-bi-background-disabled-active-radio-content": "#D0D4DA", "@color-bi-background-disabled-active-radio-content": "#D0D4DA",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#D0D4DA", "@color-bi-background-disabled-active-checkbox-content": "#D0D4DA",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479" "@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#2E3A4D",
"@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF",
"@color-bi-background-toast-error": "#FFFFFF",
"@color-bi-background-toast-normal": "#FFFFFF",
"@color-bi-color-toast-success": "#3FC47B",
"@color-bi-color-toast-warning": "#FAAA39",
"@color-bi-color-toast-error": "#E65251",
"@color-bi-color-toast-normal": "#2C60DB",
"@color-bi-color-toast-text": "#000A19"
} }

6
demo/js/base/tip/demo.toast.js

@ -10,7 +10,9 @@ Demo.Toast = BI.inherit(BI.Widget, {
text: "简单Toast测试(success)", text: "简单Toast测试(success)",
height: 30, height: 30,
handler: function () { handler: function () {
BI.Msg.toast("这是一条简单的数据"); BI.Msg.toast("这是一条简单的数据", {
level: "success"
});
} }
} }
}, { }, {
@ -20,7 +22,7 @@ Demo.Toast = BI.inherit(BI.Widget, {
height: 30, height: 30,
handler: function () { handler: function () {
BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据", { BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据", {
level: "normal"
}); });
} }
} }

5
dist/fix/fix.js vendored

@ -904,6 +904,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return target; return target;
} }
function freeze() {
return Object.freeze.apply(null, arguments);
}
/** /**
* Delete a property and trigger change if necessary. * Delete a property and trigger change if necessary.
*/ */
@ -1519,6 +1523,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
exports.notify = notify; exports.notify = notify;
exports.defineReactive = defineReactive; exports.defineReactive = defineReactive;
exports.set = set; exports.set = set;
exports.freeze = freeze;
exports.del = del; exports.del = del;
exports.Watcher = Watcher; exports.Watcher = Watcher;
exports.pushTarget = pushTarget; exports.pushTarget = pushTarget;

11
dist/fix/fix.proxy.js vendored

@ -1838,6 +1838,7 @@
if (!runner.effect.active) { if (!runner.effect.active) {
return; return;
} }
if (cb) { if (cb) {
// watch(source, cb) // watch(source, cb)
var newValue = runner(); var newValue = runner();
@ -2404,6 +2405,15 @@
} }
target[key] = val; target[key] = val;
return target;
}
function freeze(value) {
Object.defineProperty(value, '__v_skip', {
configurable: true,
enumerable: false,
value: value
});
return value;
} }
function del(target, key) { function del(target, key) {
if (_.isArray(target)) { if (_.isArray(target)) {
@ -2456,6 +2466,7 @@
exports.config = config; exports.config = config;
exports.define = define; exports.define = define;
exports.del = del; exports.del = del;
exports.freeze = freeze;
exports.mixin = mixin; exports.mixin = mixin;
exports.set = set; exports.set = set;
exports.toJSON = toJSON; exports.toJSON = toJSON;

3
jsy.lessconfig.json

@ -1,4 +1,5 @@
{ {
"@background-color-card-primary": "#003D4D",
"@color-primary": "#00acbe", "@color-primary": "#00acbe",
"font-color-normal": "#0d1540", "font-color-normal": "#0d1540",
"font-color-light-gray": "#0d1540", "font-color-light-gray": "#0d1540",
@ -17,4 +18,4 @@
"border-color-disabled": "#e8eaed", "border-color-disabled": "#e8eaed",
"border-color-success": "#28b668", "border-color-success": "#28b668",
"border-color-negative": "#e65251" "border-color-negative": "#e65251"
} }

2
package.json

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

25
src/base/combination/bubble.js

@ -223,17 +223,6 @@
this.combo = BI.createWidget(this.options.el, { this.combo = BI.createWidget(this.options.el, {
value: this.options.value value: this.options.value
}); });
if (this.options.showArrow) {
this.arrow = BI.createWidget({
type: "bi.absolute",
cls: "bi-bubble-arrow",
items: [{
type: "bi.layout",
cls: "bubble-arrow"
}]
});
}
}, },
_assertPopupView: function () { _assertPopupView: function () {
@ -241,17 +230,9 @@
if (this.popupView == null) { if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, { this.popupView = BI.createWidget(this.options.popup, {
type: "bi.bubble_popup_view", type: "bi.bubble_popup_view",
showArrow: o.showArrow,
value: o.value value: o.value
}, this); }, this);
if (this.options.showArrow) {
BI.createWidget({
type: "bi.absolute",
element: this.popupView,
items: [{
el: this.arrow
}]
});
}
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.combo.setValue(self.getValue()); self.combo.setValue(self.getValue());
@ -340,7 +321,7 @@
this._assertPopupViewRender(); this._assertPopupViewRender();
this.fireEvent(BI.Bubble.EVENT_BEFORE_POPUPVIEW); this.fireEvent(BI.Bubble.EVENT_BEFORE_POPUPVIEW);
// popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下 // popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下
this.popupView.css({left: -999999999, top: -99999999}); // this.popupView.css({left: -999999999, top: -99999999});
this.popupView.visible(); this.popupView.visible();
this.adjustWidth(e); this.adjustWidth(e);
@ -360,7 +341,7 @@
name: "arrow", name: "arrow",
options: { options: {
padding: 5, padding: 5,
element: this.arrow.element[0] element: this.popupView.arrow.element[0]
} }
}); });
} }

69
src/base/combination/combo.js

@ -6,8 +6,11 @@
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.Combo = BI.inherit(BI.Bubble, { BI.Combo = BI.inherit(BI.Bubble, {
_const: {
TRIANGLE_LENGTH: 9
},
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.Bubble.superclass._defaultConfig.apply(this, arguments); var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-combo" + (BI.isIE() ? " hack" : ""), baseCls: (conf.baseCls || "") + " bi-combo" + (BI.isIE() ? " hack" : ""),
attributes: { attributes: {
@ -25,6 +28,7 @@
hideWhenBlur: true, hideWhenBlur: true,
hideWhenAnotherComboOpen: false, hideWhenAnotherComboOpen: false,
hideWhenClickOutside: true, hideWhenClickOutside: true,
showArrow: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
isNeedAdjustWidth: true, isNeedAdjustWidth: true,
stopEvent: false, stopEvent: false,
@ -96,29 +100,24 @@
}, this)); }, this));
}, },
_initCombo: function () {
this.combo = BI.createWidget(this.options.el, {
value: this.options.value
});
},
_assertPopupView: function () { _assertPopupView: function () {
var self = this, o = this.options; var self = this, o = this.options;
if (this.popupView == null) { if (this.popupView == null) {
this.popupView = BI.createWidget(this.options.popup, { this.popupView = BI.createWidget(this.options.popup, {
type: "bi.popup_view", type: "bi.popup_view",
showArrow: o.showArrow,
value: o.value value: o.value
}, this); }, this);
this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
self.combo.setValue(self.getValue()); self.combo.setValue(self.getValue());
self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj); self.fireEvent(BI.Bubble.EVENT_CHANGE, value, obj);
} }
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
this.popupView.setVisible(false); this.popupView.setVisible(false);
BI.nextTick(function () { BI.nextTick(function () {
self.fireEvent(BI.Combo.EVENT_AFTER_INIT); self.fireEvent(BI.Bubble.EVENT_AFTER_INIT);
}); });
} }
}, },
@ -144,7 +143,7 @@
delete needHideWhenAnotherComboOpen[this.getName()]; delete needHideWhenAnotherComboOpen[this.getName()];
delete currentOpenedCombos[this.getName()]; delete currentOpenedCombos[this.getName()];
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName());
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
}, },
@ -170,11 +169,11 @@
this.element.addClass(this.options.comboClass); this.element.addClass(this.options.comboClass);
o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
BI.Widget._renderEngine.createElement(document).unbind("mousewheel." + this.getName()); o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).unbind("mousewheel." + this.getName());
BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName());
o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this));
BI.Widget._renderEngine.createElement(document).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); o.hideWhenClickOutside && BI.Widget._renderEngine.createElement(document).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this));
BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).bind("blur." + this.getName(), BI.bind(this._hideIf, this)); BI.EVENT_BLUR && o.hideWhenBlur && BI.Widget._renderEngine.createElement(window).bind("blur." + this.getName(), BI.bind(this._hideIf, this));
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
}, },
@ -214,69 +213,83 @@
switch (o.direction) { switch (o.direction) {
case "bottom": case "bottom":
case "bottom,right": case "bottom,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break; break;
case "top": case "top":
case "top,right": case "top,right":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break; break;
case "left": case "left":
case "left,bottom": case "left,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "right": case "right":
case "right,bottom": case "right,bottom":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "top,left": case "top,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break; break;
case "bottom,left": case "bottom,left":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break; break;
case "left,top": case "left,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break; break;
case "right,top": case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break; break;
case "right,innerRight": case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break; break;
case "right,innerLeft": case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break; break;
case "innerRight": case "innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerRight", "innerLeft", "right", "left", "bottom", "top"], o.offsetStyle);
break; break;
case "innerLeft": case "innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle); p = BI.DOM.getComboPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.adjustYOffset, o.isNeedAdjustHeight, ["innerLeft", "innerRight", "left", "right", "bottom", "top"], o.offsetStyle);
break; break;
case "top,custom": case "top,custom":
case "custom,top": case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); p = BI.DOM.getTopAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "top";
break; break;
case "custom,bottom": case "custom,bottom":
case "bottom,custom": case "bottom,custom":
p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight); p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, (o.adjustYOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0), o.isNeedAdjustHeight);
p.dir = "bottom";
break; break;
case "left,custom": case "left,custom":
case "custom,left": case "custom,left":
p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength); p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "left";
break; break;
case "custom,right": case "custom,right":
case "right,custom": case "right,custom":
p = BI.DOM.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength); p = BI.DOM.getRightAdaptPosition(combo, this.popupView, (o.adjustXOffset || o.adjustLength) + (o.showArrow ? this._const.TRIANGLE_LENGTH : 0));
delete p.top; delete p.top;
delete p.adaptHeight; delete p.adaptHeight;
p.dir = "right";
break; break;
} }
if ("adaptHeight" in p) { if ("adaptHeight" in p) {
this.resetListHeight(p["adaptHeight"]); this.resetListHeight(p["adaptHeight"]);
} }
var width = this.combo.element.outerWidth();
var height = this.combo.element.outerHeight();
this.popupView.setDirection && this.popupView.setDirection(p.dir, {
width: width,
height: height,
offsetStyle: o.offsetStyle,
adjustXOffset: o.adjustXOffset,
adjustYOffset: o.adjustYOffset,
offset: this.combo.element.offset()
});
if ("left" in p) { if ("left" in p) {
this.popupView.element.css({ this.popupView.element.css({
left: p.left left: p.left

8
src/base/combination/searcher.js

@ -307,6 +307,14 @@ BI.Searcher = BI.inherit(BI.Widget, {
destroyed: function () { destroyed: function () {
BI.Maskers.remove(this.getName()); BI.Maskers.remove(this.getName());
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
} }
}); });
BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE";

25
src/base/foundation/message.js

@ -133,6 +133,31 @@ BI.Msg = function () {
items: [ items: [
{ {
type: "bi.border", type: "bi.border",
attributes: {
tabIndex: 1
},
mounted: function () {
this.element.keyup(function (e) {
if (e.keyCode === BI.KeyCode.ENTER) {
close();
if (BI.isFunction(callback)) {
callback.apply(null, [true]);
}
} else if (e.keyCode === BI.KeyCode.ESCAPE) {
close();
if (hasCancel === true) {
if (BI.isFunction(callback)) {
callback.apply(null, [false]);
}
}
}
});
try {
this.element.focus();
} catch (e) {
}
},
cls: "bi-card", cls: "bi-card",
items: { items: {
north: { north: {

194
src/base/layer/layer.popup.js

@ -4,9 +4,12 @@
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _const: {
TRIANGLE_LENGTH: 9
},
_defaultConfig: function (props) {
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {
_baseCls: "bi-popup-view", _baseCls: "bi-popup-view" + (props.primary ? " bi-primary" : ""),
// 品牌色 // 品牌色
primary: false, primary: false,
maxWidth: "auto", maxWidth: "auto",
@ -21,6 +24,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
hgap: 0, hgap: 0,
innerVGap: 0, innerVGap: 0,
innerHGap: 0, innerHGap: 0,
showArrow: false,
direction: BI.Direction.Top, // 工具栏的方向 direction: BI.Direction.Top, // 工具栏的方向
stopEvent: false, // 是否停止mousedown、mouseup事件 stopEvent: false, // 是否停止mousedown、mouseup事件
stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡 stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡
@ -56,12 +60,12 @@ BI.PopupView = BI.inherit(BI.Widget, {
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_popup,
"min-width": BI.isNumeric(o.minWidth) ? (o.minWidth / BI.pixRatio + BI.pixUnit) : o.minWidth, "min-width": BI.isNumeric(o.minWidth) ? (o.minWidth / BI.pixRatio + BI.pixUnit) : o.minWidth,
"max-width": BI.isNumeric(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth "max-width": BI.isNumeric(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth
}).bind({ click: fn }); }).bind({click: fn});
this.element.bind("mousewheel", fn); this.element.bind("mousewheel", fn);
o.stopPropagation && this.element.bind({ mousedown: fn, mouseup: fn, mouseover: fn }); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});
o.stopEvent && this.element.bind({ mousedown: stop, mouseup: stop, mouseover: stop }); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});
this.tool = this._createTool(); this.tool = this._createTool();
this.tab = this._createTab(); this.tab = this._createTab();
this.view = this._createView(); this.view = this._createView();
@ -84,25 +88,47 @@ BI.PopupView = BI.inherit(BI.Widget, {
bgap: o.bgap, bgap: o.bgap,
vgap: o.vgap, vgap: o.vgap,
hgap: o.hgap, hgap: o.hgap,
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, items: BI.LogicFactory.createLogicItemsByDirection(o.direction, BI.extend({
BI.extend({
cls: "list-view-outer bi-card list-view-shadow" + (o.primary ? " bi-primary" : "") cls: "list-view-outer bi-card list-view-shadow" + (o.primary ? " bi-primary" : "")
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar) items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar)
}))) })))
) )
})))); }))));
if (o.showArrow) {
this.arrow = BI.createWidget({
type: "bi.absolute",
cls: "bi-bubble-arrow",
items: [{
type: "bi.layout",
cls: "bubble-arrow"
}]
});
// 因为三角符号的原因位置变大了,需要占位
this.placeholder = BI.createWidget({
type: "bi.layout"
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.arrow
}, {
el: this.placeholder
}]
});
}
}, },
_createView: function () { _createView: function () {
var o = this.options; var o = this.options;
this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value});
this.button_group.element.css({ this.button_group.element.css({
"min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight, "min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight,
"padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit, "padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit, "padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-left": o.innerHGap / BI.pixRatio + BI.pixUnit, "padding-left": o.innerHGap / BI.pixRatio + BI.pixUnit,
"padding-right": o.innerHGap / BI.pixRatio + BI.pixUnit, "padding-right": o.innerHGap / BI.pixRatio + BI.pixUnit
}); });
return this.button_group; return this.button_group;
}, },
@ -147,6 +173,154 @@ BI.PopupView = BI.inherit(BI.Widget, {
}); });
}, },
setDirection: function (direction, position) {
if (this.options.showArrow) {
var style, placeholderStyle;
var adjustXOffset = position.adjustXOffset || 0;
var adjustYOffset = position.adjustYOffset || 0;
var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds();
var bodyWidth = bodyBounds.width;
var bodyHeight = bodyBounds.height;
var popupWidth = this.element.outerWidth();
var popupHeight = this.element.outerHeight();
var offset = position.offset;
var offsetStyle = position.offsetStyle;
var middle = offsetStyle === "center" || offsetStyle === "middle";
var minLeft = Math.max(5, offset.left + 5 + popupWidth - bodyWidth);
var minRight = Math.max(5, popupWidth - (offset.left + 5));
var minTop = Math.max(5, offset.top + 5 + popupHeight - bodyHeight);
var minBottom = Math.max(5, popupHeight - (offset.top + 5));
var maxLeft = Math.min(popupWidth - 12 - 5, offset.left + position.width - 12 - 5);
var maxRight = Math.min(popupWidth - 12 - 5, bodyWidth - (offset.left + position.width - 12 - 5));
var maxTop = Math.min(popupHeight - 12 - 5, offset.top + position.height - 12 - 5);
var maxBottom = Math.min(popupHeight - 12 - 5, bodyHeight - (offset.top + position.height - 12 - 5));
switch (direction) {
case "bottom":
case "bottom,right":
direction = "bottom";
style = {
// 5表示留出一定的空间
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
};
placeholderStyle = {
left: 0,
right: 0,
height: this._const.TRIANGLE_LENGTH,
top: -this._const.TRIANGLE_LENGTH,
bottom: ""
};
break;
case "bottom,left":
direction = "bottom";
style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
};
placeholderStyle = {
left: 0,
right: 0,
height: this._const.TRIANGLE_LENGTH,
top: -this._const.TRIANGLE_LENGTH,
bottom: ""
};
break;
case "top":
case "top,right":
direction = "top";
style = {
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 6, minLeft, maxLeft)
};
placeholderStyle = {
left: 0,
right: 0,
height: this._const.TRIANGLE_LENGTH,
top: "",
bottom: -this._const.TRIANGLE_LENGTH
};
break;
case "top,left":
direction = "top";
style = {
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 6, minRight, maxRight)
};
placeholderStyle = {
left: 0,
right: 0,
height: this._const.TRIANGLE_LENGTH,
top: "",
bottom: -this._const.TRIANGLE_LENGTH
};
break;
case "left":
case "left,bottom":
direction = "left";
style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
};
placeholderStyle = {
top: 0,
bottom: 0,
width: this._const.TRIANGLE_LENGTH,
right: -this._const.TRIANGLE_LENGTH,
left: ""
};
break;
case "left,top":
direction = "left";
style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
};
placeholderStyle = {
top: 0,
bottom: 0,
width: this._const.TRIANGLE_LENGTH,
right: -this._const.TRIANGLE_LENGTH,
left: ""
};
break;
case "right":
case "right,bottom":
direction = "right";
style = {
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 6, minTop, maxTop)
};
placeholderStyle = {
top: 0,
bottom: 0,
width: this._const.TRIANGLE_LENGTH,
left: -this._const.TRIANGLE_LENGTH,
right: ""
};
break;
case "right,top":
direction = "right";
style = {
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 6, minBottom, maxBottom)
};
placeholderStyle = {
top: 0,
bottom: 0,
width: this._const.TRIANGLE_LENGTH,
left: -this._const.TRIANGLE_LENGTH,
right: ""
};
break;
case "right,innerRight":
break;
case "right,innerLeft":
break;
case "innerRight":
break;
case "innerLeft":
break;
}
this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction);
this.arrow.element.css(style);
this.placeholder.element.css(placeholderStyle);
}
},
getView: function () { getView: function () {
return this.view; return this.view;
}, },
@ -166,7 +340,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0);
var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap;
this.view.resetHeight ? this.view.resetHeight(resetHeight) : this.view.resetHeight ? this.view.resetHeight(resetHeight) :
this.view.element.css({ "max-height": resetHeight / BI.pixRatio + BI.pixUnit }); this.view.element.css({"max-height": resetHeight / BI.pixRatio + BI.pixUnit});
}, },
setValue: function (selectedValues) { setValue: function (selectedValues) {

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

@ -204,6 +204,12 @@ BI.BasicButton = BI.inherit(BI.Single, {
}); });
} }
hand.click(clk); hand.click(clk);
// enter键等同于点击
hand.keyup(function (e) {
if (e.keyCode === BI.KeyCode.ENTER) {
clk(e);
}
});
break; break;
} }
}); });

12
src/base/single/button/buttons/button.js

@ -16,6 +16,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); var conf = BI.Button.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-button" + ((BI.isIE() && BI.isIE9Below()) ? " hack" : ""), baseCls: (conf.baseCls || "") + " bi-button" + ((BI.isIE() && BI.isIE9Below()) ? " hack" : ""),
attributes: {
tabIndex: 1
},
minWidth: (props.block === true || props.clear === true) ? 0 : 80, minWidth: (props.block === true || props.clear === true) ? 0 : 80,
height: 24, height: 24,
shadow: props.clear !== true, shadow: props.clear !== true,
@ -125,6 +128,15 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
}, },
_setEnable: function (enable) {
BI.Button.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
setText: function (text) { setText: function (text) {
BI.Button.superclass.setText.apply(this, arguments); BI.Button.superclass.setText.apply(this, arguments);
this.text.setText(text); this.text.setText(text);

14
src/base/single/button/listitem/icontextitem.js

@ -57,6 +57,13 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
})))); }))));
}, },
doClick: function () {
BI.IconTextItem.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this);
}
},
setValue: function () { setValue: function () {
if (!this.isReadOnly()) { if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments); this.text.setValue.apply(this.text, arguments);
@ -75,13 +82,6 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
return this.text.getText(); return this.text.getText();
}, },
doClick: function () {
BI.IconTextItem.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this);
}
},
doRedMark: function () { doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments); this.text.doRedMark.apply(this.text, arguments);
}, },

14
src/base/single/button/node/icontextnode.js

@ -53,6 +53,13 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
})))); }))));
}, },
doClick: function () {
BI.IconTextNode.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this);
}
},
setValue: function () { setValue: function () {
if (!this.isReadOnly()) { if (!this.isReadOnly()) {
this.text.setValue.apply(this.text, arguments); this.text.setValue.apply(this.text, arguments);
@ -71,13 +78,6 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
return this.text.getText(); return this.text.getText();
}, },
doClick: function () {
BI.IconTextNode.superclass.doClick.apply(this, arguments);
if (this.isValid()) {
this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this);
}
},
doRedMark: function () { doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments); this.text.doRedMark.apply(this.text, arguments);
}, },

1
src/base/single/tip/tip.toast.js

@ -93,6 +93,7 @@ BI.Toast = BI.inherit(BI.Tip, {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.horizontal", type: "bi.horizontal",
horizontalAlign: BI.HorizontalAlign.Stretch, horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Middle,
element: this, element: this,
items: items, items: items,
vgap: 7, vgap: 7,

12
src/case/button/item.multiselect.js

@ -7,6 +7,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-multi-select-item", extraCls: "bi-multi-select-item",
attributes: {
tabIndex: 1
},
height: 24, height: 24,
logic: { logic: {
dynamic: false dynamic: false
@ -55,6 +58,15 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
})))); }))));
}, },
_setEnable: function (enable) {
BI.MultiSelectItem.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
doRedMark: function () { doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments); this.text.doRedMark.apply(this.text, arguments);
}, },

18
src/case/button/item.singleselect.icontext.js

@ -8,6 +8,9 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active", extraCls: "bi-single-select-icon-text-item bi-list-item-active",
attributes: {
tabIndex: 1
},
iconCls: "", iconCls: "",
height: 24 height: 24
}); });
@ -35,6 +38,15 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
}); });
}, },
_setEnable: function (enable) {
BI.SingleSelectIconTextItem.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
isSelected: function () { isSelected: function () {
return this.text.isSelected(); return this.text.isSelected();
}, },
@ -49,11 +61,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
unRedMark: function () { unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments); this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments);
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem); BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);

12
src/case/button/item.singleselect.js

@ -2,6 +2,9 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
attributes: {
tabIndex: 1
},
hgap: 10, hgap: 10,
height: 24, height: 24,
textAlign: "left" textAlign: "left"
@ -25,6 +28,15 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
}); });
}, },
_setEnable: function (enable) {
BI.SingleSelectItem.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
doRedMark: function () { doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments); this.text.doRedMark.apply(this.text, arguments);
}, },

12
src/case/button/item.singleselect.radio.js

@ -7,6 +7,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
attributes: {
tabIndex: 1
},
logic: { logic: {
dynamic: false dynamic: false
}, },
@ -51,6 +54,15 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
})))); }))));
}, },
_setEnable: function (enable) {
BI.SingleSelectRadioItem.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
doRedMark: function () { doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments); this.text.doRedMark.apply(this.text, arguments);
}, },

12
src/case/button/switch.js

@ -9,6 +9,9 @@ BI.Switch = BI.inherit(BI.BasicButton, {
props: { props: {
extraCls: "bi-switch", extraCls: "bi-switch",
attributes: {
tabIndex: 1
},
height: 20, height: 20,
width: 44, width: 44,
logic: { logic: {
@ -58,6 +61,15 @@ BI.Switch = BI.inherit(BI.BasicButton, {
}; };
}, },
_setEnable: function (enable) {
BI.Switch.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.attr("tabIndex", 1);
} else if (enable === false) {
this.element.removeAttr("tabIndex");
}
},
setSelected: function (v) { setSelected: function (v) {
BI.Switch.superclass.setSelected.apply(this, arguments); BI.Switch.superclass.setSelected.apply(this, arguments);
this.layout.attr("items")[0].left = v ? 28 : 4; this.layout.attr("items")[0].left = v ? 28 : 4;

117
src/case/combo/bubblecombo/combo.bubble.js

@ -5,9 +5,6 @@
* @extends BI.Widget * @extends BI.Widget
*/ */
BI.BubbleCombo = BI.inherit(BI.Widget, { BI.BubbleCombo = BI.inherit(BI.Widget, {
_const: {
TRIANGLE_LENGTH: 9
},
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-bubble-combo", baseCls: "bi-bubble-combo",
@ -17,6 +14,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
direction: "bottom,left", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom,left", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
hideWhenClickOutside: true,
hideWhenBlur: true, hideWhenBlur: true,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
isNeedAdjustWidth: true, isNeedAdjustWidth: true,
@ -43,16 +41,17 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
direction: o.direction, direction: o.direction,
isDefaultInit: o.isDefaultInit, isDefaultInit: o.isDefaultInit,
hideWhenBlur: o.hideWhenBlur, hideWhenBlur: o.hideWhenBlur,
hideWhenClickOutside: o.hideWhenClickOutside,
destroyWhenHide: o.destroyWhenHide, destroyWhenHide: o.destroyWhenHide,
hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen, hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen,
isNeedAdjustHeight: o.isNeedAdjustHeight, isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth, isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),
stopPropagation: o.stopPropagation, stopPropagation: o.stopPropagation,
adjustXOffset: 0, adjustXOffset: 0,
adjustYOffset: 0, adjustYOffset: 0,
hideChecker: o.hideChecker, hideChecker: o.hideChecker,
offsetStyle: o.offsetStyle, offsetStyle: o.offsetStyle,
showArrow: true,
el: o.el, el: o.el,
popup: BI.extend({ popup: BI.extend({
type: "bi.bubble_popup_view", type: "bi.bubble_popup_view",
@ -80,11 +79,9 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments); self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments);
}); });
this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {
self._showTriangle();
self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments); self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments);
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self._hideTriangle();
self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments); self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments);
}); });
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
@ -92,115 +89,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
}); });
}, },
_getAdjustLength: function () {
return this._const.TRIANGLE_LENGTH + this.options.adjustLength;
},
_createTriangle: function (direction) {
var o = this.options, pos = {}, op = {};
var adjustLength = this.options.adjustLength;
var offset = this.element.offset();
var left = offset.left, right = offset.left + this.element.outerWidth();
var top = offset.top, bottom = offset.top + this.element.outerHeight();
switch (direction) {
case "left":
pos = {
top: top,
height: this.element.outerHeight(),
left: left - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "right":
pos = {
top: top,
height: this.element.outerHeight(),
left: right + adjustLength
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "top":
pos = {
left: left,
width: this.element.outerWidth(),
top: top - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
case "bottom":
pos = {
left: left,
width: this.element.outerWidth(),
top: bottom + adjustLength
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
default:
break;
}
this.triangle && this.triangle.destroy();
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
scrollable: false,
cls: "button-combo-triangle-wrapper",
items: [{
type: "bi.layout",
cls: "bubble-combo-triangle-" + direction + (o.primary ? " bi-primary": "")
}]
});
pos.el = this.triangle;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
_createLeftTriangle: function () {
this._createTriangle("left");
},
_createRightTriangle: function () {
this._createTriangle("right");
},
_createTopTriangle: function () {
this._createTriangle("top");
},
_createBottomTriangle: function () {
this._createTriangle("bottom");
},
_showTriangle: function () {
var pos = this.combo.getPopupPosition();
switch (pos.dir) {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
break;
case "top,left":
case "top,right":
this._createTopTriangle();
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
break;
}
},
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
},
hideView: function () { hideView: function () {
this._hideTriangle();
this.combo && this.combo.hideView(); this.combo && this.combo.hideView();
}, },

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

@ -13,7 +13,7 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
maxWidth: 300, maxWidth: 300,
minHeight: 50 minHeight: 50
}); });
}, }
}); });
BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView);
@ -47,33 +47,36 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if (BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push({
el: buttonOpt,
lgap: i === 0 ? 20 : 15,
rgap: i === o.buttons.length - 1 ? 20 : 0
});
} else { } else {
items.push(BI.extend({ items.push({
type: "bi.button", el: BI.extend({
height: 24, type: "bi.button",
handler: function (v) { height: 24,
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); handler: function (v) {
} self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}, buttonOpt)); }
}, buttonOpt),
lgap: i === 0 ? 20 : 15,
rgap: i === o.buttons.length - 1 ? 20 : 0
});
} }
}); });
return BI.createWidget({ return BI.createWidget({
type: "bi.center", type: "bi.right_vertical_adapt",
height: 54, height: 54,
rgap: 20, items: items
items: [{
type: "bi.right_vertical_adapt",
lgap: 15,
items: items
}]
}); });
}, },
_createView: function () { _createView: function () {
var o = this.options; var o = this.options;
var button = BI.createWidget({ var button = BI.createWidget({
type: "bi.button_group", type: "bi.button_group",
items: [o.el], items: [o.el],
layouts: [{ layouts: [{
@ -135,6 +138,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
return { return {
type: "bi.bubble_bar_popup_view", type: "bi.bubble_bar_popup_view",
primary: o.primary, primary: o.primary,
showArrow: o.showArrow,
minWidth: o.minWidth, minWidth: o.minWidth,
maxWidth: o.maxWidth, maxWidth: o.maxWidth,
minHeight: o.minHeight, minHeight: o.minHeight,
@ -154,9 +158,12 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
}; };
}, },
setDirection: function (direction, position) {
this.popup.setDirection(direction, position);
},
populate: function (v) { populate: function (v) {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
}, }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);

2
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -35,7 +35,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
self.trigger = this; self.trigger = this;
}, },
items: o.items, items: o.items,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
value: o.value, value: o.value,

3
src/component/allvaluechooser/abstract.allvaluechooser.js

@ -24,6 +24,9 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) { _valueFormatter: function (v) {
var text = v; var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) { if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) { BI.some(this.items, function (i, item) {
// 把value都换成字符串 // 把value都换成字符串

3
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -14,6 +14,9 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) { _valueFormatter: function (v) {
var text = v; var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) { if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) { BI.some(this.items, function (i, item) {
if (item.value === v || item.value + "" === v) { if (item.value === v || item.value + "" === v) {

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

@ -102,6 +102,14 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
this._initData(items); this._initData(items);
} }
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
} }
}); });

8
src/component/treevaluechooser/combo.treevaluechooser.insert.js

@ -101,6 +101,14 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this._initData(items); this._initData(items);
} }
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
} }
}); });

8
src/component/treevaluechooser/combo.treevaluechooser.js

@ -105,6 +105,14 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this._initData(items); this._initData(items);
} }
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
} }
}); });

3
src/component/valuechooser/abstract.valuechooser.js

@ -22,6 +22,9 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
_valueFormatter: function (v) { _valueFormatter: function (v) {
var text = v; var text = v;
if (this.options.valueFormatter) {
return this.options.valueFormatter(v);
}
if (BI.isNotNull(this.items)) { if (BI.isNotNull(this.items)) {
BI.some(this.items, function (i, item) { BI.some(this.items, function (i, item) {
// 把value都换成字符串 // 把value都换成字符串

2
src/less/base/combo/combo.bubble.less

@ -30,7 +30,7 @@
background-color: @color-bi-background-bubble-combo-triangle; background-color: @color-bi-background-bubble-combo-triangle;
} }
&.bi-primary:before { &.bi-primary:before {
background-color: @background-color-primary; background-color: @background-color-card-primary;
} }
} }
} }

23
src/less/base/single/button/button.less

@ -7,6 +7,7 @@ body .bi-button, #body .bi-button {
.border-radius(0px); .border-radius(0px);
} }
.border-radius(2px); .border-radius(2px);
outline: 0;
border: 1px solid @color-bi-border-button; border: 1px solid @color-bi-border-button;
background-color: @color-bi-background-button; background-color: @color-bi-background-button;
.box-sizing(border-box); .box-sizing(border-box);
@ -22,7 +23,7 @@ body .bi-button, #body .bi-button {
font-size: inherit; font-size: inherit;
border-width: 0; border-width: 0;
background-color: transparent; background-color: transparent;
&:hover { &:hover, &:focus {
.opacity(0.8); .opacity(0.8);
} }
&:active { &:active {
@ -47,7 +48,7 @@ body .bi-button, #body .bi-button {
&, & .b-font:before { &, & .b-font:before {
color: @color-bi-text-common-ghost-button; color: @color-bi-text-common-ghost-button;
} }
&:hover { &:hover, &:focus {
color: @color-bi-text; color: @color-bi-text;
background-color: @color-bi-background-hover-common-ghost-button; background-color: @color-bi-background-hover-common-ghost-button;
} }
@ -73,7 +74,7 @@ body .bi-button, #body .bi-button {
border-width: 0; border-width: 0;
} }
&.ghost { &.ghost {
&:hover { &:hover, &:focus {
border-color: @color-bi-border-ignore-button; border-color: @color-bi-border-ignore-button;
&, & .b-font:before { &, & .b-font:before {
color: @color-bi-text-ignore-button; color: @color-bi-text-ignore-button;
@ -103,7 +104,7 @@ body .bi-button, #body .bi-button {
color: @color-bi-text-success-ghost-button; color: @color-bi-text-success-ghost-button;
} }
background-color: transparent; background-color: transparent;
&:hover { &:hover, &:focus {
color: @color-bi-text; color: @color-bi-text;
background-color: @color-bi-background-success-button; background-color: @color-bi-background-success-button;
} }
@ -132,7 +133,7 @@ body .bi-button, #body .bi-button {
color: @color-bi-text-warning-ghost-button; color: @color-bi-text-warning-ghost-button;
} }
background-color: transparent; background-color: transparent;
&:hover { &:hover, &:focus {
color: @color-bi-text; color: @color-bi-text;
background-color: @color-bi-background-warning-button; background-color: @color-bi-background-warning-button;
} }
@ -161,7 +162,7 @@ body .bi-button, #body .bi-button {
color: @color-bi-text-error-ghost-button; color: @color-bi-text-error-ghost-button;
} }
background-color: transparent; background-color: transparent;
&:hover { &:hover, &:focus {
color: @color-bi-text; color: @color-bi-text;
background-color: @color-bi-background-error-button; background-color: @color-bi-background-error-button;
} }
@ -208,7 +209,7 @@ body .bi-button, #body .bi-button {
} }
background: transparent !important; background: transparent !important;
border-width: 0 !important; border-width: 0 !important;
&:hover, &:active { &:hover, &:focus, &:active {
.opacity(1); .opacity(1);
} }
} }
@ -285,7 +286,7 @@ body .bi-button, #body .bi-button {
.opacity(0.1); .opacity(0.1);
.transition(@activeStopVal) .transition(@activeStopVal)
} }
&:hover{ &:hover, &:focus {
& .bi-button-mask { & .bi-button-mask {
.opacity(0.1); .opacity(0.1);
background-color: @color-bi-background-hover-button-mask; background-color: @color-bi-background-hover-button-mask;
@ -317,7 +318,7 @@ body .bi-button, #body .bi-button {
.opacity(0.1); .opacity(0.1);
.transition(@activeStopVal) .transition(@activeStopVal)
} }
&:hover { &:hover, &:focus {
&:not(.clear, .ghost) { &:not(.clear, .ghost) {
background-color: @color-bi-background-hover-ignore-button-mask; background-color: @color-bi-background-hover-ignore-button-mask;
} }
@ -333,10 +334,10 @@ body .bi-button, #body .bi-button {
.bi-button, #body .bi-button { .bi-button, #body .bi-button {
&.button-ignore { &.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark; background-color: @color-bi-background-ignore-button-theme-dark;
&:hover{ &:hover, &:focus {
background-color: @color-bi-background-hover-ignore-button-theme-dark; background-color: @color-bi-background-hover-ignore-button-theme-dark;
} }
&:active{ &:active {
background-color: @color-bi-background-active-ignore-button-theme-dark; background-color: @color-bi-background-active-ignore-button-theme-dark;
} }
&.clear { &.clear {

3
src/less/base/single/button/switch.less

@ -1,6 +1,7 @@
@import "../../../index"; @import "../../../index";
.bi-switch{ .bi-switch {
font-size: @font-size-12;
.border-radius(40px 40px 40px 40px); .border-radius(40px 40px 40px 40px);
background-color: @color-bi-background-switch; background-color: @color-bi-background-switch;
.transition(all .2s); .transition(all .2s);

2
src/less/base/single/tip/tip.toast.less

@ -1,7 +1,7 @@
@import "../../../index"; @import "../../../index";
.bi-toast{ .bi-toast{
color: @color-bi-text; color: @color-bi-color-toast-text;
max-width: 400px; max-width: 400px;
min-width: 150px; min-width: 150px;
line-height: @font-size-16; line-height: @font-size-16;

49
src/less/base/view/popupview.less

@ -27,50 +27,50 @@
} }
} }
.bi-popup-view[data-popper-placement^='top'] { .bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top {
> .bi-bubble-arrow { > .bi-bubble-arrow {
bottom: -10px; bottom: -12px;
> .bubble-arrow { > .bubble-arrow {
bottom: 6px; bottom: 8px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='bottom'] { .bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom {
> .bi-bubble-arrow { > .bi-bubble-arrow {
top: -10px; top: -12px;
> .bubble-arrow { > .bubble-arrow {
top: 6px; top: 8px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='left'] { .bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left {
> .bi-bubble-arrow { > .bi-bubble-arrow {
right: -10px; right: -12px;
> .bubble-arrow { > .bubble-arrow {
right: 6px; right: 8px;
} }
} }
} }
.bi-popup-view[data-popper-placement^='right'] { .bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right {
> .bi-bubble-arrow { > .bi-bubble-arrow {
left: -10px; left: -12px;
> .bubble-arrow { > .bubble-arrow {
left: 6px; left: 8px;
} }
} }
} }
.bi-bubble-arrow { .bi-bubble-arrow {
width: 10px; width: 12px;
height: 10px; height: 12px;
overflow: hidden; overflow: hidden;
.bubble-arrow { .bubble-arrow {
width: 10px; width: 12px;
height: 10px; height: 12px;
position: absolute; position: absolute;
&:before { &:before {
width: 10px; width: 12px;
height: 10px; height: 12px;
position: absolute; position: absolute;
content: ""; content: "";
background: @color-bi-background-default; background: @color-bi-background-default;
@ -85,6 +85,17 @@
} }
} }
.bi-popup-view.bi-primary {
.bi-bubble-arrow {
.bubble-arrow {
&:before {
background-color: @background-color-card-primary;
color: @color-card-primary;
}
}
}
}
.bi-theme-dark { .bi-theme-dark {
.bubble-arrow:before { .bubble-arrow:before {
background: @color-bi-background-default-theme-dark; background: @color-bi-background-default-theme-dark;
@ -102,4 +113,4 @@
& .list-view-shadow { & .list-view-shadow {
.box-shadow(0 1px 5px 0, fade(@background-color-normal-theme-dark, 80)); .box-shadow(0 1px 5px 0, fade(@background-color-normal-theme-dark, 80));
} }
} }

2
src/less/core/utils/common.less

@ -123,7 +123,7 @@
color: @color-bi-text-card; color: @color-bi-text-card;
} }
&.bi-primary { &.bi-primary {
background-color: @background-color-primary; background-color: @background-color-card-primary;
color: @color-card-primary; color: @color-card-primary;
} }
} }

2
src/less/lib/constant.less

@ -24,7 +24,7 @@
// 品牌 // 品牌
@color-primary: #3685f2; @color-primary: #3685f2;
@color-card-primary: @color-white; @color-card-primary: @color-white;
@background-color-primary: #1e4092; @background-color-card-primary: #1e4092;
//green //green
@color-green-100: #13cd66; @color-green-100: #13cd66;

5
src/less/lib/theme.less

@ -27,6 +27,11 @@
@color-bi-background-toast-warning: @color-bi-background-warning; @color-bi-background-toast-warning: @color-bi-background-warning;
@color-bi-background-toast-error: @color-bi-background-failure; @color-bi-background-toast-error: @color-bi-background-failure;
@color-bi-background-toast-normal: @color-bi-background-highlight; @color-bi-background-toast-normal: @color-bi-background-highlight;
@color-bi-color-toast-success: @color-bi-text;
@color-bi-color-toast-warning: @color-bi-text;
@color-bi-color-toast-error: @color-bi-text;
@color-bi-color-toast-normal: @color-bi-text;
@color-bi-color-toast-text: @color-bi-text;
//bubble //bubble
@color-bi-background-bubble-success: @color-bi-background-light-success; @color-bi-background-bubble-success: @color-bi-background-light-success;

9
src/less/resource/font.less

@ -1,5 +1,6 @@
@import "../lib/font"; @import "../lib/font";
@import "../lib/colors"; @import "../lib/colors";
@import "../lib/theme";
@import "../image"; @import "../image";
.addFontRes(); .addFontRes();
@ -81,10 +82,10 @@
.font-hover-active(pull-down-ha-font, @font-down-triangle, @color-bi-text-light-gray); .font-hover-active(pull-down-ha-font, @font-down-triangle, @color-bi-text-light-gray);
//toast //toast
.font(toast-error-font, @font-tip-error); .font(toast-error-font, @font-tip-error, @color-bi-color-toast-error);
.font(toast-success-font, @font-tip-success); .font(toast-success-font, @font-tip-success, @color-bi-color-toast-error);
.font(toast-warning-font, @font-tip-warning); .font(toast-warning-font, @font-tip-warning, @color-bi-color-toast-warning);
.font(toast-message-font, @font-tip-message); .font(toast-message-font, @font-tip-message, @color-bi-color-toast-normal);
//数值区间 //数值区间
.font(less-font, @font-less); .font(less-font, @font-less);

11
src/less/widget/interactivearrangement/interactivearrangement.less

@ -1,11 +0,0 @@
@import "../../index";
.bi-interactive-arrangement {
& .interactive-arrangement-dragtag-line {
z-index: @zIndex-tip;
background-color: @color-bi-background-interactive-arrangement-dragtag-line;
}
& .interactive-arrangement-dragtag-icon {
z-index: @zIndex-tip;
}
}

12
src/widget/dynamicdate/dynamicdate.combo.js

@ -298,6 +298,18 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
}, },
hidePopupView: function () { hidePopupView: function () {
this.combo.hideView(); this.combo.hideView();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

13
src/widget/dynamicdate/dynamicdate.trigger.js

@ -308,8 +308,19 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
}, },
getValue: function () { getValue: function () {
return this.storeValue; return this.storeValue;
} },
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";

12
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -306,6 +306,18 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
isValid: function () { isValid: function () {
return this.trigger.isValid(); return this.trigger.isValid();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

13
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -379,8 +379,19 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
isValid: function () { isValid: function () {
return this.editor.isValid(); return this.editor.isValid();
} },
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";

13
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -139,7 +139,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
watermark: o.watermark, watermark: o.watermark,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
@ -174,6 +174,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
var value = self.trigger.getSearcher().getKeyword(); var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue([value]); self.combo.setValue([value]);
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);
} }
}] }]
}, },
@ -237,6 +238,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
this.combo.populate(items); this.combo.populate(items);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
} }
}); });
@ -246,4 +255,4 @@ BI.MultiLayerSelectTreeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);

8
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -237,6 +237,14 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
getValue: function () { getValue: function () {
return this.searcher.getValue(); return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
} }
}); });

13
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -142,7 +142,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
value: o.value, value: o.value,
tipType: o.tipType, tipType: o.tipType,
@ -176,6 +176,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
var value = self.trigger.getSearcher().getKeyword(); var value = self.trigger.getSearcher().getKeyword();
self.combo.setValue([value]); self.combo.setValue([value]);
self.combo.hideView(); self.combo.hideView();
self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);
} }
}] }]
}, },
@ -238,6 +239,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
this.combo.populate(items); this.combo.populate(items);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
} }
}); });
@ -246,4 +255,4 @@ BI.MultiLayerSingleTreeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo); BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);

8
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -239,6 +239,14 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
getValue: function () { getValue: function () {
return this.searcher.getValue(); return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
} }
}); });
BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS";

2
src/widget/multiselect/multiselect.combo.js

@ -44,7 +44,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {

2
src/widget/multiselect/multiselect.insert.combo.js

@ -40,7 +40,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger", type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
watermark: o.watermark, watermark: o.watermark,
// adapter: this.popup, // adapter: this.popup,

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger", type: "bi.multi_select_insert_trigger",
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {

6
src/widget/multiselect/multiselect.popup.view.js

@ -84,7 +84,11 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, {
resetWidth: function (w) { resetWidth: function (w) {
this.popupView.resetWidth(w); this.popupView.resetWidth(w);
} },
setDirection: function (direction, position) {
this.popupView.setDirection(direction, position);
},
}); });
BI.MultiSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";

6
src/widget/multiselect/multiselect.popup.view.nobar.js

@ -80,7 +80,11 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {
resetWidth: function (w) { resetWidth: function (w) {
this.popupView.resetWidth(w); this.popupView.resetWidth(w);
} },
setDirection: function (direction, position) {
this.popupView.setDirection(direction, position);
},
}); });
BI.MultiSelectNoBarPopupView.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiSelectNoBarPopupView.EVENT_CHANGE = "EVENT_CHANGE";

8
src/widget/multiselect/multiselect.trigger.js

@ -136,6 +136,14 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
getValue: function () { getValue: function () {
return this.searcher.getValue(); return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
} }
}); });

8
src/widget/multiselect/trigger/searcher.multiselect.js

@ -94,6 +94,14 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
adjustView: function () { adjustView: function () {
this.searcher.adjustView(); this.searcher.adjustView();
}, },

10
src/widget/multitree/multi.tree.combo.js

@ -27,7 +27,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
text: o.text, text: o.text,
watermark: o.watermark, watermark: o.watermark,
@ -344,6 +344,14 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
populate: function () { populate: function () {
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
} }
}); });

10
src/widget/multitree/multi.tree.insert.combo.js

@ -28,7 +28,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.multi_select_trigger", type: "bi.multi_select_trigger",
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
@ -360,6 +360,14 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
populate: function () { populate: function () {
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
} }
}); });

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

@ -30,7 +30,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
text: o.text, text: o.text,
watermark: o.watermark, watermark: o.watermark,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
@ -378,6 +378,14 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
populate: function () { populate: function () {
this.combo.populate(); this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
} }
}); });

4
src/widget/multitree/multi.tree.popup.js

@ -84,6 +84,10 @@ BI.MultiTreePopup = BI.inherit(BI.Pane, {
return this.tree.hasChecked(); return this.tree.hasChecked();
}, },
setDirection: function (direction, position) {
this.popupView.setDirection(direction, position);
},
resetHeight: function (h) { resetHeight: function (h) {
this.popupView.resetHeight(h); this.popupView.resetHeight(h);
}, },

8
src/widget/multitree/trigger/searcher.list.multi.tree.js

@ -153,6 +153,14 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
this.searcher.populate.apply(this.searcher, arguments); this.searcher.populate.apply(this.searcher, arguments);
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
} }
}); });

8
src/widget/multitree/trigger/searcher.multi.tree.js

@ -184,6 +184,14 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
this.searcher.populate.apply(this.searcher, arguments); this.searcher.populate.apply(this.searcher, arguments);
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
} }
}); });

6
src/widget/searchmultitextvaluecombo/multitextvalue.popup.view.search.js

@ -77,7 +77,11 @@ BI.SearchMultiSelectPopupView = BI.inherit(BI.Widget, {
resetWidth: function (w) { resetWidth: function (w) {
this.popupView.resetWidth(w); this.popupView.resetWidth(w);
} },
setDirection: function (direction, position) {
this.popupView.setDirection(direction, position);
},
}); });
BI.SearchMultiSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE"; BI.SearchMultiSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";

2
src/widget/singleselect/singleselect.combo.js

@ -30,7 +30,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,

2
src/widget/singleselect/singleselect.insert.combo.js

@ -31,7 +31,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
watermark: o.watermark, watermark: o.watermark,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
allowNoSelect: o.allowNoSelect, allowNoSelect: o.allowNoSelect,
allowEdit: o.allowEdit, allowEdit: o.allowEdit,
// adapter: this.popup, // adapter: this.popup,

8
src/widget/singleselect/singleselect.popup.view.js

@ -69,10 +69,14 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
resetWidth: function (w) { resetWidth: function (w) {
this.popupView.resetWidth(w); this.popupView.resetWidth(w);
} },
setDirection: function (direction, position) {
this.popupView.setDirection(direction, position);
},
}); });
BI.SingleSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE"; BI.SingleSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_popup_view", BI.SingleSelectPopupView); BI.shortcut("bi.single_select_popup_view", BI.SingleSelectPopupView);

12
src/widget/time/time.combo.js

@ -222,6 +222,18 @@
this.setValue(nowTome); this.setValue(nowTome);
this.hidePopupView(); this.hidePopupView();
this.fireEvent(BI.TimeCombo.EVENT_CONFIRM); this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

13
src/widget/time/time.trigger.js

@ -180,8 +180,19 @@
getValue: function () { getValue: function () {
return this.storeValue; return this.storeValue;
} },
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
}); });
BI.shortcut("bi.time_trigger", BI.TimeTrigger); BI.shortcut("bi.time_trigger", BI.TimeTrigger);
})(); })();

1
typescript/base/combination/combo.ts

@ -11,6 +11,7 @@ export declare class Combo extends Widget {
static EVENT_AFTER_POPUPVIEW: string; static EVENT_AFTER_POPUPVIEW: string;
static EVENT_BEFORE_HIDEVIEW: string; static EVENT_BEFORE_HIDEVIEW: string;
static EVENT_AFTER_HIDEVIEW: string; static EVENT_AFTER_HIDEVIEW: string;
static closeAll: Function;
props: { props: {
trigger?: 'click' | 'hover' | 'click-hover' | ''; trigger?: 'click' | 'hover' | 'click-hover' | '';

2
typescript/base/single/button/button.basic.ts

@ -52,7 +52,7 @@ export declare class BasicButton extends Single {
beforeClick(): void; beforeClick(): void;
doClick(): void; doClick(e?: Event): void;
handle(): BasicButton; handle(): BasicButton;

4
typescript/component/treevaluechooser/combo.listtreevaluechooser.ts

@ -23,4 +23,8 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts

@ -22,4 +22,8 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/component/treevaluechooser/combo.treevaluechooser.ts

@ -24,4 +24,8 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

1
typescript/core/widget.ts

@ -671,6 +671,7 @@ export declare class Widget extends OB {
/** /**
* *
*/ */
addWidget(widget: _Widget): _Widget;
addWidget(_name: any, _widget: _Widget): _Widget; addWidget(_name: any, _widget: _Widget): _Widget;
/** /**

6
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -36,6 +36,12 @@ export declare class DynamicDateCombo extends Single {
hidePopupView(): void; hidePopupView(): void;
getValue(): DynamicDataComboValue; getValue(): DynamicDataComboValue;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
} }
export interface DynamicDataComboValue { export interface DynamicDataComboValue {

6
typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts

@ -32,4 +32,10 @@ export declare class DynamicDateTimeCombo extends Single {
getKey(): string; getKey(): string;
hidePopupView(): void; hidePopupView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void
} }

4
typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts

@ -15,4 +15,8 @@ export declare class MultiLayerSelectTreeCombo extends Widget {
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/widget/multilayersingletree/multilayersingletree.combo.ts

@ -15,4 +15,8 @@ export declare class MultiLayerSingleTreeCombo extends Widget {
populate<T>(items: T[]): void; populate<T>(items: T[]): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/widget/multitree/multi.tree.combo.ts

@ -15,4 +15,8 @@ export declare class MultiTreeCombo extends Single {
hideView(): void; hideView(): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/widget/multitree/multi.tree.insert.combo.ts

@ -23,4 +23,8 @@ export declare class MultiTreeInsertCombo extends Single {
populate(): void; populate(): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

4
typescript/widget/multitree/multi.tree.list.combo.ts

@ -22,4 +22,8 @@ export declare class MultiTreeListCombo extends Single {
populate(): void; populate(): void;
getSearcher(): Widget; getSearcher(): Widget;
focus(): void;
blur(): void;
} }

6
typescript/widget/time/time.combo.ts

@ -10,4 +10,10 @@ export declare class TimeCombo extends Single {
static EVENT_BEFORE_POPUPVIEW: string; static EVENT_BEFORE_POPUPVIEW: string;
hidePopupView(): void; hidePopupView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
} }

Loading…
Cancel
Save