Browse Source

Merge branch 'master' of https://cloud.finedevelop.com/scm/visual/fineui

# Conflicts:
#	src/base/grid/grid.js
master
Young 5 years ago
parent
commit
8bd7b7836a
  1. 6
      dist/2.0/fineui.css
  2. 43
      dist/2.0/fineui.ie.js
  3. 48
      dist/2.0/fineui.ie.min.js
  4. 43
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 24
      dist/2.0/fineui.min.js
  7. 6
      dist/base.css
  8. 2
      dist/base.js
  9. 6
      dist/bundle.css
  10. 43
      dist/bundle.ie.js
  11. 48
      dist/bundle.ie.min.js
  12. 43
      dist/bundle.js
  13. 2
      dist/bundle.min.css
  14. 24
      dist/bundle.min.js
  15. 39
      dist/case.js
  16. 2
      dist/core.js
  17. 6
      dist/fineui.css
  18. 43
      dist/fineui.ie.js
  19. 46
      dist/fineui.ie.min.js
  20. 43
      dist/fineui.js
  21. 2
      dist/fineui.min.css
  22. 24
      dist/fineui.min.js
  23. 16
      dist/fineui_without_jquery_polyfill.js
  24. 2
      dist/utils.min.js
  25. 2
      package.json
  26. 6
      src/base/combination/combo.js
  27. 1
      src/base/grid/grid.js
  28. 5
      src/base/list/virtuallist.js
  29. 13
      src/case/colorchooser/colorpicker/editor.colorpicker.simple.js
  30. 2
      src/core/platform/web/jquery/_jquery.js
  31. 5
      src/core/utils/prefixIntervalTree.js
  32. 22
      src/css/widget/multilayerselecttree/multilayerselecttree.css
  33. 22
      src/css/widget/multilayersingletree/multilayersingletree.css
  34. 20
      src/less/widget/multilayerselecttree/multilayerselecttree.combo.less
  35. 20
      src/less/widget/multilayersingletree/multilayersingletree.combo.less
  36. 2
      src/widget/downlist/combo.downlist.js
  37. 2
      src/widget/multilayerdownlist/combo.downlist.js
  38. 2
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  39. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  40. 2
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  41. 3
      typescript/core/func/date.ts
  42. 5
      typescript/core/func/index.ts
  43. 4
      typescript/core/i18n.ts
  44. 389
      typescript/core/widget.ts
  45. 4
      typescript/index.ts

6
dist/2.0/fineui.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle;
cursor: pointer;
}
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block,
#body .bi-button.block {
font-size: inherit;

43
dist/2.0/fineui.ie.js vendored

@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -38512,7 +38512,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54256,13 +54256,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54277,7 +54278,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -54421,7 +54422,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -54446,6 +54447,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -54486,9 +54499,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -55859,9 +55870,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -55951,7 +55966,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -55978,7 +55993,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59331,7 +59346,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

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

File diff suppressed because one or more lines are too long

43
dist/2.0/fineui.js vendored

@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -38916,7 +38916,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54660,13 +54660,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54681,7 +54682,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -54825,7 +54826,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -54850,6 +54851,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -54890,9 +54903,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56263,9 +56274,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -56355,7 +56370,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -56382,7 +56397,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59735,7 +59750,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/base.css vendored

@ -725,6 +725,12 @@ body .bi-button,
vertical-align: middle;
cursor: pointer;
}
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block,
#body .bi-button.block {
font-size: inherit;

2
dist/base.js vendored

@ -684,7 +684,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,

6
dist/bundle.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle;
cursor: pointer;
}
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block,
#body .bi-button.block {
font-size: inherit;

43
dist/bundle.ie.js vendored

@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -38512,7 +38512,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54256,13 +54256,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54277,7 +54278,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -54421,7 +54422,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -54446,6 +54447,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -54486,9 +54499,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -55859,9 +55870,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -55951,7 +55966,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -55978,7 +55993,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59331,7 +59346,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

48
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

43
dist/bundle.js vendored

