Browse Source

Merge remote-tracking branch 'origin/master'

es6
guy 4 years ago
parent
commit
376f5c909c
  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. 188
      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. 188
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 188
      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. 188
      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. 188
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 155
      dist/fix/fix.js
  28. 2
      dist/font.css
  29. 2
      dist/resource.css
  30. 2
      dist/utils.js
  31. 2
      dist/utils.min.js
  32. 2
      package.json
  33. 8
      src/widget/dynamicdate/dynamicdate.combo.js
  34. 8
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  35. 2
      src/widget/multiselect/multiselect.combo.js
  36. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  37. 2
      src/widget/multiselect/multiselect.insert.combo.js
  38. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  39. 2
      src/widget/multitree/multi.tree.combo.js
  40. 2
      src/widget/multitree/multi.tree.insert.combo.js
  41. 2
      src/widget/multitree/multi.tree.list.combo.js
  42. 2
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

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

188
dist/2.0/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -44633,12 +44633,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -44678,7 +44672,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -45723,12 +45717,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -45768,7 +45756,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -51624,7 +51612,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52107,7 +52095,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52610,7 +52598,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,
@ -53113,7 +53101,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -57102,7 +57090,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,
@ -57462,7 +57450,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -57840,7 +57828,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -59785,7 +59773,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {
@ -96329,8 +96317,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -96339,18 +96327,18 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -96489,7 +96477,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -96505,7 +96493,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -96518,19 +96506,19 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -96548,7 +96536,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -96732,10 +96720,10 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -96825,8 +96813,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -96968,10 +96956,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -97153,7 +97143,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -97242,21 +97232,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -97268,7 +97249,11 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -97277,8 +97262,64 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -97666,6 +97707,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
exports.__esModule = true;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),

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

188
dist/core.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -44633,12 +44633,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -44678,7 +44672,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -45723,12 +45717,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -45768,7 +45756,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -51624,7 +51612,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52107,7 +52095,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52610,7 +52598,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,
@ -53113,7 +53101,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -57102,7 +57090,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,
@ -57462,7 +57450,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -57840,7 +57828,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -59785,7 +59773,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {
@ -96167,8 +96155,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -96177,18 +96165,18 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -96327,7 +96315,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -96343,7 +96331,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -96356,19 +96344,19 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -96386,7 +96374,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -96570,10 +96558,10 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -96663,8 +96651,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -96806,10 +96794,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -96991,7 +96981,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -97080,21 +97070,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -97106,7 +97087,11 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -97115,8 +97100,64 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -97504,6 +97545,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
exports.__esModule = true;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),

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

188
dist/demo.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -44633,12 +44633,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -44678,7 +44672,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -45723,12 +45717,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -45768,7 +45756,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -51624,7 +51612,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52107,7 +52095,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52610,7 +52598,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,
@ -53113,7 +53101,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -57102,7 +57090,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,
@ -57462,7 +57450,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -57840,7 +57828,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -59785,7 +59773,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {
@ -96329,8 +96317,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -96339,18 +96327,18 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -96489,7 +96477,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -96505,7 +96493,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -96518,19 +96506,19 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -96548,7 +96536,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -96732,10 +96720,10 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -96825,8 +96813,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -96968,10 +96956,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -97153,7 +97143,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -97242,21 +97232,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -97268,7 +97249,11 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -97277,8 +97262,64 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -97666,6 +97707,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
exports.__esModule = true;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),

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

188
dist/fineui.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -44633,12 +44633,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -44678,7 +44672,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -45723,12 +45717,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -45768,7 +45756,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -51624,7 +51612,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52107,7 +52095,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -52610,7 +52598,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,
@ -53113,7 +53101,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -57102,7 +57090,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,
@ -57462,7 +57450,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -57840,7 +57828,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -59785,7 +59773,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {
@ -96329,8 +96317,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -96339,18 +96327,18 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -96489,7 +96477,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -96505,7 +96493,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -96518,19 +96506,19 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -96548,7 +96536,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -96732,10 +96720,10 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -96825,8 +96813,8 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -96968,10 +96956,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -97153,7 +97143,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -97242,21 +97232,12 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -97268,7 +97249,11 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -97277,8 +97262,64 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -97666,6 +97707,7 @@ BI.shortcut("bi.simple_tree", BI.SimpleTreeView);
exports.__esModule = true;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),

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

