Browse Source

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

* commit '812dc72e9e1c0cd59f79fc4a6bb0654fb04e80f3': (40 commits)
  无JIRA任务 feat: 恢复提交updateMode
  Revert "无JIRA任务 revert: 5fb75ef130 [5fb75ef]"
  auto upgrade version to 2.0.20210318191204
  无JIRA任务 feat: 恢复提交updateMode
  changelog
  BI-82267 fineui时间控件交互优化
  auto upgrade version to 2.0.20210317203210
  BI-83103 fix:区间滑块值最小值大于最大值,数值不会颠倒了
  BI-83103 fix:区间滑块值最小值大于最大值,数值不会颠倒了
  无jira任务 style:删除多余的提交
  无jira任务 style:删除多余的提交
  BI-83103 fix:区间滑块值最小值大于最大值,数值不会颠倒了
  auto upgrade version to 2.0.20210316205218
  DEC-17634 关于搜索的时候点击全选回滚
  auto upgrade version to 2.0.20210316194201
  DEC-17509 fix: getSearchResult 添加是否需要deepClone属性,提升性能
  BI-81515 revert
  BI-72349 bubble_combo支持hideWhenAnotherComboOpen属性
  auto upgrade version to 2.0.20210315161742
  feat: 完善类型描述
  ...
master
Kira 4 years ago
parent
commit
11fc8fb317
  1. 3
      changelog.md
  2. 2
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 1095
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 2
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 2
      dist/2.0/fineui_without_normalize.css
  11. 2
      dist/2.0/fineui_without_normalize.min.css
  12. 2
      dist/core.css
  13. 1069
      dist/core.js
  14. 2
      dist/core.js.map
  15. 2
      dist/demo.css
  16. 1429
      dist/demo.js
  17. 2
      dist/demo.js.map
  18. 2
      dist/fineui.css
  19. 4
      dist/fineui.ie.min.js
  20. 2
      dist/fineui.ie.min.js.map
  21. 1095
      dist/fineui.js
  22. 2
      dist/fineui.js.map
  23. 2
      dist/fineui.min.css
  24. 4
      dist/fineui.min.js
  25. 2
      dist/fineui.min.js.map
  26. 459
      dist/fineui_without_jquery_polyfill.js
  27. 2
      dist/fineui_without_jquery_polyfill.js.map
  28. 2
      dist/font.css
  29. 8
      dist/lib/base/combination/loader.d.ts
  30. 4
      dist/lib/index.d.ts
  31. 9
      dist/lib/widget/datetime/datetime.combo.d.ts
  32. 2
      dist/resource.css
  33. 36
      dist/utils.js
  34. 2
      dist/utils.js.map
  35. 4
      dist/utils.min.js
  36. 2
      dist/utils.min.js.map
  37. 2
      package.json
  38. 5
      src/base/layer/layer.popup.js
  39. 8
      src/case/button/item.multiselect.js
  40. 7
      src/case/button/item.singleselect.radio.js
  41. 1
      src/case/combo/bubblecombo/combo.bubble.js
  42. 8
      src/core/func/function.js
  43. 3
      src/core/widget.js
  44. 26
      src/core/wrapper/layout.js
  45. 20
      src/widget/date/calendar/picker.date.js
  46. 20
      src/widget/date/calendar/picker.year.js
  47. 46
      src/widget/datepane/datepane.js
  48. 43
      src/widget/datetimepane/datetimepane.js
  49. 58
      src/widget/dynamicdate/dynamicdate.card.js
  50. 26
      src/widget/dynamicdate/dynamicdate.param.item.js
  51. 9
      src/widget/dynamicdate/dynamicdate.popup.js
  52. 2
      src/widget/intervalslider/intervalslider.js
  53. 1
      src/widget/singletree/singletree.trigger.js
  54. 49
      src/widget/year/card.dynamic.year.js
  55. 5
      src/widget/year/popup.year.js
  56. 42
      src/widget/yearmonth/card.dynamic.yearmonth.js
  57. 5
      src/widget/yearmonth/popup.yearmonth.js
  58. 42
      src/widget/yearquarter/card.dynamic.yearquarter.js
  59. 5
      src/widget/yearquarter/popup.yearquarter.js
  60. 4
      tsconfig.json
  61. 14
      typescript/base/combination/loader.ts
  62. 3
      typescript/index.ts
  63. 12
      typescript/widget/datetime/datetime.combo.ts

3
changelog.md

@ -1,4 +1,7 @@
# 更新日志
2.0(2021-03)
- 时间类型控件优化动态时间面板的交互
2.0(2021-02)
- 增加updateModel属性,可以配置自动模式,自动watch属性并响应变化
- 增加beforeRender生命周期函数

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

1095
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

1069
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

1429
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

1095
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

