Browse Source

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

* commit '31a4adf6bef96e7d32d37c570dd4e69ba4685e4c':
  auto upgrade version to 2.0.20210725221132
  布局
  auto upgrade version to 2.0.20210725212311
  update
  布局
  auto upgrade version to 2.0.20210723183413
  无jira任务 refactor:类型补充
  无jira任务 refactor: 类型补充
  无jira任务 refactor: 类型补充
es6
windy 3 years ago
parent
commit
6450adb917
  1. 4
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 3098
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 4
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 4
      dist/2.0/fineui_without_normalize.css
  10. 4
      dist/2.0/fineui_without_normalize.min.css
  11. 4
      dist/core.css
  12. 3044
      dist/core.js
  13. 2
      dist/core.js.map
  14. 4
      dist/demo.css
  15. 3434
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 4
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 3090
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 4
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 4
      dist/fineui.proxy.css
  26. 2144
      dist/fineui.proxy.js
  27. 2
      dist/fineui.proxy.js.map
  28. 4
      dist/fineui.proxy.min.css
  29. 4
      dist/fineui.proxy.min.js
  30. 2
      dist/fineui.proxy.min.js.map
  31. 2030
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. 2
      dist/lib/base/combination/combo.d.ts
  35. 25
      dist/lib/base/combination/expander.d.ts
  36. 4
      dist/lib/index.d.ts
  37. 2
      dist/resource.css
  38. 14
      dist/utils.js
  39. 2
      dist/utils.js.map
  40. 4
      dist/utils.min.js
  41. 2
      dist/utils.min.js.map
  42. 2
      package.json
  43. 36
      src/core/wrapper/layout/float/float.absolute.center.js
  44. 64
      src/core/wrapper/layout/float/float.absolute.horizontal.js
  45. 170
      src/core/wrapper/layout/float/float.absolute.leftrightvertical.js
  46. 64
      src/core/wrapper/layout/float/float.absolute.vertical.js
  47. 0
      src/core/wrapper/layout/float/float.horizontal.js
  48. 27
      src/less/core/wrapper/float.absolute.less
  49. 3
      typescript/base/combination/combo.ts
  50. 40
      typescript/base/combination/expander.ts
  51. 3
      typescript/index.ts

4
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

3098
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
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

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

3044
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

3434
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

4
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

3090
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
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

4
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

2144
dist/fineui.proxy.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

4
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

2030
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

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/base/combination/combo.d.ts vendored

@ -36,6 +36,8 @@ export declare class Combo extends Widget {
hoverClass: string;
belowMouse: boolean;
};
resetListHeight(h: number): void;
resetListWidth(w: number): void;
populate(...args: any[]): void;
_setEnable(v: boolean): void;
isViewVisible(): boolean;

25
dist/lib/base/combination/expander.d.ts vendored

@ -0,0 +1,25 @@
import { Widget } from "../../core/widget";
export declare class Expander extends Widget {
static xtype: string;
static EVENT_EXPAND: string;
static EVENT_COLLAPSE: string;
static EVENT_TRIGGER_CHANGE: string;
static EVENT_CHANGE: string;
static EVENT_AFTER_INIT: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_AFTER_POPUPVIEW: string;
static EVENT_BEFORE_HIDEVIEW: string;
static EVENT_AFTER_HIDEVIEW: string;
populate(items?: any, ...args: any[]): void;
setValue(v: string): void;
getValue(): string;
isViewVisible(): boolean;
isExpanded(): boolean;
showView(): void;
hideView(): void;
getView<T>(): T;
getAllLeaves<T>(): T[];
getNodeById<T>(id: string): T;
getNodeByValue<T>(v: string): T;
destroy(): void;
}

4
dist/lib/index.d.ts vendored

