Browse Source

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

es6
Kira 4 years ago
parent
commit
28adb28c7c
  1. 2
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 103
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 103
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 103
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 103
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 2
      dist/fineui.proxy.css
  26. 103
      dist/fineui.proxy.js
  27. 2
      dist/fineui.proxy.js.map
  28. 2
      dist/fineui.proxy.min.css
  29. 4
      dist/fineui.proxy.min.js
  30. 2
      dist/fineui.proxy.min.js.map
  31. 74
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. BIN
      dist/font/iconfont.eot
  35. 3
      dist/font/iconfont.svg
  36. BIN
      dist/font/iconfont.ttf
  37. BIN
      dist/font/iconfont.woff
  38. BIN
      dist/font/iconfont.woff2
  39. 5
      dist/lib/base/single/button/buttons/button.image.d.ts
  40. 11
      dist/lib/base/single/button/listitem/blankicontextitem.d.ts
  41. 4
      dist/lib/base/single/label/icon.label.d.ts
  42. 2
      dist/resource.css
  43. 2
      dist/utils.js
  44. 2
      dist/utils.min.js
  45. 2
      package.json
  46. 6
      src/base/single/1.text.js
  47. 16
      src/case/pager/pager.all.count.js
  48. 22
      src/case/ztree/0.treeview.js
  49. 16
      src/core/4.widget.js
  50. 7
      src/core/platform/web/jquery/fn.js
  51. 10
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  52. 12
      src/widget/multiselect/trigger/searcher.multiselect.js
  53. 6
      src/widget/multitree/trigger/searcher.list.multi.tree.js
  54. 10
      src/widget/multitree/trigger/searcher.multi.tree.js
  55. 6
      typescript/base/single/button/buttons/button.image.ts
  56. 12
      typescript/base/single/button/listitem/blankicontextitem.ts

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