459
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-11 09:10:42 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1416);
/******/ return __webpack_require__(__webpack_require__.s = 1417);
/******/ })
/************************************************************************/
/******/ ([
@ -8369,14 +8369,16 @@ _.extend(BI.Func, {
* @param items
* @param keyword
* @param param 搜索哪个属性
* @param clone 是否需要deepClone
*/
getSearchResult: function (items, keyword, param) {
getSearchResult: function (items, keyword, param, clone) {
var isArray = BI.isArray(items);
items = isArray ? BI.flatten(items) : items;
param || (param = "text");
BI.isNull(clone) && (clone = true);
if (!BI.isKey(keyword)) {
return {
find: BI.deepClone(items),
find: clone ? BI.deepClone(items) : items,
match: isArray ? [] : {}
};
}
@ -8388,7 +8390,7 @@ _.extend(BI.Func, {
if (BI.isNull(item)) {
return;
}
item = BI.deepClone(item);
clone && (item = BI.deepClone(item));
t = BI.stripEL(item);
text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {
return BI.isNotNull(val);
@ -23468,6 +23470,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
vgap: 0,
hgap: 0,
innerVGap: 0,
innerHGap: 0,
direction: BI.Direction.Top, // 工具栏的方向
stopEvent: false, // 是否停止mousedown、mouseup事件
stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡
@ -23548,7 +23551,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.button_group.element.css({
"min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight,
"padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-left": o.innerHGap / BI.pixRatio + BI.pixUnit,
"padding-right": o.innerHGap / BI.pixRatio + BI.pixUnit,
});
return this.button_group;
},
@ -28943,8 +28948,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 16,
iconWrapperWidth: 26,
textHgap: 0,
textLgap: 0,
textRgap: 0
});
},
@ -28961,8 +28967,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.textHgap,
rgap: o.textHgap,
hgap: o.hgap,
rgap: o.rgap,
lgap: o.textLgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -29148,7 +29155,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
},
height: 24,
iconWrapperWidth: 16,
hgap: 10,
textHgap: 0,
textLgap: 0,
textRgap: 0
});
},
@ -29165,8 +29174,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.textHgap,
rgap: o.textHgap,
hgap: o.hgap,
rgap: o.textRgap,
lgap: o.textLgap,
text: o.text,
keyword: o.keyword,
value: o.value,
@ -29179,7 +29189,7 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: o.conWrapperWidth
width: o.iconWrapperWidth
}, this.text)
}))));
},
@ -31196,6 +31206,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
direction: o.direction,
isDefaultInit: o.isDefaultInit,
destroyWhenHide: o.destroyWhenHide,
hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),
@ -31373,6 +31384,7 @@ BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = "EVENT_BEFORE_HIDEVIEW";
BI.BubbleCombo.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
BI.shortcut("bi.bubble_combo", BI.BubbleCombo);
/***/ }),
/* 498 */
/***/ (function(module, exports) {
@ -37659,8 +37671,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
});
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.right = BI.createWidget({
@ -37683,8 +37695,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
});
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.year = BI.createWidget({
@ -37814,16 +37826,16 @@ BI.DatePicker = BI.inherit(BI.Widget, {
this.options.min = minDate;
this.year.setMinDate(minDate);
this._refreshMonth(this._month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setMaxDate: function (maxDate) {
this.options.max = maxDate;
this.year.setMaxDate(maxDate);
this._refreshMonth(this._month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setValue: function (ob) {
@ -37832,8 +37844,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
this.year.setValue(ob.year);
this._refreshMonth(this._month);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
getValue: function () {
@ -37882,8 +37894,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.left.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue(self.year.getValue() - 1);
self.fireEvent(BI.YearPicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.right = BI.createWidget({
@ -37896,8 +37908,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.right.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue(self.year.getValue() + 1);
self.fireEvent(BI.YearPicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.year = BI.createWidget({
@ -37959,23 +37971,23 @@ BI.YearPicker = BI.inherit(BI.Widget, {
setMinDate: function (minDate) {
this.options.min = minDate;
this.year.setMinDate(minDate);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setMaxDate: function (maxDate) {
this.options.max = maxDate;
this.year.setMaxDate(maxDate);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setValue: function (v) {
this._year = v;
this.year.setValue(v);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
getValue: function () {
@ -38737,20 +38749,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}, {
el: {
type: "bi.center",
items: [{
type: "bi.text_button",
cls: "bi-high-light bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
textHeight: 23,
listeners: [{
eventName: "EVENT_CHANGE",
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
if (self._checkValue(self.getValue())) {
self.setValue();
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}]
}, {
type: "bi.text_button",
cls: "bi-border-left bi-high-light bi-border-top",
textHeight: 23,
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}],
ref: function () {
self.dynamicPane = this;
}
}]
}]
},
height: 24
}]
};
}
}
@ -38816,9 +38859,10 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
},
getValue: function () {
var type = this.dateTab.getSelect();
return {
type: this.dateTab.getSelect(),
value: this.dateTab.getValue()
type: type,
value: type === BI.DynamicDatePane.Static ? this.dateTab.getValue() : this.dynamicPane.getValue()
};
}
});
@ -39465,20 +39509,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}, {
el: {
type: "bi.center",
items: [{
type: "bi.text_button",
cls: "bi-high-light bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
textHeight: 23,
listeners: [{
eventName: "EVENT_CHANGE",
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
self.setValue();
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}]
}, {
type: "bi.text_button",
cls: "bi-border-left bi-high-light bi-border-top",
textHeight: 23,
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}],
ref: function () {
self.dynamicPane = this;
}
}]
}]
},
height: 24
}]
};
}
}
@ -40453,18 +40528,6 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
el: {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: function () {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
},
dateType: value.dateType,
value: value.value,
offset: value.offset,
@ -40473,6 +40536,11 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-date-error");
}
}]
},
tgap: idx === 0 ? 5 : 0
@ -40530,7 +40598,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -40669,7 +40737,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
this.resultPane.populate(this._getParamJson(valuesItems, v.position));
},
getValue: function () {
_getValue: function () {
var self = this;
var valueMap = {};
var selectValues = this.checkgroup.getValue();
@ -40684,8 +40752,45 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var value = buttons[0].getValue();
valueMap.workDay = (value.offset === 0 ? -value.value : +value.value);
}
return valueMap;
},
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var buttons = this.resultPane.getAllButtons();
var errorText;
var invalid = BI.any(buttons, function (idx, button) {
return button.checkValidation && !button.checkValidation();
});
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-date-error", errorText, this.resultPane);
return !invalid;
},
});
BI.shortcut("bi.dynamic_date_card", BI.DynamicDateCard);
@ -41057,9 +41162,6 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
validationChecker: function() {
return true;
},
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
value: 0,
offset: 0,
height: 24
@ -41075,23 +41177,14 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
cls: "bi-border",
height: 22,
validationChecker: function (v) {
return BI.isNaturalNumber(v) && o.validationChecker(BI.extend({}, self.getValue(), {
value: v
}));
return BI.isNaturalNumber(v);
},
value: o.value,
ref: function () {
self.editor = this;
},
errorText: function (v) {
if (BI.isEmptyString(v)) {
return BI.i18nText("BI-Basic_Please_Input_Content");
}
if (!BI.isNumeric(v)) {
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
},
allowBlank: false,
listeners: [{
@ -41099,6 +41192,11 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);
}
}, {
eventName: BI.SignEditor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDateParamItem.EVENT_INPUT_CHANGE);
}
}]
},
width: 60
@ -41163,6 +41261,10 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
return text;
},
checkValidation: function () {
return BI.isNaturalNumber(this.editor.getValue());
},
setValue: function (v) {
v = v || {};
v.value = v.value || 0;
@ -41181,6 +41283,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
});
BI.DynamicDateParamItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateParamItem.EVENT_INPUT_CHANGE = "EVENT_INPUT_CHANGE";
BI.shortcut("bi.dynamic_date_param_item", BI.DynamicDateParamItem);
@ -41249,8 +41352,13 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24
@ -41384,7 +41492,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
if (this.options.min !== minDate) {
this.options.min = minDate;
this.ymd && this.ymd.setMinDate(minDate);
this.dynamicPane && this.ymd.setMinDate(minDate);
this.dynamicPane && this.dynamicPane.setMinDate(minDate);
}
},
@ -41392,7 +41500,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.ymd && this.ymd.setMaxDate(maxDate);
this.dynamicPane && this.ymd.setMaxDate(maxDate);
this.dynamicPane && this.dynamicPane.setMaxDate(maxDate);
}
},
@ -43807,7 +43915,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
valueOne = BI.parseFloat(valueOne);
valueTwo = BI.parseFloat(valueTwo);
if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {
var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);
var isSliderOneLeft = BI.parseFloat(this.labelOne.getValue()) < BI.parseFloat(this.labelTwo.getValue());
this._resetLabelPosition(!isSliderOneLeft);
}
},
@ -61091,7 +61199,6 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
},
populate: function (items) {
BI.SingleTreeTrigger.superclass.populate.apply(this, arguments);
this.trigger.populate(items);
}
@ -61099,6 +61206,7 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);
/***/ }),
/* 675 */
/***/ (function(module, exports) {
@ -62360,6 +62468,9 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
var self = this, o = this.options;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -62370,19 +62481,16 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
ref: function () {
self.item = this;
},
validationChecker: BI.bind(self._checkDate, self),
errorText: function () {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());
},
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-error");
}
}]
}],
vgap: 10,
@ -62392,9 +62500,7 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation({
year: (obj.offset === 0 ? -obj.value : +obj.value)
});
var date = BI.DynamicDateHelper.getCalculation(this._getValue());
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -62407,6 +62513,15 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
};
},
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());
},
setMinDate: function(minDate) {
if (BI.isNotEmptyString(this.options.min)) {
this.options.min = minDate;
@ -62424,12 +62539,30 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));
},
getValue: function () {
_getValue: function () {
var value = this.item.getValue();
return {
year: (value.offset === 0 ? -value.value : +value.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var invalid = !this.item.checkValidation();
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_card", BI.DynamicYearCard);
@ -62923,8 +63056,13 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24
@ -63526,6 +63664,9 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
var self = this;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -63534,7 +63675,6 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
ref: function () {
self.year = this;
},
@ -63543,11 +63683,14 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-month-error");
}
}]
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
dateType: BI.DynamicDateCard.TYPE.MONTH,
ref: function () {
self.month = this;
@ -63557,6 +63700,11 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-month-error");
}
}]
}],
vgap: 10,
@ -63564,7 +63712,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
};
},
_errorTextGetter: function () {
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
@ -63578,7 +63726,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -63624,14 +63772,34 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));
},
getValue: function () {
_getValue: function () {
var year = this.year.getValue();
var month = this.month.getValue();
return {
year: (year.offset === 0 ? -year.value : year.value),
month: (month.offset === 0 ? -month.value : month.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var yearInvalid = !this.year.checkValidation();
var monthInvalid = !this.month.checkValidation();
var invalid = yearInvalid || monthInvalid;
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-month-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);
@ -64093,8 +64261,13 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24
@ -64773,6 +64946,9 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
var self = this;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -64781,7 +64957,6 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
ref: function () {
self.year = this;
},
@ -64790,11 +64965,14 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-quarter-error");
}
}]
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
dateType: BI.DynamicDateCard.TYPE.QUARTER,
ref: function () {
self.quarter = this;
@ -64804,6 +64982,11 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-quarter-error");
}
}]
}],
vgap: 10,
@ -64811,7 +64994,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
};
},
_errorTextGetter: function () {
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
@ -64825,7 +65008,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -64871,14 +65054,34 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));
},
getValue: function () {
_getValue: function () {
var year = this.year.getValue();
var quarter = this.quarter.getValue();
return {
year: (year.offset === 0 ? -year.value : year.value),
quarter: (quarter.offset === 0 ? -quarter.value : quarter.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var yearInvalid = !this.year.checkValidation();
var quarterInvalid = !this.quarter.checkValidation();
var invalid = yearInvalid || quarterInvalid;
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-quarter-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);
@ -65321,8 +65524,13 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24
@ -69335,6 +69543,12 @@ Object.defineProperty(exports, "Router", {
return _router.Router;
}
});
Object.defineProperty(exports, "DateTimeCombo", {
enumerable: true,
get: function get() {
return _datetime.DateTimeCombo;
}
});
exports["default"] = void 0;
var _combo = __webpack_require__(718);
@ -69629,6 +69843,8 @@ var _button6 = __webpack_require__(840);
var _router = __webpack_require__(841);
var _datetime = __webpack_require__(842);
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@ -70955,7 +71171,15 @@ var _button = __webpack_require__(8);
/***/ }),
/* 842 */,
/* 842 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _single = __webpack_require__(2);
/***/ }),
/* 843 */,
/* 844 */,
/* 845 */,
@ -71005,7 +71229,8 @@ var _button = __webpack_require__(8);
/* 889 */,
/* 890 */,
/* 891 */,
/* 892 */
/* 892 */,
/* 893 */
/***/ (function(module, exports) {
;(function () {
@ -71168,17 +71393,17 @@ var _button = __webpack_require__(8);
/***/ }),
/* 893 */,
/* 894 */,
/* 895 */,
/* 896 */
/* 896 */,
/* 897 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(897);
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(898);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))
/***/ }),
/* 897 */
/* 898 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(setImmediate) {function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@ -72711,8 +72936,8 @@ var _button = __webpack_require__(8);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),
/* 898 */,
/* 899 */
/* 899 */,
/* 900 */
/***/ (function(module, exports) {
;(function () {
@ -73059,7 +73284,6 @@ var _button = __webpack_require__(8);
/***/ }),
/* 900 */,
/* 901 */,
/* 902 */,
/* 903 */,
@ -73276,13 +73500,13 @@ var _button = __webpack_require__(8);
/* 1114 */,
/* 1115 */,
/* 1116 */,
/* 1117 */
/* 1117 */,
/* 1118 */
/***/ (function(module, exports) {
/***/ }),
/* 1118 */,
/* 1119 */,
/* 1120 */,
/* 1121 */,
@ -73580,7 +73804,8 @@ var _button = __webpack_require__(8);
/* 1413 */,
/* 1414 */,
/* 1415 */,
/* 1416 */
/* 1416 */,
/* 1417 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(123);
@ -73684,7 +73909,7 @@ __webpack_require__(396);
__webpack_require__(153);
__webpack_require__(154);
__webpack_require__(155);
__webpack_require__(896);
__webpack_require__(897);
__webpack_require__(397);
__webpack_require__(398);
__webpack_require__(399);
@ -74064,9 +74289,9 @@ __webpack_require__(712);
__webpack_require__(713);
__webpack_require__(714);
__webpack_require__(715);
__webpack_require__(899);
__webpack_require__(892);
__webpack_require__(1117);
__webpack_require__(900);
__webpack_require__(893);
__webpack_require__(1118);
module.exports = __webpack_require__(716);

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

8
dist/lib/base/combination/loader.d.ts vendored

@ -2,7 +2,13 @@ import { Widget } from "../../core/widget";
export declare class Loader extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
populate<T>(items: T[]): void;
_prevLoad(): void;
_nextLoad(): void;
hasPrev(): boolean;
hasNext(): boolean;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
populate(...args: any[]): void;
setNotSelectedValue(...args: any[]): void;
getNotSelectedValue<T>(): T;
getAllButtons<T>(): T[];

4
dist/lib/index.d.ts vendored

@ -153,6 +153,7 @@ import { TextNode } from "./base/single/button/node/textnode";
import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck";
import { ImageButton } from './base/single/button/buttons/button.image';
import { History, Router } from "./router/router";
import { DateTimeCombo } from './widget/datetime/datetime.combo';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB;
Plugin: _Plugin;
@ -310,9 +311,10 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
ImageButton: typeof ImageButton;
Router: typeof Router;
history: History;
DateTimeCombo: typeof DateTimeCombo;
}
declare const _default: {
Decorators: typeof decorator;
};
export default _default;
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, };
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, };

9
dist/lib/widget/datetime/datetime.combo.d.ts vendored

@ -0,0 +1,9 @@
import { Single } from '../../base/single/single';
export declare class DateTimeCombo extends Single {
static xtype: string;
static EVENT_CANCEL: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
hidePopupView: () => void;
}

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

36
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-11 09:10:42 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,12 +82,12 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1239);
/******/ return __webpack_require__(__webpack_require__.s = 1240);
/******/ })
/************************************************************************/
/******/ ({
/***/ 1100:
/***/ 1101:
/***/ (function(module, exports) {
BI.i18n = {
@ -320,7 +320,14 @@ if(_global.BI.prepares == null) {
/***/ }),
/***/ 1239:
/***/ 124:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(125)(__webpack_require__(126))
/***/ }),
/***/ 1240:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(123);
@ -350,8 +357,8 @@ __webpack_require__(140);
__webpack_require__(141);
__webpack_require__(142);
__webpack_require__(143);
__webpack_require__(1100);
__webpack_require__(1240);
__webpack_require__(1101);
__webpack_require__(1241);
__webpack_require__(153);
__webpack_require__(154);
module.exports = __webpack_require__(155);
@ -359,14 +366,7 @@ module.exports = __webpack_require__(155);
/***/ }),
/***/ 124:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(125)(__webpack_require__(126))
/***/ }),
/***/ 1240:
/***/ 1241:
/***/ (function(module, exports) {
/**
@ -8106,14 +8106,16 @@ _.extend(BI.Func, {
* @param items
* @param keyword
* @param param 搜索哪个属性
* @param clone 是否需要deepClone
*/
getSearchResult: function (items, keyword, param) {
getSearchResult: function (items, keyword, param, clone) {
var isArray = BI.isArray(items);
items = isArray ? BI.flatten(items) : items;
param || (param = "text");
BI.isNull(clone) && (clone = true);
if (!BI.isKey(keyword)) {
return {
find: BI.deepClone(items),
find: clone ? BI.deepClone(items) : items,
match: isArray ? [] : {}
};
}
@ -8125,7 +8127,7 @@ _.extend(BI.Func, {
if (BI.isNull(item)) {
return;
}
item = BI.deepClone(item);
clone && (item = BI.deepClone(item));
t = BI.stripEL(item);
text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {
return BI.isNotNull(val);

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

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

5
src/base/layer/layer.popup.js

@ -18,6 +18,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
vgap: 0,
hgap: 0,
innerVGap: 0,
innerHGap: 0,
direction: BI.Direction.Top, // 工具栏的方向
stopEvent: false, // 是否停止mousedown、mouseup事件
stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡
@ -98,7 +99,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.button_group.element.css({
"min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight,
"padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit
"padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-left": o.innerHGap / BI.pixRatio + BI.pixUnit,
"padding-right": o.innerHGap / BI.pixRatio + BI.pixUnit,
});
return this.button_group;
},

8
src/case/button/item.multiselect.js

@ -11,8 +11,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
logic: {
dynamic: false
},
iconWrapperWidth: 16,
iconWrapperWidth: 26,
textHgap: 0,
textLgap: 0,
textRgap: 0
});
},
@ -29,8 +30,9 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.textHgap,
rgap: o.textRgap,
hgap: o.hgap,
rgap: o.rgap,
lgap: o.textLgap,
text: o.text,
keyword: o.keyword,
value: o.value,

7
src/case/button/item.singleselect.radio.js

@ -12,7 +12,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
},
height: 24,
iconWrapperWidth: 16,
hgap: 10,
textHgap: 0,
textLgap: 0,
textRgap: 0
});
},
@ -29,8 +31,9 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.textHgap,
rgap: o.textHgap,
hgap: o.hgap,
rgap: o.textRgap,
lgap: o.textLgap,
text: o.text,
keyword: o.keyword,
value: o.value,

