Guyi 4 years ago
parent
commit
bf61c104cc
  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. 1181
      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. 1147
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 1521
      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. 1175
      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. 435
      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. 320
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. 6
      dist/lib/index.d.ts
  35. 12
      dist/lib/widget/multilayerselecttree/multilayerselecttree.leveltree.d.ts
  36. 8
      dist/lib/widget/selecttree/selecttree.expander.d.ts
  37. 2
      dist/resource.css
  38. 26
      dist/utils.js
  39. 2
      dist/utils.js.map
  40. 4
      dist/utils.min.js
  41. 2
      dist/utils.min.js.map
  42. 65
      examples/dev.html
  43. 2
      package.json
  44. 4
      src/base/foundation/message.js
  45. 29
      src/base/single/input/file.js
  46. 2
      src/case/colorchooser/colorchooser.js
  47. 1
      src/case/colorchooser/colorchooser.popup.hex.simple.js
  48. 3
      src/case/colorchooser/colorchooser.simple.js
  49. 2
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.js
  50. 2
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js
  51. 2
      src/case/toolbar/toolbar.multiselect.js
  52. 4
      src/core/platform/web/config.js
  53. 1
      src/core/system.js
  54. 5
      src/core/wrapper/layout.js
  55. 10
      src/core/wrapper/layout/adapt/adapt.table.js
  56. 2
      src/core/wrapper/layout/fill/float.fill.horizontal.js
  57. 14
      src/core/wrapper/layout/flex/flex.horizontal.js
  58. 14
      src/core/wrapper/layout/flex/flex.vertical.js
  59. 14
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  60. 14
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  61. 14
      src/widget/multiselect/multiselect.combo.js
  62. 16
      src/widget/multiselect/multiselect.combo.nobar.js
  63. 14
      src/widget/multiselect/multiselect.insert.combo.js
  64. 14
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  65. 14
      src/widget/multiselectlist/multiselectlist.insert.js
  66. 14
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  67. 14
      src/widget/multiselectlist/multiselectlist.js
  68. 2
      src/widget/multitree/trigger/searcher.multi.tree.js
  69. 2
      src/widget/singleselect/search/singleselect.search.pane.insert.js
  70. 6
      typescript/index.ts
  71. 21
      typescript/widget/multilayerselecttree/multilayerselecttree.leveltree.ts
  72. 13
      typescript/widget/selecttree/selecttree.expander.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

1181
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

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

1147
dist/core.js vendored

File diff suppressed because it is too large Load Diff

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

1521
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

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

1175
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

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

435
dist/fineui.proxy.js vendored

File diff suppressed because it is too large Load Diff

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