188
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -40655,12 +40655,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -40700,7 +40694,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -41745,12 +41739,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -41790,7 +41778,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;
@ -47646,7 +47634,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -48129,7 +48117,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -48632,7 +48620,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,
@ -49135,7 +49123,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {
@ -53124,7 +53112,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,
@ -53484,7 +53472,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -53862,7 +53850,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {
@ -55807,7 +55795,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {
@ -71216,8 +71204,8 @@ var _button = __webpack_require__(8);
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -71226,18 +71214,18 @@ var _button = __webpack_require__(8);
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -71376,7 +71364,7 @@ var _button = __webpack_require__(8);
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -71392,7 +71380,7 @@ var _button = __webpack_require__(8);
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -71405,19 +71393,19 @@ var _button = __webpack_require__(8);
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -71435,7 +71423,7 @@ var _button = __webpack_require__(8);
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -71619,10 +71607,10 @@ var _button = __webpack_require__(8);
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -71712,8 +71700,8 @@ var _button = __webpack_require__(8);
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -71855,10 +71843,12 @@ var _button = __webpack_require__(8);
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -72040,7 +72030,7 @@ var _button = __webpack_require__(8);
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -72129,21 +72119,12 @@ var _button = __webpack_require__(8);
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -72155,7 +72136,11 @@ var _button = __webpack_require__(8);
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -72164,8 +72149,64 @@ var _button = __webpack_require__(8);
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -72553,6 +72594,7 @@ var _button = __webpack_require__(8);
exports.__esModule = true;
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(63).setImmediate))
/***/ }),

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

155
dist/fix/fix.js vendored