@ -82,6 +82,7 @@ import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple";
import { A } from "./base/a/a";
import { Html } from "./base/single/html/html";
import { Switcher } from "./base/combination/switcher";
import { Expander } from './base/combination/expander';
import { Loader } from "./base/combination/loader";
import { ListPane } from "./case/layer/pane.list";
import { MultiPopupView } from './case/layer/layer.multipopup';
@ -265,6 +266,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
A: typeof A;
Html: typeof Html;
Switcher: typeof Switcher;
Expander: typeof Expander;
Loader: typeof Loader;
ListPane: typeof ListPane;
MultiPopupView: typeof MultiPopupView;
@ -358,4 +360,4 @@ declare const _default: {
Decorators: typeof decorator;
};
export default _default;
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, MultiLayerDownListPopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiLayerDownListCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, TreeValueChooserPane, TdLayout, };
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, Expander, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, MultiLayerDownListPopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiLayerDownListCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, TreeValueChooserPane, TdLayout, };

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

14
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-7-23 17:20:32 */
/*! time: 2021-7-25 22:10:27 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1270);
/******/ return __webpack_require__(__webpack_require__.s = 1276);
/******/ })
/************************************************************************/
/******/ ({
@ -2928,7 +2928,7 @@ BI.Req = {
/***/ }),
/***/ 1128:
/***/ 1134:
/***/ (function(module, exports) {
BI.i18n = {
@ -3133,7 +3133,7 @@ BI.i18n = {
/***/ }),
/***/ 1270:
/***/ 1276:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(91);
@ -3152,8 +3152,8 @@ __webpack_require__(97);
__webpack_require__(98);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(1128);
__webpack_require__(1271);
__webpack_require__(1134);
__webpack_require__(1277);
__webpack_require__(110);
__webpack_require__(111);
module.exports = __webpack_require__(112);
@ -3161,7 +3161,7 @@ module.exports = __webpack_require__(112);
/***/ }),
/***/ 1271:
/***/ 1277:
/***/ (function(module, exports) {
/**

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

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

36
src/core/wrapper/layout/float/float.absolute.center.js

@ -0,0 +1,36 @@
/**
* absolute实现的居中布局
* @class BI.FloatAbsoluteCenterLayout
* @extends BI.Layout
*/
BI.FloatAbsoluteCenterLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatAbsoluteCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-c-fl",
});
},
render: function () {
BI.FloatAbsoluteCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.FloatAbsoluteCenterLayout.superclass._addElement.apply(this, arguments);
w.element.addClass("bi-abs-c-item").css({
position: "absolute",
});
return w;
},
resize: function () {
// console.log("float_absolute_center_adapt布局不需要resize");
},
populate: function (items) {
BI.FloatAbsoluteCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.absolute_center_float", BI.FloatAbsoluteCenterLayout);

64
src/core/wrapper/layout/float/float.absolute.horizontal.js

@ -0,0 +1,64 @@
/**
* absolute实现的居中布局
* @class BI.FloatAbsoluteHorizontalLayout
* @extends BI.Layout
*/
BI.FloatAbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatAbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-h-fl",
horizontalAlign: BI.HorizontalAlign.Center,
rowSize: [],
vgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
var self = this, o = this.options;
BI.FloatAbsoluteHorizontalLayout.superclass.render.apply(this, arguments);
return {
type: "bi.vtape",
horizontalAlign: o.horizontalAlign,
rowSize: o.rowSize,
items: this._formatItems(o.items),
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
ref: function (_ref) {
self.layout = _ref;
},
hgap: "50%",
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
};
},
_formatItems: function (items) {
return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){
return item;
}
var el = BI.stripEL(item);
if(BI.isWidget(el)){
el.element.addClass("bi-abs-c-x-item");
} else {
el.cls = (el.cls || "") + "bi-abs-c-x-item";
}
return item;
});
},
resize: function () {
// console.log("float_absolute_horizontal_adapt布局不需要resize");
},
populate: function (items) {
this.layout.populate.apply(this, arguments);
}
});
BI.shortcut("bi.absolute_horizontal_float", BI.FloatAbsoluteHorizontalLayout);