320
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-22 21:30:32 */
/*! time: 2021-8-25 17:20:32 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1456);
/******/ return __webpack_require__(__webpack_require__.s = 1458);
/******/ })
/************************************************************************/
/******/ ([
@ -138,6 +138,15 @@ var _single = __webpack_require__(2);
"use strict";
var _widget = __webpack_require__(0);
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
var g; // This works in non-strict mode
@ -160,16 +169,7 @@ try {
module.exports = g;
/***/ }),
/* 15 */,
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _widget = __webpack_require__(0);
/***/ }),
/* 16 */,
/* 17 */,
/* 18 */,
/* 19 */,
@ -273,7 +273,7 @@ var _widget = __webpack_require__(0);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 53 */
@ -356,7 +356,7 @@ __webpack_require__(96); // On some exotic environments, it's not clear which ob
exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || void 0 && (void 0).setImmediate;
exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || void 0 && (void 0).clearImmediate;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
/* 62 */,
@ -684,7 +684,7 @@ if (_global.BI == null) {
if(_global.BI.prepares == null) {
_global.BI.prepares = [];
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
/* 92 */
@ -2040,7 +2040,7 @@ if (!_global.BI) {
});
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14), __webpack_require__(61).setImmediate))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15), __webpack_require__(61).setImmediate))
/***/ }),
/* 96 */
@ -2250,7 +2250,7 @@ if (!_global.BI) {
attachTo.setImmediate = setImmediate;
attachTo.clearImmediate = clearImmediate;
})(typeof self === "undefined" ? typeof global === "undefined" ? void 0 : global : self);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14), __webpack_require__(75)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15), __webpack_require__(75)))
/***/ }),
/* 97 */
@ -4429,7 +4429,7 @@ _.extend(BI, {
};
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
/* 103 */
@ -16027,6 +16027,7 @@ BI.Region.prototype = {
TOOL_BAR_HEIGHT: 24,
LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24,
TOAST_TOP: 10
},
};
@ -16838,7 +16839,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} else { // 如果新节点在旧节点区间中存在就复用一下
var sameOldIndex = sameOldVnode[1];
updated = self.patchItem(sameOldVnode[0], newStartVnode, sameOldIndex, newStartIdx) || updated;
children[sameOldVnode[0].key == null ? newStartIdx : sameOldVnode[0].key] = self._children[self._getChildName(newStartIdx)] = self._children[self._getChildName(sameOldIndex)];
children[sameOldVnode[0].key == null ? newStartIdx : sameOldVnode[0].key] = self._children[self._getChildName(sameOldIndex)];
if (newStartIdx !== sameOldIndex) {
delete self._children[self._getChildName(sameOldIndex)];
}
@ -16877,6 +16878,7 @@ BI.Layout = BI.inherit(BI.Widget, {
function addNode (vnode, index) {
var opt = self._getOptions(vnode);
var key = opt.key == null ? index : opt.key;
delete self._children[self._getChildName(index)];
return children[key] = self._addElement(index, vnode);
}
@ -16941,9 +16943,11 @@ BI.Layout = BI.inherit(BI.Widget, {
c.destroy();
});
this._children = {};
this._isMounted = false;
}
this.options.items = opt.items;
this.stroke(opt.items);
this._mount();
},
update: function (opt) {
@ -17664,11 +17668,6 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
w.element.css("height", "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")");
}
td = BI._lazyCreateWidget({
type: "bi.default",
width: width,
@ -17679,6 +17678,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
w.element.css("height", "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")");
}
// 对于表现为td的元素设置最大宽度,有几点需要注意
// 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现
// 2、不能给多个td设置最大宽度,这样只会平分宽度
@ -18035,7 +18039,7 @@ BI.shortcut("bi.vertical_fill", BI.VerticalFillLayout);
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill",
baseCls: "bi-h-float-fill clearfix",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0,
@ -18332,6 +18336,18 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.width === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
@ -18352,7 +18368,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) {
if (columnSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {
@ -18577,6 +18593,18 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.rowSize.length > 0) {
return o.rowSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.height === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
@ -18597,7 +18625,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) {
if (rowSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {
@ -18788,6 +18816,18 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.width === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
@ -18808,7 +18848,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) {
if (columnSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {
@ -18948,6 +18988,18 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.rowSize.length > 0) {
return o.rowSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.height === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
@ -18968,7 +19020,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) {
if (rowSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {
@ -25152,7 +25204,7 @@ BI.Msg = function () {
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
var _height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
@ -25161,7 +25213,7 @@ BI.Msg = function () {
}
}]
});
var height = 10;
var height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
@ -34546,7 +34598,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_init: function () {
var self = this, o = this.options;
BI.ColorChooser.superclass._init.apply(this, arguments);
o.value = o.value || "";
o.value = (o.value || "").toLowerCase();
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
@ -34941,6 +34993,7 @@ BI.SimpleHexColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options;
return {
type: "bi.hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
value: o.value,
simple: true, // 是否有自动
listeners: [{
@ -35303,7 +35356,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
width: o.width,
height: o.height,
popup: {
type: "bi.simple_hex_color_chooser_popup"
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
}
});
this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {
@ -36012,7 +36066,7 @@ BI.shortcut("bi.color_picker", BI.ColorPicker);
BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
constants: {
RGB_WIDTH: 36,
RGB_WIDTH: 32,
HEX_WIDTH: 70,
HEX_PREFIX_POSITION: 1
},
@ -36322,7 +36376,7 @@ BI.shortcut("bi.hex_color_picker_editor", BI.HexColorPickerEditor);
BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
constants: {
RGB_WIDTH: 36,
RGB_WIDTH: 32,
HEX_WIDTH: 70,
HEX_PREFIX_POSITION: 1
},
@ -42585,7 +42639,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
setValue: function (selectedValues) {
BI.MultiSelectBar.superclass.setValue.apply(this, arguments);
var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);
this._setSelected(isAllChecked);
this.setSelected(isAllChecked);
!isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));
},
@ -54229,10 +54283,16 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -54246,7 +54306,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -54729,10 +54791,16 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -54746,7 +54814,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -55218,10 +55288,16 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -55235,7 +55311,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -55703,10 +55781,16 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -55720,7 +55804,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -58285,10 +58371,16 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -58301,7 +58393,9 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -58635,10 +58729,16 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -58651,7 +58751,9 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -58972,10 +59074,16 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -58988,7 +59096,9 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);
@ -61308,7 +61418,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]);
text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? (BI.isEmptyObject(value[name]) ? "" : ":") : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}
@ -64099,7 +64209,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
type: "bi.label",
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
cls: "bi-keyword-red-mark",
hgap: 5,
});
@ -75820,6 +75930,18 @@ Object.defineProperty(exports, "TdLayout", {
return _layout11.TdLayout;
}
});
Object.defineProperty(exports, "MultiLayerSelectLevelTree", {
enumerable: true,
get: function get() {
return _multilayerselecttree3.MultiLayerSelectLevelTree;
}
});
Object.defineProperty(exports, "SelectTreeExpander", {
enumerable: true,
get: function get() {
return _selecttree.SelectTreeExpander;
}
});
exports["default"] = void 0;
var _combo = __webpack_require__(718);
@ -75828,7 +75950,7 @@ var _group = __webpack_require__(68);
var _tab = __webpack_require__(719);
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
var _button = __webpack_require__(4);
@ -76156,6 +76278,10 @@ var _pane3 = __webpack_require__(861);
var _layout11 = __webpack_require__(862);
var _multilayerselecttree3 = __webpack_require__(863);
var _selecttree = __webpack_require__(864);
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@ -76334,7 +76460,7 @@ var _widget = __webpack_require__(0);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 737 */
@ -76878,7 +77004,7 @@ var _widget = __webpack_require__(0);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 775 */
@ -76941,7 +77067,7 @@ var _widget = __webpack_require__(0);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 782 */
@ -77130,7 +77256,7 @@ var _widget = __webpack_require__(0);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 803 */
@ -77526,7 +77652,7 @@ var _button = __webpack_require__(46);
"use strict";
var _pane = __webpack_require__(16);
var _pane = __webpack_require__(14);
/***/ }),
/* 847 */
@ -77671,8 +77797,24 @@ var _abstract = __webpack_require__(30);
var _layout = __webpack_require__(3);
/***/ }),
/* 863 */,
/* 864 */,
/* 863 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _pane = __webpack_require__(14);
/***/ }),
/* 864 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _widget = __webpack_require__(0);
/***/ }),
/* 865 */,
/* 866 */,
/* 867 */,
@ -77699,7 +77841,9 @@ var _layout = __webpack_require__(3);
/* 888 */,
/* 889 */,
/* 890 */,
/* 891 */
/* 891 */,
/* 892 */,
/* 893 */
/***/ (function(module, exports) {
;(function () {
@ -77862,8 +78006,6 @@ var _layout = __webpack_require__(3);
/***/ }),
/* 892 */,
/* 893 */,
/* 894 */,
/* 895 */,
/* 896 */,
@ -77896,7 +78038,9 @@ var _layout = __webpack_require__(3);
/* 923 */,
/* 924 */,
/* 925 */,
/* 926 */
/* 926 */,
/* 927 */,
/* 928 */
/***/ (function(module, exports) {
;(function () {
@ -78172,8 +78316,6 @@ var _layout = __webpack_require__(3);
/***/ }),
/* 927 */,
/* 928 */,
/* 929 */,
/* 930 */,
/* 931 */,
@ -78181,14 +78323,16 @@ var _layout = __webpack_require__(3);
/* 933 */,
/* 934 */,
/* 935 */,
/* 936 */
/* 936 */,
/* 937 */,
/* 938 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(937);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(939);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
/* 937 */
/* 939 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(setImmediate) {function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@ -79721,8 +79865,6 @@ var _layout = __webpack_require__(3);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(61).setImmediate))
/***/ }),
/* 938 */,
/* 939 */,
/* 940 */,
/* 941 */,
/* 942 */,
@ -79921,14 +80063,14 @@ var _layout = __webpack_require__(3);
/* 1135 */,
/* 1136 */,
/* 1137 */,
/* 1138 */
/* 1138 */,
/* 1139 */,
/* 1140 */
/***/ (function(module, exports) {
/***/ }),
/* 1139 */,
/* 1140 */,
/* 1141 */,
/* 1142 */,
/* 1143 */,
@ -80244,7 +80386,9 @@ var _layout = __webpack_require__(3);
/* 1453 */,
/* 1454 */,
/* 1455 */,
/* 1456 */
/* 1456 */,
/* 1457 */,
/* 1458 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(92);
@ -80363,7 +80507,7 @@ __webpack_require__(378);
__webpack_require__(110);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(936);
__webpack_require__(938);
__webpack_require__(379);
__webpack_require__(380);
__webpack_require__(381);
@ -80761,9 +80905,9 @@ __webpack_require__(712);
__webpack_require__(713);
__webpack_require__(714);
__webpack_require__(715);
__webpack_require__(926);
__webpack_require__(891);
__webpack_require__(1138);
__webpack_require__(928);
__webpack_require__(893);
__webpack_require__(1140);
module.exports = __webpack_require__(716);

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

6
dist/lib/index.d.ts vendored

@ -175,6 +175,8 @@ import { MultiSelectTree } from './widget/multiselecttree/multiselecttree';
import { HtmlLabel } from "./base/single/label/html.label";
import { TreeValueChooserPane } from './component/treevaluechooser/pane.treevaluechooser';
import { TdLayout } from './core/wrapper/layout/layout.td';
import { MultiLayerSelectLevelTree } from './widget/multilayerselecttree/multilayerselecttree.leveltree';
import { SelectTreeExpander } from './widget/selecttree/selecttree.expander';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB;
Plugin: _Plugin;
@ -355,9 +357,11 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
HtmlLabel: typeof HtmlLabel;
TreeValueChooserPane: typeof TreeValueChooserPane;
TdLayout: typeof TdLayout;
MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree;
SelectTreeExpander: typeof SelectTreeExpander;
}
declare const _default: {
Decorators: typeof decorator;
};
export default _default;
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, Expander, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, MultiLayerDownListPopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiLayerDownListCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, TreeValueChooserPane, TdLayout, };
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, Expander, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, MultiLayerDownListPopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiLayerDownListCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, TreeValueChooserPane, TdLayout, MultiLayerSelectLevelTree, SelectTreeExpander, };

12
dist/lib/widget/multilayerselecttree/multilayerselecttree.leveltree.d.ts vendored

@ -0,0 +1,12 @@
import { Pane } from '../../base/pane';
export declare class MultiLayerSelectLevelTree extends Pane {
static xtype: string;
static EVENT_CHANGE: string;
initTree<T>(nodes: T): void;
populate<T>(nodes?: T[]): void;
setValue(v: string[] | string): void;
getValue(): string[];
getAllLeaves<T>(): T[];
getNodeById<T>(id: string): T;
getNodeByValue<T>(id: string): T;
}

8
dist/lib/widget/selecttree/selecttree.expander.d.ts vendored

@ -0,0 +1,8 @@
import { Widget } from '../../core/widget';
export declare class SelectTreeExpander extends Widget {
static xtype: string;
getAllLeaves<T>(): T[];
setValue(v: any): void;
getValue<T>(): T;
populate<T>(items: T[]): void;
}

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

26
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-22 21:30:32 */
/*! time: 2021-8-25 17:20:32 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1279);
/******/ return __webpack_require__(__webpack_require__.s = 1281);
/******/ })
/************************************************************************/
/******/ ({
@ -1616,7 +1616,7 @@ _.extend(BI, {
};
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
@ -2928,7 +2928,7 @@ BI.Req = {
/***/ }),
/***/ 1137:
/***/ 1139:
/***/ (function(module, exports) {
BI.i18n = {
@ -3134,7 +3134,7 @@ BI.i18n = {
/***/ }),
/***/ 1279:
/***/ 1281:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(91);
@ -3153,8 +3153,8 @@ __webpack_require__(97);
__webpack_require__(98);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(1137);
__webpack_require__(1280);
__webpack_require__(1139);
__webpack_require__(1282);
__webpack_require__(110);
__webpack_require__(111);
module.exports = __webpack_require__(112);
@ -3162,7 +3162,7 @@ module.exports = __webpack_require__(112);
/***/ }),
/***/ 1280:
/***/ 1282:
/***/ (function(module, exports) {
/**
@ -3236,7 +3236,7 @@ BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
/***/ }),
/***/ 14:
/***/ 15:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -3329,7 +3329,7 @@ __webpack_require__(96); // On some exotic environments, it's not clear which ob
exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || void 0 && (void 0).setImmediate;
exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || void 0 && (void 0).clearImmediate;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
@ -3575,7 +3575,7 @@ if (_global.BI == null) {
if(_global.BI.prepares == null) {
_global.BI.prepares = [];
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15)))
/***/ }),
@ -4935,7 +4935,7 @@ if (!_global.BI) {
});
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14), __webpack_require__(61).setImmediate))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15), __webpack_require__(61).setImmediate))
/***/ }),
@ -5146,7 +5146,7 @@ if (!_global.BI) {
attachTo.setImmediate = setImmediate;
attachTo.clearImmediate = clearImmediate;
})(typeof self === "undefined" ? typeof global === "undefined" ? void 0 : global : self);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(14), __webpack_require__(75)))
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(15), __webpack_require__(75)))
/***/ }),

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

