Browse Source

Merge branch 'master' into typescript

es6
iapyang 5 years ago
parent
commit
bca73d0de1
  1. 56
      dist/2.0/fineui.css
  2. 104
      dist/2.0/fineui.ie.js
  3. 68
      dist/2.0/fineui.ie.min.js
  4. 120
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 68
      dist/2.0/fineui.min.js
  7. 2
      dist/base.js
  8. 56
      dist/bundle.css
  9. 104
      dist/bundle.ie.js
  10. 68
      dist/bundle.ie.min.js
  11. 120
      dist/bundle.js
  12. 2
      dist/bundle.min.css
  13. 68
      dist/bundle.min.js
  14. 17
      dist/case.js
  15. 2
      dist/config.js
  16. 28
      dist/core.js
  17. 56
      dist/fineui.css
  18. 99
      dist/fineui.ie.js
  19. 78
      dist/fineui.ie.min.js
  20. 115
      dist/fineui.js
  21. 2
      dist/fineui.min.css
  22. 78
      dist/fineui.min.js
  23. 113
      dist/fineui_without_jquery_polyfill.js
  24. 6
      dist/fix/fix.compact.ie.js
  25. 22
      dist/fix/fix.compact.js
  26. 56
      dist/resource.css
  27. 4
      dist/utils.js
  28. 4
      dist/utils.min.js
  29. 46
      dist/widget.js
  30. 56
      public/css/app.css
  31. 2
      src/base/single/input/input.js
  32. 1
      src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js
  33. 14
      src/case/editor/editor.state.js
  34. 2
      src/case/loader/loader.list.js
  35. 2
      src/core/base.js
  36. 2
      src/core/platform/web/detectElementResize.js
  37. 24
      src/core/wrapper/layout/layout.adaptive.js
  38. 56
      src/css/resource/app.css
  39. 4
      src/less/lib/constant.less
  40. 30
      src/less/resource/app.less
  41. 2
      src/widget/dynamicdate/dynamicdate.combo.js
  42. 2
      src/widget/dynamicdate/dynamicdate.trigger.js
  43. 2
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  44. 2
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  45. 4
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  46. 5
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  47. 4
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  48. 5
      src/widget/multilayersingletree/multilayersingletree.trigger.js
  49. 1
      src/widget/multiselect/trigger/editor.multiselect.js
  50. 4
      src/widget/multitree/multi.tree.insert.combo.js
  51. 4
      src/widget/multitree/multi.tree.list.combo.js
  52. 6
      src/widget/singleselect/trigger/editor.singleselect.js
  53. 7
      src/widget/singleslider/button/iconbutton.slider.js
  54. 1
      src/widget/singleslider/singleslider.js
  55. 2
      src/widget/time/time.combo.js
  56. 2
      src/widget/time/time.trigger.js
  57. 30
      typescript/core/base.ts
  58. 2
      typescript/core/i18n.ts
  59. 56
      ui/css/app.css

56
dist/2.0/fineui.css vendored

@ -4664,44 +4664,60 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-farbtastic .wheel { .bi-farbtastic .wheel {
background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center; background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center;

104
dist/2.0/fineui.ie.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21696,7 +21696,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34510,53 +34510,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -48463,7 +48463,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -56859,6 +56859,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58218,7 +58219,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -58445,20 +58447,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -59661,8 +59664,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -64692,6 +64695,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -64910,6 +64914,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65310,7 +65315,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -65658,6 +65663,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -65879,6 +65885,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -66386,7 +66393,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -68902,7 +68909,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69018,10 +69027,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69098,7 +69109,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -69875,7 +69887,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69991,10 +70005,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70071,7 +70087,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -73559,6 +73576,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -75875,7 +75893,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -75976,7 +75994,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76191,7 +76209,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76292,7 +76310,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -81589,7 +81607,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -81603,7 +81622,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82214,7 +82234,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -83358,6 +83377,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -83491,6 +83511,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -83555,7 +83576,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -88601,7 +88622,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });
@ -88728,7 +88753,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} }
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}());(function () { }());
(function () {
var Events = { var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind // Bind an event to a `callback` function. Passing `"all"` will bind
@ -89315,7 +89341,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}());BI.i18n = { }());BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

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

File diff suppressed because one or more lines are too long

