Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit '540510822bcafb82686b47cf6aaccea7f49e2b92': (28 commits)
  KERNEL-702 feat: 树下拉可配trigger默认显示文本 && simple_state_editor和state_editor同步
  BI-46267 其他几个combo也补充一下
  BI-46199 feat:combo逻辑拓展
  update
  BI-46267 fix: 同步的列表没有items不显示没有可选项
  BI-46199 feat: combo接口
  combo弹出再内部
  BI-46069 更新font
  CHART-9360 refactor: 根据comment优化代码
  BI-45174 feature: combo的动态布局
  CHART-9360 fix: 调整数值区间控件,使之能接受watermark和allowBlank
  BI-45969 fix: item没有el包裹且不是Widget实例,使用createItems会被添加一些方法
  无JIRA任务 checkbox默认宽高16
  无JIRA任务,吧BI.getEncodeURL方法内置到FineUI中
  BI-45749 fix: 如果在仅传入value情况下标红会导致显示异常
  BI-45527 调整年月下拉选中效果 && label _setEnable
  无jira revert
  无JIRA任务 hover-visible 方法内置到 FineUI visual.less 中
  BI-45616 fix: 2月份下拉有31号
  KERNEL-644   FineUI添加mixin支持
  ...
es6
Young 5 years ago
parent
commit
50dbd56db0
  1. 2
      demo/js/case/combo/demo.bubble_combo.js
  2. 4
      demo/js/config/core.js
  3. 75
      demo/js/core/abstract/combination/demo.combo3.js
  4. 2
      dist/2.0/fineui.css
  5. 217
      dist/2.0/fineui.ie.js
  6. 58
      dist/2.0/fineui.ie.min.js
  7. 217
      dist/2.0/fineui.js
  8. 2
      dist/2.0/fineui.min.css
  9. 74
      dist/2.0/fineui.min.js
  10. 82
      dist/base.js
  11. 2
      dist/bundle.css
  12. 217
      dist/bundle.ie.js
  13. 58
      dist/bundle.ie.min.js
  14. 217
      dist/bundle.js
  15. 2
      dist/bundle.min.css
  16. 74
      dist/bundle.min.js
  17. 2
      dist/case.js
  18. 1
      dist/core.css
  19. 91
      dist/core.js
  20. 80
      dist/demo.js
  21. 2
      dist/fineui.css
  22. 217
      dist/fineui.ie.js
  23. 58
      dist/fineui.ie.min.js
  24. 217
      dist/fineui.js
  25. 2
      dist/fineui.min.css
  26. 74
      dist/fineui.min.js
  27. 145
      dist/fineui_without_jquery_polyfill.js
  28. BIN
      dist/font/iconfont.eot
  29. 33
      dist/font/iconfont.svg
  30. BIN
      dist/font/iconfont.ttf
  31. BIN
      dist/font/iconfont.woff
  32. BIN
      dist/font/iconfont.woff2
  33. 1
      dist/resource.css
  34. 19
      dist/utils.js
  35. 4
      dist/utils.min.js
  36. 42
      dist/widget.js
  37. 1
      public/css/font.css
  38. 22
      src/base/combination/combo.js
  39. 2
      src/base/single/editor/editor.js
  40. 10
      src/base/single/editor/editor.textarea.js
  41. 4
      src/base/single/html/html.js
  42. 4
      src/base/single/input/checkbox/checkbox.js
  43. 11
      src/base/single/label/html.label.js
  44. 20
      src/base/single/label/label.js
  45. 4
      src/base/single/text.js
  46. 4
      src/base/single/tip/tip.tooltip.js
  47. 2
      src/case/calendar/calendar.year.js
  48. 2
      src/case/combo/icontextvaluecombo/popup.icontextvalue.js
  49. 4
      src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js
  50. 10
      src/case/editor/editor.state.simple.js
  51. 2
      src/case/layer/pane.list.js
  52. 15
      src/core/alias.js
  53. 4
      src/core/base.js
  54. 72
      src/core/platform/web/dom.js
  55. 1
      src/css/core/normalize2.css
  56. 1
      src/css/resource/font.css
  57. 1
      src/less/core/normalize2.less
  58. 1
      src/less/image.less
  59. 11
      src/less/visual.less
  60. 3
      src/widget/date/calendar/popup.calendar.date.js
  61. 1
      src/widget/dynamicdate/dynamicdate.combo.js
  62. 7
      src/widget/dynamicdate/dynamicdate.trigger.js
  63. 1
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  64. 5
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  65. 2
      src/widget/month/popup.month.js
  66. 1
      src/widget/multitree/multi.tree.insert.combo.js
  67. 1
      src/widget/multitree/multi.tree.list.combo.js
  68. 1
      src/widget/multitree/trigger/searcher.multi.tree.js
  69. 12
      src/widget/numberinterval/numberinterval.js
  70. 2
      src/widget/selecttree/selecttree.combo.js
  71. 3
      src/widget/time/time.combo.js
  72. 2
      src/widget/time/time.trigger.js
  73. 2
      src/widget/yearmonth/card.static.yearmonth.js
  74. 2
      src/widget/yearquarter/card.static.yearquarter.js
  75. 1
      ui/css/font.css

2
demo/js/case/combo/demo.bubble_combo.js

@ -100,7 +100,7 @@ Demo.Func = BI.inherit(BI.Widget, {
element: this,
items: [{
el: combo1,
left: 10,
left: 150,
top: 10
}, {
el: combo2,

4
demo/js/config/core.js

@ -128,6 +128,10 @@ Demo.CORE_CONFIG = [{
pId: 10201,
text: "bi.combo(各种位置)",
value: "demo.combo2"
}, {
pId: 10201,
text: "bi.combo(內部位置)",
value: "demo.combo3"
}, {
pId: 10201,
text: "bi.expander",

75
demo/js/core/abstract/combination/demo.combo3.js

@ -0,0 +1,75 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createEl: function () {
return {
type: "bi.label",
cls:"bi-border",
height: "100%",
text: "点击"
};
},
oneCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 200
}
}
});
},
twoCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 1000,
height: 200
}
}
});
},
threeCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 400,
height: 200
}
}
});
},
render: function () {
return {
type: "bi.grid",
hgap: 10,
vgap: 5,
items: [[this.oneCombo()], [this.twoCombo()], [this.threeCombo()]]
};
}
});
BI.shortcut("demo.combo3", Demo.Func);

2
dist/2.0/fineui.css vendored

