Browse Source

auto upgrade version to 2.0.20210318191204

es6
data 4 years ago
parent
commit
d2eecd162f
  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. 420
      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. 420
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 420
      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. 420
      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. 420
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 2
      dist/font.css
  28. 2
      dist/resource.css
  29. 2
      dist/utils.js
  30. 2
      dist/utils.min.js
  31. 2
      package.json

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

420
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -41649,8 +41649,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({
@ -41673,8 +41673,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({
@ -41804,16 +41804,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) {
@ -41822,8 +41822,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 () {
@ -41872,8 +41872,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({
@ -41886,8 +41886,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({
@ -41949,23 +41949,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 () {
@ -42727,20 +42727,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if (self._checkValue(self.getValue())) {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -42806,9 +42837,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()
};
}
});
@ -43455,20 +43487,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -44443,18 +44506,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,
@ -44463,6 +44514,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
@ -44520,7 +44576,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];
},
@ -44659,7 +44715,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();
@ -44674,8 +44730,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);
@ -45047,9 +45140,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
@ -45065,23 +45155,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)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
allowBlank: false,
listeners: [{
@ -45089,6 +45170,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
@ -45153,6 +45239,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;
@ -45171,6 +45261,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);
@ -45239,7 +45330,12 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -45374,7 +45470,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);
}
},
@ -45382,7 +45478,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);
}
},
@ -66350,6 +66446,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"),
@ -66360,19 +66459,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,
@ -66382,9 +66478,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];
},
@ -66397,6 +66491,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;
@ -66414,12 +66517,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);
@ -66913,7 +67034,12 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -67516,6 +67642,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"),
@ -67524,7 +67653,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;
},
@ -67533,11 +67661,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;
@ -67547,6 +67678,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,
@ -67554,7 +67690,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");
@ -67568,7 +67704,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];
},
@ -67614,14 +67750,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);
@ -68083,7 +68239,12 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -68763,6 +68924,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"),
@ -68771,7 +68935,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;
},
@ -68780,11 +68943,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;
@ -68794,6 +68960,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,
@ -68801,7 +68972,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");
@ -68815,7 +68986,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];
},
@ -68861,14 +69032,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);
@ -69311,7 +69502,12 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],

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

420
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -41649,8 +41649,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({
@ -41673,8 +41673,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({
@ -41804,16 +41804,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) {
@ -41822,8 +41822,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 () {
@ -41872,8 +41872,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({
@ -41886,8 +41886,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({
@ -41949,23 +41949,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 () {
@ -42727,20 +42727,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if (self._checkValue(self.getValue())) {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -42806,9 +42837,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()
};
}
});
@ -43455,20 +43487,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -44443,18 +44506,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,
@ -44463,6 +44514,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
@ -44520,7 +44576,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];
},
@ -44659,7 +44715,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();
@ -44674,8 +44730,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);
@ -45047,9 +45140,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
@ -45065,23 +45155,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)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
allowBlank: false,
listeners: [{
@ -45089,6 +45170,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
@ -45153,6 +45239,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;
@ -45171,6 +45261,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);
@ -45239,7 +45330,12 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -45374,7 +45470,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);
}
},
@ -45382,7 +45478,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);
}
},
@ -66350,6 +66446,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"),
@ -66360,19 +66459,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,
@ -66382,9 +66478,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];
},
@ -66397,6 +66491,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;
@ -66414,12 +66517,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);
@ -66913,7 +67034,12 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -67516,6 +67642,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"),
@ -67524,7 +67653,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;
},
@ -67533,11 +67661,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;
@ -67547,6 +67678,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,
@ -67554,7 +67690,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");
@ -67568,7 +67704,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];
},
@ -67614,14 +67750,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);
@ -68083,7 +68239,12 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -68763,6 +68924,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"),
@ -68771,7 +68935,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;
},
@ -68780,11 +68943,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;
@ -68794,6 +68960,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,
@ -68801,7 +68972,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");
@ -68815,7 +68986,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];
},
@ -68861,14 +69032,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);
@ -69311,7 +69502,12 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],

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

420
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -41649,8 +41649,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({
@ -41673,8 +41673,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({
@ -41804,16 +41804,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) {
@ -41822,8 +41822,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 () {
@ -41872,8 +41872,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({
@ -41886,8 +41886,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({
@ -41949,23 +41949,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 () {
@ -42727,20 +42727,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if (self._checkValue(self.getValue())) {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -42806,9 +42837,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()
};
}
});
@ -43455,20 +43487,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -44443,18 +44506,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,
@ -44463,6 +44514,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
@ -44520,7 +44576,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];
},
@ -44659,7 +44715,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();
@ -44674,8 +44730,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);
@ -45047,9 +45140,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
@ -45065,23 +45155,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)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
allowBlank: false,
listeners: [{
@ -45089,6 +45170,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
@ -45153,6 +45239,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;
@ -45171,6 +45261,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);
@ -45239,7 +45330,12 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -45374,7 +45470,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);
}
},
@ -45382,7 +45478,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);
}
},
@ -66350,6 +66446,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"),
@ -66360,19 +66459,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,
@ -66382,9 +66478,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];
},
@ -66397,6 +66491,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;
@ -66414,12 +66517,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);
@ -66913,7 +67034,12 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -67516,6 +67642,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"),
@ -67524,7 +67653,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;
},
@ -67533,11 +67661,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;
@ -67547,6 +67678,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,
@ -67554,7 +67690,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");
@ -67568,7 +67704,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];
},
@ -67614,14 +67750,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);
@ -68083,7 +68239,12 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -68763,6 +68924,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"),
@ -68771,7 +68935,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;
},
@ -68780,11 +68943,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;
@ -68794,6 +68960,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,
@ -68801,7 +68972,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");
@ -68815,7 +68986,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];
},
@ -68861,14 +69032,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);
@ -69311,7 +69502,12 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],

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