120
dist/2.0/fineui.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21696,7 +21696,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34510,53 +34510,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -48867,7 +48867,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -57263,6 +57263,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58622,7 +58623,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -58849,20 +58851,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -60065,8 +60068,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -65096,6 +65099,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -65314,6 +65318,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65714,7 +65719,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -66062,6 +66067,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -66283,6 +66289,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -66790,7 +66797,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -69306,7 +69313,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69422,10 +69431,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69502,7 +69513,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -70279,7 +70291,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -70395,10 +70409,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70475,7 +70491,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -73963,6 +73980,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -76279,7 +76297,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76380,7 +76398,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76595,7 +76613,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76696,7 +76714,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -81993,7 +82011,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -82007,7 +82026,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82618,7 +82638,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -83762,6 +83781,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -83895,6 +83915,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -83959,7 +83980,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -88815,7 +88836,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE"; BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () { BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
function initWatch(vm, watch) { function initWatch (vm, watch) {
vm._watchers || (vm._watchers = []); vm._watchers || (vm._watchers = []);
for (var key in watch) { for (var key in watch) {
var handler = watch[key]; var handler = watch[key];
@ -88829,7 +88850,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} }
} }
function createWatcher(vm, keyOrFn, handler) { function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), { return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
store: vm.store store: vm.store
}); });
@ -88838,24 +88859,24 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var target = null; var target = null;
var targetStack = []; var targetStack = [];
function pushTarget(_target) { function pushTarget (_target) {
if (target) targetStack.push(target); if (target) targetStack.push(target);
Fix.Model.target = target = _target; Fix.Model.target = target = _target;
} }
function popTarget() { function popTarget () {
Fix.Model.target = target = targetStack.pop(); Fix.Model.target = target = targetStack.pop();
} }
var context = null; var context = null;
var contextStack = []; var contextStack = [];
function pushContext(_context) { function pushContext (_context) {
if (context) contextStack.push(context); if (context) contextStack.push(context);
Fix.Model.context = context = _context; Fix.Model.context = context = _context;
} }
function popContext() { function popContext () {
Fix.Model.context = context = contextStack.pop(); Fix.Model.context = context = contextStack.pop();
} }
@ -88876,7 +88897,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}, options); }, options);
}; };
function findStore(widget) { function findStore (widget) {
if (target != null) { if (target != null) {
return target; return target;
} }
@ -88922,7 +88943,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}; };
}); });
function createStore() { function createStore () {
var needPop = false; var needPop = false;
if (_global.Fix && this._store) { if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element); var store = findStore(this.options.context || this.options.element);
@ -88988,7 +89009,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });
@ -89062,7 +89087,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}; };
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}());(function () { }());
(function () {
var Events = { var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind // Bind an event to a `callback` function. Passing `"all"` will bind
@ -89649,7 +89675,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}());BI.i18n = { }());BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/base.js vendored

@ -10601,7 +10601,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;

56
dist/bundle.css vendored

@ -4664,44 +4664,60 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-farbtastic .wheel { .bi-farbtastic .wheel {
background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center; background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/background/wheel.png') no-repeat center center;

104
dist/bundle.ie.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21696,7 +21696,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34510,53 +34510,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -48463,7 +48463,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -56859,6 +56859,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58218,7 +58219,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -58445,20 +58447,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -59661,8 +59664,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -64692,6 +64695,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -64910,6 +64914,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65310,7 +65315,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -65658,6 +65663,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -65879,6 +65885,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -66386,7 +66393,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -68902,7 +68909,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69018,10 +69027,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69098,7 +69109,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -69875,7 +69887,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69991,10 +70005,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70071,7 +70087,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -73559,6 +73576,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -75875,7 +75893,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -75976,7 +75994,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76191,7 +76209,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76292,7 +76310,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -81589,7 +81607,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -81603,7 +81622,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82214,7 +82234,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -83358,6 +83377,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -83491,6 +83511,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -83555,7 +83576,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -88601,7 +88622,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });
@ -88728,7 +88753,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} }
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}());(function () { }());
(function () {
var Events = { var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind // Bind an event to a `callback` function. Passing `"all"` will bind
@ -89315,7 +89341,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}());BI.i18n = { }());BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

68
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

