|
|
@ -16,7 +16,8 @@ if (typeof window !== "undefined") { |
|
|
|
} |
|
|
|
} |
|
|
|
if (_global.BI == null) { |
|
|
|
if (_global.BI == null) { |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
if(_global.BI.prepares == null) { |
|
|
|
_global.BI.prepares = []; |
|
|
|
_global.BI.prepares = []; |
|
|
|
}// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
|
|
|
}// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
|
|
|
// Reference: http://es5.github.io/#x15.4.4.14
|
|
|
|
// Reference: http://es5.github.io/#x15.4.4.14
|
|
|
@ -257,7 +258,8 @@ if (typeof window !== "undefined") { |
|
|
|
} |
|
|
|
} |
|
|
|
if (_global.BI == null) { |
|
|
|
if (_global.BI == null) { |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
if(_global.BI.prepares == null) { |
|
|
|
_global.BI.prepares = []; |
|
|
|
_global.BI.prepares = []; |
|
|
|
}/** |
|
|
|
}/** |
|
|
|
* @license |
|
|
|
* @license |
|
|
@ -12042,29 +12044,28 @@ _.extend(BI.OB.prototype, { |
|
|
|
this._parent = parent; |
|
|
|
this._parent = parent; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_mount: function () { |
|
|
|
/** |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param force 是否强制挂载子节点 |
|
|
|
|
|
|
|
* @param deep 子节点是否也是按照当前force处理 |
|
|
|
|
|
|
|
* @param lifeHook 生命周期钩子触不触发,默认触发 |
|
|
|
|
|
|
|
* @returns {boolean} |
|
|
|
|
|
|
|
* @private |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
_mount: function (force, deep, lifeHook) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var isMounted = this._isMounted; |
|
|
|
if (!force && (this._isMounted || !this.isVisible() || this.__asking === true || !(this._isRoot === true || (this._parent && this._parent._isMounted === true)))) { |
|
|
|
if (isMounted || !this.isVisible() || this.__asking === true) { |
|
|
|
return false; |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (this._isRoot === true) { |
|
|
|
|
|
|
|
isMounted = true; |
|
|
|
|
|
|
|
} else if (this._parent && this._parent._isMounted === true) { |
|
|
|
|
|
|
|
isMounted = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!isMounted) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.beforeMount && this.beforeMount(); |
|
|
|
lifeHook !== false && this.beforeMount && this.beforeMount(); |
|
|
|
this._isMounted = true; |
|
|
|
this._isMounted = true; |
|
|
|
this._mountChildren && this._mountChildren(); |
|
|
|
this._mountChildren && this._mountChildren(); |
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
!self.isEnabled() && widget._setEnable(false); |
|
|
|
!self.isEnabled() && widget._setEnable(false); |
|
|
|
!self.isValid() && widget._setValid(false); |
|
|
|
!self.isValid() && widget._setValid(false); |
|
|
|
widget._mount && widget._mount(); |
|
|
|
widget._mount && widget._mount(deep ? force : false, deep, lifeHook); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.mounted && this.mounted(); |
|
|
|
lifeHook !== false && this.mounted && this.mounted(); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -12347,7 +12348,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
}; |
|
|
|
}; |
|
|
|
BI.Widget.registerRenderEngine({ |
|
|
|
BI.Widget.registerRenderEngine({ |
|
|
|
createElement: function (widget) { |
|
|
|
createElement: function (widget) { |
|
|
|
if(BI.isWidget(widget)) { |
|
|
|
if (BI.isWidget(widget)) { |
|
|
|
var o = widget.options; |
|
|
|
var o = widget.options; |
|
|
|
if (o.element) { |
|
|
|
if (o.element) { |
|
|
|
return $(o.element); |
|
|
|
return $(o.element); |
|
|
@ -12355,8 +12356,18 @@ _.extend(BI.OB.prototype, { |
|
|
|
return $(document.createElement(o.tagName)); |
|
|
|
return $(document.createElement(o.tagName)); |
|
|
|
} |
|
|
|
} |
|
|
|
return $(widget); |
|
|
|
return $(widget); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
createFragment: function () { |
|
|
|
|
|
|
|
return document.createDocumentFragment(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.mount = function (widget, container) { |
|
|
|
|
|
|
|
if (container) { |
|
|
|
|
|
|
|
BI.Widget._renderEngine.createElement(container).append(widget.element); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return widget._mount(true, false, false); |
|
|
|
|
|
|
|
}; |
|
|
|
})();(function () { |
|
|
|
})();(function () { |
|
|
|
var kv = {}; |
|
|
|
var kv = {}; |
|
|
|
BI.shortcut = function (xtype, cls) { |
|
|
|
BI.shortcut = function (xtype, cls) { |
|
|
@ -12413,7 +12424,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
throw new Error("无法根据item创建组件"); |
|
|
|
throw new Error("无法根据item创建组件"); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
})();(function (window, undefined) { |
|
|
|
})();!(function () { |
|
|
|
function aspect (type) { |
|
|
|
function aspect (type) { |
|
|
|
return function (target, methodName, advice) { |
|
|
|
return function (target, methodName, advice) { |
|
|
|
var exist = target[methodName], |
|
|
|
var exist = target[methodName], |
|
|
@ -12475,7 +12486,7 @@ _.extend(BI.OB.prototype, { |
|
|
|
|
|
|
|
|
|
|
|
return BI.aspect; |
|
|
|
return BI.aspect; |
|
|
|
|
|
|
|
|
|
|
|
})(window); |
|
|
|
})(); |
|
|
|
!(function () { |
|
|
|
!(function () { |
|
|
|
|
|
|
|
|
|
|
|
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; |
|
|
|
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; |
|
|
@ -14941,7 +14952,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
_mountChildren: function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
var frag = BI.Widget._renderEngine.createFragment(); |
|
|
|
var hasChild = false; |
|
|
|
var hasChild = false; |
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
if (widget.element !== self.element) { |
|
|
|
if (widget.element !== self.element) { |
|
|
@ -15170,7 +15181,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
addItems: function (items) { |
|
|
|
addItems: function (items) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
var fragment = document.createDocumentFragment(); |
|
|
|
var fragment = BI.Widget._renderEngine.createFragment(); |
|
|
|
var added = []; |
|
|
|
var added = []; |
|
|
|
BI.each(items, function (i, item) { |
|
|
|
BI.each(items, function (i, item) { |
|
|
|
var w = self._addElement(o.items.length, item); |
|
|
|
var w = self._addElement(o.items.length, item); |
|
|
@ -15188,7 +15199,7 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
prependItems: function (items) { |
|
|
|
prependItems: function (items) { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
items = items || []; |
|
|
|
items = items || []; |
|
|
|
var fragment = document.createDocumentFragment(); |
|
|
|
var fragment = BI.Widget._renderEngine.createFragment(); |
|
|
|
var added = []; |
|
|
|
var added = []; |
|
|
|
for (var i = items.length - 1; i >= 0; i--) { |
|
|
|
for (var i = items.length - 1; i >= 0; i--) { |
|
|
|
this._addItemAt(0, items[i]); |
|
|
|
this._addItemAt(0, items[i]); |
|
|
@ -16182,7 +16193,12 @@ BI.ShowAction = BI.inherit(BI.Action, { |
|
|
|
BI.specialCharsMap = BI.specialCharsMap || {}; |
|
|
|
BI.specialCharsMap = BI.specialCharsMap || {}; |
|
|
|
url = url || ""; |
|
|
|
url = url || ""; |
|
|
|
url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { |
|
|
|
url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { |
|
|
|
|
|
|
|
switch (str) { |
|
|
|
|
|
|
|
case "\\": |
|
|
|
|
|
|
|
return BI.specialCharsMap["\\\\"] || str; |
|
|
|
|
|
|
|
default: |
|
|
|
return BI.specialCharsMap[str] || str; |
|
|
|
return BI.specialCharsMap[str] || str; |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
return _global.encodeURIComponent(url); |
|
|
|
return _global.encodeURIComponent(url); |
|
|
|
}; |
|
|
|
}; |
|
|
@ -17207,7 +17223,7 @@ BI.ResizeController = BI.inherit(BI.Controller, { |
|
|
|
self._resize(ev); |
|
|
|
self._resize(ev); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}, 30); |
|
|
|
}, 30); |
|
|
|
BI.Widget._renderEngine.createElement(window).resize(fn); |
|
|
|
BI.Widget._renderEngine.createElement(_global).resize(fn); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_resize: function (ev) { |
|
|
|
_resize: function (ev) { |
|
|
@ -18732,7 +18748,7 @@ BI.extend(BI.DOM, { |
|
|
|
if (BI.isEmpty(doms)) { |
|
|
|
if (BI.isEmpty(doms)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
var frag = BI.Widget._renderEngine.createFragment(); |
|
|
|
BI.each(doms, function (i, dom) { |
|
|
|
BI.each(doms, function (i, dom) { |
|
|
|
dom instanceof BI.Widget && (dom = dom.element); |
|
|
|
dom instanceof BI.Widget && (dom = dom.element); |
|
|
|
dom instanceof $ && dom[0] && frag.appendChild(dom[0]); |
|
|
|
dom instanceof $ && dom[0] && frag.appendChild(dom[0]); |
|
|
@ -35179,6 +35195,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
return watchers; |
|
|
|
return watchers; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var mixinInjection = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getMixins(type) { |
|
|
|
|
|
|
|
return mixinInjection[type]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function mixin(xtype, cls) { |
|
|
|
|
|
|
|
mixinInjection[xtype] = _.cloneDeep(cls); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var computedWatcherOptions = { lazy: true }; |
|
|
|
var computedWatcherOptions = { lazy: true }; |
|
|
|
|
|
|
|
|
|
|
|
function initState(vm, state) { |
|
|
|
function initState(vm, state) { |
|
|
@ -35283,6 +35309,22 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initMixins(vm, mixins) { |
|
|
|
|
|
|
|
mixins = mixins || []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_.each(mixins.reverse(), function (mixinType) { |
|
|
|
|
|
|
|
var mixin$$1 = getMixins(mixinType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var key in mixin$$1) { |
|
|
|
|
|
|
|
if (typeof mixin$$1[key] !== "function") continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_.has(vm, key)) continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vm[key] = _.bind(mixin$$1[key], vm.$$model ? vm.model : vm); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function defineProps(vm, keys) { |
|
|
|
function defineProps(vm, keys) { |
|
|
|
var props = {}; |
|
|
|
var props = {}; |
|
|
|
// if (typeof Proxy === 'function') {
|
|
|
|
// if (typeof Proxy === 'function') {
|
|
|
@ -35410,14 +35452,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
var watch$$1 = this.watch; |
|
|
|
var watch$$1 = this.watch; |
|
|
|
var actions = this.actions; |
|
|
|
var actions = this.actions; |
|
|
|
var keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context || []); |
|
|
|
var keys = _.keys(this.$$model).concat(_.keys(state)).concat(_.keys(computed)).concat(context || []); |
|
|
|
|
|
|
|
var mixins = this.mixins; |
|
|
|
defineProps(this, keys); |
|
|
|
defineProps(this, keys); |
|
|
|
childContext && defineContext(this, childContext); |
|
|
|
childContext && defineContext(this, childContext); |
|
|
|
this.$$model && (this.model.__ob__ = this.$$model.__ob__); |
|
|
|
this.$$model && (this.model.__ob__ = this.$$model.__ob__); |
|
|
|
this._init(); |
|
|
|
this._init(); |
|
|
|
initState(this, state); |
|
|
|
initState(this, state); |
|
|
|
|
|
|
|
initMixins(this, mixins); |
|
|
|
|
|
|
|
initMethods(this, actions); |
|
|
|
initComputed(this, computed); |
|
|
|
initComputed(this, computed); |
|
|
|
initWatch(this, watch$$1); |
|
|
|
initWatch(this, watch$$1); |
|
|
|
initMethods(this, actions); |
|
|
|
|
|
|
|
this.created && this.created(); |
|
|
|
this.created && this.created(); |
|
|
|
if (this.$$model) { |
|
|
|
if (this.$$model) { |
|
|
|
return this.model; |
|
|
|
return this.model; |
|
|
@ -35474,6 +35518,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
exports.define = define; |
|
|
|
exports.define = define; |
|
|
|
exports.version = version; |
|
|
|
exports.version = version; |
|
|
|
exports.$$skipArray = $$skipArray; |
|
|
|
exports.$$skipArray = $$skipArray; |
|
|
|
|
|
|
|
exports.mixin = mixin; |
|
|
|
exports.Model = Model; |
|
|
|
exports.Model = Model; |
|
|
|
exports.observerState = observerState; |
|
|
|
exports.observerState = observerState; |
|
|
|
exports.Observer = Observer; |
|
|
|
exports.Observer = Observer; |
|
|
@ -37127,10 +37172,10 @@ BI.TreeView = BI.inherit(BI.Pane, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
items: [this.tip] |
|
|
|
items: [this.tip] |
|
|
|
}); |
|
|
|
}); |
|
|
|
if(BI.isNotNull(o.value)){ |
|
|
|
if(BI.isNotNull(o.value)) { |
|
|
|
this.setSelectedValue(o.value); |
|
|
|
this.setSelectedValue(o.value); |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isIE9Below()) { |
|
|
|
if (BI.isIE9Below && BI.isIE9Below()) { |
|
|
|
this.element.addClass("hack"); |
|
|
|
this.element.addClass("hack"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -41164,7 +41209,7 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
BI.Resizers._resize(); |
|
|
|
BI.Resizers._resize(); |
|
|
|
}, function () { |
|
|
|
}, function () { |
|
|
|
self.tracker.releaseMouseMoves(); |
|
|
|
self.tracker.releaseMouseMoves(); |
|
|
|
}, window); |
|
|
|
}, _global); |
|
|
|
var items = { |
|
|
|
var items = { |
|
|
|
north: { |
|
|
|
north: { |
|
|
|
el: { |
|
|
|
el: { |
|
|
@ -41881,7 +41926,7 @@ BI.VirtualList = BI.inherit(BI.Widget, { |
|
|
|
this.cache[i].destroyed = true; |
|
|
|
this.cache[i].destroyed = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
var firstFragment = document.createDocumentFragment(), lastFragment = document.createDocumentFragment(); |
|
|
|
var firstFragment = BI.Widget._renderEngine.createFragment(), lastFragment = BI.Widget._renderEngine.createFragment(); |
|
|
|
var currentFragment = firstFragment; |
|
|
|
var currentFragment = firstFragment; |
|
|
|
for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { |
|
|
|
for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) { |
|
|
|
var index = this.cache[i].index; |
|
|
|
var index = this.cache[i].index; |
|
|
@ -44284,7 +44329,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
left: 0, |
|
|
|
left: 0, |
|
|
|
right: 3, |
|
|
|
right: 3, |
|
|
|
top: 0, |
|
|
|
top: 6, |
|
|
|
bottom: 5 |
|
|
|
bottom: 5 |
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}); |
|
|
@ -44427,7 +44472,7 @@ BI.Icon = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
BI.Icon.superclass._init.apply(this, arguments); |
|
|
|
BI.Icon.superclass._init.apply(this, arguments); |
|
|
|
if (BI.isIE9Below()) { |
|
|
|
if (BI.isIE9Below && BI.isIE9Below()) { |
|
|
|
this.element.addClass("hack"); |
|
|
|
this.element.addClass("hack"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -51508,7 +51553,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { |
|
|
|
BI.ColorChooserTrigger.superclass._init.apply(this, arguments); |
|
|
|
BI.ColorChooserTrigger.superclass._init.apply(this, arguments); |
|
|
|
this.colorContainer = BI.createWidget({ |
|
|
|
this.colorContainer = BI.createWidget({ |
|
|
|
type: "bi.layout", |
|
|
|
type: "bi.layout", |
|
|
|
cls: "color-chooser-trigger-content" + (BI.isIE9Below() ? " hack" : "") |
|
|
|
cls: "color-chooser-trigger-content" + (BI.isIE9Below && BI.isIE9Below() ? " hack" : "") |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var down = BI.createWidget({ |
|
|
|
var down = BI.createWidget({ |
|
|
@ -81731,7 +81776,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () { |
|
|
|
|
|
|
|
|
|
|
|
function createStore() { |
|
|
|
function createStore() { |
|
|
|
var needPop = false; |
|
|
|
var needPop = false; |
|
|
|
if (window.Fix && this._store) { |
|
|
|
if (_global.Fix && this._store) { |
|
|
|
var store = findStore(this.options.context || this.options.element); |
|
|
|
var store = findStore(this.options.context || this.options.element); |
|
|
|
if (store) { |
|
|
|
if (store) { |
|
|
|
pushTarget(store); |
|
|
|
pushTarget(store); |
|
|
@ -81763,7 +81808,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () { |
|
|
|
var _render = BI.Widget.prototype._render; |
|
|
|
var _render = BI.Widget.prototype._render; |
|
|
|
BI.Widget.prototype._render = function () { |
|
|
|
BI.Widget.prototype._render = function () { |
|
|
|
var needPop = false; |
|
|
|
var needPop = false; |
|
|
|
if (window.Fix && this._store) { |
|
|
|
if (_global.Fix && this._store) { |
|
|
|
needPop = true; |
|
|
|
needPop = true; |
|
|
|
pushTarget(this.store); |
|
|
|
pushTarget(this.store); |
|
|
|
initWatch(this, this.watch); |
|
|
|
initWatch(this, this.watch); |
|
|
|