1
src/case/combo/bubblecombo/combo.bubble.js

@ -40,6 +40,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
direction: o.direction,
isDefaultInit: o.isDefaultInit,
destroyWhenHide: o.destroyWhenHide,
hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),

8
src/core/func/function.js

@ -40,14 +40,16 @@ _.extend(BI.Func, {
* @param items
* @param keyword
* @param param 搜索哪个属性
* @param clone 是否需要deepClone
*/
getSearchResult: function (items, keyword, param) {
getSearchResult: function (items, keyword, param, clone) {
var isArray = BI.isArray(items);
items = isArray ? BI.flatten(items) : items;
param || (param = "text");
BI.isNull(clone) && (clone = true);
if (!BI.isKey(keyword)) {
return {
find: BI.deepClone(items),
find: clone ? BI.deepClone(items) : items,
match: isArray ? [] : {}
};
}
@ -59,7 +61,7 @@ _.extend(BI.Func, {
if (BI.isNull(item)) {
return;
}
item = BI.deepClone(item);
clone && (item = BI.deepClone(item));
t = BI.stripEL(item);
text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {
return BI.isNotNull(val);

3
src/core/widget.js

@ -76,8 +76,7 @@
shouldUpdate: null,
update: function () {
},
update: null,
beforeUpdate: null,

26
src/core/wrapper/layout.js

@ -71,12 +71,13 @@ BI.Layout = BI.inherit(BI.Widget, {
var self = this;
var frag = BI.Widget._renderEngine.createFragment();
var hasChild = false;
BI.each(this._children, function (i, widget) {
if (widget.element !== self.element) {
frag.appendChild(widget.element[0]);
for (var key in this._children) {
var child = this._children[key];
if (child.element !== self.element) {
frag.appendChild(child.element[0]);
hasChild = true;
}
});
}
if (hasChild === true) {
this.appendFragment(frag);
}
@ -268,19 +269,13 @@ BI.Layout = BI.inherit(BI.Widget, {
if (!child.shouldUpdate) {
return null;
}
return child.shouldUpdate(this._getOptions(item)) === true;
return child.shouldUpdate(this._getOptions(item));
},
updateItemAt: function (index, item) {
if (index < 0 || index > this.options.items.length - 1) {
return;
}
var child = this._children[this._getChildName(index)];
var updated;
if (updated = child.update(this._getOptions(item))) {
return updated;
}
var del = this._children[this._getChildName(index)];
delete this._children[this._getChildName(index)];
this.options.items.splice(index, 1);
@ -367,7 +362,14 @@ BI.Layout = BI.inherit(BI.Widget, {
patchItem: function (oldVnode, vnode, index) {
var shouldUpdate = this.shouldUpdateItem(index, vnode);
if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {
var child = this._children[this._getChildName(index)];
if (shouldUpdate) {
return child._update(this._getOptions(vnode), shouldUpdate);
}
if (shouldUpdate === null && !this._compare(oldVnode, vnode)) {
// if (child.update) {
// return child.update(this._getOptions(vnode));
// }
return this.updateItemAt(index, vnode);
}
},

20
src/widget/date/calendar/picker.date.js

@ -39,8 +39,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
});
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.right = BI.createWidget({
@ -63,8 +63,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
});
}
self.fireEvent(BI.DatePicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.year = BI.createWidget({
@ -194,16 +194,16 @@ BI.DatePicker = BI.inherit(BI.Widget, {
this.options.min = minDate;
this.year.setMinDate(minDate);
this._refreshMonth(this._month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setMaxDate: function (maxDate) {
this.options.max = maxDate;
this.year.setMaxDate(maxDate);
this._refreshMonth(this._month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setValue: function (ob) {
@ -212,8 +212,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
this.year.setValue(ob.year);
this._refreshMonth(this._month);
this.month.setValue(ob.month);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
getValue: function () {

20
src/widget/date/calendar/picker.year.js

@ -28,8 +28,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.left.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue(self.year.getValue() - 1);
self.fireEvent(BI.YearPicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.right = BI.createWidget({
@ -42,8 +42,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.right.on(BI.IconButton.EVENT_CHANGE, function () {
self.setValue(self.year.getValue() + 1);
self.fireEvent(BI.YearPicker.EVENT_CHANGE);
self._checkLeftValid();
self._checkRightValid();
// self._checkLeftValid();
// self._checkRightValid();
});
this.year = BI.createWidget({
@ -105,23 +105,23 @@ BI.YearPicker = BI.inherit(BI.Widget, {
setMinDate: function (minDate) {
this.options.min = minDate;
this.year.setMinDate(minDate);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setMaxDate: function (maxDate) {
this.options.max = maxDate;
this.year.setMaxDate(maxDate);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
setValue: function (v) {
this._year = v;
this.year.setValue(v);
this._checkLeftValid();
this._checkRightValid();
// this._checkLeftValid();
// this._checkRightValid();
},
getValue: function () {

46
src/widget/datepane/datepane.js

@ -88,20 +88,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}, {
el: {
type: "bi.center",
items: [{
type: "bi.text_button",
cls: "bi-high-light bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
textHeight: 23,
listeners: [{
eventName: "EVENT_CHANGE",
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
if (self._checkValue(self.getValue())) {
self.setValue();
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}]
}, {
type: "bi.text_button",
cls: "bi-border-left bi-high-light bi-border-top",
textHeight: 23,
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}],
ref: function () {
self.dynamicPane = this;
}
}]
}]
},
height: 24
}]
};
}
}
@ -167,9 +198,10 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
},
getValue: function () {
var type = this.dateTab.getSelect();
return {
type: this.dateTab.getSelect(),
value: this.dateTab.getValue()
type: type,
value: type === BI.DynamicDatePane.Static ? this.dateTab.getValue() : this.dynamicPane.getValue()
};
}
});

43
src/widget/datetimepane/datetimepane.js

@ -88,20 +88,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}, {
el: {
type: "bi.center",
items: [{
type: "bi.text_button",
cls: "bi-high-light bi-border-top",
shadow: true,
text: BI.i18nText("BI-Basic_Clear"),
textHeight: 23,
listeners: [{
eventName: "EVENT_CHANGE",
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
self.setValue();
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}]
}, {
type: "bi.text_button",
cls: "bi-border-left bi-high-light bi-border-top",
textHeight: 23,
shadow: true,
text: BI.i18nText("BI-Basic_OK"),
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
}],
ref: function () {
self.dynamicPane = this;
}
}]
}]
},
height: 24
}]
};
}
}

58
src/widget/dynamicdate/dynamicdate.card.js

@ -142,18 +142,6 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
el: {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: function () {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
},
dateType: value.dateType,
value: value.value,
offset: value.offset,
@ -162,6 +150,11 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-date-error");
}
}]
},
tgap: idx === 0 ? 5 : 0
@ -219,7 +212,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -358,7 +351,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
this.resultPane.populate(this._getParamJson(valuesItems, v.position));
},
getValue: function () {
_getValue: function () {
var self = this;
var valueMap = {};
var selectValues = this.checkgroup.getValue();
@ -373,8 +366,45 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
var value = buttons[0].getValue();
valueMap.workDay = (value.offset === 0 ? -value.value : +value.value);
}
return valueMap;
},
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,
start.getDate(),
end.getFullYear(),
end.getMonth() + 1,
end.getDate()
);
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var buttons = this.resultPane.getAllButtons();
var errorText;
var invalid = BI.any(buttons, function (idx, button) {
return button.checkValidation && !button.checkValidation();
});
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-date-error", errorText, this.resultPane);
return !invalid;
},
});
BI.shortcut("bi.dynamic_date_card", BI.DynamicDateCard);

26
src/widget/dynamicdate/dynamicdate.param.item.js

@ -6,9 +6,6 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
validationChecker: function() {
return true;
},
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
value: 0,
offset: 0,
height: 24
@ -24,23 +21,14 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
cls: "bi-border",
height: 22,
validationChecker: function (v) {
return BI.isNaturalNumber(v) && o.validationChecker(BI.extend({}, self.getValue(), {
value: v
}));
return BI.isNaturalNumber(v);
},
value: o.value,
ref: function () {
self.editor = this;
},
errorText: function (v) {
if (BI.isEmptyString(v)) {
return BI.i18nText("BI-Basic_Please_Input_Content");
}
if (!BI.isNumeric(v)) {
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
},
allowBlank: false,
listeners: [{
@ -48,6 +36,11 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);
}
}, {
eventName: BI.SignEditor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDateParamItem.EVENT_INPUT_CHANGE);
}
}]
},
width: 60
@ -112,6 +105,10 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
return text;
},
checkValidation: function () {
return BI.isNaturalNumber(this.editor.getValue());
},
setValue: function (v) {
v = v || {};
v.value = v.value || 0;
@ -130,4 +127,5 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
});
BI.DynamicDateParamItem.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateParamItem.EVENT_INPUT_CHANGE = "EVENT_INPUT_CHANGE";
BI.shortcut("bi.dynamic_date_param_item", BI.DynamicDateParamItem);