65
examples/dev.html

@ -20,34 +20,53 @@
}
},
setup: function () {
var layout;
var list, count = 0;
return function () {
return {
type: "bi.left",
type: "bi.vertical",
items: [{
type: "bi.button",
text: "点击",
handler: function () {
layout.populate([{
type: "bi.label",
key: "1",
text: 1
}, {
type: "bi.virtual_group",
height: 100,
ref: function (_ref) {
list = _ref;
},
items: BI.range(10).map(function (item, i) {
var r = {
type: "bi.label",
key: "2",
text: 2
}])
}
text: item,
// 指定key后,会根据key值进行前后两次数据对比,否则会根据数组索引进行数据对比
key: item,
cls: "bi-border"
};
if (i === 9) {
r.width = "fill";
r.key = "唯一的标识";
}
return r;
}),
layouts: [{
type: "bi.inline",
tgap: 10,
lgap: 10
}]
}, {
type: "bi.left",
lgap: 10,
items: [{
type: "bi.label",
key: "123",
text: "start"
}],
ref: function (_ref) {
layout = _ref;
type: "bi.button",
text: "点击删除第一个元素",
handler: function () {
count++;
list.populate(BI.range(10 - count).map(function (i) {
var r = {
type: "bi.label",
text: i + count,
key: i + count,
cls: "bi-border"
};
if (i + count === 9) {
r.width = "fill";
r.key = "唯一的标识";
}
return r;
}));
}
}]
};

2
package.json

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

4
src/base/foundation/message.js

@ -37,7 +37,7 @@ BI.Msg = function () {
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
var _height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
@ -46,7 +46,7 @@ BI.Msg = function () {
}
}]
});
var height = 10;
var height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});