170
src/core/wrapper/layout/float/float.absolute.leftrightvertical.js

@ -0,0 +1,170 @@
BI.FloatAbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatAbsoluteLeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-lr-v-fl",
verticalAlign: BI.VerticalAlign.Middle,
items: {},
llgap: 0,
lrgap: 0,
lhgap: 0,
ltgap: 0,
lbgap: 0,
lvgap: 0,
rlgap: 0,
rrgap: 0,
rhgap: 0,
rtgap: 0,
rbgap: 0,
rvgap: 0
});
},
render: function () {
var o = this.options, self = this;
BI.FloatAbsoluteLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.htape",
ref: function (_ref) {
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
items: this._formatItems(),
vgap: "50%",
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function () {
var o = this.options;
var leftItems = o.items.left || [];
var rightItems = o.items.right || [];
leftItems = BI.map(leftItems, function (i, item) {
var el = BI.stripEL(item);
if(BI.isWidget(el)){
el.element.addClass("bi-abs-c-y-item");
} else {
el.cls = (el.cls || "") + "bi-abs-c-y-item";
}
var json = {
el: el,
width: item.width
};
// if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
// json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0);
// }
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0);
}
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0);
}
// if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
// json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0);
// }
return json;
});
rightItems = BI.map(rightItems, function (i, item) {
var el = BI.stripEL(item);
if(BI.isWidget(el)){
el.element.addClass("bi-abs-c-y-item");
} else {
el.cls = (el.cls || "") + "bi-abs-c-y-item";
}
var json = {
el: el,
width: item.width
};
// if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
// json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0);
// }
if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + (item.lgap || 0) + (item.hgap || 0);
}
if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0);
}
// if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
// json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0);
// }
return json;
});
return leftItems.concat({}, rightItems);
},
resize: function () {
// console.log("absolute_left_right_vertical_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("不能添加子组件");
},
populate: function (items) {
this.options.items = items;
this.layout.populate(this._formatItems());
}
});
BI.shortcut("bi.absolute_left_right_vertical_float", BI.FloatAbsoluteLeftRightVerticalAdaptLayout);
BI.FloatAbsoluteRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatAbsoluteRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-r-v-fl",
verticalAlign: BI.VerticalAlign.Middle,
items: [],
lgap: 0,
rgap: 0,
hgap: 0,
});
},
render: function () {
var o = this.options, self = this;
BI.FloatAbsoluteRightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.htape",
ref: function (_ref) {
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
items: [{}].concat(this._formatItems(o.items)),
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
vgap: "50%",
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function (items) {
return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){
return item;
}
var el = BI.stripEL(item);
if(BI.isWidget(el)){
el.element.addClass("bi-abs-c-y-item");
} else {
el.cls = (el.cls || "") + "bi-abs-c-y-item";
}
return item;
});
},
resize: function () {
},
addItem: function () {
// do nothing
throw new Error("不能添加子组件");
},
populate: function (items) {
this.layout.populate(items);
}
});
BI.shortcut("bi.absolute_right_vertical_float", BI.FloatAbsoluteRightVerticalAdaptLayout);

64
src/core/wrapper/layout/float/float.absolute.vertical.js

@ -0,0 +1,64 @@
/**
* absolute实现的居中布局
* @class BI.FloatAbsoluteVerticalLayout
* @extends BI.Layout
*/
BI.FloatAbsoluteVerticalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.FloatAbsoluteVerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-h-fl",
verticalAlign: BI.VerticalAlign.Middle,
columnSize: [],
hgap: 0,
lgap: 0,
rgap: 0
});
},
render: function () {
var self = this, o = this.options;
BI.FloatAbsoluteVerticalLayout.superclass.render.apply(this, arguments);
return {
type: "bi.htape",
verticalAlign: o.verticalAlign,
columnSize: o.columnSize,
items: this._formatItems(o.items),
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
ref: function (_ref) {
self.layout = _ref;
},
vgap: "50%",
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
};
},
_formatItems: function (items) {
return BI.map(items, function (i, item) {
if(!item || BI.isEmptyObject(item)){
return item;
}
var el = BI.stripEL(item);
if(BI.isWidget(el)){
el.element.addClass("bi-abs-c-y-item");
} else {
el.cls = (el.cls || "") + "bi-abs-c-y-item";
}
return item;
});
},
resize: function () {
// console.log("float_absolute_vertical_adapt布局不需要resize");
},
populate: function (items) {
this.layout.populate.apply(this, arguments);
}
});
BI.shortcut("bi.absolute_vertical_float", BI.FloatAbsoluteVerticalLayout);