120
dist/bundle.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21696,7 +21696,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34510,53 +34510,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -48867,7 +48867,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -57263,6 +57263,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58622,7 +58623,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -58849,20 +58851,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -60065,8 +60068,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -65096,6 +65099,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -65314,6 +65318,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65714,7 +65719,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -66062,6 +66067,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -66283,6 +66289,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -66790,7 +66797,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -69306,7 +69313,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69422,10 +69431,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69502,7 +69513,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -70279,7 +70291,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -70395,10 +70409,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70475,7 +70491,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -73963,6 +73980,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -76279,7 +76297,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76380,7 +76398,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76595,7 +76613,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76696,7 +76714,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -81993,7 +82011,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -82007,7 +82026,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82618,7 +82638,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -83762,6 +83781,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -83895,6 +83915,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -83959,7 +83980,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -88815,7 +88836,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE"; BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () { BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
function initWatch(vm, watch) { function initWatch (vm, watch) {
vm._watchers || (vm._watchers = []); vm._watchers || (vm._watchers = []);
for (var key in watch) { for (var key in watch) {
var handler = watch[key]; var handler = watch[key];
@ -88829,7 +88850,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} }
} }
function createWatcher(vm, keyOrFn, handler) { function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), { return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
store: vm.store store: vm.store
}); });
@ -88838,24 +88859,24 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var target = null; var target = null;
var targetStack = []; var targetStack = [];
function pushTarget(_target) { function pushTarget (_target) {
if (target) targetStack.push(target); if (target) targetStack.push(target);
Fix.Model.target = target = _target; Fix.Model.target = target = _target;
} }
function popTarget() { function popTarget () {
Fix.Model.target = target = targetStack.pop(); Fix.Model.target = target = targetStack.pop();
} }
var context = null; var context = null;
var contextStack = []; var contextStack = [];
function pushContext(_context) { function pushContext (_context) {
if (context) contextStack.push(context); if (context) contextStack.push(context);
Fix.Model.context = context = _context; Fix.Model.context = context = _context;
} }
function popContext() { function popContext () {
Fix.Model.context = context = contextStack.pop(); Fix.Model.context = context = contextStack.pop();
} }
@ -88876,7 +88897,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}, options); }, options);
}; };
function findStore(widget) { function findStore (widget) {
if (target != null) { if (target != null) {
return target; return target;
} }
@ -88922,7 +88943,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}; };
}); });
function createStore() { function createStore () {
var needPop = false; var needPop = false;
if (_global.Fix && this._store) { if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element); var store = findStore(this.options.context || this.options.element);
@ -88988,7 +89009,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });
@ -89062,7 +89087,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}; };
} }
BI.watch = Fix.watch; BI.watch = Fix.watch;
}());(function () { }());
(function () {
var Events = { var Events = {
// Bind an event to a `callback` function. Passing `"all"` will bind // Bind an event to a `callback` function. Passing `"all"` will bind
@ -89649,7 +89675,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}());BI.i18n = { }());BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

17
dist/case.js vendored

@ -4839,6 +4839,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -6198,7 +6199,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -6425,20 +6427,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -7641,8 +7644,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();

2
dist/config.js vendored

@ -2,7 +2,7 @@
BI.i18n = { BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

28
dist/core.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21696,7 +21696,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34510,53 +34510,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {

56
dist/fineui.css vendored

@ -4664,44 +4664,60 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-farbtastic .wheel { .bi-farbtastic .wheel {
background: url('resources?path=/com/fr/web/ui/images/1x/background/wheel.png') no-repeat center center; background: url('resources?path=/com/fr/web/ui/images/1x/background/wheel.png') no-repeat center center;

99
dist/fineui.ie.js vendored

@ -11636,7 +11636,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21941,7 +21941,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34755,53 +34755,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -48708,7 +48708,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -57104,6 +57104,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58463,7 +58464,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -58690,20 +58692,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -59906,8 +59909,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -64937,6 +64940,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -65155,6 +65159,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65555,7 +65560,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -65903,6 +65908,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -66124,6 +66130,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -66631,7 +66638,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -69147,7 +69154,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69263,10 +69272,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69343,7 +69354,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -70120,7 +70132,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -70236,10 +70250,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70316,7 +70332,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -73804,6 +73821,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -76120,7 +76138,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76221,7 +76239,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76436,7 +76454,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76537,7 +76555,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -81834,7 +81852,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -81848,7 +81867,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82459,7 +82479,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -83603,6 +83622,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -83736,6 +83756,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -83800,7 +83821,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -89430,7 +89451,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });

78
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

115
dist/fineui.js vendored

@ -11636,7 +11636,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -21941,7 +21941,7 @@ BI.prepares.push(function () {
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";
@ -34755,53 +34755,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -49112,7 +49112,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -57508,6 +57508,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -58867,7 +58868,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -59094,20 +59096,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -60310,8 +60313,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -65341,6 +65344,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -65559,6 +65563,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -65959,7 +65964,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -66307,6 +66312,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -66528,6 +66534,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -67035,7 +67042,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -69551,7 +69558,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -69667,10 +69676,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -69747,7 +69758,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -70524,7 +70536,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -70640,10 +70654,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -70720,7 +70736,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -74208,6 +74225,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -76524,7 +76542,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76625,7 +76643,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -76840,7 +76858,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -76941,7 +76959,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -82238,7 +82256,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -82252,7 +82271,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -82863,7 +82883,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -84007,6 +84026,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -84140,6 +84160,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -84204,7 +84225,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -89644,7 +89665,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
// Create the default BI.history. // Create the default BI.history.
BI.history = new History; BI.history = new History;
}());;(function () { }());;(function () {
function initWatch(vm, watch) { function initWatch (vm, watch) {
vm._watchers || (vm._watchers = []); vm._watchers || (vm._watchers = []);
for (var key in watch) { for (var key in watch) {
var handler = watch[key]; var handler = watch[key];
@ -89658,7 +89679,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
} }
} }
function createWatcher(vm, keyOrFn, handler) { function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), { return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
store: vm.store store: vm.store
}); });
@ -89667,24 +89688,24 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
var target = null; var target = null;
var targetStack = []; var targetStack = [];
function pushTarget(_target) { function pushTarget (_target) {
if (target) targetStack.push(target); if (target) targetStack.push(target);
Fix.Model.target = target = _target; Fix.Model.target = target = _target;
} }
function popTarget() { function popTarget () {
Fix.Model.target = target = targetStack.pop(); Fix.Model.target = target = targetStack.pop();
} }
var context = null; var context = null;
var contextStack = []; var contextStack = [];
function pushContext(_context) { function pushContext (_context) {
if (context) contextStack.push(context); if (context) contextStack.push(context);
Fix.Model.context = context = _context; Fix.Model.context = context = _context;
} }
function popContext() { function popContext () {
Fix.Model.context = context = contextStack.pop(); Fix.Model.context = context = contextStack.pop();
} }
@ -89705,7 +89726,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
}, options); }, options);
}; };
function findStore(widget) { function findStore (widget) {
if (target != null) { if (target != null) {
return target; return target;
} }
@ -89751,7 +89772,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
}; };
}); });
function createStore() { function createStore () {
var needPop = false; var needPop = false;
if (_global.Fix && this._store) { if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element); var store = findStore(this.options.context || this.options.element);
@ -89817,7 +89838,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

78
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

113
dist/fineui_without_jquery_polyfill.js vendored

@ -11391,7 +11391,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -23330,53 +23330,53 @@ BI.shortcut("bi.absolute", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {
@ -35890,7 +35890,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;
@ -40390,6 +40390,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,
@ -41749,7 +41750,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -41976,20 +41978,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
@ -43192,8 +43195,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();
@ -47947,6 +47950,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -48165,6 +48169,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -48565,7 +48570,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -48913,6 +48918,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -49134,6 +49140,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -49641,7 +49648,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -52157,7 +52164,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -52273,10 +52282,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -52353,7 +52364,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -53130,7 +53142,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -53246,10 +53260,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -53326,7 +53342,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -56814,6 +56831,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -59130,7 +59148,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -59231,7 +59249,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -59446,7 +59464,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -59547,7 +59565,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -64844,7 +64862,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -64858,7 +64877,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -65469,7 +65489,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -66613,6 +66632,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -66746,6 +66766,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -66810,7 +66831,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",
@ -71666,7 +71687,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE"; BI.ValueChooserPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () { BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
function initWatch(vm, watch) { function initWatch (vm, watch) {
vm._watchers || (vm._watchers = []); vm._watchers || (vm._watchers = []);
for (var key in watch) { for (var key in watch) {
var handler = watch[key]; var handler = watch[key];
@ -71680,7 +71701,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} }
} }
function createWatcher(vm, keyOrFn, handler) { function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), { return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
store: vm.store store: vm.store
}); });
@ -71689,24 +71710,24 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var target = null; var target = null;
var targetStack = []; var targetStack = [];
function pushTarget(_target) { function pushTarget (_target) {
if (target) targetStack.push(target); if (target) targetStack.push(target);
Fix.Model.target = target = _target; Fix.Model.target = target = _target;
} }
function popTarget() { function popTarget () {
Fix.Model.target = target = targetStack.pop(); Fix.Model.target = target = targetStack.pop();
} }
var context = null; var context = null;
var contextStack = []; var contextStack = [];
function pushContext(_context) { function pushContext (_context) {
if (context) contextStack.push(context); if (context) contextStack.push(context);
Fix.Model.context = context = _context; Fix.Model.context = context = _context;
} }
function popContext() { function popContext () {
Fix.Model.context = context = contextStack.pop(); Fix.Model.context = context = contextStack.pop();
} }
@ -71727,7 +71748,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}, options); }, options);
}; };
function findStore(widget) { function findStore (widget) {
if (target != null) { if (target != null) {
return target; return target;
} }
@ -71773,7 +71794,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
}; };
}); });
function createStore() { function createStore () {
var needPop = false; var needPop = false;
if (_global.Fix && this._store) { if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element); var store = findStore(this.options.context || this.options.element);
@ -71839,7 +71860,11 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });

