Browse Source

auto upgrade version to 2.0.20210830214116

es6
data 3 years ago
parent
commit
3e1a86de31
  1. 2
      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. 315
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 315
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 315
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 315
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 2
      dist/fineui.proxy.css
  26. 315
      dist/fineui.proxy.js
  27. 2
      dist/fineui.proxy.js.map
  28. 2
      dist/fineui.proxy.min.css
  29. 4
      dist/fineui.proxy.min.js
  30. 2
      dist/fineui.proxy.min.js.map
  31. 315
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/fineui_without_normalize.min.css
  34. 2
      dist/font.css
  35. 2
      dist/resource.css
  36. 205
      dist/utils.js
  37. 2
      dist/utils.js.map
  38. 4
      dist/utils.min.js
  39. 2
      dist/utils.min.js.map
  40. 2
      package.json

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

315
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -4689,85 +4689,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -4830,6 +4908,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -4877,6 +4956,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -4928,6 +5008,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -9301,6 +9382,7 @@ module.exports = !__webpack_require__(927)(function () {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -9310,6 +9392,7 @@ module.exports = !__webpack_require__(927)(function () {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -9422,27 +9505,14 @@ module.exports = !__webpack_require__(927)(function () {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -9459,10 +9529,31 @@ module.exports = !__webpack_require__(927)(function () {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -10052,9 +10143,6 @@ module.exports = !__webpack_require__(927)(function () {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -10062,6 +10150,21 @@ module.exports = !__webpack_require__(927)(function () {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -10070,24 +10173,7 @@ module.exports = !__webpack_require__(927)(function () {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -10129,6 +10215,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -10173,6 +10260,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -10184,6 +10290,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

315
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -4689,85 +4689,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -4830,6 +4908,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -4877,6 +4956,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -4928,6 +5008,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -9301,6 +9382,7 @@ module.exports = !__webpack_require__(927)(function () {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -9310,6 +9392,7 @@ module.exports = !__webpack_require__(927)(function () {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -9422,27 +9505,14 @@ module.exports = !__webpack_require__(927)(function () {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -9459,10 +9529,31 @@ module.exports = !__webpack_require__(927)(function () {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -10052,9 +10143,6 @@ module.exports = !__webpack_require__(927)(function () {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -10062,6 +10150,21 @@ module.exports = !__webpack_require__(927)(function () {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -10070,24 +10173,7 @@ module.exports = !__webpack_require__(927)(function () {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -10129,6 +10215,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -10173,6 +10260,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -10184,6 +10290,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

315
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -4689,85 +4689,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -4830,6 +4908,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -4877,6 +4956,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -4928,6 +5008,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -9301,6 +9382,7 @@ module.exports = !__webpack_require__(927)(function () {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -9310,6 +9392,7 @@ module.exports = !__webpack_require__(927)(function () {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -9422,27 +9505,14 @@ module.exports = !__webpack_require__(927)(function () {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -9459,10 +9529,31 @@ module.exports = !__webpack_require__(927)(function () {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -10052,9 +10143,6 @@ module.exports = !__webpack_require__(927)(function () {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -10062,6 +10150,21 @@ module.exports = !__webpack_require__(927)(function () {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -10070,24 +10173,7 @@ module.exports = !__webpack_require__(927)(function () {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -10129,6 +10215,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -10173,6 +10260,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -10184,6 +10290,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

315
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -4689,85 +4689,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -4830,6 +4908,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -4877,6 +4956,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -4928,6 +5008,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -9301,6 +9382,7 @@ module.exports = !__webpack_require__(927)(function () {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -9310,6 +9392,7 @@ module.exports = !__webpack_require__(927)(function () {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -9422,27 +9505,14 @@ module.exports = !__webpack_require__(927)(function () {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -9459,10 +9529,31 @@ module.exports = !__webpack_require__(927)(function () {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -10052,9 +10143,6 @@ module.exports = !__webpack_require__(927)(function () {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -10062,6 +10150,21 @@ module.exports = !__webpack_require__(927)(function () {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -10070,24 +10173,7 @@ module.exports = !__webpack_require__(927)(function () {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -10129,6 +10215,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -10173,6 +10260,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -10184,6 +10290,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

315
dist/fineui.proxy.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -3006,85 +3006,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -3147,6 +3225,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -3194,6 +3273,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -3245,6 +3325,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -6762,6 +6843,7 @@ BI.Req = {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -6771,6 +6853,7 @@ BI.Req = {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -6883,27 +6966,14 @@ BI.Req = {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -6920,10 +6990,31 @@ BI.Req = {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -7513,9 +7604,6 @@ BI.Req = {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -7523,6 +7611,21 @@ BI.Req = {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -7531,24 +7634,7 @@ BI.Req = {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -7590,6 +7676,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -7634,6 +7721,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -7645,6 +7751,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

315
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -2916,85 +2916,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
return BI.Plugin.configWidget(type, configFn, opt);
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -3057,6 +3135,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -3104,6 +3183,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -3155,6 +3235,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
@ -6377,6 +6458,7 @@ BI.Req = {
return;
}
initCallbackCalled = true;
function render () {
// 加个保险
if (renderCallbackCalled === true) {
@ -6386,6 +6468,7 @@ BI.Req = {
renderCallbackCalled = true;
self._render();
}
if (self.options.beforeRender || self.beforeRender) {
self.__async = true;
(self.options.beforeRender || self.beforeRender).call(self, render);
@ -6498,27 +6581,14 @@ BI.Req = {
var self = this;
var isMounted = this._isMounted;
this.__async === true && isMounted && callLifeHook(this, "beforeMount");
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
} else {
if (!this._initVNode()) {
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
if (BI.isArray(els)) {
BI.each(els, function (i, el) {
if (el) {
BI._lazyCreateWidget(el, {
@ -6535,10 +6605,31 @@ BI.Req = {
}
},
_initVNode: function () {
if (this.options.vdom) {
var div = document.createElement("div");
var element = this.element;
element.append(div);
this.vnode = this._renderVNode();
BI.patchVNode(div, this.vnode);
// 去除这个临时的div
BI.DOM.hang([div]);
element.attr("style", self.vnode.elm.getAttribute("style"));
element.addClass(self.vnode.elm.getAttribute("class"));
element.empty();
BI.each(BI.jQuery(self.vnode.elm).children(), function (i, node) {
element.append(node);
});
return true;
}
return false;
},
_renderVNode: function () {
var self = this;
var render = BI.isFunction(this.options.render) ? this.options.render : this.render;
var els = render && render.call(this);
els = BI.Plugin.getRender(this.options.type, els);
if (BI.isPlainObject(els)) {
els = [els];
}
@ -7128,9 +7219,6 @@ BI.Req = {
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
var el, w;
item || (item = {});
if (BI.isWidget(options)) {
context = options;
@ -7138,6 +7226,21 @@ BI.Req = {
} else {
options || (options = {});
}
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
}
if (el) {
BI.runConfigFunction(el.type);
}
// 先把准备环境准备好
BI.init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
type: "bi.layout"
@ -7146,24 +7249,7 @@ BI.Req = {
if (BI.isWidget(item)) {
return item;
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
BI.Plugin.getObject(el.type, this);
}
}]);
}
return createWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
if (el) {
w = BI.Plugin.getWidget(el.type, el);
if (w.type === el.type) {
if (BI.Plugin.hasObject(el.type)) {
@ -7205,6 +7291,7 @@ BI.Plugin = BI.Plugin || {};
var _WidgetsPlugin = {};
var _ObjectPlugin = {};
var _ConfigPlugin = {};
var _ConfigRenderPlugin = {};
var _GlobalWidgetConfigFns = [];
var __GlobalObjectConfigFns = [];
BI.defaults(BI.Plugin, {
@ -7249,6 +7336,25 @@ BI.Plugin = BI.Plugin || {};
_ConfigPlugin[type].push(fn);
},
getRender: function (type, rendered) {
var res;
if (_ConfigRenderPlugin[type]) {
for (var i = _ConfigRenderPlugin[type].length - 1; i >= 0; i--) {
if (res = _ConfigRenderPlugin[type][i](rendered)) {
rendered = res;
}
}
}
return rendered;
},
configRender: function (type, fn) {
if (!_ConfigRenderPlugin[type]) {
_ConfigRenderPlugin[type] = [];
}
_ConfigRenderPlugin[type].push(fn);
},
// Deprecated
registerWidget: function (type, fn) {
if (!_WidgetsPlugin[type]) {
@ -7260,6 +7366,7 @@ BI.Plugin = BI.Plugin || {};
_WidgetsPlugin[type].push(fn);
},
// Deprecated
relieveWidget: function (type) {
delete _WidgetsPlugin[type];
},

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui_without_normalize.min.css 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/resource.css vendored

File diff suppressed because one or more lines are too long

205
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-8-30 19:40:31 */
/*! time: 2021-8-30 21:40:13 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -2310,85 +2310,163 @@ if (!_global.BI) {
};
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 初始化过或者系统配置需要立刻执行
if (BI.initialized || "bi.provider.system" === type) {
var runConfigFunction = BI.runConfigFunction = function (type) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = configFunctions[type];
delete configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return configFn(providers[type]);
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
};
BI.config = BI.config || function (type, configFn, opt) {
opt = opt || {};
// 系统配置直接执行
if ("bi.provider.system" === type) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
// 如果config被重新配置的话,需要删除掉之前的实例
if (providerInstance[type]) {
delete providerInstance[type];
}
return BI.Plugin.configWidget(type, configFn, opt);
return configFn(providers[type]);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[i];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
break;
}
if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
findVersion = true;
break;
}
}
}
if (findVersion === true) {
_global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue;
}
}
if (constantInjection[type]) {
constantInjection[type] = fn(constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
fn(providers[type]);
continue;
}
BI.Plugin.configWidget(type, fn);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({
fn: configFn,
opt: opt
});
// // 初始化过或者系统配置需要立刻执行
// if (BI.initialized || "bi.provider.system" === type) {
// if (constantInjection[type]) {
// return (constantInjection[type] = configFn(constantInjection[type]));
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// // 如果config被重新配置的话,需要删除掉之前的实例
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// return configFn(providers[type]);
// }
// return BI.Plugin.configWidget(type, configFn, opt);
// }
// if (!configFunctions[type]) {
// configFunctions[type] = [];
// BI.prepares.push(function () {
// var queue = configFunctions[type];
// var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
// var modules = moduleInjectionMap.components[type]
// || moduleInjectionMap.constants[type]
// || moduleInjectionMap.services[type]
// || moduleInjectionMap.stores[type]
// || moduleInjectionMap.models[type]
// || moduleInjectionMap.providers[type];
// for (var i = 0; i < queue.length; i++) {
// var conf = queue[i];
// var version = conf.opt.version;
// var fn = conf.fn;
// if (modules && version) {
// var findVersion = false;
// for (var j = 0; j < modules.length; j++) {
// var module = modules[i];
// if (module && dependencies[module.moduleId] && module.version === version) {
// var minVersion = dependencies[module.moduleId].minVersion,
// maxVersion = dependencies[module.moduleId].maxVersion;
// if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
// findVersion = true;
// break;
// }
// if (maxVersion && (moduleInjection[module.moduleId].version || version) > maxVersion) {
// findVersion = true;
// break;
// }
// }
// }
// if (findVersion === true) {
// _global.console && console.error("moduleId: [" + module.moduleId + "] 接口: [" + type + "] 接口版本: [" + version + "] 已过期,版本要求为:", dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
// continue;
// }
// }
// if (constantInjection[type]) {
// constantInjection[type] = fn(constantInjection[type]);
// continue;
// }
// if (providerInjection[type]) {
// if (!providers[type]) {
// providers[type] = new providerInjection[type]();
// }
// if (providerInstance[type]) {
// delete providerInstance[type];
// }
// fn(providers[type]);
// continue;
// }
// BI.Plugin.configWidget(type, fn);
// }
// configFunctions[type] = null;
// });
// }
// configFunctions[type].push({
// fn: configFn,
// opt: opt
// });
};
BI.getReference = BI.getReference || function (type, fn) {
@ -2451,6 +2529,7 @@ if (!_global.BI) {
if (BI.isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return constantInjection[type];
}
};
@ -2498,6 +2577,7 @@ if (!_global.BI) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
}
runConfigFunction(type);
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
inst.mixins && callPoint(inst, inst.mixins);
@ -2549,6 +2629,7 @@ if (!_global.BI) {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
runConfigFunction(type);
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}

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.20210830194150",
"version": "2.0.20210830214116",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

Loading…
Cancel
Save