Browse Source

Merge remote-tracking branch 'origin/master'

es6
Kobi 4 years ago
parent
commit
b7956fe3e7
  1. 43
      demo/app.js
  2. 2
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 123
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 2
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 2
      dist/2.0/fineui_without_normalize.css
  11. 2
      dist/2.0/fineui_without_normalize.min.css
  12. 2
      dist/core.css
  13. 123
      dist/core.js
  14. 2
      dist/core.js.map
  15. 2
      dist/demo.css
  16. 166
      dist/demo.js
  17. 2
      dist/demo.js.map
  18. 2
      dist/fineui.css
  19. 4
      dist/fineui.ie.min.js
  20. 2
      dist/fineui.ie.min.js.map
  21. 123
      dist/fineui.js
  22. 2
      dist/fineui.js.map
  23. 2
      dist/fineui.min.css
  24. 4
      dist/fineui.min.js
  25. 2
      dist/fineui.min.js.map
  26. 2
      dist/fineui.proxy.css
  27. 123
      dist/fineui.proxy.js
  28. 2
      dist/fineui.proxy.js.map
  29. 2
      dist/fineui.proxy.min.css
  30. 4
      dist/fineui.proxy.min.js
  31. 2
      dist/fineui.proxy.min.js.map
  32. 109
      dist/fineui_without_jquery_polyfill.js
  33. 2
      dist/fineui_without_jquery_polyfill.js.map
  34. 2
      dist/font.css
  35. 2
      dist/lib/core/wrapper/layout.d.ts
  36. 10
      dist/lib/widget/numberinterval/numberinterval.d.ts
  37. 2
      dist/resource.css
  38. 13
      dist/router.js
  39. 8
      dist/utils.js
  40. 2
      dist/utils.js.map
  41. 4
      dist/utils.min.js
  42. 2
      dist/utils.min.js.map
  43. 3
      package.json
  44. 3
      src/base/single/0.single.js
  45. 1
      src/base/single/1.text.js
  46. 3
      src/case/colorchooser/colorchooser.js
  47. 2
      src/case/colorchooser/colorchooser.popup.hex.js
  48. 1
      src/case/colorchooser/colorchooser.simple.js
  49. 14
      src/core/platform/web/config.js
  50. 11
      src/core/structure/tree.js
  51. 5
      src/core/utils/i18n.js
  52. 80
      src/core/wrapper/layout/float/float.horizontal.js
  53. 2
      typescript/core/wrapper/layout.ts
  54. 5
      yarn.lock

43
demo/app.js

@ -23,7 +23,50 @@ BI.$(function () {
return Promise.resolve({
type: "demo.router"
});
},
}, {
name: "user",
path: "/user/:name",
component: function () {
return Promise.resolve({
type: "bi.vtape",
items: [{
type: "bi.label",
text: "user",
height: 50
}, {
type: "bi.router_view",
deps: 1
}]
});
},
children: [{
path: '',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'home'
})
}
}, {
name: 'dashboard',
path: 'dashboard',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'dashboard'
})
}
}, {
name: 'tables',
path: 'tables/:id',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'tables'
})
}
}]
}];
// BI.Tree.traversal(tree, function (index, node) {

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

123
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -7311,6 +7311,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -7339,6 +7344,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -18737,17 +18743,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -18755,8 +18762,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -22365,8 +22372,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -30106,7 +30191,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -30229,7 +30315,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -37528,6 +37613,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -37572,7 +37658,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -37848,7 +37934,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -38279,6 +38365,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
@ -80870,19 +80957,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {

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

123
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -7311,6 +7311,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -7339,6 +7344,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -18737,17 +18743,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -18755,8 +18762,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -22365,8 +22372,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -30106,7 +30191,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -30229,7 +30315,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -37528,6 +37613,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -37572,7 +37658,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -37848,7 +37934,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -38279,6 +38365,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
@ -80870,19 +80957,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {

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

166
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -7311,6 +7311,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -7339,6 +7344,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -18737,17 +18743,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -18755,8 +18762,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -22365,8 +22372,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -30106,7 +30191,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -30229,7 +30315,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -37528,6 +37613,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -37572,7 +37658,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -37848,7 +37934,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -38279,6 +38365,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
@ -80870,19 +80957,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {
@ -109973,7 +110048,50 @@ BI.$(function () {
return Promise.resolve({
type: "demo.router"
});
},
}, {
name: "user",
path: "/user/:name",
component: function () {
return Promise.resolve({
type: "bi.vtape",
items: [{
type: "bi.label",
text: "user",
height: 50
}, {
type: "bi.router_view",
deps: 1
}]
});
},
children: [{
path: '',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'home'
})
}
}, {
name: 'dashboard',
path: 'dashboard',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'dashboard'
})
}
}, {
name: 'tables',
path: 'tables/:id',
component: function () {
return Promise.resolve({
type: "bi.label",
text: 'tables'
})
}
}]
}];
// BI.Tree.traversal(tree, function (index, node) {

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