0
src/core/wrapper/layout/adapt/float.horizontal.js → src/core/wrapper/layout/float/float.horizontal.js

27
src/less/core/wrapper/float.absolute.less

@ -0,0 +1,27 @@
.bi-abs-c-x-item {
left: 50%;
-ms-transform: translateX(-50%); /* IE 9 */
-moz-transform: translateX(-50%); /* Firefox */
-webkit-transform: translateX(-50%); /* Safari 和 Chrome */
-o-transform: translateX(-50%); /* Opera */
transform: translateX(-50%);
}
.bi-abs-c-y-item {
top: 50%;
-ms-transform: translateY(-50%); /* IE 9 */
-moz-transform: translateY(-50%); /* Firefox */
-webkit-transform: translateY(-50%); /* Safari 和 Chrome */
-o-transform: translateY(-50%); /* Opera */
transform: translateY(-50%);
}
.bi-abs-c-item {
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%); /* IE 9 */
-moz-transform: translate(-50%, -50%); /* Firefox */
-webkit-transform: translate(-50%, -50%); /* Safari 和 Chrome */
-o-transform: translate(-50%, -50%); /* Opera */
transform: translate(-50%, -50%);
}

3
typescript/base/combination/combo.ts

@ -38,6 +38,9 @@ export declare class Combo extends Widget {
hoverClass: string;
belowMouse: boolean;
}
resetListHeight(h: number): void;
resetListWidth(w: number): void;
populate(...args: any[]): void;

40
typescript/base/combination/expander.ts

@ -0,0 +1,40 @@
import { Widget } from "../../core/widget";
export declare class Expander extends Widget {
static xtype: string;
static EVENT_EXPAND: string;
static EVENT_COLLAPSE: string;
static EVENT_TRIGGER_CHANGE: string;
static EVENT_CHANGE: string;
static EVENT_AFTER_INIT: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_AFTER_POPUPVIEW: string;
static EVENT_BEFORE_HIDEVIEW: string;
static EVENT_AFTER_HIDEVIEW: string;
populate(items?: any, ...args: any[]): void;
setValue(v: string): void;
getValue(): string;
isViewVisible(): boolean;
isExpanded(): boolean;
showView(): void;
hideView(): void;
getView<T>(): T;
getAllLeaves<T>(): T[];
getNodeById<T>(id: string): T;
getNodeByValue<T>(v: string): T;
destroy(): void;
}

3
typescript/index.ts

@ -82,6 +82,7 @@ import { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple";
import { A } from "./base/a/a";
import { Html } from "./base/single/html/html";
import { Switcher } from "./base/combination/switcher";
import { Expander } from './base/combination/expander';
import { Loader } from "./base/combination/loader";
import { ListPane } from "./case/layer/pane.list";
import { MultiPopupView } from './case/layer/layer.multipopup';
@ -267,6 +268,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
A: typeof A;
Html: typeof Html;
Switcher: typeof Switcher;
Expander: typeof Expander;
Loader: typeof Loader;
ListPane: typeof ListPane;
MultiPopupView: typeof MultiPopupView;
@ -415,6 +417,7 @@ export {
A,
Html,
Switcher,
Expander,
BubbleCombo,
Loader,
ListPane,

Loading…
Cancel
Save