@ -276,7 +276,6 @@ li {
}
i {
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
input,
@ -4633,7 +4632,6 @@ textarea::-webkit-scrollbar-thumb:hover {
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

217
dist/2.0/fineui.ie.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19744,6 +19759,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19751,6 +19772,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -19768,12 +19796,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -19979,7 +20016,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -19997,6 +20034,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20088,6 +20131,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36084,7 +36169,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36146,7 +36231,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -38795,7 +38881,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -38853,14 +38942,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39167,6 +39255,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -44550,7 +44644,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -44774,9 +44868,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -44825,9 +44919,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -44840,7 +44934,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -44956,10 +45050,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45171,8 +45269,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -46450,13 +46548,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46469,7 +46568,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46505,7 +46604,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46523,7 +46622,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46570,7 +46669,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -46864,13 +46963,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46883,7 +46983,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46919,7 +47019,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46937,7 +47037,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46984,21 +47084,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47331,11 +47422,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -51832,7 +51923,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60254,7 +60345,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -62555,6 +62647,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63146,7 +63239,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63172,11 +63266,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -63511,6 +63605,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64213,7 +64308,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64239,7 +64335,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -65827,7 +65923,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -74357,7 +74453,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -74366,8 +74464,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -74406,8 +74504,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -76678,7 +76776,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -80386,6 +80484,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -80532,6 +80631,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -80585,7 +80686,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82032,7 +82133,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83072,7 +83173,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

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

File diff suppressed because one or more lines are too long

217
dist/2.0/fineui.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19744,6 +19759,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19751,6 +19772,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -19768,12 +19796,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -19979,7 +20016,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -19997,6 +20034,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20088,6 +20131,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36488,7 +36573,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36550,7 +36635,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -39199,7 +39285,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -39257,14 +39346,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39571,6 +39659,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -44954,7 +45048,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -45178,9 +45272,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -45229,9 +45323,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -45244,7 +45338,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -45360,10 +45454,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45575,8 +45673,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -46854,13 +46952,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46873,7 +46972,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46909,7 +47008,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46927,7 +47026,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46974,7 +47073,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -47268,13 +47367,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -47287,7 +47387,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47323,7 +47423,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47341,7 +47441,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47388,21 +47488,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47735,11 +47826,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -52236,7 +52327,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60658,7 +60749,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -62959,6 +63051,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63550,7 +63643,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63576,11 +63670,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -63915,6 +64009,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64617,7 +64712,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64643,7 +64739,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -66231,7 +66327,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -74761,7 +74857,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -74770,8 +74868,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -74810,8 +74908,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -77082,7 +77180,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -80790,6 +80888,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -80936,6 +81035,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -80989,7 +81090,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82436,7 +82537,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83476,7 +83577,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

74
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

82
dist/base.js vendored

@ -612,7 +612,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -674,7 +674,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -3323,7 +3324,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -3381,14 +3385,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -3695,6 +3698,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -9078,7 +9087,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -9302,9 +9311,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -9353,9 +9362,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -9368,7 +9377,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -9484,10 +9493,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -9699,8 +9712,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -10978,13 +10991,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -10997,7 +11011,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11033,7 +11047,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11051,7 +11065,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11098,7 +11112,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -11392,13 +11406,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -11411,7 +11426,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11447,7 +11462,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11465,7 +11480,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -11512,21 +11527,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -11859,11 +11865,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});

2
dist/bundle.css vendored

