Browse Source

无JIRA任务 chore: 重新整理一下import和export和挂载到BI的规范

es6
Zhenfei.Li 2 years ago
parent
commit
c645f52ac8
  1. 13
      src/base/0.base.js
  2. 2
      src/base/1.pane.js
  3. 2
      src/base/combination/bubble.js
  4. 4
      src/base/combination/combo.js
  5. 2
      src/base/combination/expander.js
  6. 2
      src/base/combination/group.button.js
  7. 2
      src/base/combination/group.combo.js
  8. 2
      src/base/combination/group.virtual.js
  9. 12
      src/base/combination/index.js
  10. 2
      src/base/combination/loader.js
  11. 2
      src/base/combination/navigation.js
  12. 4
      src/base/combination/searcher.js
  13. 2
      src/base/combination/switcher.js
  14. 2
      src/base/combination/tab.js
  15. 4
      src/base/combination/tree.button.js
  16. 54
      src/base/foundation/message.js
  17. 98
      src/base/index.js
  18. 4
      src/base/layer/index.js
  19. 2
      src/base/layer/layer.drawer.js
  20. 2
      src/base/layer/layer.popup.js
  21. 4
      src/base/layer/layer.searcher.js
  22. 3
      src/base/list/index.js
  23. 2
      src/base/list/listview.js
  24. 2
      src/base/list/virtualgrouplist.js
  25. 2
      src/base/list/virtuallist.js
  26. 2
      src/base/single/0.single.js
  27. 6
      src/base/single/1.text.js
  28. 4
      src/base/single/a/a.js
  29. 4
      src/base/single/index.js
  30. 4
      src/base/single/tip/0.tip.js
  31. 3
      src/base/single/tip/index.js
  32. 4
      src/base/single/tip/tip.toast.js
  33. 4
      src/base/single/tip/tip.tooltip.js
  34. 121
      src/core/2.base.js
  35. 6
      src/core/3.ob.js
  36. 16
      src/core/4.widget.js
  37. 26
      src/core/5.inject.js
  38. 4
      src/core/action/action.js
  39. 4
      src/core/action/action.show.js
  40. 2
      src/core/action/index.js
  41. 4
      src/core/behavior/0.behavior.js
  42. 4
      src/core/behavior/behavior.highlight.js
  43. 4
      src/core/behavior/behavior.redmark.js
  44. 3
      src/core/behavior/index.js
  45. 4
      src/core/controller/0.controller.js
  46. 4
      src/core/controller/controller.broadcast.js
  47. 4
      src/core/controller/controller.bubbles.js
  48. 4
      src/core/controller/controller.drawer.js
  49. 4
      src/core/controller/controller.layer.js
  50. 4
      src/core/controller/controller.masker.js
  51. 4
      src/core/controller/controller.popover.js
  52. 4
      src/core/controller/controller.resizer.js
  53. 4
      src/core/controller/controller.tooltips.js
  54. 9
      src/core/controller/index.js
  55. 89
      src/core/index.js
  56. 6
      src/core/listener/listener.show.js
  57. 4
      src/core/loader/loader.style.js

13
src/base/0.base.js