6
dist/fix/fix.compact.ie.js vendored

@ -189,7 +189,11 @@
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });

22
dist/fix/fix.compact.js vendored

@ -1,5 +1,5 @@
;(function () { ;(function () {
function initWatch(vm, watch) { function initWatch (vm, watch) {
vm._watchers || (vm._watchers = []); vm._watchers || (vm._watchers = []);
for (var key in watch) { for (var key in watch) {
var handler = watch[key]; var handler = watch[key];
@ -13,7 +13,7 @@
} }
} }
function createWatcher(vm, keyOrFn, handler) { function createWatcher (vm, keyOrFn, handler) {
return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), { return Fix.watch(vm.model, keyOrFn, _.bind(handler, vm), {
store: vm.store store: vm.store
}); });
@ -22,24 +22,24 @@
var target = null; var target = null;
var targetStack = []; var targetStack = [];
function pushTarget(_target) { function pushTarget (_target) {
if (target) targetStack.push(target); if (target) targetStack.push(target);
Fix.Model.target = target = _target; Fix.Model.target = target = _target;
} }
function popTarget() { function popTarget () {
Fix.Model.target = target = targetStack.pop(); Fix.Model.target = target = targetStack.pop();
} }
var context = null; var context = null;
var contextStack = []; var contextStack = [];
function pushContext(_context) { function pushContext (_context) {
if (context) contextStack.push(context); if (context) contextStack.push(context);
Fix.Model.context = context = _context; Fix.Model.context = context = _context;
} }
function popContext() { function popContext () {
Fix.Model.context = context = contextStack.pop(); Fix.Model.context = context = contextStack.pop();
} }
@ -60,7 +60,7 @@
}, options); }, options);
}; };
function findStore(widget) { function findStore (widget) {
if (target != null) { if (target != null) {
return target; return target;
} }
@ -106,7 +106,7 @@
}; };
}); });
function createStore() { function createStore () {
var needPop = false; var needPop = false;
if (_global.Fix && this._store) { if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element); var store = findStore(this.options.context || this.options.element);
@ -172,7 +172,11 @@
var old = BI.Widget.prototype[name]; var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () { old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store); this.store && pushTarget(this.store);
var res = old.apply(this, arguments); try {
var res = old.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && popTarget(); this.store && popTarget();
return res; return res;
}); });

56
dist/resource.css vendored

