Browse Source

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

es6
Kira 4 years ago
parent
commit
480d8dd98e
  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. 294
      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. 294
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 294
      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. 294
      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. 294
      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. 294
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. 2
      dist/resource.css
  35. 2
      dist/utils.js
  36. 2
      dist/utils.min.js
  37. 2
      package.json
  38. 5
      src/base/1.pane.js
  39. 12
      src/case/layer/pane.list.js
  40. 8
      src/case/list/list.select.js
  41. 3
      src/case/pager/pager.all.count.js
  42. 2
      src/core/8.snabdom.js
  43. 4
      src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  44. 6
      src/core/wrapper/layout/adapt/adapt.table.js
  45. 11
      src/core/wrapper/layout/layout.td.js
  46. 31
      src/widget/multiselect/multiselect.combo.js
  47. 32
      src/widget/multiselect/multiselect.combo.nobar.js
  48. 32
      src/widget/multiselect/multiselect.insert.combo.js
  49. 32
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  50. 5
      src/widget/multiselect/search/multiselect.search.loader.js
  51. 30
      src/widget/multiselectlist/multiselectlist.insert.js
  52. 30
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  53. 30
      src/widget/multiselectlist/multiselectlist.js
  54. 5
      src/widget/singleselect/search/singleselect.search.loader.js
  55. 6
      src/widget/yearmonth/trigger.yearmonth.js
  56. 8
      src/widget/yearquarter/trigger.yearquarter.js

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

294
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -11014,7 +11014,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -18635,6 +18635,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18652,6 +18653,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18684,6 +18686,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18702,6 +18705,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18797,7 +18801,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -21883,13 +21891,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -21939,7 +21948,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -22732,6 +22745,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -41364,8 +41382,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -41673,11 +41699,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -42472,9 +42500,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -55079,26 +55108,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -55578,25 +55608,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56064,25 +56096,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56547,25 +56581,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -57744,7 +57780,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -59123,24 +59162,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59471,24 +59512,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59806,24 +59849,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -64801,7 +64846,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -71413,7 +71461,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -72714,7 +72766,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

294
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -11014,7 +11014,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -18635,6 +18635,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18652,6 +18653,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18684,6 +18686,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18702,6 +18705,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18797,7 +18801,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -21883,13 +21891,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -21939,7 +21948,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -22732,6 +22745,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -41364,8 +41382,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -41673,11 +41699,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -42472,9 +42500,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -55079,26 +55108,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -55578,25 +55608,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56064,25 +56096,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56547,25 +56581,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -57744,7 +57780,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -59123,24 +59162,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59471,24 +59512,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59806,24 +59849,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -64801,7 +64846,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -71413,7 +71461,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -72714,7 +72766,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

294
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -11014,7 +11014,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -18635,6 +18635,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18652,6 +18653,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18684,6 +18686,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18702,6 +18705,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18797,7 +18801,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -21883,13 +21891,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -21939,7 +21948,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -22732,6 +22745,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -41364,8 +41382,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -41673,11 +41699,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -42472,9 +42500,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -55079,26 +55108,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -55578,25 +55608,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56064,25 +56096,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56547,25 +56581,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -57744,7 +57780,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -59123,24 +59162,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59471,24 +59512,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59806,24 +59849,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -64801,7 +64846,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -71413,7 +71461,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -72714,7 +72766,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

294
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -11014,7 +11014,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -18635,6 +18635,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18652,6 +18653,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18684,6 +18686,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -18702,6 +18705,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -18797,7 +18801,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -21883,13 +21891,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -21939,7 +21948,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -22732,6 +22745,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -41364,8 +41382,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -41673,11 +41699,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -42472,9 +42500,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -55079,26 +55108,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -55578,25 +55608,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56064,25 +56096,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56547,25 +56581,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -57744,7 +57780,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -59123,24 +59162,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59471,24 +59512,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -59806,24 +59849,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -64801,7 +64846,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -71413,7 +71461,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -72714,7 +72766,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

294
dist/fineui.proxy.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -8475,7 +8475,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -16096,6 +16096,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -16113,6 +16114,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -16145,6 +16147,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -16163,6 +16166,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -16258,7 +16262,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -19344,13 +19352,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -19400,7 +19409,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -20193,6 +20206,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -38825,8 +38843,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -39134,11 +39160,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -39933,9 +39961,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -52540,26 +52569,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -53039,25 +53069,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -53525,25 +53557,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -54008,25 +54042,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -55205,7 +55241,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -56584,24 +56623,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56932,24 +56973,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -57267,24 +57310,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -62262,7 +62307,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -68874,7 +68922,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -70175,7 +70227,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