@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -38916,7 +38916,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54660,13 +54660,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54681,7 +54682,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -54825,7 +54826,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -54850,6 +54851,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -54890,9 +54903,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56263,9 +56274,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -56355,7 +56370,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -56382,7 +56397,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59735,7 +59750,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

39
dist/case.js vendored

@ -2314,13 +2314,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -2335,7 +2336,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -2479,7 +2480,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -2504,6 +2505,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -2544,9 +2557,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -3917,9 +3928,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -4009,7 +4024,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -4036,7 +4051,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -7389,7 +7404,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

2
dist/core.js vendored

@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,

6
dist/fineui.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle;
cursor: pointer;
}
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block,
#body .bi-button.block {
font-size: inherit;

43
dist/fineui.ie.js vendored

@ -22970,7 +22970,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -38757,7 +38757,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54501,13 +54501,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54522,7 +54523,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -54666,7 +54667,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -54691,6 +54692,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -54731,9 +54744,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56104,9 +56115,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -56196,7 +56211,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -56223,7 +56238,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59576,7 +59591,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

46
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

43
dist/fineui.js vendored

@ -22970,7 +22970,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,
@ -39161,7 +39161,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -54905,13 +54905,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: {
baseCls: "bi-color-chooser-popup",
width: 230,
height: 145
height: 145,
simple: false // 简单模式, popup中没有自动和透明
},
render: function () {
var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor",
type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value,
cls: "bi-header-background bi-border-bottom",
height: 30
@ -54926,7 +54927,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({
type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))],
items: [this._digestStoreColors(this._getStoreColors())],
width: 210,
height: 24,
value: o.value
@ -55070,7 +55071,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () {
var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
@ -55095,6 +55096,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
@ -55135,9 +55148,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup",
value: o.value,
element: this,
editor: {
type: "bi.simple_color_picker_editor"
}
simple: true // 是否有自动
});
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56508,9 +56519,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -56600,7 +56615,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -56627,7 +56642,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -59980,7 +59995,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

24
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

16
dist/fineui_without_jquery_polyfill.js vendored