123
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -7311,6 +7311,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -7339,6 +7344,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -18737,17 +18743,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -18755,8 +18762,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -22365,8 +22372,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -30106,7 +30191,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -30229,7 +30315,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -37528,6 +37613,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -37572,7 +37658,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -37848,7 +37934,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -38279,6 +38365,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
@ -80870,19 +80957,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

123
dist/fineui.proxy.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -5628,6 +5628,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -5656,6 +5661,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -16198,17 +16204,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -16216,8 +16223,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -19826,8 +19833,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -27567,7 +27652,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -27690,7 +27776,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -34989,6 +35074,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -35033,7 +35119,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -35309,7 +35395,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -35740,6 +35826,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,
@ -78331,19 +78418,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

109
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -5628,6 +5628,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -5656,6 +5661,7 @@ _.extend(BI, {
});
})();
/***/ }),
/* 110 */
/***/ (function(module, exports) {
@ -15813,17 +15819,18 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -15831,8 +15838,8 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;
@ -19441,8 +19448,86 @@ BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);
@ -27182,7 +27267,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
@ -27305,7 +27391,6 @@ BI.shortcut("bi.single", BI.Single);
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},
@ -34604,6 +34689,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -34648,7 +34734,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},
@ -34924,7 +35010,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};
@ -35355,6 +35441,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,

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/lib/core/wrapper/layout.d.ts vendored

@ -3,7 +3,7 @@ export declare class Layout extends Widget {
static xtype: string;
addItem(item: any): any;
prependItem(item: any): any;
addItemAt(index: string, item: any): any;
addItemAt(index: number, item: any): any;
removeItemAt(indexes: any): void;
shouldUpdateItem(index: number, item: any): boolean;
updateItemAt(index: number, item: any): any;

10
dist/lib/widget/numberinterval/numberinterval.d.ts vendored

@ -5,6 +5,16 @@ export declare class NumberInterval extends Single {
static EVENT_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
props: {
watermark?: string;
allowBlank?: boolean;
min?: string | number;
max?: string | number;
closeMin?: boolean;
closeMax?: boolean;
validation?: 'invalid' | 'valid';
numTip?: string;
} & Single['props'];
isStateValid(): boolean;
setMinEnable(v: boolean): void;
setCloseMinEnable(v: boolean): void;

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

13
dist/router.js vendored

@ -3152,7 +3152,16 @@
created: function () {
var self = this, o = this.options;
cbs.push(this._callbackListener = function () {
self.tab.setSelect($router.history.current.fullPath || "/");
var current = $router.history.current;
// 匹配的路径名(/component/:id)
var matchedPath = current.matched[o.deps] && current.matched[o.deps].path;
if (matchedPath) {
BI.each(current.params, function (key, value) {
// 把 :id 替换成具体的值(/component/demo.td)
matchedPath = matchedPath.replace(`:${key}`, value);
});
}
self.tab.setSelect(matchedPath || "/");
});
},
render: function () {
@ -3173,7 +3182,7 @@
};
},
destroyed: function () {
BI.remove(cbs, this._callbackListener);
cbs.remove(this._callbackListener);
}
});
BI.shortcut("bi.router_view", BI.RouterView);

8
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-25 17:20:32 */
/*! time: 2021-8-30 14:50:48 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -2822,6 +2822,11 @@ _.extend(BI, {
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},
@ -2850,6 +2855,7 @@ _.extend(BI, {
});
})();
/***/ }),
/***/ 110:

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

3
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20210825172131",
"version": "2.0.20210830145216",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",
@ -46,6 +46,7 @@
"style-loader": "0.23.1",
"terser-webpack-plugin": "4.2.3",
"typescript": "3.5.2",
"@types/node": "15.6.1",
"webpack": "4.35.2",
"webpack-cli": "3.3.5",
"webpack-dev-server": "3.7.2",

3
src/base/single/0.single.js