294
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -8085,7 +8085,7 @@ BI.Plugin = BI.Plugin || {};
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);
@ -15706,6 +15706,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -15723,6 +15724,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -15755,6 +15757,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -15773,6 +15776,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -15868,7 +15872,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");
@ -18954,13 +18962,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -19010,7 +19019,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",
@ -19803,6 +19816,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();
@ -38435,8 +38453,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {
@ -38744,11 +38770,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});
@ -39543,9 +39571,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager
@ -52150,26 +52179,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -52649,25 +52679,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -53135,25 +53167,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -53618,25 +53652,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -54815,7 +54851,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -56194,24 +56233,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56542,24 +56583,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -56877,24 +56920,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];
@ -61872,7 +61917,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
@ -68484,7 +68532,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();
@ -69785,7 +69837,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

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

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-7-14 11:00:30 */
/*! time: 2021-7-21 10:30:28 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ 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",
"version": "2.0.20210714110206",
"version": "2.0.20210721103227",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

5
src/base/1.pane.js

@ -138,6 +138,11 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._assertTip();
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();

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

@ -121,8 +121,16 @@ BI.ListPane = BI.inherit(BI.Pane, {
}]);
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {

8
src/case/list/list.select.js

@ -48,11 +48,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});

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

@ -97,9 +97,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget(o.showRowCount ? {
type: "bi.vertical_adapt",
columnSize: ["fill", ""],
element: this,
scrollx: false,
columnSize: ["fill", ""],
horizontalAlign: BI.HorizontalAlign.Right,
items: [
this._getRowCountObject(),
this.editor, this.allPages, this.pager

2
src/core/8.snabdom.js

@ -929,7 +929,7 @@
var propsModule = { create: updateProps, update: updateProps };
// Bindig `requestAnimationFrame` like this fixes a bug in IE/Edge. See #360 and #409.
var raf$1 = typeof window !== "undefined" && window.requestAnimationFrame.bind(window) || setTimeout;
var raf$1 = typeof window !== "undefined" && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window)) || setTimeout;
var nextFrame$1 = function nextFrame$1(fn) {
raf$1(function () {
raf$1(fn);

4
src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -97,6 +97,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-l-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -114,6 +115,7 @@ BI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {
self.layout = _ref;
},
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
@ -146,6 +148,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-r-v-a",
items: [],
columnSize: [],
lgap: 0,
rgap: 0,
hgap: 0,
@ -164,6 +167,7 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
},
horizontalAlign: BI.HorizontalAlign.Right,
items: o.items,
columnSize: o.columnSize,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,

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

@ -61,7 +61,11 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
if (i === 0) {
td.element.addClass("first-element");

11
src/core/wrapper/layout/layout.td.js

@ -76,13 +76,14 @@ BI.TdLayout = BI.inherit(BI.Layout, {
}
var height = o.rowSize[idx] === "" ? "" : (o.rowSize[idx] < 1 ? ((o.rowSize[idx] * 100).toFixed(1) + "%") : o.rowSize[idx]);
var rowHeight = BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height;
var tr = BI._lazyCreateWidget({
type: "bi.default",
tagName: "tr",
height: height,
css: {
"max-height": BI.isNumber(o.rowSize[idx]) ? (o.rowSize[idx] <= 1 ? height : height / BI.pixRatio + BI.pixUnit) : height
"max-height": rowHeight,
"min-height": rowHeight
}
});
@ -132,7 +133,11 @@ BI.TdLayout = BI.inherit(BI.Layout, {
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
if (columnSize > 0) {
td.element.css({"max-width": columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit});
columnSize = columnSize < 1 ? width : width / BI.pixRatio + BI.pixUnit;
td.element.css({
"max-width": columnSize,
"min-width": columnSize
});
}
td.element.css({
position: "relative",

31
src/widget/multiselect/multiselect.combo.js

@ -336,26 +336,27 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var self = this; var o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

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

@ -363,25 +363,27 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = self._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

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

@ -350,25 +350,27 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

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

@ -348,25 +348,27 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
this._assertValue(res);
this.requesting = true;
if (this.storeValue.type === res.type) {
var result = BI.Func.getSearchResult(this.storeValue.value, this.trigger.getKey());
var change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
self.storeValue.assist && self.storeValue.assist.push(map[v]);
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

5
src/widget/multiselect/search/multiselect.search.loader.js

@ -68,7 +68,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}

30
src/widget/multiselectlist/multiselectlist.insert.js

@ -239,24 +239,26 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

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

@ -243,24 +243,26 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
callback();
return;
}
o.itemsCreator({
type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,
keywords: [self.trigger.getKeyword()]
keywords: [this.trigger.getKeyword()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
callback();
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

30
src/widget/multiselectlist/multiselectlist.js

@ -229,24 +229,26 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
_joinAll: function (res, callback) {
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 change = false;
var map = this._makeMap(this.storeValue.value);
BI.each(BI.concat(result.match, result.find), function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (this.storeValue.value = BI.values(map));
this._adjust(callback);
return;
}
o.itemsCreator({
type: BI.MultiSelectList.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
keywords: [this.trigger.getKey()],
selectedValues: this.storeValue.value,
}, function (ob) {
var items = BI.map(ob.items, "value");
if (self.storeValue.type === res.type) {
var change = false;
var map = self._makeMap(self.storeValue.value);
BI.each(items, function (i, v) {
if (BI.isNotNull(map[v])) {
change = true;
delete map[v];
}
});
change && (self.storeValue.value = BI.values(map));
self._adjust(callback);
return;
}
var selectedMap = self._makeMap(self.storeValue.value);
var notSelectedMap = self._makeMap(res.value);
var newItems = [];

5
src/widget/singleselect/search/singleselect.search.loader.js

@ -64,7 +64,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}

6
src/widget/yearmonth/trigger.yearmonth.js

@ -67,7 +67,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if (isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.monthEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? (BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1) : 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

8
src/widget/yearquarter/trigger.yearquarter.js

@ -65,7 +65,13 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
height: o.height,
validationChecker: function (v) {
if(isYear) {
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1, 1, o.min, o.max)[0]);
var month = self.quarterEditor.getValue();
if(BI.isEmptyString(month)) {
month = parseInt(v, 10) === BI.parseDateTime(o.min, "%Y-%X-%d").getFullYear() ? BI.parseDateTime(o.min, "%Y-%X-%d").getMonth() + 1 : 1;
} else {
month = (v - 1) * 3 + 1;
}
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, month, 1, o.min, o.max)[0]);
}
var year = self.yearEditor.getValue();

Loading…
Cancel
Save