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