@ -276,7 +276,6 @@ li {
}
i {
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
input,
@ -4633,7 +4632,6 @@ textarea::-webkit-scrollbar-thumb:hover {
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

217
dist/bundle.ie.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19744,6 +19759,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19751,6 +19772,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -19768,12 +19796,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -19979,7 +20016,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -19997,6 +20034,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20088,6 +20131,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36084,7 +36169,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36146,7 +36231,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -38795,7 +38881,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -38853,14 +38942,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39167,6 +39255,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -44550,7 +44644,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -44774,9 +44868,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -44825,9 +44919,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -44840,7 +44934,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -44956,10 +45050,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45171,8 +45269,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -46450,13 +46548,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46469,7 +46568,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46505,7 +46604,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46523,7 +46622,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46570,7 +46669,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -46864,13 +46963,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46883,7 +46983,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46919,7 +47019,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46937,7 +47037,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46984,21 +47084,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47331,11 +47422,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -51832,7 +51923,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60254,7 +60345,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -62555,6 +62647,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63146,7 +63239,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63172,11 +63266,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -63511,6 +63605,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64213,7 +64308,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64239,7 +64335,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -65827,7 +65923,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -74357,7 +74453,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -74366,8 +74464,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -74406,8 +74504,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -76678,7 +76776,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -80386,6 +80484,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -80532,6 +80631,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -80585,7 +80686,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82032,7 +82133,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83072,7 +83173,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

58
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

217
dist/bundle.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19744,6 +19759,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19751,6 +19772,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -19768,12 +19796,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -19979,7 +20016,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -19997,6 +20034,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20088,6 +20131,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36488,7 +36573,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36550,7 +36635,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -39199,7 +39285,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -39257,14 +39346,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39571,6 +39659,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -44954,7 +45048,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -45178,9 +45272,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -45229,9 +45323,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -45244,7 +45338,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -45360,10 +45454,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45575,8 +45673,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -46854,13 +46952,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46873,7 +46972,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46909,7 +47008,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46927,7 +47026,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46974,7 +47073,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -47268,13 +47367,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -47287,7 +47387,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47323,7 +47423,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47341,7 +47441,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47388,21 +47488,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47735,11 +47826,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -52236,7 +52327,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60658,7 +60749,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -62959,6 +63051,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63550,7 +63643,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63576,11 +63670,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -63915,6 +64009,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64617,7 +64712,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64643,7 +64739,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -66231,7 +66327,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -74761,7 +74857,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -74770,8 +74868,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -74810,8 +74908,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -77082,7 +77180,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -80790,6 +80888,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -80936,6 +81035,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -80989,7 +81090,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82436,7 +82537,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83476,7 +83577,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

74
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -1948,7 +1948,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,

1
dist/core.css vendored

@ -276,7 +276,6 @@ li {
}
i {
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
input,

91
dist/core.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19744,6 +19759,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19751,6 +19772,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -19768,12 +19796,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -19979,7 +20016,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -19997,6 +20034,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20088,6 +20131,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}

80
dist/demo.js vendored

@ -1854,7 +1854,7 @@ BI.shortcut("demo.tree_view", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
element: this,
items: [{
el: combo1,
left: 10,
left: 150,
top: 10
}, {
el: combo2,
@ -3781,6 +3781,10 @@ Demo.COMPONENT_CONFIG = [{
pId: 10201,
text: "bi.combo(各种位置)",
value: "demo.combo2"
}, {
pId: 10201,
text: "bi.combo(內部位置)",
value: "demo.combo3"
}, {
pId: 10201,
text: "bi.expander",
@ -4864,6 +4868,80 @@ BI.shortcut("demo.combo2", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createEl: function () {
return {
type: "bi.label",
cls:"bi-border",
height: "100%",
text: "点击"
};
},
oneCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 200
}
}
});
},
twoCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 1000,
height: 200
}
}
});
},
threeCombo: function () {
return BI.createWidget({
type: "bi.combo",
direction: "right,innerRight",
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 400,
height: 200
}
}
});
},
render: function () {
return {
type: "bi.grid",
hgap: 10,
vgap: 5,
items: [[this.oneCombo()], [this.twoCombo()], [this.threeCombo()]]
};
}
});
BI.shortcut("demo.combo3", Demo.Func);Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
return {
type: "bi.vertical",

2
dist/fineui.css vendored

@ -276,7 +276,6 @@ li {
}
i {
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
input,
@ -4633,7 +4632,6 @@ textarea::-webkit-scrollbar-thumb:hover {
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

217
dist/fineui.ie.js vendored

@ -10480,8 +10480,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -16106,6 +16106,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16361,6 +16362,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19989,6 +20004,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19996,6 +20017,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -20013,12 +20041,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -20224,7 +20261,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -20242,6 +20279,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20333,6 +20376,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36329,7 +36414,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36391,7 +36476,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -39040,7 +39126,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -39098,14 +39187,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39412,6 +39500,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -44795,7 +44889,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -45019,9 +45113,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -45070,9 +45164,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -45085,7 +45179,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -45201,10 +45295,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45416,8 +45514,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -46695,13 +46793,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -46714,7 +46813,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46750,7 +46849,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46768,7 +46867,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -46815,7 +46914,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -47109,13 +47208,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -47128,7 +47228,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47164,7 +47264,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47182,7 +47282,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47229,21 +47329,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47576,11 +47667,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -52077,7 +52168,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60499,7 +60590,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -62800,6 +62892,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63391,7 +63484,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63417,11 +63511,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -63756,6 +63850,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64458,7 +64553,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64484,7 +64580,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -66072,7 +66168,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -74602,7 +74698,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -74611,8 +74709,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -74651,8 +74749,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -76923,7 +77021,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -80631,6 +80729,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -80777,6 +80876,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -80830,7 +80931,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82277,7 +82378,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83317,7 +83418,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

58
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

217
dist/fineui.js vendored

@ -10480,8 +10480,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -16106,6 +16106,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16361,6 +16362,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -19989,6 +20004,12 @@ BI.prepares.push(function () {
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -19996,6 +20017,13 @@ BI.prepares.push(function () {
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -20013,12 +20041,21 @@ BI.prepares.push(function () {
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -20224,7 +20261,7 @@ BI.prepares.push(function () {
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -20242,6 +20279,12 @@ BI.prepares.push(function () {
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -20333,6 +20376,48 @@ BI.prepares.push(function () {
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}
@ -36733,7 +36818,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -36795,7 +36880,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -39444,7 +39530,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -39502,14 +39591,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -39816,6 +39904,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -45199,7 +45293,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -45423,9 +45517,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -45474,9 +45568,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -45489,7 +45583,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -45605,10 +45699,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -45820,8 +45918,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -47099,13 +47197,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -47118,7 +47217,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47154,7 +47253,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47172,7 +47271,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47219,7 +47318,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -47513,13 +47612,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -47532,7 +47632,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47568,7 +47668,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47586,7 +47686,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -47633,21 +47733,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -47980,11 +48071,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -52481,7 +52572,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -60903,7 +60994,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -63204,6 +63296,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -63795,7 +63888,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -63821,11 +63915,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -64160,6 +64254,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64862,7 +64957,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -64888,7 +64984,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -66476,7 +66572,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -75006,7 +75102,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -75015,8 +75113,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -75055,8 +75153,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -77327,7 +77425,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -81035,6 +81133,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -81181,6 +81280,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -81234,7 +81335,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -82681,7 +82782,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83721,7 +83822,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

74
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

145
dist/fineui_without_jquery_polyfill.js vendored

@ -10235,8 +10235,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -15607,6 +15607,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -15862,6 +15863,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -25181,7 +25196,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -25243,7 +25258,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -26640,7 +26656,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -26698,14 +26717,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -27012,6 +27030,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
@ -32395,7 +32419,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
@ -32619,9 +32643,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -32670,9 +32694,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -32685,7 +32709,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]
@ -32801,10 +32825,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({
@ -33016,8 +33044,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {
@ -33670,13 +33698,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -33689,7 +33718,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -33725,7 +33754,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -33743,7 +33772,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -33790,7 +33819,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
@ -34084,13 +34113,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -34103,7 +34133,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -34139,7 +34169,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -34157,7 +34187,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -34204,21 +34234,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -34551,11 +34572,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});
@ -36709,7 +36730,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -43312,7 +43333,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -45613,6 +45635,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -46204,7 +46227,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -46230,11 +46254,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -46569,6 +46593,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -47271,7 +47296,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -47297,7 +47323,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -48885,7 +48911,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -57415,7 +57441,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -57424,8 +57452,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -57464,8 +57492,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -59736,7 +59764,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -63444,6 +63472,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -63590,6 +63619,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -63643,7 +63674,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -65090,7 +65121,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -66130,7 +66161,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

33
dist/font/iconfont.svg vendored

@ -80,7 +80,7 @@ Created by iconfont
<glyph glyph-name="normal9" unicode="&#59075;" d="M192 800h192A96 96 0 0 0 480 704v-288H192A96 96 0 0 0 96 512V704A96 96 0 0 0 192 800z m224-320V704a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32v-192a32 32 0 0 1 32-32h224zM192 352h288V64A96 96 0 0 0 384-32H192A96 96 0 0 0 96 64v192A96 96 0 0 0 192 352z m224-64H192a32 32 0 0 1-32-32v-192a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32V288z m224 512h192A96 96 0 0 0 928 704v-192A96 96 0 0 0 832 416H544V704A96 96 0 0 0 640 800z m-32-320H832a32 32 0 0 1 32 32V704a32 32 0 0 1-32 32h-192a32 32 0 0 1-32-32v-224z m224-128a96 96 0 0 0 96-96v-192a96 96 0 0 0-96-96h-192A96 96 0 0 0 544 64V352H832z m-224-64V64a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H608z" horiz-adv-x="1024" />
<glyph glyph-name="normal10" unicode="&#59076;" d="M224 640V704A96 96 0 0 0 320 800h384A96 96 0 0 0 800 704v-64H896a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64h96z m64 0h448V704a32 32 0 0 1-32 32H320a32 32 0 0 1-32-32v-64zM256 480v-448a32 32 0 0 1 32-32h448a32 32 0 0 1 32 32v448a32 32 0 1 0 64 0v-448a96 96 0 0 0-96-96h-448A96 96 0 0 0 192 32v448a32 32 0 0 0 64 0z m128 0a32 32 0 0 0 64 0V128a32 32 0 1 0-64 0V480z m192 0a32 32 0 0 0 64 0V128a32 32 0 1 0-64 0V480z" horiz-adv-x="1024" />
<glyph glyph-name="normal10" unicode="&#59076;" d="M800 640h96a32 32 0 1 0 0-64H128a32 32 0 1 0 0 64h96V752a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64v-112z m-64 0V752H288v-112h448z m96-176v-448a64 64 0 0 0-64-64H256a64 64 0 0 0-64 64V464a32 32 0 1 0 64 0v-448h512V464a32 32 0 1 0 64 0z m-416 32a32 32 0 0 0 32-32v-320a32 32 0 1 0-64 0V464a32 32 0 0 0 32 32z m208 0a32 32 0 0 0 32-32v-320a32 32 0 1 0-64 0V464a32 32 0 0 0 32 32z" horiz-adv-x="1024" />
<glyph glyph-name="normal11" unicode="&#59077;" d="M480 658.624L308.864 487.488a32 32 0 1 0-45.312 45.248L489.856 759.04a32 32 0 0 0 45.248 0l226.304-226.304a32 32 0 1 0-45.248-45.248L544 659.648v-436.352a32 32 0 1 0-64 0V658.624zM192 64h640V288a32 32 0 1 0 64 0v-256a32 32 0 0 0-32-32h-704a32 32 0 0 0-32 32v256a32 32 0 0 0 64 0V64z" horiz-adv-x="1024" />
@ -1316,10 +1316,37 @@ Created by iconfont
<glyph glyph-name="yichangxiangqing" unicode="&#59144;" d="M256 0V320a256 256 0 1 0 512 0v-320h96a32 32 0 1 0 0-64h-704a32 32 0 1 0 0 64H256z m64 0h384V320a192 192 0 1 1-384 0v-320z m177.216 256h84.352c8.576 0 16.384-3.392 22.144-8.896a32 32 0 0 0 5.76-39.296l-64-110.848a32 32 0 1 0-55.424 32L526.464 192H446.08a32 32 0 0 0-32.256 47.68l64 110.848a32 32 0 1 0 55.424-32L497.28 256zM512 832a32 32 0 0 0 32-32v-128a32 32 0 0 0-64 0v128A32 32 0 0 0 512 832z m-240-51.264a32 32 0 0 0 43.712-11.712l64-110.848a32 32 0 1 0-55.424-32l-64 110.848a32 32 0 0 0 11.712 43.712zM96.064 611.2a32 32 0 0 0 43.712 11.712l110.848-64a32 32 0 1 0-32-55.424l-110.848 64a32 32 0 0 0-11.712 43.712z m831.872 0a32 32 0 0 0-11.712-43.712l-110.848-64a32 32 0 0 0-32 55.424l110.848 64a32 32 0 0 0 43.712-11.712zM752 780.736a32 32 0 0 0 11.712-43.712l-64-110.848a32 32 0 0 0-55.424 32l64 110.848a32 32 0 0 0 43.712 11.712z" horiz-adv-x="1024" />
<glyph glyph-name="huifuquanxianjichengfuzhi" unicode="&#59145;" d="M185.334733 90.94951a256.279757 256.279757 0 0 0 152.860929 199.377459 164.5632 164.5632 0 1 0 201.205939 0A255.987201 255.987201 0 0 0 694.822402 54.891884a36.5696 36.5696 0 1 0-73.1392 0 182.848 182.848 0 1 1-365.696001 0 36.423322 36.423322 0 0 0-7.31392-21.94176 438.835201 438.835201 0 1 1-26.988365 680.194562H329.126401a36.5696 36.5696 0 0 0 0-73.139201H146.2784a36.5696 36.5696 0 0 0-36.5696 36.569601V859.423086a36.5696 36.5696 0 0 0 73.1392 0v-83.23241A511.974401 511.974401 0 1 0 0 384.018285a36.5696 36.5696 0 0 0 73.1392 0c0-112.634368 42.420736-215.394945 112.195533-293.068775zM438.835201 329.163885a91.424 91.424 0 1 1 0 182.848 91.424 91.424 0 0 1 0-182.848zM585.113601 310.879085c20.917811 27.866035 34.082867 61.875763 36.277044 98.884198a91.424 91.424 0 1 1-81.696487 163.319834 181.750912 181.750912 0 0 1-78.478362 28.963124 164.5632 164.5632 0 1 0 224.537345-238.580071A255.987201 255.987201 0 0 0 841.100802 128.031084a36.5696 36.5696 0 0 0-73.1392 0A182.848 182.848 0 0 1 585.113601 310.879085z" horiz-adv-x="1024" />
<glyph glyph-name="huifuquanxianjichengfuzhi" unicode="&#59145;" d="M195.19511592 703.56253242a449.98350029 449.98350029 0 1 0-24.82408917-612.42754395l56.9229126 48.82320968a374.98625068 374.98625068 0 1 1 19.49928487 509.23132821 37.64861982 37.64861982 0 0 0-64.12264893 26.39903203c0 11.09959277 4.79982393 21.07422685 12.52454063 27.97397403zM127.54759677 790.33435107l223.11681856-223.1918165a22.49917471 22.49917471 0 0 0-15.8994167-38.39859228H111.57318213a22.49917471 22.49917471 0 0 0-22.49917471 22.49917558V774.43493438A22.49917471 22.49917471 0 0 0 127.54759677 790.33435107z m70.79740401-711.72390321a37.4986248 37.4986248 0 1 0 0 74.99724961 37.4986248 37.4986248 0 0 0 0-74.99724961z" horiz-adv-x="1024" />
<glyph glyph-name="danyonghuxianzhi" unicode="&#59224;" d="M630.784 374.033067c-110.3872-51.882667-155.101867-173.124267-155.101867-314.299734v-102.4H34.133333a443.938133 443.938133 0 0 0 291.566934 416.9728 273.066667 273.066667 0 1 0 304.264533 0l0.750933-0.273066zM648.533333 230.4v34.133333a136.533333 136.533333 0 1 0 273.066667 0v-34.133333h34.133333a34.133333 34.133333 0 0 0 34.133334-34.133333V76.8a187.733333 187.733333 0 0 0-187.733334-187.733333h-34.133333A187.733333 187.733333 0 0 0 580.266667 76.8v119.466667a34.133333 34.133333 0 0 0 34.133333 34.133333H648.533333z m68.266667 0h136.533333v34.133333a68.266667 68.266667 0 0 1-136.533333 0v-34.133333z m68.266667-98.986667a34.133333 34.133333 0 0 1-34.133334-34.133333v-68.266667a34.133333 34.133333 0 1 1 68.266667 0v68.266667a34.133333 34.133333 0 0 1-34.133333 34.133333z" horiz-adv-x="1024" />
<glyph glyph-name="danyonghuxianzhi" unicode="&#59224;" d="M630.784 374.03306699999996c-110.3872-51.882667-155.101867-173.124267-155.101867-314.299734v-102.4H34.133333a443.938133 443.938133 0 0 0 291.566934 416.9728 273.066667 273.066667 0 1 0 304.264533 0l0.750933-0.273066zM648.533333 230.39999999999998v34.133333a136.533333 136.533333 0 1 0 273.066667 0v-34.133333h34.133333a34.133333 34.133333 0 0 0 34.133334-34.133333V76.79999999999995a187.733333 187.733333 0 0 0-187.733334-187.733333h-34.133333A187.733333 187.733333 0 0 0 580.266667 76.79999999999995v119.466667a34.133333 34.133333 0 0 0 34.133333 34.133333H648.533333z m68.266667 0h136.533333v34.133333a68.266667 68.266667 0 0 1-136.533333 0v-34.133333z m68.266667-98.986667a34.133333 34.133333 0 0 1-34.133334-34.133333v-68.266667a34.133333 34.133333 0 1 1 68.266667 0v68.266667a34.133333 34.133333 0 0 1-34.133333 34.133333z" horiz-adv-x="1024" />
<glyph glyph-name="shouqi2" unicode="&#59226;" d="M186.181818 337.45454500000005h651.636364V430.545455H186.181818z" horiz-adv-x="1024" />
<glyph glyph-name="zhankai2" unicode="&#59227;" d="M465.454545 430.545455V709.818182h93.09091v-279.272727h279.272727v-93.09091H558.545455v-279.272727H465.454545V337.45454500000005H186.181818V430.545455h279.272727z" horiz-adv-x="1024" />
<glyph glyph-name="qiehuan" unicode="&#59228;" d="M512 576H320a192 192 0 0 1-1.792-384l-42.496-59.392C155.136 155.32799999999997 64 259.264 64 384c0 141.44 116.992 256 261.312 256h314.304L512 461.376V576z m-102.72-384l81.92 114.688V192H704a192 192 0 0 1 0 384h-20.096l44.608 62.336C858.88 623.808 960 515.456 960 384c0-141.44-116.992-256-261.312-256H363.52l45.76 64z" horiz-adv-x="1024" />
<glyph glyph-name="jilushuziduan" unicode="&#59319;" d="M781.888 512.256h-104l-43.904-264.896h125.12v-55.232H624.256l-25.984-135.68h-63.36l25.984 135.68H343.04l-29.248-135.68H252.16l29.248 135.68H192v55.232h100.736l48.768 264.896H219.648v55.232h131.584L377.28 704h61.696l-25.984-136.512h211.2L648.704 704h63.36l-22.72-136.512h92.608v-55.232z m-211.264-264.896l45.504 264.896h-211.2l-50.432-264.896h216.128z m376.384 464.96c3.456-5.12 4.224-10.752 2.24-16.96-1.856-6.144-5.12-10.112-9.856-11.776l-50.56-13.44 33.28-42.944a14.528 14.528 0 0 0 1.92-8c0-3.2-0.512-6.528-1.664-9.856a34.88 34.88 0 0 0-4.416-9.344 17.28 17.28 0 0 0-7.296-6.08 24.064 24.064 0 0 0-18.24 3.2 25.6 25.6 0 0 0-10.688 11.52v-0.64l-25.6 42.88-34.56-49.216c-0.768-2.176-2.752-3.776-5.76-4.864a24 24 0 0 0-6.912-1.6 41.536 41.536 0 0 0-10.56 1.28 11.328 11.328 0 0 0-7.424 6.4v-0.64a27.328 27.328 0 0 0 0 30.08l29.44 37.12h-0.64c-0.384 0-0.896 0.256-1.28 0.704h-2.56a172.544 172.544 0 0 0-16.64 4.416 1833.92 1833.92 0 0 1-21.12 6.464c-4.672 1.664-7.808 6.336-9.216 14.016a29.44 29.44 0 0 0 1.536 19.2 16.256 16.256 0 0 0 12.16 6.4 22.784 22.784 0 0 0 14.72-3.84h-0.64l19.84-7.04c6.848-2.944 13.44-5.12 19.84-6.4v10.88a15.872 15.872 0 0 1-0.32 2.88 12.032 12.032 0 0 0-0.32 2.88V748.8c0 6.016 1.984 10.688 6.08 14.08a22.528 22.528 0 0 0 15.104 5.12 23.04 23.04 0 0 0 13.44-5.12 16.384 16.384 0 0 0 6.912-14.08l-3.2-45.44 39.68 15.424a32.896 32.896 0 0 0 17.728 1.856 21.44 21.44 0 0 0 15.552-8.32z" horiz-adv-x="1024" />
<glyph glyph-name="jilushuziduanfuzhi" unicode="&#59320;" d="M813.888 512.256h-104l-43.84-264.896h125.12v-55.232h-134.912l-25.984-135.68h-63.36l25.984 135.68H375.168l-29.248-135.68H284.16l29.248 135.68H224v55.232h100.8l48.704 264.896H251.648v55.232h131.648L409.28 704h61.76l-26.048-136.512h211.264L680.64 704h63.36l-22.72-136.512h92.608v-55.232z m-211.2-264.896l45.44 264.896h-211.2l-50.432-264.896h216.128z m376.32 464.96c3.52-5.12 4.224-10.752 2.304-16.96-1.92-6.144-5.184-10.112-9.856-11.776l-50.56-13.44 33.216-42.944a14.528 14.528 0 0 0 1.92-8 34.88 34.88 0 0 0-6.08-19.2 17.28 17.28 0 0 0-7.296-6.08 24.064 24.064 0 0 0-18.24 3.2 25.6 25.6 0 0 0-10.624 11.52v-0.64l-25.6 42.88-34.56-49.216c-0.832-2.176-2.752-3.776-5.76-4.864a24 24 0 0 0-7.04-1.6 41.536 41.536 0 0 0-10.496 1.28 11.328 11.328 0 0 0-7.36 6.4v-0.64a27.328 27.328 0 0 0 0 30.08l29.44 37.12h-0.64c-0.448 0-0.896 0.256-1.344 0.704h-2.56a172.544 172.544 0 0 0-16.64 4.416 1833.92 1833.92 0 0 1-21.12 6.464c-4.672 1.664-7.808 6.336-9.216 14.016a29.44 29.44 0 0 0 1.536 19.2 16.256 16.256 0 0 0 12.16 6.4 22.784 22.784 0 0 0 14.72-3.84h-0.64l19.84-7.04c6.848-2.944 13.44-5.12 19.84-6.4v10.88a15.872 15.872 0 0 1-0.256 2.88 12.032 12.032 0 0 0-0.32 2.88V748.8c0 6.016 1.92 10.688 6.016 14.08a22.528 22.528 0 0 0 15.104 5.12 23.04 23.04 0 0 0 13.44-5.12 16.384 16.384 0 0 0 6.976-14.08l-3.2-45.44 39.68 15.424a32.896 32.896 0 0 0 17.664 1.856 21.44 21.44 0 0 0 15.616-8.32zM32 416v64h192v-64h-192z m0-128v64h192v-64h-192z" horiz-adv-x="1024" />
<glyph glyph-name="bukeliandong" unicode="&#59229;" d="M213.333333 853.333333h597.333334a170.666667 170.666667 0 0 0 170.666666-170.666666v-597.333334a170.666667 170.666667 0 0 0-170.666666-170.666666H213.333333a170.666667 170.666667 0 0 0-170.666666 170.666666V682.666667a170.666667 170.666667 0 0 0 170.666666 170.666666z m0-42.666666a128 128 0 0 1-128-128v-597.333334a128 128 0 0 1 128-128h597.333334a128 128 0 0 1 128 128V682.666667a128 128 0 0 1-128 128H213.333333z" horiz-adv-x="1024" />
<glyph glyph-name="bukeliandong_fanxiangkeliandong" unicode="&#59321;" d="M627.498667 85.333333H960a21.333333 21.333333 0 1 0 0-42.666666h-332.501333l84.266666-84.266667a21.333333 21.333333 0 1 0-30.165333-30.165333l-120.704 120.661333a21.333333 21.333333 0 0 0 0 30.208l120.704 120.661333a21.333333 21.333333 0 1 0 30.165333-30.165333L627.498667 85.333333zM981.333333 213.333333h-42.666666V682.666667a128 128 0 0 1-128 128H213.333333a128 128 0 0 1-128-128v-597.333334a128 128 0 0 1 128-128h256v-42.666666H213.333333a170.666667 170.666667 0 0 0-170.666666 170.666666V682.666667a170.666667 170.666667 0 0 0 170.666666 170.666666h597.333334a170.666667 170.666667 0 0 0 170.666666-170.666666v-469.333334z m-512-298.666666a21.333333 21.333333 0 1 0 0 42.666666 21.333333 21.333333 0 0 0 0-42.666666z m490.666667 277.162666a21.333333 21.333333 0 1 0 0 42.666667 21.333333 21.333333 0 0 0 0-42.666667z" horiz-adv-x="1024" />
<glyph glyph-name="keliandong" unicode="&#59322;" d="M449.536 283.13599999999997l301.653333 301.696a42.666667 42.666667 0 0 0 60.373334-60.330667l-331.861334-331.861333a42.538667 42.538667 0 0 0-60.373333 0L268.501333 343.46666700000003a42.666667 42.666667 0 0 0 60.330667 60.330666l120.704-120.661333z" horiz-adv-x="1024" />
<glyph glyph-name="youhuazhanshicengjibeifen-copy" unicode="&#59323;" d="M548.571429-55.00342899999998v877.714286h-438.857143v-146.285714h-73.142857v182.857143a36.571429 36.571429 0 0 0 36.571428 36.571428h1024a36.571429 36.571429 0 0 0 36.571429-36.571428V676.571429h-73.142857V822.637714h-438.857143v-877.714285h438.857143V91.42857100000003h73.142857v-182.857142a36.571429 36.571429 0 0 0-36.571429-36.571429H73.142857a36.571429 36.571429 0 0 0-36.571428 36.571429v182.857142h73.142857v-146.285714h438.857143z m-234.569143 475.428572L221.257143 513.170286a36.571429 36.571429 0 1 0 51.712 51.712l155.209143-155.136a36.571429 36.571429 0 0 0 0-51.712L272.969143 202.82514300000003a36.571429 36.571429 0 0 0-51.712 51.712l92.745143 92.745143H109.714286a36.571429 36.571429 0 0 0 0 73.142857h204.288z m542.646857 0.146286H1060.571429a36.571429 36.571429 0 1 0 0-73.142858h-204.580572l93.037714-93.037714a36.571429 36.571429 0 1 0-51.712-51.712l-155.209142 155.062857A36.425143 36.425143 0 0 0 731.428571 384a36.571429 36.571429 0 0 0 13.824 28.598857l152.064 152.137143a36.571429 36.571429 0 1 0 51.712-51.785143L856.649143 420.571429z" horiz-adv-x="1170" />

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 288 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

1
dist/resource.css vendored

@ -291,7 +291,6 @@ textarea::-webkit-scrollbar-thumb:hover {
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

19
dist/utils.js vendored

@ -11014,8 +11014,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);
@ -12826,6 +12826,7 @@ if (!_global.BI) {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -13081,6 +13082,20 @@ if (!_global.BI) {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

42
dist/widget.js vendored

@ -449,7 +449,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},
@ -2750,6 +2751,7 @@ BI.extend(BI.DynamicDateCard, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {
@ -3341,7 +3343,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -3367,11 +3370,11 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},
@ -3706,6 +3709,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,
@ -4408,7 +4412,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -4434,7 +4439,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
@ -6022,7 +6027,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -14552,7 +14557,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -14561,8 +14568,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -14601,8 +14608,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",
@ -16873,7 +16880,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",
@ -20581,6 +20588,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -20727,6 +20735,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();!(function () {
@ -20780,7 +20790,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",
@ -22227,7 +22237,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -23267,7 +23277,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

1
public/css/font.css

@ -8,7 +8,6 @@
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

22
src/base/combination/combo.js

@ -9,7 +9,10 @@ BI.Combo = BI.inherit(BI.Widget, {
baseCls: (conf.baseCls || "") + " bi-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft
logic: {
dynamic: true
},
container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false,
destroyWhenHide: false,
@ -67,14 +70,13 @@ BI.Combo = BI.inherit(BI.Widget, {
}
});
BI.createWidget({
type: "bi.vertical",
scrolly: false,
element: this,
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("vertical", BI.extend(o.logic, {
items: [
{el: this.combo}
{ el: this.combo }
]
});
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
if (this.isViewVisible()) {
@ -381,6 +383,12 @@ BI.Combo = BI.inherit(BI.Widget, {
case "right,top":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "right,innerRight":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerRight", "innerLeft", "bottom", "top"], o.offsetStyle);
break;
case "right,innerLeft":
p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "innerLeft", "innerRight", "bottom", "top"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);

2
src/base/single/editor/editor.js

@ -240,7 +240,7 @@ BI.Editor = BI.inherit(BI.Single, {
var o = this.options;
var errorText = o.errorText;
if (BI.isFunction(errorText)) {
errorText = errorText(this.editor.getValue());
errorText = errorText(BI.trim(this.editor.getValue()));
}
if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {

10
src/base/single/editor/editor.textarea.js

@ -30,9 +30,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 10,
left: 4,
right: 10,
top: 8,
top: 4,
bottom: 8
}]
});
@ -81,9 +81,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
if (!this.watermark) {
this.watermark = BI.createWidget({
type: "bi.text_button",
cls: "bi-water-mark",
cls: "bi-water-mark cursor-default",
textAlign: "left",
height: 30,
height: 20,
text: o.watermark,
invalid: o.invalid,
disabled: o.disabled
@ -96,7 +96,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 10,
left: 4,
top: 4,
right: 0
}]

4
src/base/single/html/html.js

@ -50,10 +50,14 @@ BI.Html = BI.inherit(BI.Single, {
if (BI.isNumber(o.lineHeight)) {
this.element.css({lineHeight: o.lineHeight + "px"});
}
if (BI.isWidthOrHeight(o.maxWidth)) {
this.element.css({maxWidth: o.maxWidth});
}
this.element.css({
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "",
overflow: o.whiteSpace === "nowrap" ? "" : "auto"
});
if (o.handler) {
this.text = BI.createWidget({

4
src/base/single/input/checkbox/checkbox.js

@ -11,8 +11,8 @@ BI.Checkbox = BI.inherit(BI.BasicButton, {
handler: BI.emptyFn,
width: 16,
height: 16,
iconWidth: 14,
iconHeight: 14
iconWidth: 16,
iconHeight: 16
},
render: function () {

11
src/base/single/label/html.label.js

@ -194,13 +194,14 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) {
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -213,7 +214,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
return;
}
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -249,7 +250,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -267,7 +268,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -314,7 +315,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});

20
src/base/single/label/label.js

@ -203,13 +203,14 @@ BI.Label = BI.inherit(BI.Single, {
_createNotCenterEl: function () {
var o = this.options;
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt";
var json = this._createJson();
if (BI.isNumber(o.width) && o.width > 0) {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
height: o.height,
scrollable: o.whiteSpace === "normal",
element: this,
@ -222,7 +223,7 @@ BI.Label = BI.inherit(BI.Single, {
return;
}
BI.createWidget({ // 2.2
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -258,7 +259,7 @@ BI.Label = BI.inherit(BI.Single, {
}
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;
BI.createWidget({ // 2.4
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -276,7 +277,7 @@ BI.Label = BI.inherit(BI.Single, {
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
json.width = o.textWidth;
BI.createWidget({ // 2.5
type: "bi.vertical_adapt",
type: adaptLayout,
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,
vgap: o.vgap,
@ -323,21 +324,12 @@ BI.Label = BI.inherit(BI.Single, {
maxWidth: "100%"
}));
BI.createWidget({
type: "bi.vertical_adapt",
type: adaptLayout,
element: this,
items: [this.text]
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},

4
src/base/single/text.js

@ -85,7 +85,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -147,4 +147,4 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);
BI.shortcut("bi.text", BI.Text);

4
src/base/single/tip/tip.tooltip.js

@ -47,11 +47,11 @@ BI.Tooltip = BI.inherit(BI.Tip, {
hgap: this._const.hgap,
items: BI.map(texts, function (i, text) {
return {
type: "bi.text",
type: "bi.label",
textAlign: "left",
whiteSpace: "normal",
text: text,
height: 18
textHeight: 18
};
})
});

2
src/case/calendar/calendar.year.js

@ -59,7 +59,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,

2
src/case/combo/icontextvaluecombo/popup.icontextvalue.js

@ -39,6 +39,8 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
}
});
this.check();
BI.createWidget({
type: "bi.vertical",
element: this,

4
src/case/combo/searchtextvaluecombo/popup.searchtextvalue.js

@ -45,6 +45,10 @@ BI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {
};
},
mounted: function() {
this.check();
},
populate: function (find, match, keyword) {
var items = BI.concat(find, match);
BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);

10
src/case/editor/editor.state.simple.js

@ -21,7 +21,8 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
allowBlank: true,
watermark: "",
errorText: "",
height: 24
height: 24,
text: BI.i18nText("BI-Basic_Unrestricted")
});
},
@ -48,8 +49,8 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
type: "bi.text_button",
cls: "state-editor-infinite-text",
textAlign: "left",
text: o.text,
height: o.height,
text: BI.i18nText("BI-Basic_Unrestricted"),
hgap: 4,
handler: function () {
self._showInput();
@ -218,6 +219,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
},
setState: function (v) {
var o = this.options;
BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);
if (BI.isNumber(v)) {
if (v === BI.Selection.All) {
@ -227,7 +229,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
this.text.setText(BI.i18nText("BI-Already_Selected"));
this.text.element.removeClass("state-editor-infinite-text");
} else {
this.text.setText(BI.i18nText("BI-Basic_Unrestricted"));
this.text.setText(o.text);
this.text.element.addClass("state-editor-infinite-text");
}
return;
@ -237,7 +239,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
this.text.setTitle(v);
this.text.element.removeClass("state-editor-infinite-text");
} else if (BI.isEmpty(v)) {
this.text.setText(BI.i18nText("BI-Basic_Unrestricted"));
this.text.setText(o.text);
this.text.element.addClass("state-editor-infinite-text");
} else {
this.text.setText(BI.i18nText("BI-Already_Selected"));

2
src/case/layer/pane.list.js

@ -49,6 +49,8 @@ BI.ListPane = BI.inherit(BI.Pane, {
calback.apply(self, arguments);
op.times === 1 && BI.nextTick(function () {
self.loaded();
// callback可能在loading之前执行, check保证显示正确
self.check();
});
});
},

15
src/core/alias.js

@ -353,6 +353,7 @@
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -608,6 +609,20 @@
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";

4
src/core/base.js

@ -88,8 +88,8 @@ if (!_global.BI) {
},
createItems: function (data, innerAttr, outerAttr) {
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr);
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr);
innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});
outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});
return BI.map(data, function (i, item) {
if (BI.isArray(item)) {
return BI.createItems(item, innerAttr, outerAttr);

72
src/core/platform/web/dom.js

@ -306,6 +306,12 @@
};
},
getInnerLeftPosition: function (combo, popup, extraWidth) {
return {
left: combo.element.offset().left + (extraWidth || 0)
};
},
getRightPosition: function (combo, popup, extraWidth) {
var el = combo.element;
return {
@ -313,6 +319,13 @@
};
},
getInnerRightPosition: function (combo, popup, extraWidth) {
var el = combo.element, viewBounds = popup.element.bounds();
return {
left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)
};
},
getTopPosition: function (combo, popup, extraHeight) {
return {
top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)
@ -330,12 +343,21 @@
return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;
},
isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isRightSpaceEnough: function (combo, popup, extraWidth) {
var viewBounds = popup.element.bounds(),
windowBounds = BI.Widget._renderEngine.createElement("body").bounds();
return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;
},
isInnerRightSpaceEnough: function (combo, popup, extraWidth) {
return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;
},
isTopSpaceEnough: function (combo, popup, extraHeight) {
return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;
},
@ -541,7 +563,7 @@
extraWidth || (extraWidth = 0);
extraHeight || (extraHeight = 0);
var i, direct;
var leftRight = [], topBottom = [];
var leftRight = [], topBottom = [], innerLeftRight = [];
var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;
var left, top, pos, firstDir = directions[0];
for (i = 0; i < directions.length; i++) {
@ -559,6 +581,12 @@
case "bottom":
topBottom.push(direct);
break;
case "innerLeft":
innerLeftRight.push(direct);
break;
case "innerRight":
innerLeftRight.push(direct);
break;
}
}
for (i = 0; i < directions.length; i++) {
@ -650,6 +678,48 @@
}
tbFirst = true;
break;
case "innerLeft":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;
if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerLeft,top";
}
if (tbFirst) {
pos.change = "innerLeft";
}
pos.left = left;
return pos;
}
}
lrFirst = true;
break;
case "innerRight":
if (!isNeedAdaptHeight) {
var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;
if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {
left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;
if (topBottom[0] === "bottom") {
pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,bottom";
} else {
pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);
pos.dir = "innerRight,top";
}
if (tbFirst) {
pos.change = "innerRight";
}
pos.left = left;
return pos;
}
}
break;
}
}

1
src/css/core/normalize2.css

@ -46,6 +46,5 @@ li {
}
i {
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}

1
src/css/resource/font.css

@ -8,7 +8,6 @@
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

1
src/less/core/normalize2.less

@ -59,6 +59,5 @@ li {
i {
//font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}

1
src/less/image.less

@ -342,7 +342,6 @@
@baseProperty: {
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
};

11
src/less/visual.less

@ -313,4 +313,15 @@
-ms-transform-origin: @x @y;
-o-transform-origin: @x @y;
transform-origin: @x @y;
}
.hover-visible(@cls) {
& .@{cls} {
visibility: hidden;
}
&:hover {
& .@{cls} {
visibility: visible;
}
}
}

3
src/widget/date/calendar/popup.calendar.date.js

@ -25,7 +25,8 @@ BI.DateCalendarPopup = BI.inherit(BI.Widget, {
max: this.options.max,
year: date.year,
month: date.month,
day: this.selectedTime.day
// BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可
day: 1
});
return calendar;
},

1
src/widget/dynamicdate/dynamicdate.combo.js

@ -52,6 +52,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
value: opts.value,
ref: function () {

7
src/widget/dynamicdate/dynamicdate.trigger.js

@ -14,7 +14,8 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -40,11 +41,11 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text");
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
return str;
},

1
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -51,6 +51,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
value: opts.value,

5
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -14,7 +14,8 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
max: "2099-12-31", // 最大日期
height: 24,
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
allowEdit: true, // 是否允许编辑
watermark: ""
},
_init: function () {
@ -40,7 +41,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
errorText: function () {
var str = "";
if (!BI.isKey(o.format)) {

2
src/widget/month/popup.month.js

@ -31,7 +31,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

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

@ -46,6 +46,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
},
searcher: {
type: "bi.multi_tree_searcher",
text: o.text,
itemsCreator: o.itemsCreator,
popup: {
type: "bi.multi_tree_search_insert_pane",

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

@ -38,6 +38,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
text: o.text,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,

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

@ -28,6 +28,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
height: o.height,
el: {
type: "bi.simple_state_editor",
text: o.text,
height: o.height
}
});

12
src/widget/numberinterval/numberinterval.js

@ -26,7 +26,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
extraCls: "bi-number-interval",
height: 24,
validation: "valid",
closeMin: true
closeMin: true,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted")
});
},
_init: function () {
@ -35,8 +37,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.min,
level: "warning",
tipType: "success",
@ -75,8 +77,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor",
height: o.height - 2,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
watermark: o.watermark,
allowBlank: o.allowBlank,
value: o.max,
level: "warning",
tipType: "success",

2
src/widget/selecttree/selecttree.combo.js

@ -7,7 +7,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-combo",
height: 30,
height: 24,
text: "",
items: [],
value: "",

3
src/widget/time/time.combo.js

@ -66,6 +66,7 @@
el: {
type: "bi.time_trigger",
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
value: opts.value,
ref: function (_ref) {
@ -212,6 +213,8 @@
BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.TimeCombo.EVENT_VALID = "EVENT_VALID";
BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR";
BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.time_combo", BI.TimeCombo);
})();

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

@ -49,7 +49,7 @@
value: this._formatValue(o.value),
hgap: 4,
allowBlank: true,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"),
title: BI.bind(this._getTitle, this),
listeners: [{
eventName: "EVENT_KEY_DOWN",

2
src/widget/yearmonth/card.static.yearmonth.js

@ -19,7 +19,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

2
src/widget/yearquarter/card.static.yearquarter.js

@ -23,7 +23,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

1
ui/css/font.css

@ -8,7 +8,6 @@
font-family: 'fineui';
font-style: normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.close-font .b-font {

Loading…
Cancel
Save