@ -134,8 +134,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
setImmediate(nextTickHandler);
};
} else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
// PhantomJS
MessageChannel.toString() === '[object MessageChannelConstructor]')) {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = nextTickHandler;
@ -144,18 +144,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
};
} else
/* istanbul ignore next */
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
if (typeof Promise !== 'undefined' && isNative(Promise)) {
// use microtask in non-DOM environments, e.g. Weex
var p = Promise.resolve();
timerFunc = function timerFunc() {
p.then(nextTickHandler);
};
} else {
// fallback to setTimeout
timerFunc = function timerFunc() {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick(cb, ctx) {
var _resolve = void 0;
@ -294,7 +294,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (isIE9Below) {
var VBClassPool = {};
window.execScript([// jshint ignore:line
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
'Function parseVB(code)', '\tExecuteGlobal(code)', 'End Function' //转换一段文本为VB代码
].join('\n'), 'VBScript');
var VBMediator = function VBMediator(instance, accessors, name, value) {
@ -310,7 +310,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
// jshint ignore:line
var buffer = [];
buffer.push('\tPrivate [$vbsetter]', '\tPublic [$accessors]', '\tPublic Default Function [$vbthis](ac' + timeBucket + ', s' + timeBucket + ')', '\t\tSet [$accessors] = ac' + timeBucket + ': set [$vbsetter] = s' + timeBucket, '\t\tSet [$vbthis] = Me', //链式调用
'\tEnd Function');
'\tEnd Function');
//添加普通属性,因为VBScript对象不能像JS那样随意增删属性,必须在这里预先定义好
var uniq = {
$vbthis: true,
@ -323,19 +323,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
uniq[name] = true;
}
}
//添加访问器属性
//添加访问器属性
for (name in accessors) {
if (uniq[name]) {
continue;
}
uniq[name] = true;
buffer.push(
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
//由于不知对方会传入什么,因此set, let都用上
'\tPublic Property Let [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Set [' + name + '](val' + timeBucket + ')', //setter
'\t\tCall [$vbsetter](Me, [$accessors], "' + name + '", val' + timeBucket + ')', '\tEnd Property', '\tPublic Property Get [' + name + ']', //getter
'\tOn Error Resume Next', //必须优先使用set语句,否则它会误将数组当字符串返回
'\t\tSet[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tIf Err.Number <> 0 Then', '\t\t[' + name + '] = [$vbsetter](Me, [$accessors],"' + name + '")', '\tEnd If', '\tOn Error Goto 0', '\tEnd Property');
}
for (name in properties) {
@ -353,7 +353,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
className = makeHashCode('VBClass');
window.parseVB('Class ' + className + body);
window.parseVB(['Function ' + className + 'Factory(acc, vbm)', //创建实例并传入两个关键的参数
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
'\tDim o', '\tSet o = (New ' + className + ')(acc, vbm)', '\tSet ' + className + 'Factory = o', 'End Function'].join('\r\n'));
VBClassPool[body] = className;
}
var ret = window[className + 'Factory'](accessors, VBMediator); //得到其产品
@ -537,10 +537,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (this.active) {
var value = this.get();
if (value !== this.value ||
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// Deep watchers and watchers on Object/Arrays should fire even
// when the value is the same, because the value may
// have mutated.
_.isObject(value) && options && options.refresh || this.deep) {
// set new value
var oldValue = this.value;
this.value = value;
@ -630,8 +630,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_.each(['push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse'], function (method) {
var original = arrayProto[method];
arrayMethods[method] = function mutator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var ob = this.__ob__;
@ -773,10 +773,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
for (var _key in root._globalDeps) {
var reg = new RegExp(_key);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
for (var i = 0; i < root._globalDeps[_key].length; i++) {
root._globalDeps[_key][i].notify({ observer: observer, key: _key });
}
}
}
}
@ -958,7 +960,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
function routeToRegExp(route) {
route = route.replace(/\*./g, '[a-zA-Z0-9_]+.');
route = route.replace(/\*\*/g, '[a-zA-Z0-9_]+').replace(/\*./g, '[a-zA-Z0-9_]+.');
return '^' + route + '$';
}
@ -1047,21 +1049,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var currentModel = model;
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
if (/^(\*\*\.)+[1-9a-zA-Z]+(\.\*\*$)/.test(exp)) {
//先获取到能获取到的对象
var paths = exp.split(".");
for (var _i = 0, len = paths.length; _i < len; _i++) {
if (paths[_i] === "*") {
break;
}
currentModel = model[paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
var currentModel = model[paths[1]];
exp = paths[1] + ".**";
//补全路径
var parent = currentModel.__ob__.parent,
root = currentModel.__ob__;
@ -1073,7 +1066,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var regStr = routeToRegExp(exp);
var _dep = new Dep();
root._globalDeps || (root._globalDeps = {});
root._globalDeps[regStr] = _dep;
if (_.isArray(root._globalDeps[regStr])) {
root._globalDeps[regStr].push(_dep);
} else {
root._globalDeps[regStr] = [_dep];
}
var _w = new Watcher(currentModel, function () {
_dep.depend();
@ -1082,8 +1079,64 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
_w.teardown();
root._globalDeps && delete root._globalDeps[regStr];
if (root._globalDeps) {
remove(root._globalDeps[regStr], _dep);
if (root._globalDeps[regStr].length === 0) {
delete root._globalDeps[regStr];
_w.teardown();
}
}
});
return;
}
if (/\*\*$|\*$/.test(exp)) {
throw new Error('not support');
}
//其他含有*的情况,如*.a,*.*.a,a.*.a
if (/\*/.test(exp)) {
var _currentModel = model;
//先获取到能获取到的对象
var _paths = exp.split(".");
for (var _i = 0, len = _paths.length; _i < len; _i++) {
if (_paths[_i] === "*") {
break;
}
_currentModel = model[_paths[_i]];
}
exp = exp.substr(exp.indexOf("*"));
//补全路径
var _parent = _currentModel.__ob__.parent,
_root = _currentModel.__ob__;
while (_parent) {
exp = '*.' + exp;
_root = _parent;
_parent = _parent.parent;
}
var _regStr = routeToRegExp(exp);
var _dep2 = new Dep();
_root._globalDeps || (_root._globalDeps = {});
if (_.isArray(_root._globalDeps[_regStr])) {
_root._globalDeps[_regStr].push(_dep2);
} else {
_root._globalDeps[_regStr] = [_dep2];
}
var _w2 = new Watcher(_currentModel, function () {
_dep2.depend();
return NaN;
}, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _.extend({ index: i }, attrs));
}, options);
watchers.push(function unwatchFn() {
if (_root._globalDeps) {
remove(_root._globalDeps[_regStr], _dep2);
if (_root._globalDeps[_regStr].length === 0) {
delete _root._globalDeps[_regStr];
_w2.teardown();
}
}
});
return;
}
@ -1470,4 +1523,4 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
exports.toJSON = toJSON;
exports.__esModule = true;
});
});

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

2
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-2-24 14:40:42 */
/*! time: 2021-2-26 13:00:37 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

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

8
src/widget/dynamicdate/dynamicdate.combo.js

@ -16,12 +16,6 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
supportDynamic: true,
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -61,7 +55,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
format: opts.format,
allowEdit: opts.allowEdit,
watermark: opts.watermark,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;

8
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -16,12 +16,6 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
supportDynamic: true
},
_init: function () {
var o = this.options;
o.height -= 2;
BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments);
},
render: function () {
var self = this, opts = this.options;
this.storeTriggerValue = "";
@ -61,7 +55,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
allowEdit: opts.allowEdit,
watermark: opts.watermark,
format: opts.format,
height: opts.height,
height: opts.height - 2,
value: opts.value,
ref: function () {
self.trigger = this;

2
src/widget/multiselect/multiselect.combo.js

@ -44,7 +44,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {

2
src/widget/multiselect/multiselect.insert.combo.js

@ -40,7 +40,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
text: o.text,
watermark: o.watermark,
// adapter: this.popup,

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -41,7 +41,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
height: o.height,
height: o.height - 2,
text: o.text,
// adapter: this.popup,
masker: {

2
src/widget/multitree/multi.tree.combo.js

@ -37,7 +37,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
text: o.text,
watermark: o.watermark,

2
src/widget/multitree/multi.tree.insert.combo.js

@ -37,7 +37,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {

2
src/widget/multitree/multi.tree.list.combo.js

@ -40,7 +40,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
allowEdit: o.allowEdit,
text: o.text,
watermark: o.watermark,
height: o.height,
height: o.height - 2,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
masker: {

2
src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

@ -35,7 +35,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.search_multi_select_trigger",
text: o.text,
height: o.height,
height: o.height - 2,
// adapter: this.popup,
masker: {
offset: {

Loading…
Cancel
Save