420
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -41649,8 +41649,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({
@ -41673,8 +41673,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({
@ -41804,16 +41804,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) {
@ -41822,8 +41822,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 () {
@ -41872,8 +41872,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({
@ -41886,8 +41886,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({
@ -41949,23 +41949,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 () {
@ -42727,20 +42727,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if (self._checkValue(self.getValue())) {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -42806,9 +42837,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()
};
}
});
@ -43455,20 +43487,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -44443,18 +44506,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,
@ -44463,6 +44514,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
@ -44520,7 +44576,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];
},
@ -44659,7 +44715,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();
@ -44674,8 +44730,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);
@ -45047,9 +45140,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
@ -45065,23 +45155,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)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
allowBlank: false,
listeners: [{
@ -45089,6 +45170,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
@ -45153,6 +45239,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;
@ -45171,6 +45261,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);
@ -45239,7 +45330,12 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -45374,7 +45470,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);
}
},
@ -45382,7 +45478,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);
}
},
@ -66350,6 +66446,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"),
@ -66360,19 +66459,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,
@ -66382,9 +66478,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];
},
@ -66397,6 +66491,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;
@ -66414,12 +66517,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);
@ -66913,7 +67034,12 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -67516,6 +67642,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"),
@ -67524,7 +67653,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;
},
@ -67533,11 +67661,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;
@ -67547,6 +67678,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,
@ -67554,7 +67690,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");
@ -67568,7 +67704,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];
},
@ -67614,14 +67750,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);
@ -68083,7 +68239,12 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -68763,6 +68924,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"),
@ -68771,7 +68935,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;
},
@ -68780,11 +68943,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;
@ -68794,6 +68960,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,
@ -68801,7 +68972,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");
@ -68815,7 +68986,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];
},
@ -68861,14 +69032,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);
@ -69311,7 +69502,12 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],

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

420
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -37671,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({
@ -37695,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({
@ -37826,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) {
@ -37844,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 () {
@ -37894,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({
@ -37908,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({
@ -37971,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 () {
@ -38749,20 +38749,51 @@ BI.DynamicDatePane = BI.inherit(BI.Widget, {
case BI.DynamicDatePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if (self._checkValue(self.getValue())) {
self.fireEvent(BI.DynamicDatePane.EVENT_CHANGE);
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -38828,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()
};
}
});
@ -39477,20 +39509,51 @@ BI.DynamicDateTimePane = BI.inherit(BI.Widget, {
case BI.DynamicDateTimePane.Dynamic:
default:
return {
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
listeners: [{
eventName: "EVENT_CHANGE",
action: function () {
if(self._checkValue(self.getValue())) {
self.fireEvent("EVENT_CHANGE");
}
type: "bi.vtape",
items: [{
type: "bi.dynamic_date_card",
min: o.minDate,
max: o.maxDate,
ref: function () {
self.dynamicPane = this;
}
}],
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: BI.TextButton.EVENT_CHANGE,
action: function () {
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);
}
}
}]
}]
},
height: 24
}]
};
}
}
@ -40465,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,
@ -40485,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
@ -40542,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];
},
@ -40681,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();
@ -40696,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);
@ -41069,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
@ -41087,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)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return o.errorText(v);
errorText: function () {
return BI.i18nText("BI-Please_Input_Natural_Number");
},
allowBlank: false,
listeners: [{
@ -41111,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
@ -41175,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;
@ -41193,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);
@ -41261,7 +41352,12 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -41396,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);
}
},
@ -41404,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);
}
},
@ -62372,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"),
@ -62382,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,
@ -62404,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];
},
@ -62419,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;
@ -62436,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);
@ -62935,7 +63056,12 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -63538,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"),
@ -63546,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;
},
@ -63555,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;
@ -63569,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,
@ -63576,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");
@ -63590,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];
},
@ -63636,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);
@ -64105,7 +64261,12 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],
@ -64785,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"),
@ -64793,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;
},
@ -64802,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;
@ -64816,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,
@ -64823,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");
@ -64837,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];
},
@ -64883,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);
@ -65333,7 +65524,12 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.TextButton.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);
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);
}
}
}]
}]],

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-3-17 20:30:26 */
/*! time: 2021-3-18 19:10:30 */
/******/ (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.20210317203210",
"version": "2.0.20210318191204",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

Loading…
Cancel
Save