@ -27539,7 +27539,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "",
text: "",
stopEvent: false,
@ -39124,9 +39124,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
});
},
_init: function () {
@ -39216,7 +39220,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
}
}, buttonOpt);
@ -39243,7 +39247,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text);
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/**
* Created by Young's on 2016/4/28.
@ -42596,7 +42600,7 @@ BI.SelectList = BI.inherit(BI.Widget, {
value: this.list.getNotSelectedValue(),
assist: this.list.getValue()
};
},
empty: function () {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -2,7 +2,7 @@
"name": "fineui",
"version": "1.1.2",
"description": "fineui",
"main": "index.js",
"main": "typescript/index.ts",
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.11.0",

6
src/base/combination/combo.js

@ -266,6 +266,12 @@ BI.Combo = BI.inherit(BI.Widget, {
if ((this.element.find(e.target).length > 0)
|| (this.popupView && this.popupView.element.find(e.target).length > 0)
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
var directions = this.options.direction.split(",");
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) {
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
this.adjustWidth();
this.adjustHeight();
}
return;
}
var isHide = this.options.hideChecker.apply(this, [e]);

1
src/base/grid/grid.js

@ -208,6 +208,7 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]);
});
// 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系
this.container._children = renderedWidgets;

5
src/base/list/virtuallist.js

@ -151,7 +151,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () {
BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy();
cell && cell._destroy();
});
this.container._children = {};
this.container.attr("items", []);
@ -162,6 +162,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren();
this.cache = {};
this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
},
populate: function (items) {

13
src/case/colorchooser/colorpicker/editor.colorpicker.simple.js

@ -50,6 +50,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
BI.each(Ws, function (i, w) {
w.on(BI.TextEditor.EVENT_CHANGE, function () {
self._checkEditors();
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);
@ -90,6 +91,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
});
},
_checkEditors: function () {
if(BI.isEmptyString(this.R.getValue())) {
this.R.setValue(0);
}
if(BI.isEmptyString(this.G.getValue())) {
this.G.setValue(0);
}
if(BI.isEmptyString(this.B.getValue())) {
this.B.setValue(0);
}
},
setValue: function (color) {
this.colorShow.element.css({"background-color": color});
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));

2
src/core/platform/web/jquery/_jquery.js vendored

@ -45,7 +45,7 @@ var
// List of deleted data cache ids, so we can reuse them
core_deletedIds = [],
core_version = "1.9.1",
core_version = "1.12.4",
// Save a reference to some core methods
core_concat = core_deletedIds.concat,

5
src/core/utils/prefixIntervalTree.js

@ -23,13 +23,15 @@
BI.PrefixIntervalTree = function (xs) {
this._size = xs.length;
this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half);
var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i];
}
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
}
@ -37,6 +39,7 @@
BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) {
var node = this._half + index;
this._heap[node] = value;

22
src/css/widget/multilayerselecttree/multilayerselecttree.css

@ -1,3 +1,25 @@
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view {
min-width: 100%;
}

22
src/css/widget/multilayersingletree/multilayersingletree.css

@ -1,3 +1,25 @@
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view {
min-width: 100%;
}

20
src/less/widget/multilayerselecttree/multilayerselecttree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-select-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

20
src/less/widget/multilayersingletree/multilayersingletree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-single-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

2
src/widget/downlist/combo.downlist.js

@ -54,7 +54,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
minWidth: 140
}

2
src/widget/multilayerdownlist/combo.downlist.js

@ -54,7 +54,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
}),
popup: {
el: this.popupview,
stopPropagation: true,
stopPropagation: o.stopPropagation,
maxHeight: 1000
}
});

2
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -37,7 +37,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -9,7 +9,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo",
baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false,
height: 24,
text: "",

2
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -37,7 +37,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
node.keyword = keyword;
node.keyword = node.keyword || keyword;
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node";

3
typescript/core/func/date.ts

@ -88,7 +88,7 @@ export declare type _getWeekEndDate = (date: Date) => Date;
*/
export declare type _print = (date: Date, str: string) => string;
declare type _date = {
export declare type _date = {
getTimezone: _getTimezone;
getMonthDays: _getMonthDays;
getLastDateOfMonth: _getLastDateOfMonth;
@ -105,4 +105,3 @@ declare type _date = {
getWeekEndDate: _getWeekEndDate;
print: _print;
}
export default _date;

5
typescript/core/func/index.ts

@ -2,9 +2,8 @@ import _array from "./array";
import _string from "./string";
import _number from "./number";
import _function from "./function";
import _date, {_Date} from "./date";
import { _Date } from "./date";
interface _func extends _array, _string, _number, _function {
export interface _func extends _array, _string, _number, _function {
Date: _Date;
}
export default _func;

4
typescript/core/i18n.ts

@ -3,6 +3,6 @@ export declare type _addI18n = (v: string) => string;
export declare type _i18nText = (key: string) => string;
export declare type _i18n = {
addI18n: _addI18n;
i18nText: _i18nText;
addI18n: _addI18n;
i18nText: _i18nText;
}

389
typescript/core/widget.ts

@ -0,0 +1,389 @@
import { _OB } from "./ob";
export declare class _Widget extends _OB {
/**
* loading的锁
*/
protected __asking: boolean;
/**
*
*/
protected __async: boolean;
/**
* widget类标识符
*/
public widgetName: string | null;
/**
*
*/
private _isRoot: boolean;
/**
*
*/
private _parent: _Widget | null;
// TODO: 完成jquery文件夹后把这块改了
/**
* dom的类jQuery对象
*/
public element: any;
/**
*
*/
public _children: {
[key: string]: _Widget;
};
/**
*
*/
private _isMounted: boolean;
/**
* enable
*/
private _manualSetEnable: boolean;
/**
* valid
*/
private _manualSetValid: boolean;
/**
*
*/
public _renderEngine: RenderEngine;
private _store: () => any;
private model: any;
// 生命周期函数
/**
*
*/
public beforeInit: Function | null;
/**
*
*/
public beforeCreate: Function | null;
/**
*
*/
public created: Function | null;
/**
*
*/
public render: Function | null;
/**
*
*/
public beforeMount: Function | null;
/**
*
*/
public mounted: Function | null;
/**
*
*/
public shouldUpdate: Function | null;
/**
*
*/
public update: Function;
/**
*
*/
public beforeDestroy: Function | null;
/**
*
*/
public destroyed: Function | null;
/**
* render函数
*/
private _initRender: () => void;
/**
* render函数
*/
private _render: () => void;
/**
*
*/
private _initRoot: () => void;
/**
*
*/
private _initElementWidth: () => void;
/**
*
*/
private _initElementHeight: () => void;
/**
*
*/
private _initVisual: () => void;
/**
*
*/
private _initEffects: () => void;
/**
* mounted锁
*/
private _initState: () => void;
/**
* dom
*/
private _initElement: () => void;
/**
*
*/
private _setParent: () => void;
/**
* @param force
* @param deep force处理
* @param lifeHook
* @param predicate widget的回调
*/
public _mount: (force?: boolean, deep?: boolean, lifeHook?: boolean, predicate?: Function) => boolean;
/**
*
*/
private _mountChildren: Function | null;
/**
*
*/
public isMounted: () => boolean;
/**
*
*/
public setWidth: (w: number) => void;
/**
*
*/
public setHeight: (h: number) => void;
/**
*
*/
private _setEnable: (enable: boolean) => void;
/**
*
*/
private _setValid: (valid: boolean) => void;
/**
*
*/
private _setVisible: (visible: boolean) => void;
/**
*
*/
public setEnable: (enable: boolean) => void;
/**
*
*/
public setVisible: (visible: boolean) => void;
/**
*
*/
public setValid: (valid: boolean) => void;
/**
*
* @param args arguments参数
*/
public doBehavior: (...args: any[]) => void;
/**
*
*/
public getWidth: () => number;
/**
*
*/
public getHeight: () => number;
/**
*
*/
public isValid: () => boolean;
/**
*
*/
public addWidget: (_name: any, _widget: _Widget) => _Widget;
/**
* wigetname获取子元素实例
*/
public getWidgetByName: (_name: string) => _Widget;
/**
*
* @param nameOrWidget widgetName或widget实例
*/
public removeWidget: (nameOrWidget: string | _Widget) => void;
/**
*
*/
public hasWidget: (name: string) => boolean;
/**
* widgetName
*/
public getName: () => string;
/**
* tag
* @param tag html tag
*/
public setTag: (tag: string) => void;
/**
* tag
*/
public getTag: () => string;
/**
*
* @param key
* @param value
*/
public attr: (key: string | { [key: string]: any }, value: any) => any;
/**
* text
*/
public getText: () => string;
/**
* text
*/
public setText: () => void;
/**
*
*/
public getValue: () => any;
/**
*
*/
public setValue: (...args: any[]) => void;
/**
* enable
*/
public isEnabled: () => boolean;
/**
*
*/
public isVisible: () => boolean;
/**
* disable元素
*/
public disable: ()=> void;
/**
* enable元素
*/
public enable: () => void;
/**
* widget合法
*/
public valid: () => void;
/**
* 使
*/
public invalid: () => void;
/**
* 使
*/
public invisible: () => void;
/**
*
*/
public visible: () => void;
/**
*
*/
private __d: () => void;
/**
*
*/
private _unMount: () => void;
/**
* hang元素
*/
public isolate: () => void;
/**
*
*/
public empty: () => void;
/**
* destory方法
*/
protected _destroy: () => void;
/**
* destory元素
*/
public destroy: () => void;
/**
*
* @param engine
*/
static registerRenderEngine: (engine: RenderEngine) => void;
}
interface RenderEngine {
// TODO: 完成jquery文件夹后把这块改了
/**
* jQuery对象
* @param widget widget对象
*/
createElement: (widget: any) => any;
/**
* DocumentFragment对象
*/
createFragment: () => DocumentFragment;
}

4
typescript/index.ts

@ -1,8 +1,10 @@
import { _i18n } from "./core/i18n";
import { _OB } from "./core/ob";
import _func from "./core/func";
import { _func } from "./core/func";
import { _Widget } from "./core/widget";
export interface BI extends _func {
i18n: _i18n;
OB: _OB;
Widget: _Widget;
}
Loading…
Cancel
Save