103
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -9608,6 +9608,14 @@ module.exports = !__webpack_require__(908)(function () {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -9616,11 +9624,7 @@ module.exports = !__webpack_require__(908)(function () {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -9631,7 +9635,7 @@ module.exports = !__webpack_require__(908)(function () {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -26683,6 +26687,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -26717,7 +26722,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -26755,8 +26760,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -41094,15 +41098,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -57009,9 +57015,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57025,9 +57031,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57069,6 +57075,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57208,9 +57215,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57224,9 +57231,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57236,7 +57243,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57268,6 +57275,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60452,7 +60460,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -60464,7 +60472,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60493,6 +60501,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60515,7 +60524,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -60635,7 +60644,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60655,7 +60664,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60664,7 +60673,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60694,6 +60703,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -89277,17 +89287,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";
@ -91163,7 +91176,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -91306,7 +91319,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -91402,14 +91415,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

103
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -9608,6 +9608,14 @@ module.exports = !__webpack_require__(908)(function () {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -9616,11 +9624,7 @@ module.exports = !__webpack_require__(908)(function () {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -9631,7 +9635,7 @@ module.exports = !__webpack_require__(908)(function () {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -26683,6 +26687,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -26717,7 +26722,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -26755,8 +26760,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -41094,15 +41098,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -57009,9 +57015,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57025,9 +57031,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57069,6 +57075,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57208,9 +57215,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57224,9 +57231,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57236,7 +57243,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57268,6 +57275,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60452,7 +60460,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -60464,7 +60472,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60493,6 +60501,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60515,7 +60524,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -60635,7 +60644,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60655,7 +60664,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60664,7 +60673,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60694,6 +60703,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -89277,17 +89287,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";
@ -91163,7 +91176,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -91306,7 +91319,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -91402,14 +91415,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

103
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -9608,6 +9608,14 @@ module.exports = !__webpack_require__(908)(function () {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -9616,11 +9624,7 @@ module.exports = !__webpack_require__(908)(function () {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -9631,7 +9635,7 @@ module.exports = !__webpack_require__(908)(function () {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -26683,6 +26687,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -26717,7 +26722,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -26755,8 +26760,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -41094,15 +41098,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -57009,9 +57015,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57025,9 +57031,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57069,6 +57075,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57208,9 +57215,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57224,9 +57231,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57236,7 +57243,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57268,6 +57275,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60452,7 +60460,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -60464,7 +60472,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60493,6 +60501,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60515,7 +60524,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -60635,7 +60644,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60655,7 +60664,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60664,7 +60673,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60694,6 +60703,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -89277,17 +89287,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";
@ -91163,7 +91176,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -91306,7 +91319,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -91402,14 +91415,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

103
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -9608,6 +9608,14 @@ module.exports = !__webpack_require__(908)(function () {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -9616,11 +9624,7 @@ module.exports = !__webpack_require__(908)(function () {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -9631,7 +9635,7 @@ module.exports = !__webpack_require__(908)(function () {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -26683,6 +26687,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -26717,7 +26722,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -26755,8 +26760,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -41094,15 +41098,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -57009,9 +57015,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57025,9 +57031,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57069,6 +57075,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57208,9 +57215,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57224,9 +57231,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -57236,7 +57243,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57268,6 +57275,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60452,7 +60460,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -60464,7 +60472,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60493,6 +60501,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -60515,7 +60524,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -60635,7 +60644,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60655,7 +60664,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -60664,7 +60673,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -60694,6 +60703,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -89277,17 +89287,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";
@ -91163,7 +91176,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -91306,7 +91319,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -91402,14 +91415,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

103
dist/fineui.proxy.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -7069,6 +7069,14 @@ BI.Req = {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -7077,11 +7085,7 @@ BI.Req = {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -7092,7 +7096,7 @@ BI.Req = {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -24144,6 +24148,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -24178,7 +24183,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -24216,8 +24221,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -38555,15 +38559,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -54470,9 +54476,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54486,9 +54492,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54530,6 +54536,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -54669,9 +54676,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54685,9 +54692,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54697,7 +54704,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -54729,6 +54736,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57913,7 +57921,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -57925,7 +57933,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57954,6 +57962,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57976,7 +57985,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -58096,7 +58105,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -58116,7 +58125,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -58125,7 +58134,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -58155,6 +58164,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -86738,17 +86748,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";
@ -88624,7 +88637,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -88767,7 +88780,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -88863,14 +88876,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.js.map vendored

File diff suppressed because one or more lines are too long

74
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
@ -6679,6 +6679,14 @@ BI.Req = {
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -6687,11 +6695,7 @@ BI.Req = {
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -6702,7 +6706,7 @@ BI.Req = {
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
@ -23754,6 +23758,7 @@ BI.shortcut("bi.single", BI.Single);
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -23788,7 +23793,7 @@ BI.shortcut("bi.single", BI.Single);
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -23826,8 +23831,7 @@ BI.shortcut("bi.single", BI.Single);
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });
@ -38165,15 +38169,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,
@ -54080,9 +54086,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54096,9 +54102,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54140,6 +54146,7 @@ BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
/***/ }), /***/ }),
/* 611 */ /* 611 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -54279,9 +54286,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54295,9 +54302,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -54307,7 +54314,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -54339,6 +54346,7 @@ BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
/***/ }), /***/ }),
/* 612 */ /* 612 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57523,7 +57531,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -57535,7 +57543,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57564,6 +57572,7 @@ BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
/***/ }), /***/ }),
/* 627 */ /* 627 */
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -57586,7 +57595,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -57706,7 +57715,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -57726,7 +57735,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -57735,7 +57744,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -57765,6 +57774,7 @@ BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
/***/ }), /***/ }),
/* 628 */ /* 628 */
/***/ (function(module, exports) { /***/ (function(module, exports) {

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

3
dist/font/iconfont.svg vendored

@ -20,6 +20,9 @@ Created by iconfont
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="shujuyuchuli" unicode="&#59480;" d="M333.248 128H191.872v-128h208.64c20.032-24.32 43.264-45.888 69.12-64h-277.76a64 64 0 0 0-64 64v128a64 64 0 0 0 64 64h129.536c1.984-22.016 6.016-43.392 11.84-64z m-45.376-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM400.448 448H191.872v-128h141.376a350.72 350.72 0 0 1-11.84-64H191.872a64 64 0 0 0-64 64V448a64 64 0 0 0 64 64h277.632c-25.792-18.176-49.024-39.744-69.12-64z m-112.576-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64z m544 416a64 64 0 0 0 64-64v-128a64 64 0 0 0-64-64h-640a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64z m0-64h-640v-128h640V768z m-544-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM891.584 384l3.328-3.2 67.072-79.232a18.88 18.88 0 0 0-6.592-29.44l-4.48-1.28-26.88-4.992a256.832 256.832 0 0 0-206.72-297.92 253.824 253.824 0 0 0-143.552 15.616l-14.4 6.528-0.64 0.192a23.36 23.36 0 0 0 16.96 43.52l3.136-1.6c39.04-19.2 84.224-26.752 130.432-18.368a210.112 210.112 0 0 1 170.88 231.936l-1.728 11.712-29.568-5.376a18.816 18.816 0 0 0-22.08 20.864l1.024 4.032 35.2 97.92A18.816 18.816 0 0 0 891.52 384z m-119.36 71.872l16.768-7.68a23.168 23.168 0 0 0 10.112-28.608 23.36 23.36 0 0 0-30.144-13.248l-1.92 1.024a209.664 209.664 0 0 1-132.16 19.2 210.112 210.112 0 0 1-170.88-232l1.728-11.776 28.16 5.12a18.88 18.88 0 0 0 22.208-20.416l-1.024-4.48-35.2-97.92a18.88 18.88 0 0 0-28.8-9.024l-3.392 3.2-67.008 79.232a18.88 18.88 0 0 0 6.592 29.376l4.48 1.408 28.16 5.184a256.64 256.64 0 0 0 206.848 297.92 253.184 253.184 0 0 0 145.472-16.512zM672 355.20000000000005c15.168 0 28.544-10.048 32.768-24.64l62.4-216.768c3.392-11.648-4.032-23.552-16.512-26.624-12.416-3.136-25.28 3.776-28.608 15.36l-11.52 39.808H633.408l-11.392-39.808c-3.328-11.584-16.192-18.496-28.608-15.36-12.48 3.072-19.84 14.976-16.512 26.624l62.4 216.768a34.112 34.112 0 0 0 32.768 24.64z m0-78.912l-26.112-90.496h52.096L672 276.288z" horiz-adv-x="1024" />
<glyph glyph-name="jianceyichang" unicode="&#59479;" d="M512-42.666667c235.648 0 426.666667 191.018667 426.666667 426.666667S747.648 810.666667 512 810.666667 85.333333 619.648 85.333333 384s191.018667-426.666667 426.666667-426.666667zM298.666667 426.666667h426.666666a42.666667 42.666667 0 0 0 0-85.333334H298.666667a42.666667 42.666667 0 0 0 0 85.333334z" horiz-adv-x="1024" /> <glyph glyph-name="jianceyichang" unicode="&#59479;" d="M512-42.666667c235.648 0 426.666667 191.018667 426.666667 426.666667S747.648 810.666667 512 810.666667 85.333333 619.648 85.333333 384s191.018667-426.666667 426.666667-426.666667zM298.666667 426.666667h426.666666a42.666667 42.666667 0 0 0 0-85.333334H298.666667a42.666667 42.666667 0 0 0 0 85.333334z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 393 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.

5
dist/lib/base/single/button/buttons/button.image.d.ts vendored

@ -2,6 +2,11 @@ import { BasicButton } from "../button.basic";
export declare class ImageButton extends BasicButton { export declare class ImageButton extends BasicButton {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
props: {
src?: string;
iconWidth?: number;
iconHeight?: number;
} & BasicButton['props'];
setImageWidth(w: number | string): void; setImageWidth(w: number | string): void;
setImageHeight(h: number | string): void; setImageHeight(h: number | string): void;
getImageWidth(): number; getImageWidth(): number;

11
dist/lib/base/single/button/listitem/blankicontextitem.d.ts vendored

@ -2,6 +2,17 @@ import { BasicButton } from "../button.basic";
export declare class BlankIconTextItem extends BasicButton { export declare class BlankIconTextItem extends BasicButton {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
props: {
blankWidth?: number;
iconHeight?: number | null;
iconWidth?: number | null;
textHgap?: number;
textVgap?: number;
textLgap?: number;
textRgap?: number;
text?: string;
keyword?: string;
} & BasicButton['props'];
doClick(): void; doClick(): void;
setValue(): void; setValue(): void;
getValue(): string; getValue(): string;

4
dist/lib/base/single/label/icon.label.d.ts vendored

@ -1,4 +1,8 @@
import { Single } from '../single'; import { Single } from '../single';
export declare class IconLabel extends Single { export declare class IconLabel extends Single {
static xtype: string; static xtype: string;
props: {
iconWidth: number;
iconHeight: number;
} & Single['props'];
} }

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-9 7:40:16 PM */ /*! time: 2021-6-18 11:30:22 */
/******/ (function(modules) { // webpackBootstrap /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

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

6
src/base/single/1.text.js

@ -77,6 +77,7 @@
} }
var text = this._getShowText(); var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) { if (!BI.isUndefined(text)) {
this.setText(text); this.setText(text);
} else if (BI.isKey(o.value)) { } else if (BI.isKey(o.value)) {
@ -111,7 +112,7 @@
_doRedMark: function (keyword) { _doRedMark: function (keyword) {
var o = this.options; var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword // render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword; o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py); this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
}, },
@ -149,8 +150,7 @@
setText: function (text) { setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments); BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined this.options.text = text;
this.options.text = BI.isNotNull(text) ? text : "";
this._doRedMark(this.options.keyword); this._doRedMark(this.options.keyword);
} }
}); });

16
src/case/pager/pager.all.count.js

@ -144,15 +144,17 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
self.prevText = _ref; self.prevText = _ref;
} }
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.rowCount = _ref; ref: function (_ref) {
self.rowCount = _ref;
},
cls: "row-count",
height: o.height,
text: o.count,
title: o.count
}, },
cls: "row-count",
height: o.height,
hgap: 5, hgap: 5,
text: o.count,
title: o.count
}, { }, {
type: "bi.label", type: "bi.label",
height: o.height, height: o.height,

22
src/case/ztree/0.treeview.js

@ -95,7 +95,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "", expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替 nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false, dblClickExpand: false,
showLine: o.showLine, showLine: o.showLine
}, },
callback: { callback: {
beforeExpand: beforeExpand, beforeExpand: beforeExpand,
@ -238,7 +238,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) { _getNodeValue: function (node) {
// 去除标红 // 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value; return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
}, },
// 获取半选框值 // 获取半选框值
@ -334,14 +334,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options; var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes); var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) { BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent; n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value; n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红 // 处理标红
if (BI.isKey(o.paras.keyword)) { if (BI.isNotNull(n.text)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html(); if (BI.isKey(o.paras.keyword)) {
} else { n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
n.text = BI.htmlEncode(BI.Text.formatText(n.text + "")); } else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
} }
}); });
return nodes; return nodes;

16
src/core/4.widget.js

@ -553,6 +553,14 @@
this.purgeListeners(); this.purgeListeners();
}, },
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () { isolate: function () {
if (this._parent) { if (this._parent) {
this._parent.removeWidget(this); this._parent.removeWidget(this);
@ -561,11 +569,7 @@
}, },
empty: function () { empty: function () {
BI.each(this._children, function (i, widget) { this._empty();
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
}, },
// 默认的reset方法就是干掉重来 // 默认的reset方法就是干掉重来
@ -576,7 +580,7 @@
} }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
this.empty(); this._empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();

7
src/core/platform/web/jquery/fn.js vendored

@ -77,17 +77,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为"" * 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/ */
__textKeywordMarked__: function (text, keyword, py) { __textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) { if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) { if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text)); return this.html(BI.htmlEncode(text));
} }
// textContent性能更好,并且原生防xss // textContent性能更好,并且原生防xss
this[0].textContent = text; this[0].textContent = text;
return this; return this;
} }
keyword = keyword + ""; keyword = keyword + "";
keyword = BI.toUpperCase(keyword); keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + ""; var textLeft = text + "";
py = (py || BI.makeFirstPY(text, { py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b" splitChar: "\u200b"
})) + ""; })) + "";