9
src/widget/dynamicdate/dynamicdate.popup.js

@ -59,8 +59,13 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24
@ -194,7 +199,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
if (this.options.min !== minDate) {
this.options.min = minDate;
this.ymd && this.ymd.setMinDate(minDate);
this.dynamicPane && this.ymd.setMinDate(minDate);
this.dynamicPane && this.dynamicPane.setMinDate(minDate);
}
},
@ -202,7 +207,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
if (this.options.max !== maxDate) {
this.options.max = maxDate;
this.ymd && this.ymd.setMaxDate(maxDate);
this.dynamicPane && this.ymd.setMaxDate(maxDate);
this.dynamicPane && this.dynamicPane.setMaxDate(maxDate);
}
},

2
src/widget/intervalslider/intervalslider.js

@ -335,7 +335,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
valueOne = BI.parseFloat(valueOne);
valueTwo = BI.parseFloat(valueTwo);
if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {
var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);
var isSliderOneLeft = BI.parseFloat(this.labelOne.getValue()) < BI.parseFloat(this.labelTwo.getValue());
this._resetLabelPosition(!isSliderOneLeft);
}
},

1
src/widget/singletree/singletree.trigger.js

@ -52,7 +52,6 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
},
populate: function (items) {
BI.SingleTreeTrigger.superclass.populate.apply(this, arguments);
this.trigger.populate(items);
}