@ -30,44 +30,60 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-farbtastic .wheel { .bi-farbtastic .wheel {
background: url('images/1x/background/wheel.png') no-repeat center center; background: url('images/1x/background/wheel.png') no-repeat center center;

4
dist/utils.js vendored

@ -12170,7 +12170,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }
@ -18109,7 +18109,7 @@ BI.Region.prototype = {
};BI.i18n = { };BI.i18n = {
"BI-Multi_Date_Quarter_End": "季度末", "BI-Multi_Date_Quarter_End": "季度末",
"BI-Multi_Date_Month_Begin": "月初", "BI-Multi_Date_Month_Begin": "月初",
"BI-Multi_Date_YMD": "年//日", "BI-Multi_Date_YMD": "年月日",
"BI-Custom_Color": "自定义颜色", "BI-Custom_Color": "自定义颜色",
"BI-Numerical_Interval_Input_Data": "请输入数值", "BI-Numerical_Interval_Input_Data": "请输入数值",
"BI-Please_Input_Natural_Number": "请输入非负整数", "BI-Please_Input_Natural_Number": "请输入非负整数",

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

46
dist/widget.js vendored

@ -2762,6 +2762,7 @@ BI.extend(BI.DynamicDateCard, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -2980,6 +2981,7 @@ BI.extend(BI.DynamicDateCard, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -3380,7 +3382,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -3728,6 +3730,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -3949,6 +3952,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
@ -4456,7 +4460,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
@ -6972,7 +6976,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -7088,10 +7094,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -7168,7 +7176,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -7945,7 +7954,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {
@ -8061,10 +8072,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -8141,7 +8154,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {
@ -11629,6 +11643,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,
@ -13945,7 +13960,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -14046,7 +14061,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -14261,7 +14276,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -14362,7 +14377,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
@ -19659,7 +19674,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -19673,7 +19689,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -20284,7 +20301,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {
@ -21428,6 +21444,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -21561,6 +21578,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
@ -21625,7 +21643,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",

56
public/css/app.css

@ -30,42 +30,58 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }

2
src/base/single/input/input.js

@ -164,7 +164,7 @@ BI.Input = BI.inherit(BI.Single, {
if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) { if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {
this.fireEvent(BI.Input.EVENT_BACKSPACE); this.fireEvent(BI.Input.EVENT_BACKSPACE);
} }
this.fireEvent(BI.Input.EVENT_KEY_DOWN); this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);
// _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务 // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务
var lastValue = this._lastValue; var lastValue = this._lastValue;

1
src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js

@ -25,6 +25,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value, o.items), text: this._digest(o.value, o.items),
value: o.value, value: o.value,
height: o.height, height: o.height,

14
src/case/editor/editor.state.js

@ -21,7 +21,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
watermark: "", watermark: "",
errorText: "", errorText: "",
height: 24, height: 24,
text: BI.i18nText("BI-Basic_Unrestricted") defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
text: BI.i18nText("BI-Basic_Unrestricted") // 显示值
}); });
}, },
@ -248,20 +249,21 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Select_Part")); this.text.setText(BI.i18nText("BI-Select_Part"));
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");
} else { } else {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} }
return; return;
} }
if (BI.isString(v)) { if (BI.isString(v)) {
this.text.setText(v); this.text.setText(v);
v === o.text ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark"); // 配置了defaultText才判断标灰,其他情况不标灰
(BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
return; return;
} }
if (BI.isArray(v)) { if (BI.isArray(v)) {
if (BI.isEmpty(v)) { if (BI.isEmpty(v)) {
this.text.setText(o.text); this.text.setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);
this.text.element.addClass("bi-water-mark"); BI.isKey(o.defaultText) ? this.text.element.addClass("bi-water-mark") : this.text.element.removeClass("bi-water-mark");
} else if (v.length === 1) { } else if (v.length === 1) {
this.text.setText(v[0]); this.text.setText(v[0]);
this.text.element.removeClass("bi-water-mark"); this.text.element.removeClass("bi-water-mark");

2
src/case/loader/loader.list.js

@ -100,8 +100,8 @@ BI.ListLoader = BI.inherit(BI.Widget, {
addItems: function (items) { addItems: function (items) {
this.count += items.length; this.count += items.length;
if (BI.isObject(this.next)) { if (BI.isObject(this.next)) {
this.options.items = this.options.items.concat(items);
if (this.hasNext()) { if (this.hasNext()) {
this.options.items = this.options.items.concat(items);
this.next.setLoaded(); this.next.setLoaded();
} else { } else {
this.next.setEnd(); this.next.setEnd();

2
src/core/base.js

@ -1212,7 +1212,7 @@ if (!_global.BI) {
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) { if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime(); var localTime = dt.getTime();
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准 // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数 var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区 var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset); return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
} }

2
src/core/platform/web/detectElementResize.js

@ -114,7 +114,7 @@
var addResizeListener = function (element, fn) { var addResizeListener = function (element, fn) {
if (attachEvent) { if (attachEvent) {
element.attachEvent("onresize", fn); element.attachEvent("onresize", fn);
BI.defer(fn); BI.nextTick(fn);
} else { } else {
if (!element.__resizeTriggers__) { if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === "static") element.style.position = "relative"; if (getComputedStyle(element).position === "static") element.style.position = "relative";

24
src/core/wrapper/layout/layout.adaptive.js

@ -22,53 +22,53 @@ BI.AdaptiveLayout = BI.inherit(BI.Layout, {
var left = 0, right = 0, top = 0, bottom = 0; var left = 0, right = 0, top = 0, bottom = 0;
if (BI.isNotNull(item.left)) { if (BI.isNotNull(item.left)) {
w.element.css({ w.element.css({
"margin-left": item.left left: item.left
}); });
} }
if (BI.isNotNull(item.right)) { if (BI.isNotNull(item.right)) {
w.element.css({ w.element.css({
"margin-right": item.right right: item.right
}); });
} }
if (BI.isNotNull(item.top)) { if (BI.isNotNull(item.top)) {
w.element.css({ w.element.css({
"margin-top": item.top top: item.top
}); });
} }
if (BI.isNotNull(item.bottom)) { if (BI.isNotNull(item.bottom)) {
w.element.css({ w.element.css({
"margin-bottom": item.bottom bottom: item.bottom
}); });
} }
if (BI.isNotNull(o.hgap)) { if (BI.isNotNull(o.hgap)) {
left += o.hgap; left += o.hgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
right += o.hgap; right += o.hgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.vgap)) { if (BI.isNotNull(o.vgap)) {
top += o.vgap; top += o.vgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
bottom += o.vgap; bottom += o.vgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(o.lgap)) { if (BI.isNotNull(o.lgap)) {
left += o.lgap; left += o.lgap;
w.element.css({left: left}); w.element.css({"margin-left": left});
} }
if (BI.isNotNull(o.rgap)) { if (BI.isNotNull(o.rgap)) {
right += o.rgap; right += o.rgap;
w.element.css({right: right}); w.element.css({"margin-right": right});
} }
if (BI.isNotNull(o.tgap)) { if (BI.isNotNull(o.tgap)) {
top += o.tgap; top += o.tgap;
w.element.css({top: top}); w.element.css({"margin-top": top});
} }
if (BI.isNotNull(o.bgap)) { if (BI.isNotNull(o.bgap)) {
bottom += o.bgap; bottom += o.bgap;
w.element.css({bottom: bottom}); w.element.css({"margin-bottom": bottom});
} }
if (BI.isNotNull(item.width)) { if (BI.isNotNull(item.width)) {

56
src/css/resource/app.css

@ -30,42 +30,58 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }

4
src/less/lib/constant.less

@ -102,7 +102,9 @@
@border-color-disabled-theme-dark: #606479; @border-color-disabled-theme-dark: #606479;
//scroll color //scroll color
@scroll-color: #20263b; @scroll-color: #232e40;
@scroll-color-theme-dark: #ffffff; @scroll-color-theme-dark: #ffffff;
@scroll-thumb-color: #232e40;
@scroll-thumb-color-theme-dark: #232e40;
@water-mark-color-theme-dark: #878d9f; @water-mark-color-theme-dark: #878d9f;

30
src/less/resource/app.less

@ -29,15 +29,23 @@ body {
div, textarea { div, textarea {
&::-webkit-scrollbar { &::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
width: 10px;
height: 10px;
}
&::-webkit-scrollbar-track {
.border-radius(5px);
.background-color(@scroll-color, 5%); .background-color(@scroll-color, 5%);
width: 6px; &:hover {
height: 6px; .background-color(@scroll-color, 5%);
}
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
.border-radius(0); border: 2px solid transparent;
.background-color(@scroll-color, 30%); background-clip: padding-box;
.border-radius(10px);
.background-color(@scroll-color, 10%);
&:hover { &:hover {
.background-color(@scroll-color, 70%); .background-color(@scroll-color, 30%);
} }
} }
} }
@ -46,15 +54,17 @@ div, textarea {
div, textarea { div, textarea {
&::-webkit-scrollbar { &::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
&::-webkit-scrollbar-track {
.background-color(@scroll-color-theme-dark, 5%); .background-color(@scroll-color-theme-dark, 5%);
width: 6px; &:hover {
height: 6px; .background-color(@scroll-color-theme-dark, 5%);
}
} }
&::-webkit-scrollbar-thumb { &::-webkit-scrollbar-thumb {
.border-radius(0); .background-color(@scroll-color-theme-dark, 10%);
.background-color(@scroll-color-theme-dark, 30%);
&:hover { &:hover {
.background-color(@scroll-color-theme-dark, 70%); .background-color(@scroll-color-theme-dark, 30%);
} }
} }
} }

2
src/widget/dynamicdate/dynamicdate.combo.js

@ -64,6 +64,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_STOP, eventName: BI.DynamicDateTrigger.EVENT_STOP,
@ -282,6 +283,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";

2
src/widget/dynamicdate/dynamicdate.trigger.js

@ -52,7 +52,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();

2
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -64,6 +64,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_STOP, eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,
@ -285,6 +286,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
}); });
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";

2
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -52,7 +52,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
title: BI.bind(this._getTitle, this) title: BI.bind(this._getTitle, this)
}); });
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();

4
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -159,7 +159,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {

5
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -29,10 +29,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -109,7 +111,8 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {

4
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -158,7 +158,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
getValue: function () { getValue: function () {
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; return BI.isArray(this.storeValue) ?
this.storeValue : BI.isNull(this.storeValue) ?
[] : [this.storeValue];
}, },
getAllLeaves: function () { getAllLeaves: function () {

5
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -29,10 +29,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
ref: function () { ref: function () {
self.editor = this; self.editor = this;
}, },
defaultText: o.text,
text: this._digest(o.value), text: this._digest(o.value),
value: o.value, value: o.value,
height: o.height, height: o.height,
tipText: "", tipText: "",
watermark: BI.i18nText("BI-Basic_Search"),
listeners: [{ listeners: [{
eventName: BI.StateEditor.EVENT_FOCUS, eventName: BI.StateEditor.EVENT_FOCUS,
action: function () { action: function () {
@ -109,7 +111,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
}, },
_digest: function (v) { _digest: function (v) {
return this.options.valueFormatter(v); var o = this.options;
return o.valueFormatter(v) || o.text;
}, },
stopEditing: function () { stopEditing: function () {

1
src/widget/multiselect/trigger/editor.multiselect.js

@ -23,6 +23,7 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
defaultText: o.text,
text: o.text, text: o.text,
tipType: o.tipType, tipType: o.tipType,
warningTitle: o.warningTitle, warningTitle: o.warningTitle,

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

@ -106,7 +106,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -207,7 +207,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {

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

@ -115,7 +115,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
self.trigger.getSearcher().setState(val); self.trigger.getSearcher().setState(val);
self.trigger.getCounter().setButtonChecked(val); self.trigger.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
} }
}, { }, {
eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,
@ -216,7 +216,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
}; };
this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);
this.getCounter().setButtonChecked(val); this.getCounter().setButtonChecked(val);
self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());
}); });
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {

6
src/widget/singleselect/trigger/editor.singleselect.js

@ -9,7 +9,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-editor", baseCls: "bi-single-select-editor",
el: {} el: {},
text: BI.i18nText("BI-Basic_Please_Select")
}); });
}, },
@ -23,7 +24,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"), watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true, allowBlank: true,
value: o.value, value: o.value,
text: o.text defaultText: o.text,
text: o.text,
}); });
this.editor.on(BI.Controller.EVENT_CHANGE, function () { this.editor.on(BI.Controller.EVENT_CHANGE, function () {

7
src/widget/singleslider/button/iconbutton.slider.js

@ -23,11 +23,8 @@ BI.SliderIconButton = BI.inherit(BI.Widget, {
}, },
items: [{ items: [{
el: { el: {
type: "bi.text_button", type: "bi.text",
width: 16, cls: "slider-button bi-high-light-border",
height: 16,
forceNotSelected: true,
cls: "slider-button bi-list-item-select3 bi-high-light-border",
ref: function () { ref: function () {
self.slider = this; self.slider = this;
} }

1
src/widget/singleslider/singleslider.js

@ -157,7 +157,6 @@ BI.SingleSlider = BI.inherit(BI.Widget, {
v = o.digit === false ? v : v.toFixed(o.digit); v = o.digit === false ? v : v.toFixed(o.digit);
self.label.setValue(v); self.label.setValue(v);
self.value = v; self.value = v;
self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
} }
}, function () { }, function () {
if (startDrag === true) { if (startDrag === true) {

2
src/widget/time/time.combo.js

@ -78,6 +78,7 @@
if (self.combo.isViewVisible()) { if (self.combo.isViewVisible()) {
self.combo.hideView(); self.combo.hideView();
} }
self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);
} }
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
@ -211,6 +212,7 @@
} }
}); });
BI.TimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; BI.TimeCombo.EVENT_VALID = "EVENT_VALID";

2
src/widget/time/time.trigger.js

@ -56,7 +56,7 @@
listeners: [{ listeners: [{
eventName: "EVENT_KEY_DOWN", eventName: "EVENT_KEY_DOWN",
action: function () { action: function () {
self.fireEvent("EVENT_KEY_DOWN"); self.fireEvent("EVENT_KEY_DOWN", arguments);
} }
}, { }, {
eventName: "EVENT_FOCUS", eventName: "EVENT_FOCUS",

30
typescript/core/base.ts

@ -9,13 +9,13 @@ export interface _base {
createWidgets: (items: any, options: any, context: any) => any; createWidgets: (items: any, options: any, context: any) => any;
createItems: (data: any[], innerAttr: any[], outerAttr: any[]) => any; createItems: <T, U, K>(data: T[], innerAttr?: U[], outerAttr?: K[]) => (U & T & K)[];
packageItems: (items: any[], layouts: any[]) => any[]; packageItems: (items: any[], layouts: any[]) => any[];
formatEL: (obj: any) => {el: any} formatEL: <T>(obj: T) => {el: T} | T
stripEL: (obj: any) => any; stripEL: <T>(obj: {el: T} | T) => T;
trans2Element: (widgets: any[]) => any[]; trans2Element: (widgets: any[]) => any[];
@ -56,7 +56,7 @@ export interface _base {
some: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean; some: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean;
_any: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean; any: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean;
max: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any; max: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any;
@ -110,11 +110,11 @@ export interface _base {
// 数组相关的方法 // 数组相关的方法
first: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T; first: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T;
initial: (array: any[], callback?: Function|object|number|string, thisArg?: any) => any[]; initial: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T[];
last: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T; last: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T;
rest: (array: any[], callback?: Function|object|number|string, thisArg?: any) => any[]; rest: <T>(array: T[], callback?: Function|object|number|string, thisArg?: any) => T[];
compact: (array: any[]) => any[]; compact: (array: any[]) => any[];
@ -132,7 +132,7 @@ export interface _base {
unzip: (...array: any[]) => any[]; unzip: (...array: any[]) => any[];
_object: (keys: string[], values?: any[]) => any[]; object: (keys: string[], values?: any[]) => any[];
indexOf: (array: any[], value: any, fromIndex?: number) => number; indexOf: (array: any[], value: any, fromIndex?: number) => number;
@ -142,19 +142,19 @@ export interface _base {
range: (start: number, end: number, step: number) => number[]; range: (start: number, end: number, step: number) => number[];
take: (array: any[], n: number) => any[]; take: <T>(array: T[], n: number) => T[];
takeRight: (array: any[], n: number) => any[]; takeRight: <T>(array: T[], n: number) => T[];
findIndex: (array: any[], value: any, callback?: Function|object|string, thisArg?: any) => number; findIndex: (array: any[], value: any, callback?: Function|object|string, thisArg?: any) => number;
findLastIndex: (array: any[], value: any, callback?: Function|object|string, thisArg?: any) => number; findLastIndex: (array: any[], value: any, callback?: Function|object|string, thisArg?: any) => number;
makeArray: (length: number, value: any) => any[]; makeArray: <T>(length: number, value?: T) => number[] | T[];
makeObject: (array: any[], value: any) => any; makeObject: (array: any[], value: any) => any;
makeArrayByArray: (array: any[], value: any) => any[]; makeArrayByArray: <T>(array: any[], value: T) => T[];
uniq: <T>(array: T[], isSorted?: boolean, iteratee?: any, context?: any) => T[]; uniq: <T>(array: T[], isSorted?: boolean, iteratee?: any, context?: any) => T[];
@ -177,7 +177,7 @@ export interface _base {
defaults: (object: object, ...sources: any[]) => object; defaults: (object: object, ...sources: any[]) => object;
clone: (object: object) => object; clone: <T>(object: T) => T;
property: (path: any[]|string) => Function; property: (path: any[]|string) => Function;
@ -235,9 +235,9 @@ export interface _base {
init: () => void; init: () => void;
has: (obj: object, keys: string[]) => boolean; has: (obj: object, keys: string|string[]) => boolean;
freeze: (value: object) => object; freeze: <T>(value: T) => T;
isKey: (key: any) => boolean; isKey: (key: any) => boolean;
@ -261,7 +261,7 @@ export interface _base {
isDeepMatch: (object: any, attrs: any) => boolean; isDeepMatch: (object: any, attrs: any) => boolean;
contains: (obj: any[], target: any, fromIndex: number) => number; contains: (obj: any[], target: any, fromIndex?: number) => number;
deepContains: (obj: any[], copy: any) => number; deepContains: (obj: any[], copy: any) => number;

2
typescript/core/i18n.ts

@ -1,4 +1,4 @@
export declare type _addI18n = (v: string) => string; export declare type _addI18n = (v: string | object) => string;
export declare type _i18nText = (key: string, ..._args: any[]) => string; export declare type _i18nText = (key: string, ..._args: any[]) => string;

56
ui/css/app.css

@ -30,42 +30,58 @@ body {
div::-webkit-scrollbar, div::-webkit-scrollbar,
textarea::-webkit-scrollbar { textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
background-color: rgba(32, 38, 59, 0.05); width: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d20263b,endColorstr=#0d20263b); height: 10px;
width: 6px; }
height: 6px; div::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
}
div::-webkit-scrollbar-track:hover,
textarea::-webkit-scrollbar-track:hover {
background-color: rgba(35, 46, 64, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d232e40,endColorstr=#0d232e40);
} }
div::-webkit-scrollbar-thumb, div::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb { textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; border: 2px solid transparent;
-moz-border-radius: 0; background-clip: padding-box;
border-radius: 0; -webkit-border-radius: 10px;
background-color: rgba(32, 38, 59, 0.3); -moz-border-radius: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d20263b,endColorstr=#4d20263b); border-radius: 10px;
background-color: rgba(35, 46, 64, 0.1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a232e40,endColorstr=#1a232e40);
} }
div::-webkit-scrollbar-thumb:hover, div::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover { textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(32, 38, 59, 0.7); background-color: rgba(35, 46, 64, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b320263b,endColorstr=#b320263b); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d232e40,endColorstr=#4d232e40);
} }
.bi-theme-dark div::-webkit-scrollbar, .bi-theme-dark div::-webkit-scrollbar,
.bi-theme-dark textarea::-webkit-scrollbar { .bi-theme-dark textarea::-webkit-scrollbar {
-webkit-appearance: none; -webkit-appearance: none;
}
.bi-theme-dark div::-webkit-scrollbar-track,
.bi-theme-dark textarea::-webkit-scrollbar-track {
background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
}
.bi-theme-dark div::-webkit-scrollbar-track:hover,
.bi-theme-dark textarea::-webkit-scrollbar-track:hover {
background-color: rgba(255, 255, 255, 0.05); background-color: rgba(255, 255, 255, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dffffff,endColorstr=#0dffffff);
width: 6px;
height: 6px;
} }
.bi-theme-dark div::-webkit-scrollbar-thumb, .bi-theme-dark div::-webkit-scrollbar-thumb,
.bi-theme-dark textarea::-webkit-scrollbar-thumb { .bi-theme-dark textarea::-webkit-scrollbar-thumb {
-webkit-border-radius: 0; background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1affffff,endColorstr=#1affffff);
border-radius: 0;
background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }
.bi-theme-dark div::-webkit-scrollbar-thumb:hover, .bi-theme-dark div::-webkit-scrollbar-thumb:hover,
.bi-theme-dark textarea::-webkit-scrollbar-thumb:hover { .bi-theme-dark textarea::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3ffffff,endColorstr=#b3ffffff); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dffffff,endColorstr=#4dffffff);
} }

Loading…
Cancel
Save