10
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -135,9 +135,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -151,9 +151,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -193,4 +193,4 @@ BI.MultiSelectInsertSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.MultiSelectInsertSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectInsertSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);

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

@ -133,9 +133,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.assist, function (i, v) { BI.each(ob.assist, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -149,9 +149,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = ""; var state = "";
BI.each(ob.value, function (i, v) { BI.each(ob.value, function (i, v) {
if (i === 0) { if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v); state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else { } else {
state += "," + (o.valueFormatter(v + "") || v); state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
} }
}); });
this.editor.setState(state); this.editor.setState(state);
@ -161,7 +161,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -191,4 +191,4 @@ BI.MultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.MultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);

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

@ -122,7 +122,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = ""; var text = "";
BI.each(ob.value, function (idx, path) { BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path); var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; "; text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++; count++;
}); });
@ -134,7 +134,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -161,4 +161,4 @@ BI.MultiListTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiListTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiListTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher); BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);

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

@ -16,7 +16,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
adapter: null, adapter: null,
masker: {}, masker: {}
}); });
}, },
@ -136,7 +136,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value)); var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]); var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; "; text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -156,7 +156,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) { BI.each(names, function (idx, name) {
index++; index++;
var childNodes = getChildrenNode(ob[name]); var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ","); text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") { if (childNodes === "") {
count++; count++;
} }
@ -165,7 +165,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
} }
}, },
getState: function() { getState: function () {
return this.editor.getState(); return this.editor.getState();
}, },
@ -193,4 +193,4 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher); BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);

6
typescript/base/single/button/buttons/button.image.ts

@ -4,6 +4,12 @@ export declare class ImageButton extends BasicButton {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
props: {
src?: string;
iconWidth?: number;
iconHeight?: number;
} & BasicButton['props'];
setImageWidth(w: number | string): void; setImageWidth(w: number | string): void;
setImageHeight(h: number | string): void; setImageHeight(h: number | string): void;

12
typescript/base/single/button/listitem/blankicontextitem.ts

@ -4,6 +4,18 @@ export declare class BlankIconTextItem extends BasicButton {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
props: {
blankWidth?: number;
iconHeight?: number | null;
iconWidth?: number | null;
textHgap?: number;
textVgap?: number;
textLgap?: number;
textRgap?: number;
text?: string;
keyword?: string;
} & BasicButton['props'];
doClick(): void; doClick(): void;
setValue(): void; setValue(): void;

Loading…
Cancel
Save