@ -8,7 +8,6 @@ import {
ResizeController, ResizeController,
TooltipsController, TooltipsController,
StyleLoaderManager, StyleLoaderManager,
extend
} from "../core"; } from "../core";
const Resizers = new ResizeController(); const Resizers = new ResizeController();
@ -21,18 +20,6 @@ const Drawers = new DrawerController();
const Broadcasts = new BroadcastController(); const Broadcasts = new BroadcastController();
const StyleLoaders = new StyleLoaderManager(); const StyleLoaders = new StyleLoaderManager();
extend(BI, {
Resizers,
Layers,
Maskers,
Bubbles,
Tooltips,
Popovers,
Drawers,
Broadcasts,
StyleLoaders
});
export { export {
Resizers, Resizers,
Layers, Layers,

2
src/base/1.pane.js

@ -10,7 +10,7 @@ import { Widget, shortcut, isNotEmptyString, extend, isNull, isEmpty, createWidg
import { Layers } from "./0.base"; import { Layers } from "./0.base";
@shortcut() @shortcut()
export default class Pane extends Widget { export class Pane extends Widget {
static xtype = "bi.pane"; static xtype = "bi.pane";
static EVENT_LOADED = "EVENT_LOADED"; static EVENT_LOADED = "EVENT_LOADED";
static EVENT_LOADING = "EVENT_LOADING"; static EVENT_LOADING = "EVENT_LOADING";

2
src/base/combination/bubble.js

@ -5,7 +5,7 @@
import { shortcut, Widget, Controller, extend, nextTick, createWidget, each, defer, debounce, delay, isNull, isFunction, contains, bind } from "../../core"; import { shortcut, Widget, Controller, extend, nextTick, createWidget, each, defer, debounce, delay, isNull, isFunction, contains, bind } from "../../core";
@shortcut() @shortcut()
export default class Bubble extends Widget { export class Bubble extends Widget {
static xtype = "bi.bubble"; static xtype = "bi.bubble";
static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

4
src/base/combination/combo.js

@ -4,14 +4,14 @@
*/ */
import { shortcut, Widget, Controller, extend, createWidget, nextTick, bind, isNotNull, isNull, isFunction, each } from "../../core"; import { shortcut, Widget, Controller, extend, createWidget, nextTick, bind, isNotNull, isNull, isFunction, each } from "../../core";
import Bubble from "./bubble"; import { Bubble } from "./bubble";
import { Resizers } from "../0.base"; import { Resizers } from "../0.base";
let needHideWhenAnotherComboOpen = {}; let needHideWhenAnotherComboOpen = {};
let currentOpenedCombos = {}; let currentOpenedCombos = {};
@shortcut() @shortcut()
export default class Combo extends Bubble { export class Combo extends Bubble {
static xtype = "bi.combo"; static xtype = "bi.combo";
static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

2
src/base/combination/expander.js

@ -9,7 +9,7 @@
import { shortcut, Widget, Controller, extend, nextTick, each, debounce, isNull, createWidget } from "../../core"; import { shortcut, Widget, Controller, extend, nextTick, each, debounce, isNull, createWidget } from "../../core";
@shortcut() @shortcut()
export default class Expander extends Widget { export class Expander extends Widget {
static xtype = "bi.expander"; static xtype = "bi.expander";
static EVENT_EXPAND = "EVENT_EXPAND"; static EVENT_EXPAND = "EVENT_EXPAND";

2
src/base/combination/group.button.js

@ -6,7 +6,7 @@
import { shortcut, Widget, Controller, extend, createWidget, createWidgets, each, isFunction, isKey, isNotEmptyArray, createItems, isArray, remove, map, stripEL, makeArrayByArray, clone, deepClone, formatEL, isEmpty, concat, removeAt, deepContains, has, any } from "../../core"; import { shortcut, Widget, Controller, extend, createWidget, createWidgets, each, isFunction, isKey, isNotEmptyArray, createItems, isArray, remove, map, stripEL, makeArrayByArray, clone, deepClone, formatEL, isEmpty, concat, removeAt, deepContains, has, any } from "../../core";
@shortcut() @shortcut()
export default class ButtonGroup extends Widget { export class ButtonGroup extends Widget {
static xtype = "bi.button_group"; static xtype = "bi.button_group";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

2
src/base/combination/group.combo.js

@ -5,7 +5,7 @@
import { shortcut, Widget, Controller, extend, isEmpty, each, formatEL, clone, createWidget } from "../../core"; import { shortcut, Widget, Controller, extend, isEmpty, each, formatEL, clone, createWidget } from "../../core";
@shortcut() @shortcut()
export default class ComboGroup extends Widget { export class ComboGroup extends Widget {
static xtype = "bi.combo_group"; static xtype = "bi.combo_group";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

2
src/base/combination/group.virtual.js

@ -1,7 +1,7 @@
import { shortcut, Widget, Controller, extend, isFunction, isKey, isArray, map, stripEL, deepClone, formatEL, isEmpty, each, createWidget } from "../../core"; import { shortcut, Widget, Controller, extend, isFunction, isKey, isArray, map, stripEL, deepClone, formatEL, isEmpty, each, createWidget } from "../../core";
@shortcut() @shortcut()
export default class VirtualGroup extends Widget { export class VirtualGroup extends Widget {
static xtype = "bi.virtual_group"; static xtype = "bi.virtual_group";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

12
src/base/combination/index.js

@ -0,0 +1,12 @@
export { Bubble } from "./bubble";
export { Combo } from "./combo";
export { Expander } from "./expander";
export { ButtonGroup } from "./group.button";
export { ComboGroup } from "./group.combo";
export { VirtualGroup } from "./group.virtual";
export { Loader } from "./loader";
export { Navigation } from "./navigation";
export { Searcher } from "./searcher";
export { Switcher } from "./switcher";
export { Tab } from "./tab";
export { ButtonTree } from "./tree.button";

2
src/base/combination/loader.js

@ -8,7 +8,7 @@
import { shortcut, Widget, Controller, extend, createWidget, isEmpty, nextTick, bind, isFunction, isNotEmptyArray, isNumber, isObject, each } from "../../core"; import { shortcut, Widget, Controller, extend, createWidget, isEmpty, nextTick, bind, isFunction, isNotEmptyArray, isNumber, isObject, each } from "../../core";
@shortcut() @shortcut()
export default class Loader extends Widget { export class Loader extends Widget {
static xtype = "bi.loader"; static xtype = "bi.loader";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

2
src/base/combination/navigation.js

@ -4,7 +4,7 @@
import { shortcut, Widget, Controller, extend, createWidget, bind, ShowListener, isFunction, each, nextTick, isKey, values } from "../../core"; import { shortcut, Widget, Controller, extend, createWidget, bind, ShowListener, isFunction, each, nextTick, isKey, values } from "../../core";
@shortcut() @shortcut()
export default class Navigation extends Widget { export class Navigation extends Widget {
static xtype = "bi.navigation"; static xtype = "bi.navigation";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

4
src/base/combination/searcher.js

@ -6,11 +6,11 @@
* @extends BI.Widget * @extends BI.Widget
*/ */
import { shortcut, Widget, Controller, extend, createWidget, debounce, bind, endWith, deepWithout, nextTick, isEmptyString, isNull } from "../../core"; import { shortcut, Widget, Controller, extend, createWidget, debounce, bind, endWith, deepWithout, nextTick, isEmptyString, isNull } from "../../core";
import ButtonGroup from "./group.button"; import { ButtonGroup } from "./group.button";
import { Maskers } from "../0.base"; import { Maskers } from "../0.base";
@shortcut() @shortcut()
export default class Searcher extends Widget { export class Searcher extends Widget {
static xtype = "bi.searcher"; static xtype = "bi.searcher";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

2
src/base/combination/switcher.js

@ -10,7 +10,7 @@ import { shortcut, Widget, Controller, extend, nextTick, createWidget, each, deb
import { Maskers } from "../0.base"; import { Maskers } from "../0.base";
@shortcut() @shortcut()
export default class Switcher extends Widget { export class Switcher extends Widget {
static xtype = "bi.switcher"; static xtype = "bi.switcher";
static EVENT_EXPAND = "EVENT_EXPAND"; static EVENT_EXPAND = "EVENT_EXPAND";

2
src/base/combination/tab.js

@ -4,7 +4,7 @@
import { shortcut, Widget, Controller, ShowListener, extend, createWidget, isObject, each, isFunction, contains, any, isEqual } from "../../core"; import { shortcut, Widget, Controller, ShowListener, extend, createWidget, isObject, each, isFunction, contains, any, isEqual } from "../../core";
@shortcut() @shortcut()
export default class Tab extends Widget { export class Tab extends Widget {
static xtype = "bi.tab"; static xtype = "bi.tab";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

4
src/base/combination/tree.button.js

@ -4,10 +4,10 @@
* @extends BI.ButtonGroup * @extends BI.ButtonGroup
*/ */
import { shortcut, Widget, extend, isArray, each, isFunction, deepContains, concat, any, contains } from "../../core"; import { shortcut, Widget, extend, isArray, each, isFunction, deepContains, concat, any, contains } from "../../core";
import ButtonGroup from "./group.button"; import { ButtonGroup } from "./group.button";
@shortcut() @shortcut()
export default class ButtonTree extends ButtonGroup { export class ButtonTree extends ButtonGroup {
static xtype = "bi.button_tree"; static xtype = "bi.button_tree";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

54
src/base/foundation/message.js

@ -3,12 +3,14 @@
* 弹出提示消息框用于模拟阻塞操作通过回调函数实现 * 弹出提示消息框用于模拟阻塞操作通过回调函数实现
* @class BI.Msg * @class BI.Msg
*/ */
BI.Msg = ((function () { import { Widget, isString, isNull, isFunction, createWidget, remove, each } from "../../core"
var $mask, $pop;
var messageShows = []; export const Msg = ((() => {
let $mask, $pop;
var toastStack = []; let messageShows = [];
let toastStack = [];
return { return {
alert: function (title, message, callback) { alert: function (title, message, callback) {
@ -21,13 +23,13 @@ BI.Msg = ((function () {
// BI.Msg.prompt(title, message, value, callback, min_width); // BI.Msg.prompt(title, message, value, callback, min_width);
}, },
toast: function (message, options, context) { toast: function (message, options, context) {
BI.isString(options) && (options = { level: options }); isString(options) && (options = { level: options });
options = options || {}; options = options || {};
context = context || BI.Widget._renderEngine.createElement("body"); context = context || Widget._renderEngine.createElement("body");
var level = options.level || "common"; const level = options.level || "common";
var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose; const autoClose = isNull(options.autoClose) ? true : options.autoClose;
var callback = BI.isFunction(options.callback) ? options.callback : BI.emptyFn; const callback = isFunction(options.callback) ? options.callback : BI.emptyFn;
var toast = BI.createWidget({ const toast = createWidget({
type: "bi.toast", type: "bi.toast",
cls: "bi-message-animate bi-message-leave", cls: "bi-message-animate bi-message-leave",
level: level, level: level,
@ -37,9 +39,9 @@ BI.Msg = ((function () {
listeners: [{ listeners: [{
eventName: BI.Toast.EVENT_DESTORY, eventName: BI.Toast.EVENT_DESTORY,
action: function () { action: function () {
BI.remove(toastStack, toast.element); remove(toastStack, toast.element);
var _height = BI.SIZE_CONSANTS.TOAST_TOP; let _height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) { each(toastStack, function (i, element) {
element.css({ "top": _height }); element.css({ "top": _height });
_height += element.outerHeight() + 10; _height += element.outerHeight() + 10;
}); });
@ -47,11 +49,11 @@ BI.Msg = ((function () {
}, },
}], }],
}); });
var height = BI.SIZE_CONSANTS.TOAST_TOP; const height = BI.SIZE_CONSANTS.TOAST_TOP;
BI.each(toastStack, function (i, element) { each(toastStack, function (i, element) {
height += element.outerHeight() + 10; height += element.outerHeight() + 10;
}); });
BI.createWidget({ createWidget({
type: "bi.absolute", type: "bi.absolute",
element: context, element: context,
items: [{ items: [{
@ -75,7 +77,7 @@ BI.Msg = ((function () {
}; };
}, },
_show: function (hasCancel, title, message, callback) { _show: function (hasCancel, title, message, callback) {
BI.isNull($mask) && ($mask = BI.Widget._renderEngine.createElement("<div class=\"bi-z-index-mask\">").css({ isNull($mask) && ($mask = Widget._renderEngine.createElement("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_tip - 2,
top: 0, top: 0,
@ -84,7 +86,7 @@ BI.Msg = ((function () {
bottom: 0, bottom: 0,
opacity: 0.5, opacity: 0.5,
}).appendTo("body")); }).appendTo("body"));
$pop = BI.Widget._renderEngine.createElement("<div class=\"bi-message-depend\">").css({ $pop = Widget._renderEngine.createElement("<div class=\"bi-message-depend\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 1, zIndex: BI.zIndex_tip - 1,
top: 0, top: 0,
@ -100,7 +102,7 @@ BI.Msg = ((function () {
$mask = null; $mask = null;
} }
} }
var controlItems = []; let controlItems = [];
if (hasCancel === true) { if (hasCancel === true) {
controlItems.push({ controlItems.push({
el: { el: {
@ -109,7 +111,7 @@ BI.Msg = ((function () {
level: "ignore", level: "ignore",
handler: function () { handler: function () {
close(); close();
if (BI.isFunction(callback)) { if (isFunction(callback)) {
callback.apply(null, [false]); callback.apply(null, [false]);
} }
}, },
@ -122,13 +124,13 @@ BI.Msg = ((function () {
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
handler: function () { handler: function () {
close(); close();
if (BI.isFunction(callback)) { if (isFunction(callback)) {
callback.apply(null, [true]); callback.apply(null, [true]);
} }
}, },
}, },
}); });
var conf = { const conf = {
element: $pop, element: $pop,
type: "bi.center_adapt", type: "bi.center_adapt",
items: [ items: [
@ -141,13 +143,13 @@ BI.Msg = ((function () {
this.element.keyup(function (e) { this.element.keyup(function (e) {
if (e.keyCode === BI.KeyCode.ENTER) { if (e.keyCode === BI.KeyCode.ENTER) {
close(); close();
if (BI.isFunction(callback)) { if (isFunction(callback)) {
callback.apply(null, [true]); callback.apply(null, [true]);
} }
} else if (e.keyCode === BI.KeyCode.ESCAPE) { } else if (e.keyCode === BI.KeyCode.ESCAPE) {
close(); close();
if (hasCancel === true) { if (hasCancel === true) {
if (BI.isFunction(callback)) { if (isFunction(callback)) {
callback.apply(null, [false]); callback.apply(null, [false]);
} }
} }
@ -183,7 +185,7 @@ BI.Msg = ((function () {
// height: 50, // height: 50,
handler: function () { handler: function () {
close(); close();
if (BI.isFunction(callback)) { if (isFunction(callback)) {
callback.apply(null, [false]); callback.apply(null, [false]);
} }
}, },
@ -228,7 +230,7 @@ BI.Msg = ((function () {
], ],
}; };
messageShows[messageShows.length] = BI.createWidget(conf); messageShows[messageShows.length] = createWidget(conf);
}, },
}; };
})()); })());

98
src/base/index.js

@ -1,93 +1,31 @@
import { extend } from "../core"; import { Pane } from "./1.pane";
import Pane from "./1.pane"; import * as single from "./single";
import Single from "./single/0.single"; import * as layer from "./layer";
import Text from "./single/1.text"; import * as list from "./list";
import A from "./single/a/a";
import Tip from "./single/tip/0.tip";
import Toast from "./single/tip/tip.toast";
import Tooltip from "./single/tip/tip.tooltip";
import Drawer from "./layer/layer.drawer";
import { Popover, BarPopover } from "./layer/layer.popover";
import PopupView from "./layer/layer.popup";
import SearcherView from "./layer/layer.searcher";
import ListView from "./list/listview";
import VirtualGroupList from "./list/virtualgrouplist";
import VirtualList from "./list/virtuallist";
import GridView from "./grid/grid"; import GridView from "./grid/grid";
import Pager from "./pager/pager"; import Pager from "./pager/pager";
import Bubble from "./combination/bubble"; import * as combination from "./combination";
import Combo from "./combination/combo"; import { Msg } from "./foundation/message";
import Expander from "./combination/expander";
import ButtonGroup from "./combination/group.button";
import ComboGroup from "./combination/group.combo";
import VirtualGroup from "./combination/group.virtual";
import Loader from "./combination/loader";
import Navigation from "./combination/navigation";
import Searcher from "./combination/searcher";
import Switcher from "./combination/switcher";
import Tab from "./combination/tab";
import ButtonTree from "./combination/tree.button";
extend(BI, { Object.assign(BI, {
Pane, Pane,
Single, ...layer,
Text, ...list,
A, ...single,
Tip,
Toast,
Tooltip,
Drawer,
Popover,
BarPopover,
PopupView,
SearcherView,
ListView,
VirtualGroupList,
VirtualList,
GridView, GridView,
Pager, Pager,
Bubble, ...combination,
Combo, Msg,
Expander,
ButtonGroup,
ComboGroup,
VirtualGroup,
Loader,
Navigation,
Searcher,
Switcher,
Tab,
ButtonTree,
}); });
export * from "./0.base";
export * from "./combination";
export * from "./layer";
export * from "./list";
export * from "./single";
export { export {
Pane, Pane,
Single,
Text,
A,
Tip,
Toast,
Tooltip,
Drawer,
Popover,
BarPopover,
PopupView,
SearcherView,
ListView,
VirtualGroupList,
VirtualList,
GridView, GridView,
Pager, Pager,
Bubble, Msg,
Combo,
Expander,
ButtonGroup,
ComboGroup,
VirtualGroup,
Loader,
Navigation,
Searcher,
Switcher,
Tab,
ButtonTree,
} }

4
src/base/layer/index.js

@ -0,0 +1,4 @@
export { Drawer } from "./layer.drawer";
export { Popover, BarPopover } from "./layer.popover";
export { PopupView } from "./layer.popup";
export { SearcherView } from "./layer.searcher";

2
src/base/layer/layer.drawer.js

@ -6,7 +6,7 @@
import { Widget, shortcut } from "../../core"; import { Widget, shortcut } from "../../core";
@shortcut() @shortcut()
export default class Drawer extends Widget { export class Drawer extends Widget {
SIZE = { SIZE = {
SMALL: "small", SMALL: "small",
NORMAL: "normal", NORMAL: "normal",

2
src/base/layer/layer.popup.js

@ -6,7 +6,7 @@
import { Widget, shortcut } from "../../core"; import { Widget, shortcut } from "../../core";
@shortcut() @shortcut()
export default class PopupView extends Widget { export class PopupView extends Widget {
_const = { _const = {
TRIANGLE_LENGTH: 12, TRIANGLE_LENGTH: 12,
} }

4
src/base/layer/layer.searcher.js

@ -7,10 +7,10 @@
*/ */
import { shortcut } from "../../core"; import { shortcut } from "../../core";
import Pane from "../1.pane"; import { Pane } from "../1.pane";
@shortcut() @shortcut()
export default class SearcherView extends Pane { export class SearcherView extends Pane {
static xtype = "bi.searcher_view"; static xtype = "bi.searcher_view";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";

3
src/base/list/index.js

@ -0,0 +1,3 @@
export { ListView } from "./listview";
export { VirtualGroupList } from "./virtualgrouplist";
export { VirtualList } from "./virtuallist";

2
src/base/list/listview.js

@ -7,7 +7,7 @@
*/ */
import { Widget, shortcut } from "../../core"; import { Widget, shortcut } from "../../core";
@shortcut() @shortcut()
export default class ListView extends Widget { export class ListView extends Widget {
props() { props() {
return { return {
baseCls: "bi-list-view", baseCls: "bi-list-view",

2
src/base/list/virtualgrouplist.js

@ -8,7 +8,7 @@
import { Widget, shortcut } from "../../core"; import { Widget, shortcut } from "../../core";
@shortcut() @shortcut()
export default class VirtualGroupList extends Widget { export class VirtualGroupList extends Widget {
props() { props() {
return { return {
baseCls: "bi-virtual-group-list", baseCls: "bi-virtual-group-list",

2
src/base/list/virtuallist.js

@ -8,7 +8,7 @@
import { Widget, shortcut } from "../../core"; import { Widget, shortcut } from "../../core";
@shortcut() @shortcut()
export default class VirtualList extends Widget { export class VirtualList extends Widget {
props() { props() {
return { return {
baseCls: "bi-virtual-list", baseCls: "bi-virtual-list",

2
src/base/single/0.single.js

@ -14,7 +14,7 @@ import { Widget, shortcut } from "../../core";
import { Tooltips } from "../0.base"; import { Tooltips } from "../0.base";
@shortcut() @shortcut()
export default class Single extends Widget { export class Single extends Widget {
static xtype = "bi.single"; static xtype = "bi.single";
_defaultConfig() { _defaultConfig() {

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

@ -3,11 +3,11 @@
* @class BI.Text * @class BI.Text
* @extends BI.Single * @extends BI.Single
*/ */
import { shortcut } from "../../core/decorator"; import { shortcut } from "../../core";
import { Single } from "../index"; import { Single } from "./0.single";
@shortcut() @shortcut()
export default class Text extends Single { export class Text extends Single {
static xtype = "bi.text"; static xtype = "bi.text";
props = { props = {

4
src/base/single/a/a.js

@ -7,9 +7,9 @@
* @abstract * @abstract
*/ */
import { shortcut } from "../../../core"; import { shortcut } from "../../../core";
import Text from "../1.text"; import { Text } from "../1.text";
@shortcut() @shortcut()
export default class A extends Text { export class A extends Text {
static xtype = "bi.a"; static xtype = "bi.a";
_defaultConfig() { _defaultConfig() {

4
src/base/single/index.js

@ -0,0 +1,4 @@
export { Single } from "./0.single";
export { Text } from "./1.text";
export { A } from "./a/a";
export * from "./tip";

4
src/base/single/tip/0.tip.js

@ -7,8 +7,8 @@
* @abstract * @abstract
*/ */
import Single from "../0.single"; import { Single } from "../0.single";
export default class Tip extends Single { export class Tip extends Single {
_defaultConfig() { _defaultConfig() {
const conf = super._defaultConfig(arguments); const conf = super._defaultConfig(arguments);
return BI.extend(conf, { return BI.extend(conf, {

3
src/base/single/tip/index.js

@ -0,0 +1,3 @@
export { Tip } from "./0.tip";
export { Toast } from "./tip.toast";
export { Tooltip } from "./tip.tooltip";

4
src/base/single/tip/tip.toast.js

@ -7,9 +7,9 @@
*/ */
import { shortcut } from "../../../core"; import { shortcut } from "../../../core";
import Tip from "./0.tip"; import { Tip } from "./0.tip";
@shortcut() @shortcut()
export default class Toast extends Tip { export class Toast extends Tip {
_const= { _const= {
closableMinWidth: 146, closableMinWidth: 146,
minWidth: 100, minWidth: 100,

4
src/base/single/tip/tip.tooltip.js

@ -7,9 +7,9 @@
*/ */
import { shortcut } from "../../../core"; import { shortcut } from "../../../core";
import Tip from "./0.tip"; import { Tip } from "./0.tip";
@shortcut() @shortcut()
export default class Tooltip extends Tip { export class Tooltip extends Tip {
_const = { _const = {
hgap: 8, hgap: 8,
vgap: 4, vgap: 4,

121
src/core/2.base.js

@ -139,20 +139,6 @@ export function trans2Element(widgets) {
return map(widgets, (i, wi) => wi.element); return map(widgets, (i, wi) => wi.element);
} }
// Utility
BI._.extend(BI, {
assert,
warn,
UUID,
isWidget,
createWidgets,
createItems,
packageItems,
formatEL,
stripEL,
trans2Element,
});
// 集合相关方法 // 集合相关方法
BI._.each(["where", "findWhere", "invoke", "pluck", "shuffle", "sample", "toArray", "size"], function (name) { BI._.each(["where", "findWhere", "invoke", "pluck", "shuffle", "sample", "toArray", "size"], function (name) {
BI[name] = _apply(name); BI[name] = _apply(name);
@ -384,27 +370,6 @@ export function int2Abc(num) {
return str; return str;
} }
BI._.extend(BI, {
count,
inverse,
firstKey,
lastKey,
firstObject,
lastObject,
concat,
backEach,
backAny,
backEvery,
backFindKey,
backFind,
remove,
removeAt,
string2Array,
array2String,
abc2Int,
int2Abc,
});
// 数组相关的方法 // 数组相关的方法
BI._.each([ BI._.each([
"first", "initial", "last", "rest", "compact", "flatten", "without", "union", "intersection", "first", "initial", "last", "rest", "compact", "flatten", "without", "union", "intersection",
@ -493,13 +458,6 @@ export function uniq(array, isSorted, iteratee, context) {
return uniq.call(BI._, array, isSorted, iteratee, context); return uniq.call(BI._, array, isSorted, iteratee, context);
} }
BI._.extend(BI, {
makeArray,
makeObject,
makeArrayByArray,
uniq,
});
// 对象相关方法 // 对象相关方法
BI._.each([ BI._.each([
"keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn", "keys", "allKeys", "values", "pairs", "invert", "create", "functions", "extend", "extendOwn",
@ -652,24 +610,6 @@ export function isPromise(obj) {
return !!obj && (isObject(obj) || isFunction(obj)) && isFunction(obj.then); return !!obj && (isObject(obj) || isFunction(obj)) && isFunction(obj.then);
} }
BI._.extend(BI, {
inherit,
init,
has,
freeze,
isKey,
isCapitalEqual,
isWidthOrHeight,
isNotNull,
isNull,
isEmptyArray,
isNotEmptyArray,
isEmptyObject,
isNotEmptyObject,
isWindow,
isPromise,
});
export const deepClone = BI._.cloneDeep; export const deepClone = BI._.cloneDeep;
export const deepExtend = BI._.deepExtend; export const deepExtend = BI._.deepExtend;
@ -781,20 +721,6 @@ export function deepDiff(object, other) {
return result; return result;
} }
// deep方法
BI._.extend(BI, {
deepClone: BI._.cloneDeep,
deepExtend: BI._.merge,
isDeepMatch,
contains,
deepContains,
deepIndexOf,
deepRemove,
deepWithout,
deepUnique,
deepDiff,
});
// 通用方法 // 通用方法
BI._.each(["uniqueId", "result", "chain", "iteratee", "unescape", "before", "after", "chunk"], function (name) { BI._.each(["uniqueId", "result", "chain", "iteratee", "unescape", "before", "after", "chunk"], function (name) {
BI[name] = function () { BI[name] = function () {
@ -893,8 +819,6 @@ export const nextTick = (function () {
}; };
})(); })();
BI._.extend(BI, { nextTick });
// 数字相关方法 // 数字相关方法
BI._.each(["random"], function (name) { BI._.each(["random"], function (name) {
BI[name] = _apply(name); BI[name] = _apply(name);
@ -985,22 +909,6 @@ export function average(array, iteratee, context) {
return sumResult / array.length; return sumResult / array.length;
} }
BI._.extend(BI, {
parseInt,
parseSafeInt,
parseFloat,
isNaturalNumber,
isPositiveInteger,
isNegativeInteger,
isInteger,
isNumeric,
isFloat,
isOdd,
isEven,
sum,
average,
});
export function trim() { export function trim() {
return BI._.trim.apply(BI._, arguments); return BI._.trim.apply(BI._, arguments);
} }
@ -1126,25 +1034,6 @@ export function format(format) {
return format.replace(/\{(\d+)\}/g, (m, i) => args[i]); return format.replace(/\{(\d+)\}/g, (m, i) => args[i]);
} }
// 字符串相关方法
BI._.extend(BI, {
trim,
toUpperCase,
toLowerCase,
isEndWithBlank,
isLiteral,
stripQuotes,
camelize,
hyphenate,
isNotEmptyString,
isEmptyString,
encrypt,
decrypt,
escape,
leftPad,
format,
});
/** /**
* 是否是闰年 * 是否是闰年
* @param year * @param year
@ -1454,15 +1343,5 @@ export function getTime() {
return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000; return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;
} }
return dt.getTime(); return dt.getTime();
} }
// 日期相关方法
BI._.extend(BI, {
isLeapYear,
checkDateVoid,
checkDateLegal,
parseDateTime,
getDate,
getTime,
});

6
src/core/3.ob.js

@ -1,4 +1,4 @@
import { isFunction, isArray, isObject, isArguments, reduce, bind, extend } from "./2.base"; import { isFunction, isArray, isObject, isArguments, reduce, bind } from "./2.base";
function obExtend() { function obExtend() {
let target = arguments[0] || {}, length = arguments.length, i = 1, name, copy; let target = arguments[0] || {}, length = arguments.length, i = 1, name, copy;
@ -26,7 +26,7 @@ function obExtend() {
return target; return target;
} }
export default class OB { export class OB {
// props = {}; // props = {};
// init = null; // init = null;
@ -215,5 +215,3 @@ export default class OB {
this.purgeListeners(); this.purgeListeners();
} }
} }
extend(BI, { OB });

16
src/core/4.widget.js

@ -7,7 +7,7 @@
*/ */
import { isFunction, isArray, each, extend, isPlainObject, isNull, uniqueId, isWidget, isWidthOrHeight, isKey, remove, any, isNotNull } from "./2.base"; import { isFunction, isArray, each, extend, isPlainObject, isNull, uniqueId, isWidget, isWidthOrHeight, isKey, remove, any, isNotNull } from "./2.base";
import OB from "./3.ob"; import { OB } from "./3.ob";
import { Providers, _lazyCreateWidget } from "./5.inject"; import { Providers, _lazyCreateWidget } from "./5.inject";
const cancelAnimationFrame = const cancelAnimationFrame =
@ -35,7 +35,7 @@ function callLifeHook(self, life) {
}); });
} }
export default class Widget extends OB { export class Widget extends OB {
_defaultConfig () { _defaultConfig () {
return extend(super._defaultConfig(), { return extend(super._defaultConfig(), {
root: false, root: false,
@ -1079,15 +1079,3 @@ export function mount(widget, container, predicate, hydrate) {
} }
return widget._mount(true, false, false, predicate); return widget._mount(true, false, false, predicate);
} }
extend(BI, {
Widget,
useStore,
useContext,
watch,
onBeforeMount,
onMounted,
onBeforeUnmount,
onUnmounted,
mount,
});

26
src/core/5.inject.js

@ -1,6 +1,6 @@
import { isFunction, isNull, isNotNull, isArray, each, isWidget, extend, init, isEmpty, remove } from "./2.base"; import { isFunction, isNull, isNotNull, isArray, each, isWidget, extend, init, isEmpty, remove } from "./2.base";
import OB from "./3.ob"; import { OB } from "./3.ob";
import Widget from "./4.widget" import { Widget } from "./4.widget"
let moduleInjection = {}, moduleInjectionMap = { let moduleInjection = {}, moduleInjectionMap = {
components: {}, components: {},
@ -39,7 +39,6 @@ export function module(xtype, cls) {
return () => Modules.getModule(xtype); return () => Modules.getModule(xtype);
} }
BI.module = BI.module || module;
let constantInjection = {}; let constantInjection = {};
export function constant(xtype, cls) { export function constant(xtype, cls) {
@ -51,7 +50,6 @@ export function constant(xtype, cls) {
return () => Constants.getConstant(xtype); return () => Constants.getConstant(xtype);
} }
BI.constant = BI.constant || constant;
let modelInjection = {}; let modelInjection = {};
export function model(xtype, cls) { export function model(xtype, cls) {
@ -63,7 +61,6 @@ export function model(xtype, cls) {
return (config) => Models.getModel(xtype, config); return (config) => Models.getModel(xtype, config);
} }
BI.model = BI.model || model;
let storeInjection = {}; let storeInjection = {};
export function store(xtype, cls) { export function store(xtype, cls) {
@ -75,7 +72,6 @@ export function store(xtype, cls) {
return (config) => Stores.getStore(xtype, config); return (config) => Stores.getStore(xtype, config);
} }
BI.store = BI.store || store;
let serviceInjection = {}; let serviceInjection = {};
export function service(xtype, cls) { export function service(xtype, cls) {
@ -87,7 +83,6 @@ export function service(xtype, cls) {
return (config) => Services.getService(xtype, config); return (config) => Services.getService(xtype, config);
} }
BI.service = BI.service || service;
let providerInjection = {}; let providerInjection = {};
export function provider(xtype, cls) { export function provider(xtype, cls) {
@ -99,7 +94,6 @@ export function provider(xtype, cls) {
return (config) => Providers.getProvider(xtype, config); return (config) => Providers.getProvider(xtype, config);
} }
BI.provider = BI.provider || provider;
let configFunctions = OB.configFunctions = {}; let configFunctions = OB.configFunctions = {};
const runConfigFunction = function (type, configFn) { const runConfigFunction = function (type, configFn) {
@ -200,12 +194,10 @@ export function config(type, configFn, opt) {
return runConfigFunction(type, configFn); return runConfigFunction(type, configFn);
} }
} }
BI.config = BI.config || config;
export function getReference(type, fn) { export function getReference(type, fn) {
return BI.Plugin.registerObject(type, fn); return BI.Plugin.registerObject(type, fn);
} }
BI.getReference = BI.getReference || getReference;
let actions = {}; let actions = {};
let globalAction = []; let globalAction = [];
@ -227,7 +219,6 @@ export function action(type, actionFn) {
} }
}; };
} }
BI.action = BI.action || action;
let points = {}; let points = {};
export function point(type, action, pointFn, after) { export function point(type, action, pointFn, after) {
@ -242,7 +233,6 @@ export function point(type, action, pointFn, after) {
} }
points[type][action][after ? "after" : "before"].push(pointFn); points[type][action][after ? "after" : "before"].push(pointFn);
} }
BI.point = BI.point || point;
export const Modules = { export const Modules = {
getModule: function (type) { getModule: function (type) {
@ -255,7 +245,6 @@ export const Modules = {
return moduleInjection; return moduleInjection;
} }
} }
BI.Modules = BI.Modules || Modules;
export const Constants = { export const Constants = {
getConstant: function (type) { getConstant: function (type) {
@ -266,7 +255,6 @@ export const Constants = {
return isFunction(constantInjection[type]) ? constantInjection[type]() : constantInjection[type]; return isFunction(constantInjection[type]) ? constantInjection[type]() : constantInjection[type];
} }
} }
BI.Constants = BI.Constants || Constants;
const callPoint = function (inst, types) { const callPoint = function (inst, types) {
types = isArray(types) ? types : [types]; types = isArray(types) ? types : [types];
@ -319,7 +307,6 @@ export const Models = {
return inst; return inst;
} }
} }
BI.Models = BI.Models || Models;
let stores = {}; let stores = {};
export const Stores = { export const Stores = {
@ -338,7 +325,6 @@ export const Stores = {
return inst; return inst;
} }
} }
BI.Stores = BI.Stores || Stores;
let services = {}; let services = {};
export const Services = { export const Services = {
@ -354,7 +340,6 @@ export const Services = {
return services[type]; return services[type];
} }
} }
BI.Services = BI.Services || Services;
let providers = {}, let providers = {},
providerInstance = {}; providerInstance = {};
@ -373,7 +358,6 @@ export const Providers = {
return providerInstance[type]; return providerInstance[type];
} }
} }
BI.Providers = BI.Providers || Providers;
export const Actions = { export const Actions = {
runAction: function (type, event, config) { runAction: function (type, event, config) {
@ -396,7 +380,6 @@ export const Actions = {
}); });
} }
} }
BI.Actions = BI.Actions || Actions;
let kv = {}; let kv = {};
export function shortcut(xtype, cls) { export function shortcut(xtype, cls) {
@ -408,7 +391,6 @@ export function shortcut(xtype, cls) {
} }
kv[xtype] = cls; kv[xtype] = cls;
} }
BI.shortcut = BI.component = BI.shortcut || shortcut;
// 根据配置属性生成widget // 根据配置属性生成widget
const createRealWidget = function (config, context, lazy) { const createRealWidget = function (config, context, lazy) {
@ -496,18 +478,15 @@ export function createWidget(item, options, context, lazy) {
} }
throw new Error("组件:无法根据item创建组件", item); throw new Error("组件:无法根据item创建组件", item);
} }
BI.createWidget = BI.createWidget || createWidget;
export function _lazyCreateWidget (item, options, context) { export function _lazyCreateWidget (item, options, context) {
return createWidget(item, options, context, true); return createWidget(item, options, context, true);
} }
BI._lazyCreateWidget = BI._lazyCreateWidget || _lazyCreateWidget;
export function createElement() { export function createElement() {
const widget = createWidget.apply(this, arguments); const widget = createWidget.apply(this, arguments);
return widget.element; return widget.element;
} }
BI.createElement = BI.createElement || createElement;
export function getResource(type, config) { export function getResource(type, config) {
if (isNotNull(constantInjection[type])) { if (isNotNull(constantInjection[type])) {
@ -527,4 +506,3 @@ export function getResource(type, config) {
} }
throw new Error("未知类型: [" + type + "] 未定义"); throw new Error("未知类型: [" + type + "] 未定义");
} }
BI.getResource = BI.getResource || getResource;

4
src/core/action/action.js

@ -5,8 +5,8 @@
* @extends BI.OB * @extends BI.OB
* @abstract * @abstract
*/ */
import OB from "../3.ob"; import { OB } from "../3.ob";
export default class Action extends OB { export class Action extends OB {
props = { props = {
src: null, src: null,
tar: null tar: null

4
src/core/action/action.show.js

@ -4,8 +4,8 @@
* @class BI.ShowAction * @class BI.ShowAction
* @extends BI.Action * @extends BI.Action
*/ */
import Action from "./action"; import { Action } from "./action";
export default class ShowAction extends Action { export class ShowAction extends Action {
actionPerformed(src, tar, callback) { actionPerformed(src, tar, callback) {
tar = tar || this.options.tar; tar = tar || this.options.tar;
tar.setVisible(true); tar.setVisible(true);

2
src/core/action/index.js

@ -0,0 +1,2 @@
export { Action } from "./action";
export { ShowAction } from "./action.show";

4
src/core/behavior/0.behavior.js

@ -20,8 +20,8 @@ BI.BehaviorFactory = {
* @extends BI.OB * @extends BI.OB
*/ */
import OB from "../3.ob"; import { OB } from "../3.ob";
export default class Behavior extends OB { export class Behavior extends OB {
_defaultConfig() { _defaultConfig() {
return BI.extend(super._defaultConfig(arguments), { return BI.extend(super._defaultConfig(arguments), {
rule: () => true rule: () => true

4
src/core/behavior/behavior.highlight.js

@ -4,8 +4,8 @@
* @class BI.HighlightBehavior * @class BI.HighlightBehavior
* @extends BI.Behavior * @extends BI.Behavior
*/ */
import Behavior from "./0.behavior"; import { Behavior } from "./0.behavior";
export default class HighlightBehavior extends Behavior { export class HighlightBehavior extends Behavior {
doBehavior(items) { doBehavior(items) {
const args = Array.prototype.slice.call(arguments, 1), const args = Array.prototype.slice.call(arguments, 1),
o = this.options; o = this.options;

4
src/core/behavior/behavior.redmark.js

@ -4,8 +4,8 @@
* @class BI.RedMarkBehavior * @class BI.RedMarkBehavior
* @extends BI.Behavior * @extends BI.Behavior
*/ */
import Behavior from "./0.behavior"; import { Behavior } from "./0.behavior";
export default class RedMarkBehavior extends Behavior { export class RedMarkBehavior extends Behavior {
doBehavior(items) { doBehavior(items) {
const args = Array.prototype.slice.call(arguments, 1), const args = Array.prototype.slice.call(arguments, 1),
o = this.options; o = this.options;

3
src/core/behavior/index.js

@ -0,0 +1,3 @@
export { Behavior } from "./0.behavior";
export { HighlightBehavior } from "./behavior.highlight";
export { RedMarkBehavior } from "./behavior.redmark";

4
src/core/controller/0.controller.js

@ -6,7 +6,7 @@
* @extends BI.OB * @extends BI.OB
* @abstract * @abstract
*/ */
import OB from "../3.ob"; import { OB } from "../3.ob";
export default class Controller extends OB { export class Controller extends OB {
static EVENT_CHANGE = "__EVENT_CHANGE__"; static EVENT_CHANGE = "__EVENT_CHANGE__";
} }

4
src/core/controller/controller.broadcast.js

@ -4,8 +4,8 @@
* Created by GUY on 2015/12/23. * Created by GUY on 2015/12/23.
* @class * @class
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class BroadcastController extends Controller { export class BroadcastController extends Controller {
init() { init() {
this._broadcasts = {}; this._broadcasts = {};
} }

4
src/core/controller/controller.bubbles.js

@ -5,8 +5,8 @@
* Created by GUY on 2015/8/21. * Created by GUY on 2015/8/21.
* @class * @class
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class BubblesController extends Controller { export class BubblesController extends Controller {
init() { init() {
this.storeBubbles = {}; this.storeBubbles = {};
this.storePoppers = {}; this.storePoppers = {};

4
src/core/controller/controller.drawer.js

@ -4,8 +4,8 @@
* @class BI.popoverController * @class BI.popoverController
* @extends BI.Controller * @extends BI.Controller
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class DrawerController extends Controller { export class DrawerController extends Controller {
constructor() { constructor() {
super(); super();
this._constructor(); this._constructor();

4
src/core/controller/controller.layer.js

@ -4,8 +4,8 @@
* Created by GUY on 2015/6/24. * Created by GUY on 2015/6/24.
* @class * @class
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class LayerController extends Controller { export class LayerController extends Controller {
constructor() { constructor() {
super(); super();
this._constructor(); this._constructor();

4
src/core/controller/controller.masker.js

@ -4,8 +4,8 @@
* Created by GUY on 2015/6/24. * Created by GUY on 2015/6/24.
* @class * @class
*/ */
import LayerController from "./controller.layer"; import { LayerController } from "./controller.layer";
export default class MaskersController extends LayerController { export class MaskersController extends LayerController {
init() { init() {
super.init(arguments); super.init(arguments);
this.zindex = BI.zIndex_masker; this.zindex = BI.zIndex_masker;

4
src/core/controller/controller.popover.js

@ -4,8 +4,8 @@
* @class BI.popoverController * @class BI.popoverController
* @extends BI.Controller * @extends BI.Controller
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class PopoverController extends Controller { export class PopoverController extends Controller {
constructor() { constructor() {
super(); super();
this._constructor(); this._constructor();

4
src/core/controller/controller.resizer.js

@ -4,8 +4,8 @@
* Created by GUY on 2015/6/24. * Created by GUY on 2015/6/24.
* @class * @class
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class ResizeController extends Controller { export class ResizeController extends Controller {
init() { init() {
this.resizerManger = {}; this.resizerManger = {};

4
src/core/controller/controller.tooltips.js

@ -6,8 +6,8 @@
* @class BI.TooltipsController * @class BI.TooltipsController
* @extends BI.Controller * @extends BI.Controller
*/ */
import Controller from "./0.controller"; import { Controller } from "./0.controller";
export default class TooltipsController extends Controller { export class TooltipsController extends Controller {
init() { init() {
this.tooltipsManager = {}; this.tooltipsManager = {};
this.showingTips = {};// 存储正在显示的tooltip this.showingTips = {};// 存储正在显示的tooltip

9
src/core/controller/index.js

@ -0,0 +1,9 @@
export { Controller } from "./0.controller";
export { BroadcastController } from "./controller.broadcast";
export { BubblesController } from "./controller.bubbles";
export { DrawerController } from "./controller.drawer";
export { LayerController } from "./controller.layer";
export { MaskersController } from "./controller.masker";
export { PopoverController } from "./controller.popover";
export { ResizeController } from "./controller.resizer";
export { TooltipsController } from "./controller.tooltips";

89
src/core/index.js

@ -1,68 +1,39 @@
import {shortcut} from "./decorator";
import OB from "./3.ob";
import Widget from "./4.widget";
import Action from "./action/action";
import ShowAction from "./action/action.show";
import Behavior from "./behavior/0.behavior";
import HighlightBehavior from "./behavior/behavior.highlight";
import RedMarkBehavior from "./behavior/behavior.redmark";
import Controller from "./controller/0.controller";
import BroadcastController from "./controller/controller.broadcast";
import BubblesController from "./controller/controller.bubbles";
import DrawerController from "./controller/controller.drawer";
import LayerController from "./controller/controller.layer";
import MaskersController from "./controller/controller.masker";
import PopoverController from "./controller/controller.popover";
import ResizeController from "./controller/controller.resizer";
import TooltipsController from "./controller/controller.tooltips";
import StyleLoaderManager from "./loader/loader.style";
import "./h";
import ShowListener from "./listener/listener.show";
BI.extend(BI, { import * as base from "./2.base";
OB, import * as ob from "./3.ob";
Widget, import * as widget from "./4.widget";
Action, import * as inject from "./5.inject";
ShowAction, import * as action from "./action";
Behavior, import * as behavior from "./behavior";
HighlightBehavior, import * as controllers from "./controller";
RedMarkBehavior, import { StyleLoaderManager } from "./loader/loader.style";
Controller, import "./h";
BroadcastController, import { ShowListener } from "./listener/listener.show";
BubblesController, import { shortcut } from "./decorator";
DrawerController,
LayerController,
MaskersController,
PopoverController,
ResizeController,
TooltipsController,
StyleLoaderManager,
ShowListener,
});
export * from "./2.base"; export * from "./2.base";
export * from "./3.ob";
export * from "./4.widget"; export * from "./4.widget";
export * from "./5.inject"; export * from "./5.inject";
export * from "./func"; export * from "./action";
export * from "./behavior";
export * from "./controller";
export { export {
StyleLoaderManager,
ShowListener,
shortcut, shortcut,
OB, }
Widget,
Action, Object.assign(BI, {
ShowAction, ...base,
Behavior, ...ob,
HighlightBehavior, ...widget,
RedMarkBehavior, ...inject,
Controller, ...behavior,
BroadcastController, component: inject.shortcut,
BubblesController, ...action,
DrawerController, ...controllers,
LayerController,
MaskersController,
PopoverController,
ResizeController,
TooltipsController,
StyleLoaderManager, StyleLoaderManager,
ShowListener ShowListener,
}; });

6
src/core/listener/listener.show.js

@ -5,12 +5,12 @@
* @class BI.ShowListener * @class BI.ShowListener
* @extends BI.OB * @extends BI.OB
*/ */
import OB from "../3.ob"; import { OB } from "../3.ob";
import { isArray, isNull, nextTick, } from "../2.base"; import { isArray, isNull, nextTick, } from "../2.base";
import { createWidget } from "../5.inject"; import { createWidget } from "../5.inject";
import Controller from "../controller/0.controller"; import { Controller } from "../controller/0.controller";
export default class ShowListener extends OB { export class ShowListener extends OB {
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";
props() { props() {

4
src/core/loader/loader.style.js

@ -4,9 +4,9 @@
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class * @class
*/ */
import OB from "../3.ob"; import { OB } from "../3.ob";
export default class StyleLoaderManager extends OB { export class StyleLoaderManager extends OB {
_defaultConfig() { _defaultConfig() {
return BI.extend(super._defaultConfig(arguments), {}); return BI.extend(super._defaultConfig(arguments), {});
} }

Loading…
Cancel
Save