49
src/widget/year/card.dynamic.year.js

@ -15,6 +15,9 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
var self = this, o = this.options;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -25,19 +28,16 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
ref: function () {
self.item = this;
},
validationChecker: BI.bind(self._checkDate, self),
errorText: function () {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());
},
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-error");
}
}]
}],
vgap: 10,
@ -47,9 +47,7 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation({
year: (obj.offset === 0 ? -obj.value : +obj.value)
});
var date = BI.DynamicDateHelper.getCalculation(this._getValue());
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -62,6 +60,15 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
};
},
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());
},
setMinDate: function(minDate) {
if (BI.isNotEmptyString(this.options.min)) {
this.options.min = minDate;
@ -79,12 +86,30 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));
},
getValue: function () {
_getValue: function () {
var value = this.item.getValue();
return {
year: (value.offset === 0 ? -value.value : +value.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var invalid = !this.item.checkValidation();
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_card", BI.DynamicYearCard);

5
src/widget/year/popup.year.js

@ -67,8 +67,13 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24

42
src/widget/yearmonth/card.dynamic.yearmonth.js

@ -15,6 +15,9 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
var self = this;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -23,7 +26,6 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
ref: function () {
self.year = this;
},
@ -32,11 +34,14 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-month-error");
}
}]
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
dateType: BI.DynamicDateCard.TYPE.MONTH,
ref: function () {
self.month = this;
@ -46,6 +51,11 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-month-error");
}
}]
}],
vgap: 10,
@ -53,7 +63,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
};
},
_errorTextGetter: function () {
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
@ -67,7 +77,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -113,14 +123,34 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));
},
getValue: function () {
_getValue: function () {
var year = this.year.getValue();
var month = this.month.getValue();
return {
year: (year.offset === 0 ? -year.value : year.value),
month: (month.offset === 0 ? -month.value : month.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var yearInvalid = !this.year.checkValidation();
var monthInvalid = !this.month.checkValidation();
var invalid = yearInvalid || monthInvalid;
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-month-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);

5
src/widget/yearmonth/popup.yearmonth.js

@ -67,8 +67,13 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24

42
src/widget/yearquarter/card.dynamic.yearquarter.js

@ -15,6 +15,9 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
var self = this;
return {
type: "bi.vertical",
ref: function (_ref) {
self.wrapper = _ref;
},
items: [{
type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
@ -23,7 +26,6 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
ref: function () {
self.year = this;
},
@ -32,11 +34,14 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-quarter-error");
}
}]
}, {
type: "bi.dynamic_date_param_item",
validationChecker: BI.bind(self._checkDate, self),
errorText: BI.bind(this._errorTextGetter, this),
dateType: BI.DynamicDateCard.TYPE.QUARTER,
ref: function () {
self.quarter = this;
@ -46,6 +51,11 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
action: function () {
self.fireEvent("EVENT_CHANGE");
}
}, {
eventName: "EVENT_INPUT_CHANGE",
action: function () {
BI.Bubbles.hide("dynamic-year-quarter-error");
}
}]
}],
vgap: 10,
@ -53,7 +63,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
};
},
_errorTextGetter: function () {
_getErrorText: function () {
var o = this.options;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
@ -67,7 +77,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
_checkDate: function (obj) {
var o = this.options;
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this.getValue(), this._digestDateTypeValue(obj)));
var date = BI.DynamicDateHelper.getCalculation(BI.extend(this._getValue(), this._digestDateTypeValue(obj)));
return !BI.checkDateVoid(date.getFullYear(), date.getMonth() + 1, date.getDate(), o.min, o.max)[0];
},
@ -113,14 +123,34 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));
},
getValue: function () {
_getValue: function () {
var year = this.year.getValue();
var quarter = this.quarter.getValue();
return {
year: (year.offset === 0 ? -year.value : year.value),
quarter: (quarter.offset === 0 ? -quarter.value : quarter.value)
};
},
getValue: function () {
return this.checkValidation() ? this._getValue() : {};
},
checkValidation: function (show) {
var errorText;
var yearInvalid = !this.year.checkValidation();
var quarterInvalid = !this.quarter.checkValidation();
var invalid = yearInvalid || quarterInvalid;
if (invalid) {
errorText = BI.i18nText("BI-Please_Input_Natural_Number");
} else {
invalid = !this._checkDate(this._getValue());
errorText = this._getErrorText();
}
invalid && show && BI.Bubbles.show("dynamic-year-quarter-error", errorText, this.wrapper);
return !invalid;
},
});
BI.DynamicYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);