29
src/base/single/input/file.js

@ -520,22 +520,21 @@
setTimeout(function () {
self_.clean(); // remove files from list
self_.hide(); // hide progress bars and enable input file
if (200 > xhr.status || xhr.status > 399) {
BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR);
return;
}
var error = BI.some(_wrap.attach_array, function (index, attach) {
if (attach.errorCode) {
BI.Msg.toast(BI.i18nText(attach.errorMsg), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR, attach);
return true;
}
});
!error && self.fireEvent(BI.File.EVENT_UPLOADED);
// enable again the submit button/element
}, 1000);
}, 100);
if (200 > xhr.status || xhr.status > 399) {
BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR);
return;
}
var error = BI.some(_wrap.attach_array, function (index, attach) {
if (attach.errorCode) {
BI.Msg.toast(BI.i18nText(attach.errorMsg), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR, attach);
return true;
}
});
!error && self.fireEvent(BI.File.EVENT_UPLOADED);
};
_wrap.url = o.url;
_wrap.fileType = o.accept; // 文件类型限制

2
src/case/colorchooser/colorchooser.js

@ -19,7 +19,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
_init: function () {
var self = this, o = this.options;
BI.ColorChooser.superclass._init.apply(this, arguments);
o.value = o.value || "";
o.value = (o.value || "").toLowerCase();
this.combo = BI.createWidget({
type: "bi.combo",
element: this,

1
src/case/colorchooser/colorchooser.popup.hex.simple.js

@ -13,6 +13,7 @@ BI.SimpleHexColorChooserPopup = BI.inherit(BI.Widget, {
var self = this, o = this.options;
return {
type: "bi.hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
value: o.value,
simple: true, // 是否有自动
listeners: [{

3
src/case/colorchooser/colorchooser.simple.js

@ -26,7 +26,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
width: o.width,
height: o.height,
popup: {
type: "bi.simple_hex_color_chooser_popup"
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
}
});
this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {

2
src/case/colorchooser/colorpicker/editor.colorpicker.hex.js

@ -8,7 +8,7 @@
BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
constants: {
RGB_WIDTH: 36,
RGB_WIDTH: 32,
HEX_WIDTH: 70,
HEX_PREFIX_POSITION: 1
},

2
src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js

@ -6,7 +6,7 @@
BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
constants: {
RGB_WIDTH: 36,
RGB_WIDTH: 32,
HEX_WIDTH: 70,
HEX_PREFIX_POSITION: 1
},

2
src/case/toolbar/toolbar.multiselect.js

@ -130,7 +130,7 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
setValue: function (selectedValues) {
BI.MultiSelectBar.superclass.setValue.apply(this, arguments);
var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);
this._setSelected(isAllChecked);
this.setSelected(isAllChecked);
!isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));
},

4
src/core/platform/web/config.js

@ -49,7 +49,9 @@ BI.prepares.push(function () {
if (hasAutoAndFillColumnSize) {
// 宽度是不是受限
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
return BI.extend({
verticalAlign: BI.VerticalAlign.Top
}, ob, {type: "bi.horizontal_float_fill"});
}
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch

1
src/core/system.js

@ -11,6 +11,7 @@
TOOL_BAR_HEIGHT: 24,
LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24,
TOAST_TOP: 10
},
};

5
src/core/wrapper/layout.js

@ -447,7 +447,7 @@ BI.Layout = BI.inherit(BI.Widget, {
} else { // 如果新节点在旧节点区间中存在就复用一下
var sameOldIndex = sameOldVnode[1];
updated = self.patchItem(sameOldVnode[0], newStartVnode, sameOldIndex, newStartIdx) || updated;
children[sameOldVnode[0].key == null ? newStartIdx : sameOldVnode[0].key] = self._children[self._getChildName(newStartIdx)] = self._children[self._getChildName(sameOldIndex)];
children[sameOldVnode[0].key == null ? newStartIdx : sameOldVnode[0].key] = self._children[self._getChildName(sameOldIndex)];
if (newStartIdx !== sameOldIndex) {
delete self._children[self._getChildName(sameOldIndex)];
}
@ -486,6 +486,7 @@ BI.Layout = BI.inherit(BI.Widget, {
function addNode (vnode, index) {
var opt = self._getOptions(vnode);
var key = opt.key == null ? index : opt.key;
delete self._children[self._getChildName(index)];
return children[key] = self._addElement(index, vnode);
}
@ -550,9 +551,11 @@ BI.Layout = BI.inherit(BI.Widget, {
c.destroy();
});
this._children = {};
this._isMounted = false;
}
this.options.items = opt.items;
this.stroke(opt.items);
this._mount();
},
update: function (opt) {

10
src/core/wrapper/layout/adapt/adapt.table.js

@ -58,11 +58,6 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
w.element.css("height", "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")");
}
td = BI._lazyCreateWidget({
type: "bi.default",
width: width,
@ -73,6 +68,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
td = this.getWidgetByName(this._getChildName(i));
td.element.width(width);
}
if (o.verticalAlign === BI.VerticalAlign.Stretch) {
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
w.element.css("height", "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")");
}
// 对于表现为td的元素设置最大宽度,有几点需要注意
// 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现
// 2、不能给多个td设置最大宽度,这样只会平分宽度

2
src/core/wrapper/layout/fill/float.fill.horizontal.js

@ -1,7 +1,7 @@
BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatHorizontalFillLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-float-fill",
baseCls: "bi-h-float-fill clearfix",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
hgap: 0,

14
src/core/wrapper/layout/flex/flex.horizontal.js

@ -34,6 +34,18 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.width === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
@ -54,7 +66,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) {
if (columnSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {

14
src/core/wrapper/layout/flex/flex.vertical.js

@ -33,6 +33,18 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.rowSize.length > 0) {
return o.rowSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.height === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
@ -53,7 +65,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) {
if (rowSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {

14
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -30,6 +30,18 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.columnSize.length > 0) {
return o.columnSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.width === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
@ -50,7 +62,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) {
if (columnSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {

14
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -30,6 +30,18 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
_hasFill: function () {
var o = this.options;
if (o.rowSize.length > 0) {
return o.rowSize.indexOf("fill") >= 0;
}
return BI.some(o.items, function (i, item) {
if (item.height === "fill") {
return true;
}
});
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
@ -50,7 +62,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
}
}
// 当既有动态宽度和自适应宽度的时候只压缩自适应
if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) {
if (rowSize === "" && this._hasFill()) {
w.element.addClass("f-s-n");
}
} else {

14
src/widget/multiselect/multiselect.combo.js

@ -338,10 +338,16 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -355,7 +361,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

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

@ -364,10 +364,16 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -381,7 +387,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

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

@ -352,10 +352,16 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -369,7 +375,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

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

@ -349,10 +349,16 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
@ -366,7 +372,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

14
src/widget/multiselectlist/multiselectlist.insert.js

@ -240,10 +240,16 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -256,7 +262,9 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

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

@ -244,10 +244,16 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKeyword());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -260,7 +266,9 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

14
src/widget/multiselectlist/multiselectlist.js

@ -230,10 +230,16 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this._assertValue(res);
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var result = BI.Func.getSearchResult(BI.map(this.storeValue.value, function (_i, v) {
return {
text: o.valueFormatter(v) || v,
value: v
};
}), this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
BI.each(BI.concat(result.match, result.find), function (i, obj) {
var v = obj.value;
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
@ -246,7 +252,9 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
selectedValues: BI.filter(this.storeValue.value, function (_i, v) {
return !BI.contains(res.value, v);
}),
}, function (ob) {
var items = BI.map(ob.items, "value");
var selectedMap = self._makeMap(self.storeValue.value);

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

@ -136,7 +136,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]);
text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? (BI.isEmptyObject(value[name]) ? "" : ":") : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}

2
src/widget/singleselect/search/singleselect.search.pane.insert.js

@ -31,7 +31,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
type: "bi.label",
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
cls: "bi-keyword-red-mark",
hgap: 5,
});

6
typescript/index.ts

@ -175,6 +175,8 @@ import { MultiSelectTree } from './widget/multiselecttree/multiselecttree';
import { HtmlLabel } from "./base/single/label/html.label";
import { TreeValueChooserPane } from './component/treevaluechooser/pane.treevaluechooser';
import { TdLayout } from './core/wrapper/layout/layout.td';
import { MultiLayerSelectLevelTree } from './widget/multilayerselecttree/multilayerselecttree.leveltree';
import { SelectTreeExpander } from './widget/selecttree/selecttree.expander';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
@ -357,6 +359,8 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
HtmlLabel: typeof HtmlLabel;
TreeValueChooserPane: typeof TreeValueChooserPane;
TdLayout: typeof TdLayout;
MultiLayerSelectLevelTree: typeof MultiLayerSelectLevelTree;
SelectTreeExpander: typeof SelectTreeExpander;
}
export default {
@ -539,4 +543,6 @@ export {
HtmlLabel,
TreeValueChooserPane,
TdLayout,
MultiLayerSelectLevelTree,
SelectTreeExpander,
};

21
typescript/widget/multilayerselecttree/multilayerselecttree.leveltree.ts

@ -0,0 +1,21 @@
import { Pane } from '../../base/pane';
export declare class MultiLayerSelectLevelTree extends Pane {
static xtype: string;
static EVENT_CHANGE: string;
initTree<T>(nodes: T): void;
populate<T>(nodes?: T[]): void;
setValue(v: string[] | string): void;
getValue(): string[];
getAllLeaves<T>(): T[];
getNodeById<T>(id: string): T;
getNodeByValue<T>(id: string): T;
}

13
typescript/widget/selecttree/selecttree.expander.ts

@ -0,0 +1,13 @@
import { Widget } from '../../core/widget';
export declare class SelectTreeExpander extends Widget {
static xtype: string;
getAllLeaves<T>(): T[];
setValue(v: any): void;
getValue<T>(): T;
populate<T>(items: T[]): void;
}
Loading…
Cancel
Save