@ -196,7 +196,8 @@ BI.Single = BI.inherit(BI.Widget, {
return this.options.value;
},
destroyed: function () {
__d: function () {
BI.Single.superclass.__d.call(this);
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;

1
src/base/single/1.text.js

@ -106,7 +106,6 @@
_getShowText: function () {
var o = this.options;
var text = BI.isFunction(o.text) ? o.text() : o.text;
return BI.isKey(text) ? BI.Text.formatText(text + "") : text;
},

3
src/case/colorchooser/colorchooser.js

@ -25,6 +25,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
adjustLength: 1,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustWidth: false,
isNeedAdjustHeight: false,
el: BI.extend({
@ -69,7 +70,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
self.trigger.setValue(color);
};
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
});
},

2
src/case/colorchooser/colorchooser.popup.hex.js

@ -237,7 +237,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) {
var items = BI.map(colors.slice(0, 12), function (i, color) {
return {
value: color
};

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

@ -25,6 +25,7 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
value: o.value,
width: o.width,
height: o.height,
destroyWhenHide: o.destroyWhenHide,
popup: {
type: "bi.simple_hex_color_chooser_popup",
recommendColorsGetter: o.recommendColorsGetter,

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

@ -113,19 +113,7 @@ BI.prepares.push(function () {
if (ob.items && ob.items.length <= 1) {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}
return BI.extend({}, ob, {
type: "bi.inline_horizontal_adapt",
vgap: 0,
tgap: 0,
bgap: 0,
items: [{
type: "bi.vertical",
vgap: ob.vgap,
tgap: ob.tgap,
bgap: ob.bgap,
items: ob.items
}]
});
return ob;
});
BI.Plugin.configWidget("bi.horizontal_fill", function (ob) {

11
src/core/structure/tree.js

@ -387,17 +387,18 @@
};
BI.extend(BI.Tree, {
transformToArrayFormat: function (nodes, pId) {
transformToArrayFormat: function (nodes, pId, childKey) {
if (!nodes) return [];
var r = [];
childKey = childKey || "children";
if (BI.isArray(nodes)) {
for (var i = 0, l = nodes.length; i < l; i++) {
var node = BI.clone(nodes[i]);
node.pId = node.pId == null ? pId : node.pId;
delete node.children;
r.push(node);
if (nodes[i]["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i]["children"], node.id));
if (nodes[i][childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][childKey], node.id));
}
}
} else {
@ -405,8 +406,8 @@
newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;
delete newNodes.children;
r.push(newNodes);
if (nodes["children"]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes["children"], newNodes.id));
if (nodes[childKey]) {
r = r.concat(BI.Tree.transformToArrayFormat(nodes[childKey], newNodes.id));
}
}
return r;

5
src/core/utils/i18n.js

@ -1,6 +1,11 @@
!(function () {
var i18nStore = {};
_.extend(BI, {
changeI18n: function (i18n) {
if (i18n) {
i18nStore = i18n;
}
},
addI18n: function (i18n) {
BI.extend(i18nStore, i18n);
},

80
src/core/wrapper/layout/float/float.horizontal.js

@ -1,6 +1,84 @@
/**
* 浮动的水平居中布局
*/
BI.FloatHorizontalLayout = function () {
BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineHorizontalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top,
rowSize: [],
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
if (o.verticalAlign === BI.VerticalAlign.Top) {
return {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
}
return {
type: "bi.inline",
items: [{
el: {
type: "bi.vertical",
ref: function (_ref) {
self.layout = _ref;
},
items: this._formatItems(o.items),
vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap
}
}],
horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
return {
el: {
type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign,
items: [item],
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap
}
};
});
},
resize: function () {
this.layout.stroke(this._formatItems(this.options.items));
},
populate: function (items) {
this.layout.populate(this._formatItems(items));
}
});
BI.shortcut("bi.horizontal_float", BI.FloatHorizontalLayout);

2
typescript/core/wrapper/layout.ts

@ -7,7 +7,7 @@ export declare class Layout extends Widget {
prependItem(item: any): any;
addItemAt(index: string, item: any): any;
addItemAt(index: number, item: any): any;
removeItemAt(indexes: any): void;

5
yarn.lock

@ -896,6 +896,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.14.tgz#24a0b5959f16ac141aeb0c5b3cd7a15b7c64cbce"
integrity sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ==
"@types/node@15.6.1":
version "15.6.1"
resolved "https://registry.nlark.com/@types/node/download/@types/node-15.6.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-15.6.1.tgz#32d43390d5c62c5b6ec486a9bc9c59544de39a08"
integrity sha1-MtQzkNXGLFtuxIapvJxZVE3jmgg=
"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"

Loading…
Cancel
Save