5
src/widget/yearquarter/popup.yearquarter.js

@ -60,8 +60,13 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
var type = self.dateTab.getSelect();
if (type === BI.DynamicDateCombo.Dynamic) {
self.dynamicPane.checkValidation(true) && self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
} else {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
}
}
}]
}]],
height: 24

4
tsconfig.json

@ -25,6 +25,8 @@
"include": [
"typescript/*.ts",
"typescript/**/*.ts",
"types/*.d.ts"
"types/*.d.ts",
"src/*.js",
"src/**/*.js",
]
}

14
typescript/base/combination/loader.ts

@ -5,7 +5,19 @@ export declare class Loader extends Widget {
static EVENT_CHANGE: string;
populate<T>(items: T[]): void;
_prevLoad(): void;
_nextLoad(): void;
hasPrev(): boolean;
hasNext(): boolean;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
populate(...args: any[]): void;
setNotSelectedValue(...args: any[]): void;

3
typescript/index.ts

@ -153,6 +153,7 @@ import { TextNode } from "./base/single/button/node/textnode";
import { TextValueCheckComboPopup } from "./case/combo/textvaluecheckcombo/popup.textvaluecheck";
import { ImageButton } from './base/single/button/buttons/button.image';
import { History, Router } from "./router/router";
import { DateTimeCombo } from './widget/datetime/datetime.combo';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
@ -312,6 +313,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
ImageButton: typeof ImageButton;
Router: typeof Router;
history: History,
DateTimeCombo: typeof DateTimeCombo;
}
export default {
@ -473,4 +475,5 @@ export {
ImageButton,
Router,
History,
DateTimeCombo,
};

12
typescript/widget/datetime/datetime.combo.ts

@ -0,0 +1,12 @@
import { Single } from '../../base/single/single';
export declare class DateTimeCombo extends Single {
static xtype: string;
static EVENT_CANCEL: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
hidePopupView: () => void;
}
Loading…
Cancel
Save