Browse Source

Merge remote-tracking branch 'origin/master' into bugfix

es6
iapyang 4 years ago
parent
commit
7fb1e4b181
  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. 4389
      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. 4349
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 4761
      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. 4435
      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. 2393
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 781
      dist/fix/fix.js
  28. 2
      dist/font.css
  29. 27
      dist/lib/base/combination/group.button.d.ts
  30. 12
      dist/lib/base/combination/tab.d.ts
  31. 5
      dist/lib/base/combination/tree.button.d.ts
  32. 15
      dist/lib/base/layer/layer.popover.d.ts
  33. 1
      dist/lib/base/single/button/button.basic.d.ts
  34. 8
      dist/lib/base/single/button/button.node.d.ts
  35. 13
      dist/lib/base/single/button/buttons/button.d.ts
  36. 1
      dist/lib/base/single/button/buttons/button.icon.d.ts
  37. 11
      dist/lib/base/single/button/buttons/button.text.d.ts
  38. 1
      dist/lib/base/single/button/listitem/icontexticonitem.d.ts
  39. 38
      dist/lib/base/single/editor/editor.d.ts
  40. 3
      dist/lib/base/single/label/abstract.label.d.ts
  41. 4
      dist/lib/base/single/label/icon.label.d.ts
  42. 1
      dist/lib/base/single/label/label.d.ts
  43. 13
      dist/lib/base/tree/customtree.d.ts
  44. 9
      dist/lib/case/button/icon/icon.change.d.ts
  45. 10
      dist/lib/case/button/item.multiselect.d.ts
  46. 6
      dist/lib/case/button/node/node.icon.arrow.d.ts
  47. 10
      dist/lib/case/button/treeitem/item.first.treeleaf.d.ts
  48. 10
      dist/lib/case/button/treeitem/item.last.treeleaf.d.ts
  49. 10
      dist/lib/case/button/treeitem/item.mid.treeleaf.d.ts
  50. 7
      dist/lib/case/combo/combo.textvalue.d.ts
  51. 8
      dist/lib/case/combo/iconcombo/combo.icon.d.ts
  52. 3
      dist/lib/core/wrapper/layout/adapt/adapt.leftrightvertical.d.ts
  53. 5
      dist/lib/core/wrapper/layout/adapt/adapt.table.d.ts
  54. 4
      dist/lib/core/wrapper/layout/adapt/auto.horizontal.d.ts
  55. 4
      dist/lib/core/wrapper/layout/adapt/inline.vertical.d.ts
  56. 58
      dist/lib/index.d.ts
  57. 11
      dist/lib/widget/downlist/combo.downlist.d.ts
  58. 18
      dist/lib/widget/dynamicdate/dynamicdate.combo.d.ts
  59. 28
      dist/lib/widget/editor/editor.text.d.ts
  60. 2
      dist/resource.css
  61. 378
      dist/utils.js
  62. 2
      dist/utils.js.map
  63. 4
      dist/utils.min.js
  64. 2
      dist/utils.min.js.map
  65. 2
      package.json
  66. 4
      src/core/inject.js
  67. 44
      typescript/base/combination/group.button.ts
  68. 20
      typescript/base/combination/tab.ts
  69. 6
      typescript/base/combination/tree.button.ts
  70. 22
      typescript/base/layer/layer.popover.ts
  71. 2
      typescript/base/single/button/button.basic.ts
  72. 12
      typescript/base/single/button/button.node.ts
  73. 1
      typescript/base/single/button/buttons/button.icon.ts
  74. 17
      typescript/base/single/button/buttons/button.text.ts
  75. 20
      typescript/base/single/button/buttons/button.ts
  76. 1
      typescript/base/single/button/listitem/icontexticonitem.ts
  77. 55
      typescript/base/single/editor/editor.ts
  78. 5
      typescript/base/single/label/icon.label.ts
  79. 22
      typescript/base/tree/customtree.ts
  80. 13
      typescript/case/button/icon/icon.change.ts
  81. 16
      typescript/case/button/item.multiselect.ts
  82. 9
      typescript/case/button/node/node.icon.arrow.ts
  83. 17
      typescript/case/button/treeitem/item.first.treeleaf.ts
  84. 17
      typescript/case/button/treeitem/item.last.treeleaf.ts
  85. 17
      typescript/case/button/treeitem/item.mid.treeleaf.ts
  86. 10
      typescript/case/combo/combo.textvalue.ts
  87. 13
      typescript/case/combo/iconcombo/combo.icon.ts
  88. 65
      typescript/index.ts
  89. 17
      typescript/widget/downlist/combo.downlist.ts
  90. 24
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  91. 36
      typescript/widget/editor/editor.text.ts

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

4389
dist/2.0/fineui.js vendored

File diff suppressed because one or more lines are too long

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

4349
dist/core.js vendored

File diff suppressed because one or more lines are too long

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

4761
dist/demo.js vendored

File diff suppressed because one or more lines are too long

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

4435
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

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

2393
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

781
dist/fix/fix.js vendored

@ -248,42 +248,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
Dep.target = targetStack.pop();
}
var arrayProto = Array.prototype;
var arrayMethods = [];
_.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];
}
var ob = this.__ob__;
var inserted = void 0;
switch (method) {
case 'push':
case 'unshift':
inserted = args;
break;
case 'splice':
inserted = args.slice(2);
break;
}
if (inserted) inserted = ob.observeArray(inserted);
switch (method) {
case 'push':
case 'unshift':
args = inserted;
break;
case 'splice':
args = [args[0], args[1]].concat(inserted ? inserted : []);
break;
}
var result = original.apply(this, args);
notify(ob.parent, ob.parentKey, ob.dep, true);
return result;
};
});
//如果浏览器不支持ecma262v5的Object.defineProperties或者存在BUG,比如IE8
//标准浏览器使用__defineGetter__, __defineSetter__实现
var canHideProperty = true;
@ -400,280 +364,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var createViewModel$1 = createViewModel;
var arrayKeys = _.keys(arrayMethods);
var observerState = {
shouldConvert: true
};
function def(obj, key, val, enumerable) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
});
}
/**
* Observer class that are attached to each observed
* object. Once attached, the observer converts target
* object's property keys into getter/setters that
* collect dependencies and dispatches updates.
*/
var Observer = function () {
function Observer(value) {
_classCallCheck(this, Observer);
this.value = value;
this.dep = new Dep();
this.vmCount = 0;
if (_.isArray(value)) {
var augment = hasProto ? protoAugment : copyAugment;
augment(value, arrayMethods, arrayKeys);
this.model = this.observeArray(value);
} else {
this.model = this.walk(value);
}
if (isIE9Below) {
this.model['__ob__'] = this;
} else {
def(this.model, "__ob__", this);
}
}
Observer.prototype.walk = function walk(obj) {
return defineReactive(obj, this);
};
Observer.prototype.observeArray = function observeArray(items) {
for (var i = 0, l = items.length; i < l; i++) {
var ob = observe(items[i], this, i);
items[i] = ob ? ob.model : items[i];
}
return items;
};
return Observer;
}();
function protoAugment(target, src, keys) {
/* eslint-disable no-proto */
target.__proto__ = src;
/* eslint-enable no-proto */
}
/* istanbul ignore next */
function copyAugment(target, src, keys) {
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
target[key] = src[key];
}
}
function observe(value, parentObserver, parentKey) {
if (!_.isObject(value)) {
return;
}
var ob = void 0;
if (value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (observerState.shouldConvert && isExtensible(value) && (_.isArray(value) || isPlainObject(value))) {
ob = new Observer(value);
}
if (ob) {
ob.parent = parentObserver || ob.parent;
ob.parentKey = parentKey;
}
return ob;
}
function notify(observer, key, dep, refresh) {
dep.notify({ observer: observer, key: key, refresh: refresh });
if (observer) {
//触发a.*绑定的依赖
_.each(observer._deps, function (dep) {
dep.notify({ observer: observer, key: key });
});
//触发a.**绑定的依赖
var parent = observer,
root = observer,
route = key || "";
while (parent) {
_.each(parent._scopeDeps, function (dep) {
dep.notify({ observer: observer, key: key });
});
if (parent.parentKey != null) {
route = parent.parentKey + '.' + route;
}
root = parent;
parent = parent.parent;
}
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
}
}
}
}
function defineReactive(obj, observer, shallow) {
var props = {};
var model = void 0;
// if (typeof Proxy === 'function') {
// const deps = {}, childObs = {}, cache = {}
// _.each(obj, function (val, key) {
// if (key in $$skipArray) {
// return
// }
// cache[key] = val
// const dep = deps[key] = (observer && observer['__dep' + key]) || new Dep()
// observer && (observer['__dep' + key] = dep)
// childObs[key] = !shallow && observe(val, observer, key)
// })
// return model = new Proxy(props, {
// has: function (target, key) {
// return key in obj;
// },
// get: function (target, key) {
// if (key in $$skipArray) {
// return target[key]
// }
// const value = cache[key]
// if (Dep.target) {
// deps[key].depend()
// if (childObs[key]) {
// childObs[key].dep.depend()
// if (_.isArray(value)) {
// dependArray(value)
// }
// }
// }
// return value
// },
// set: function (target, key, newVal) {
// if (key in $$skipArray) {
// return target[key] = newVal
// }
// const value = cache[key], dep = deps[key]
// if (newVal === value || (newVal !== newVal && value !== value)) {
// return newVal
// }
// cache[key] = newVal
// childObs[key] = !shallow && observe(newVal, observer, key)
// obj[key] = childObs[key] ? childObs[key].model : newVal
// notify(model, key, dep)
// return obj[key]
// }
// })
// }
_.each(obj, function (val, key) {
if (key in $$skipArray) {
return;
}
var configurable = isConfigurable(obj, key);
var dep = observer && observer['__dep' + key] || new Dep();
observer && (observer['__dep' + key] = dep);
var childOb = configurable && !shallow && observe(val, observer, key);
props[key] = {
enumerable: true,
configurable: true,
get: function reactiveGetter() {
var value = childOb ? childOb.model : val;
if (Dep.target) {
dep.depend();
if (childOb) {
childOb.dep.depend();
if (_.isArray(value)) {
dependArray(value);
}
}
}
return value;
},
set: function reactiveSetter(newVal) {
var value = childOb ? childOb.model : val;
if (newVal === value || newVal !== newVal && value !== value) {
return;
}
val = newVal;
childOb = configurable && !shallow && observe(newVal, observer, key);
if (childOb && value && value.__ob__) {
childOb._scopeDeps = value.__ob__._scopeDeps;
childOb._deps = value.__ob__._deps;
}
obj[key] = childOb ? childOb.model : newVal;
notify(model.__ob__, key, dep);
}
};
});
return model = createViewModel$1(obj, props);
}
/**
* Set a property on an object. Adds the new property and
* triggers change notification if the property doesn't
* already exist.
*/
function set(target, key, val) {
if (_.isArray(target)) {
target.length = Math.max(target.length, key);
target.splice(key, 1, val);
return val;
}
if (_.has(target, key)) {
target[key] = val;
return val;
}
var ob = target.__ob__;
if (!ob) {
target[key] = val;
return val;
}
ob.value[key] = val;
target = defineReactive(ob.value, ob);
notify(ob, key, ob.dep);
return target;
}
/**
* Delete a property and trigger change if necessary.
*/
function del(target, key) {
if (_.isArray(target)) {
target.splice(key, 1);
return;
}
var ob = target.__ob__;
if (!_.has(target, key)) {
return;
}
if (!ob) {
delete target[key];
return target;
}
delete ob.value[key];
target = defineReactive(ob.value, ob);
notify(ob, key, ob.dep);
return target;
}
/**
* Collect dependencies on array elements when the array is touched, since
* we cannot intercept array element access like property getters.
*/
function dependArray(value) {
for (var e, i = 0, l = value.length; i < l; i++) {
e = value[i];
e && e.__ob__ && e.__ob__.dep.depend();
if (_.isArray(e)) {
dependArray(e);
}
}
}
var queue = [];
var activatedChildren = [];
var has = {};
@ -876,61 +566,371 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this.dirty = false;
};
Watcher.prototype.depend = function depend() {
var i = this.deps.length;
while (i--) {
this.deps[i].depend();
Watcher.prototype.depend = function depend() {
var i = this.deps.length;
while (i--) {
this.deps[i].depend();
}
};
Watcher.prototype.teardown = function teardown() {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed.
remove(this.vm._watchers, this);
var i = this.deps.length;
while (i--) {
this.deps[i].removeSub(this);
}
this.active = false;
}
};
return Watcher;
}();
var seenObjects = new Set();
function traverse(val) {
seenObjects.clear();
_traverse(val, seenObjects);
}
function _traverse(val, seen) {
var i = void 0,
keys = void 0;
var isA = _.isArray(val);
if (!isA && !_.isObject(val)) {
return;
}
if (val.__ob__) {
var depId = val.__ob__.dep.id;
if (seen.has(depId)) {
return;
}
seen.add(depId);
}
if (isA) {
i = val.length;
while (i--) {
_traverse(val[i], seen);
}
} else {
keys = _.keys(val);
i = keys.length;
while (i--) {
_traverse(val[keys[i]], seen);
}
}
}
var arrayProto = Array.prototype;
var arrayMethods = [];
_.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];
}
var ob = this.__ob__;
var inserted = void 0;
switch (method) {
case 'push':
case 'unshift':
inserted = args;
break;
case 'splice':
inserted = args.slice(2);
break;
}
if (inserted) inserted = ob.observeArray(inserted);
switch (method) {
case 'push':
case 'unshift':
args = inserted;
break;
case 'splice':
args = [args[0], args[1]].concat(inserted ? inserted : []);
break;
}
var result = original.apply(this, args);
notify(ob.parent, ob.parentKey, ob.dep, true);
return result;
};
});
var arrayKeys = _.keys(arrayMethods);
var observerState = {
shouldConvert: true
};
function def(obj, key, val, enumerable) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
});
}
/**
* Observer class that are attached to each observed
* object. Once attached, the observer converts target
* object's property keys into getter/setters that
* collect dependencies and dispatches updates.
*/
var Observer = function () {
function Observer(value) {
_classCallCheck(this, Observer);
this.value = value;
this.dep = new Dep();
this.vmCount = 0;
if (_.isArray(value)) {
var augment = hasProto ? protoAugment : copyAugment;
augment(value, arrayMethods, arrayKeys);
this.model = this.observeArray(value);
} else {
this.model = this.walk(value);
}
if (isIE9Below) {
this.model['__ob__'] = this;
} else {
def(this.model, "__ob__", this);
}
}
Observer.prototype.walk = function walk(obj) {
return defineReactive(obj, this);
};
Observer.prototype.observeArray = function observeArray(items) {
for (var i = 0, l = items.length; i < l; i++) {
var ob = observe(items[i], this, i);
items[i] = ob ? ob.model : items[i];
}
return items;
};
return Observer;
}();
function protoAugment(target, src, keys) {
/* eslint-disable no-proto */
target.__proto__ = src;
/* eslint-enable no-proto */
}
/* istanbul ignore next */
function copyAugment(target, src, keys) {
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
target[key] = src[key];
}
}
function observe(value, parentObserver, parentKey) {
if (!_.isObject(value)) {
return;
}
var ob = void 0;
if (value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (observerState.shouldConvert && isExtensible(value) && (_.isArray(value) || isPlainObject(value))) {
ob = new Observer(value);
}
if (ob) {
ob.parent = parentObserver || ob.parent;
ob.parentKey = parentKey;
}
return ob;
}
function notify(observer, key, dep, refresh) {
dep.notify({ observer: observer, key: key, refresh: refresh });
if (observer) {
//触发a.*绑定的依赖
_.each(observer._deps, function (dep) {
dep.notify({ observer: observer, key: key });
});
//触发a.**绑定的依赖
var parent = observer,
root = observer,
route = key || "";
while (parent) {
_.each(parent._scopeDeps, function (dep) {
dep.notify({ observer: observer, key: key });
});
if (parent.parentKey != null) {
route = parent.parentKey + '.' + route;
}
root = parent;
parent = parent.parent;
}
};
Watcher.prototype.teardown = function teardown() {
if (this.active) {
// remove self from vm's watcher list
// this is a somewhat expensive operation so we skip it
// if the vm is being destroyed.
remove(this.vm._watchers, this);
var i = this.deps.length;
while (i--) {
this.deps[i].removeSub(this);
for (var _key2 in root._globalDeps) {
var reg = new RegExp(_key2);
if (reg.test(route)) {
root._globalDeps[_key2].notify({ observer: observer, key: _key2 });
}
this.active = false;
}
};
return Watcher;
}();
}
}
var seenObjects = new Set();
function defineReactive(obj, observer, shallow) {
var props = {};
var model = void 0;
// if (typeof Proxy === 'function') {
// const deps = {}, childObs = {}, cache = {}
// _.each(obj, function (val, key) {
// if (key in $$skipArray) {
// return
// }
// cache[key] = val
// const dep = deps[key] = (observer && observer['__dep' + key]) || new Dep()
// observer && (observer['__dep' + key] = dep)
// childObs[key] = !shallow && observe(val, observer, key)
// })
// return model = new Proxy(props, {
// has: function (target, key) {
// return key in obj;
// },
// get: function (target, key) {
// if (key in $$skipArray) {
// return target[key]
// }
// const value = cache[key]
// if (Dep.target) {
// deps[key].depend()
// if (childObs[key]) {
// childObs[key].dep.depend()
// if (_.isArray(value)) {
// dependArray(value)
// }
// }
// }
// return value
// },
// set: function (target, key, newVal) {
// if (key in $$skipArray) {
// return target[key] = newVal
// }
// const value = cache[key], dep = deps[key]
// if (newVal === value || (newVal !== newVal && value !== value)) {
// return newVal
// }
// cache[key] = newVal
// childObs[key] = !shallow && observe(newVal, observer, key)
// obj[key] = childObs[key] ? childObs[key].model : newVal
// notify(model, key, dep)
// return obj[key]
// }
// })
// }
_.each(obj, function (val, key) {
if (key in $$skipArray) {
return;
}
var configurable = isConfigurable(obj, key);
var dep = observer && observer['__dep' + key] || new Dep();
observer && (observer['__dep' + key] = dep);
var childOb = configurable && !shallow && observe(val, observer, key);
props[key] = {
enumerable: true,
configurable: true,
get: function reactiveGetter() {
var value = childOb ? childOb.model : val;
if (Dep.target) {
dep.depend();
if (childOb) {
childOb.dep.depend();
if (_.isArray(value)) {
dependArray(value);
}
}
}
return value;
},
set: function reactiveSetter(newVal) {
var value = childOb ? childOb.model : val;
if (newVal === value || newVal !== newVal && value !== value) {
return;
}
val = newVal;
childOb = configurable && !shallow && observe(newVal, observer, key);
if (childOb && value && value.__ob__) {
childOb._scopeDeps = value.__ob__._scopeDeps;
childOb._deps = value.__ob__._deps;
}
obj[key] = childOb ? childOb.model : newVal;
notify(model.__ob__, key, dep);
}
};
});
return model = createViewModel$1(obj, props);
}
function traverse(val) {
seenObjects.clear();
_traverse(val, seenObjects);
/**
* Set a property on an object. Adds the new property and
* triggers change notification if the property doesn't
* already exist.
*/
function set(target, key, val) {
if (_.isArray(target)) {
target.length = Math.max(target.length, key);
target.splice(key, 1, val);
return val;
}
if (_.has(target, key)) {
target[key] = val;
return val;
}
var ob = target.__ob__;
if (!ob) {
target[key] = val;
return val;
}
ob.value[key] = val;
target = defineReactive(ob.value, ob);
notify(ob, key, ob.dep);
return target;
}
function _traverse(val, seen) {
var i = void 0,
keys = void 0;
var isA = _.isArray(val);
if (!isA && !_.isObject(val)) {
/**
* Delete a property and trigger change if necessary.
*/
function del(target, key) {
if (_.isArray(target)) {
target.splice(key, 1);
return;
}
if (val.__ob__) {
var depId = val.__ob__.dep.id;
if (seen.has(depId)) {
return;
}
seen.add(depId);
var ob = target.__ob__;
if (!_.has(target, key)) {
return;
}
if (isA) {
i = val.length;
while (i--) {
_traverse(val[i], seen);
}
} else {
keys = _.keys(val);
i = keys.length;
while (i--) {
_traverse(val[keys[i]], seen);
if (!ob) {
delete target[key];
return target;
}
delete ob.value[key];
target = defineReactive(ob.value, ob);
notify(ob, key, ob.dep);
return target;
}
/**
* Collect dependencies on array elements when the array is touched, since
* we cannot intercept array element access like property getters.
*/
function dependArray(value) {
for (var e, i = 0, l = value.length; i < l; i++) {
e = value[i];
e && e.__ob__ && e.__ob__.dep.depend();
if (_.isArray(e)) {
dependArray(e);
}
}
}
@ -1116,49 +1116,42 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
function initComputed(vm, computed) {
var watchers = vm._computedWatchers = {};
defineComputed(vm, computed);
for (var key in computed) {
var userDef = computed[key],
context = vm.$$model ? vm.model : vm;
var getter = typeof userDef === "function" ? _.bind(userDef, context) : _.bind(userDef.get, context);
watchers[key] = defineComputedWatcher(vm, computed[key]);
}
}
watchers[key] = new Watcher(vm.$$computed, getter || noop, noop, computedWatcherOptions);
function defineComputedWatcher(vm, userDef) {
var context = vm.$$model ? vm.model : vm;
var getter = typeof userDef === "function" ? userDef : userDef.get;
return new Watcher(context, getter || noop, noop, computedWatcherOptions);
}
function defineOneComputedGetter(vm, key, userDef) {
var shouldCache = true;
var sharedPropertyDefinition = {
enumerable: true,
configurable: true,
get: noop,
set: noop
};
if (typeof userDef === "function") {
sharedPropertyDefinition.get = createComputedGetter(vm, key);
sharedPropertyDefinition.set = noop;
} else {
sharedPropertyDefinition.get = userDef.get ? shouldCache && userDef.cache !== false ? createComputedGetter(vm, key) : userDef.get : noop;
sharedPropertyDefinition.set = userDef.set ? userDef.set : noop;
}
return sharedPropertyDefinition;
}
function defineComputed(vm, computed) {
var props = {};
// if (typeof Proxy === 'function') {
// return vm.$$computed = new Proxy(props, {
// has: function (target, key) {
// return computed && key in computed
// },
// get: function (target, key) {
// return createComputedGetter(vm, key)()
// }
// })
// }
var shouldCache = true;
for (var key in computed) {
if (!(key in vm)) {
var sharedPropertyDefinition = {
enumerable: true,
configurable: true,
get: noop,
set: noop
};
var userDef = computed[key];
if (typeof userDef === "function") {
sharedPropertyDefinition.get = createComputedGetter(vm, key);
sharedPropertyDefinition.set = noop;
} else {
sharedPropertyDefinition.get = userDef.get ? shouldCache && userDef.cache !== false ? createComputedGetter(key) : userDef.get : noop;
sharedPropertyDefinition.set = userDef.set ? userDef.set : noop;
}
props[key] = sharedPropertyDefinition;
props[key] = defineOneComputedGetter(vm, key, computed[key]);
}
}
vm.$$computed = createViewModel$1({}, props);
@ -1419,6 +1412,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return Model;
}();
function define(model) {
return REACTIVE ? new Observer(model).model : model;
}
var reactive = define;
function config(options) {
options || (options = {});
if ("reactive" in options) {
@ -1446,16 +1445,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return result;
}
function define(model) {
return new Observer(model).model;
}
var version = '2.0';
exports.define = define;
exports.version = version;
exports.$$skipArray = $$skipArray;
exports.mixin = mixin;
exports.Model = Model;
exports.define = define;
exports.reactive = reactive;
exports.config = config;
exports.observerState = observerState;
exports.Observer = Observer;

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

27
dist/lib/base/combination/group.button.d.ts vendored

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _ButtonGroup extends _Widget {
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
@ -27,3 +27,28 @@ export interface _ButtonGroupChooseType {
export interface _ButtonGroupStatic {
EVENT_CHANGE: string;
}
export declare class ButtonGroup extends Widget {
static xtype: string;
static CHOOSE_TYPE_SINGLE: number;
static CHOOSE_TYPE_MULTI: number;
static CHOOSE_TYPE_ALL: number;
static CHOOSE_TYPE_NONE: number;
static CHOOSE_TYPE_DEFAULT: number;
static EVENT_CHANGE: string;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
removeItemAt(indexes: any): void;
removeItems(values: any): void;
populate(items?: any, ...args: any[]): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];
setEnabledValue(v: any): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

12
dist/lib/base/combination/tab.d.ts vendored

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _Tab extends _Widget {
setSelect(v: string | number): void;
removeTab(v: string | number): void;
@ -10,3 +10,13 @@ export interface _Tab extends _Widget {
export interface _TabStatic {
EVENT_CHANGE: string;
}
export declare class Tab extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
setSelect(v: string | number): void;
removeTab(v: string | number): void;
getSelect(): string | number;
getSelectedTab(): any;
getTab(v: string | number): any;
populate(): void;
}

5
dist/lib/base/combination/tree.button.d.ts vendored

@ -0,0 +1,5 @@
import { ButtonGroup } from './group.button';
export declare class ButtonTree extends ButtonGroup {
static xtype: string;
static EVENT_CHANGE: string;
}

15
dist/lib/base/layer/layer.popover.d.ts vendored

@ -0,0 +1,15 @@
import { Widget } from '../../core/widget';
export declare class Popover extends Widget {
static xtype: string;
static EVENT_CLOSE: string;
static EVENT_OPEN: string;
static EVENT_CANCEL: string;
static EVENT_CONFIRM: string;
hide(): void;
open(): void;
close(): void;
setZindex(zindex: number): void;
}
export declare class BarPopover extends Popover {
static xtype: string;
}

1
dist/lib/base/single/button/button.basic.d.ts vendored

@ -22,6 +22,7 @@ export interface _BasicButtonStatic {
EVENT_CHANGE: string;
}
export declare class BasicButton extends Single {
static EVENT_CHANGE: string;
_createShadow(): void;
bindEvent(): void;
_trigger(e: Event): void;

8
dist/lib/base/single/button/button.node.d.ts vendored

@ -1,7 +1,13 @@
import { _BasicButton } from "./button.basic";
import { _BasicButton, BasicButton } from "./button.basic";
export interface _NodeButton extends _BasicButton {
isOpened(): void;
setOpened(b: boolean): void;
triggerCollapse(): void;
triggerExpand(): void;
}
export declare class NodeButton extends BasicButton {
isOpened(): boolean;
setOpened(b: boolean): void;
triggerCollapse(): void;
triggerExpand(): void;
}

13
dist/lib/base/single/button/buttons/button.d.ts vendored

@ -1,4 +1,5 @@
import { _BasicButton } from "../button.basic";
import { IconLabel, Label } from "../../../..";
import { BasicButton, _BasicButton } from "../button.basic";
export interface _Button extends _BasicButton {
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
@ -8,3 +9,13 @@ export interface _Button extends _BasicButton {
export interface _ButtonStatic {
EVENT_CHANGE: string;
}
export declare class Button extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
text: Label;
icon?: IconLabel;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
}

1
dist/lib/base/single/button/buttons/button.icon.d.ts vendored

@ -1,4 +1,5 @@
import { BasicButton } from "../button.basic";
export declare class IconButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
}

11
dist/lib/base/single/button/buttons/button.text.d.ts vendored

@ -1,4 +1,4 @@
import { _BasicButton } from "../button.basic";
import { BasicButton, _BasicButton } from "../button.basic";
export interface _TextButton extends _BasicButton {
setStyle(style: any): void;
doRedMark(...args: any[]): void;
@ -9,3 +9,12 @@ export interface _TextButton extends _BasicButton {
export interface _TextButtonStatic {
EVENT_CHANGE: string;
}
export declare class TextButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
setStyle(style: any): void;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
}

1
dist/lib/base/single/button/listitem/icontexticonitem.d.ts vendored

@ -1,4 +1,5 @@
import { BasicButton } from "../button.basic";
export declare class IconTextIconItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
}

38
dist/lib/base/single/editor/editor.d.ts vendored

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { _Single, Single } from "../single";
export interface _Editor extends _Single {
setErrorText(v: string): void;
getErrorText(): string;
@ -37,3 +37,39 @@ export interface _EditorStatic {
EVENT_REMOVE: string;
EVENT_EMPTY: string;
}
export declare class Editor extends Single {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setErrorText(v: string): void;
getErrorText(): string;
setWaterMark(v: string): void;
disableError(): void;
enableError(): void;
disableWaterMark(): void;
enableWaterMark(): void;
focus(): void;
blur(): void;
selectAll(): void;
onKeyDown(keyCode: number): void;
getLastValidValue(): string;
getLastChangedValue(): string;
isEditing(): boolean;
isValid(): boolean;
}

3
dist/lib/base/single/label/abstract.label.d.ts vendored

@ -9,11 +9,10 @@ export interface _AbstractLabel extends _Single {
setStyle(css: any): void;
}
export declare class AbstractLabel extends Single {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
setText(v: string): void;
getText(): string;
setStyle(css: any): void;
}

4
dist/lib/base/single/label/icon.label.d.ts vendored

@ -0,0 +1,4 @@
import { Single } from '../single';
export declare class IconLabel extends Single {
static xtype: string;
}

1
dist/lib/base/single/label/label.d.ts vendored

@ -4,4 +4,5 @@ export interface _Label extends _AbstractLabel {
unRedMark(...args: any[]): void;
}
export declare class Label extends AbstractLabel {
static xtype: string;
}

13
dist/lib/base/tree/customtree.d.ts vendored

@ -0,0 +1,13 @@
import { Widget } from '../../core/widget';
export declare class CustomTree extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
initTree(nodes: any, ...args: any[]): void;
stroke(...args: any[]): void;
populate(nodes: any, ...args: any[]): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

9
dist/lib/case/button/icon/icon.change.d.ts vendored

@ -1,4 +1,4 @@
import { _Single } from "../../../base/single/single";
import { Single, _Single } from "../../../base/single/single";
export interface _IconChangeButton extends _Single {
isSelected(): boolean;
setSelected(v: boolean): void;
@ -7,3 +7,10 @@ export interface _IconChangeButton extends _Single {
export interface _IconChangeButtonStatic {
EVENT_CHANGE: string;
}
export declare class IconChangeButton extends Single {
static xtype: string;
static EVENT_CHANGE: string;
isSelected(): boolean;
setSelected(v: boolean): void;
setIcon(cls: string): void;
}

10
dist/lib/case/button/item.multiselect.d.ts vendored

@ -1,4 +1,4 @@
import { _BasicButton } from "../../base/single/button/button.basic";
import { _BasicButton, BasicButton } from "../../base/single/button/button.basic";
export interface _MultiSelectItem extends _BasicButton {
doClick(...args: any[]): void;
doRedMark(...args: any[]): void;
@ -8,3 +8,11 @@ export interface _MultiSelectItem extends _BasicButton {
export interface _MultiSelectItemStatic {
EVENT_CHANGE: string;
}
export declare class MultiSelectItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
doClick(...args: any[]): void;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
setSelected(v: boolean): void;
}

6
dist/lib/case/button/node/node.icon.arrow.d.ts vendored

@ -0,0 +1,6 @@
import { NodeButton } from '../../../base/single/button/button.node';
export declare class IconArrowNode extends NodeButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
}

10
dist/lib/case/button/treeitem/item.first.treeleaf.d.ts vendored

@ -0,0 +1,10 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class FirstTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

10
dist/lib/case/button/treeitem/item.last.treeleaf.d.ts vendored

@ -0,0 +1,10 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class LastTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

10
dist/lib/case/button/treeitem/item.mid.treeleaf.d.ts vendored

@ -0,0 +1,10 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class MidTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

7
dist/lib/case/combo/combo.textvalue.d.ts vendored

@ -1,7 +1,12 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _TextValueCombo extends _Widget {
populate(items: any): void;
}
export interface _TextValueComboStatic {
EVENT_CHANGE: string;
}
export declare class TextValueCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
populate(items: any): void;
}

8
dist/lib/case/combo/iconcombo/combo.icon.d.ts vendored

@ -0,0 +1,8 @@
import { Widget } from '../../../core/widget';
export declare class IconCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
showView(): void;
hideView(): void;
populate(items: any[]): void;
}

3
dist/lib/core/wrapper/layout/adapt/adapt.leftrightvertical.d.ts vendored

@ -2,3 +2,6 @@ import { Layout } from "../../layout";
export declare class LeftRightVerticalAdaptLayout extends Layout {
static xtype: string;
}
export declare class RightVerticalAdaptLayout extends Layout {
static xtype: string;
}

5
dist/lib/core/wrapper/layout/adapt/adapt.table.d.ts vendored

@ -0,0 +1,5 @@
import { Layout } from "../../layout";
export declare class TableAdaptLayout extends Layout {
static xtype: string;
appendFragment(frag: any): void;
}

4
dist/lib/core/wrapper/layout/adapt/auto.horizontal.d.ts vendored

@ -0,0 +1,4 @@
import { Layout } from "../../layout";
export declare class HorizontalAutoLayout extends Layout {
static xtype: string;
}

4
dist/lib/core/wrapper/layout/adapt/inline.vertical.d.ts vendored

@ -0,0 +1,4 @@
import { Layout } from "../../layout";
export declare class InlineVerticalAdaptLayout extends Layout {
static xtype: string;
}

58
dist/lib/index.d.ts vendored

@ -1,25 +1,25 @@
import { _Combo, _ComboStatic } from "./base/combination/combo";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button";
import { _Tab, _TabStatic } from "./base/combination/tab";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic, ButtonGroup } from "./base/combination/group.button";
import { _Tab, _TabStatic, Tab } from "./base/combination/tab";
import { _Pane, _PaneStatic } from "./base/pane";
import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic";
import { _NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic } from "./base/single/button/buttons/button";
import { _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _NodeButton, NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic, Button } from "./base/single/button/buttons/button";
import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem";
import { _Editor, _EditorStatic } from "./base/single/editor/editor";
import { _Editor, _EditorStatic, Editor } from "./base/single/editor/editor";
import { _Iframe } from "./base/single/iframe/iframe";
import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox";
import { _Input, _InputStatic } from "./base/single/input/input";
import { _AbstractLabel } from "./base/single/label/abstract.label";
import { _Label } from "./base/single/label/label";
import { _AbstractLabel, AbstractLabel } from "./base/single/label/abstract.label";
import { _Label, Label } from "./base/single/label/label";
import { _Single, Single } from "./base/single/single";
import { _Text } from "./base/single/text";
import { _Trigger } from "./base/single/trigger/trigger";
import { _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change";
import { _MultiSelectItem, _MultiSelectItemStatic } from "./case/button/item.multiselect";
import { IconChangeButton, _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change";
import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./case/button/item.multiselect";
import { _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble";
import { _TextValueCombo, _TextValueComboStatic } from "./case/combo/combo.textvalue";
import { _TextValueCombo, _TextValueComboStatic, TextValueCombo } from "./case/combo/combo.textvalue";
import { _SearchTextValueCombo, _SearchTextValueComboStatic } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { _SignEditor, _SignEditorStatic } from "./case/editor/editor.sign";
import { _LoadingPane } from "./case/loading/loading_pane";
@ -44,12 +44,26 @@ import { _AbsoluteLayout } from "./core/wrapper/layout/layout.absolute";
import { _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape";
import { _VerticalLayout } from "./core/wrapper/layout/layout.vertical";
import { _DefaultLayout } from "./core/wrapper/layout/layout.default";
import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { DownListCombo, _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { Icon } from "./base/single/icon/icon";
import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical";
import { LeftRightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical";
import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical";
import { IconTextIconItem } from "./base/single/button/listitem/icontexticonitem";
import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizontal";
import { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical";
import { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table";
import { IconButton } from "./base/single/button/buttons/button.icon";
import { TextEditor } from "./widget/editor/editor.text";
import { IconLabel } from "./base/single/label/icon.label";
import { Popover, BarPopover } from "./base/layer/layer.popover";
import { IconCombo } from "./case/combo/iconcombo/combo.icon";
import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo";
import { CustomTree } from "./base/tree/customtree";
import { ButtonTree } from "./base/combination/tree.button";
import { IconArrowNode } from "./case/button/node/node.icon.arrow";
import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf";
import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf";
import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf";
declare type ClassConstructor<T extends {}> = T & {
new (config: any): T;
(config: any): T;
@ -107,10 +121,26 @@ export interface BI extends _func, _i18n, _base, _inject {
LeftVerticalAdaptLayout: ClassConstructor<_LeftVerticalAdapt>;
LeftRightVerticalAdaptLayout: typeof LeftRightVerticalAdaptLayout;
IconTextIconItem: typeof IconTextIconItem;
HorizontalAutoLayout: typeof HorizontalAutoLayout;
InlineVerticalAdaptLayout: typeof InlineVerticalAdaptLayout;
RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout;
TableAdaptLayout: typeof TableAdaptLayout;
IconButton: typeof IconButton;
TextEditor: typeof TextEditor;
IconLabel: typeof IconLabel;
Popover: typeof Popover;
BarPopover: typeof BarPopover;
IconCombo: typeof IconCombo;
DynamicDateCombo: typeof DynamicDateCombo;
CustomTree: typeof CustomTree;
ButtonTree: typeof ButtonTree;
IconArrowNode: typeof IconArrowNode;
MidTreeLeafItem: typeof MidTreeLeafItem;
FirstTreeLeafItem: typeof FirstTreeLeafItem;
LastTreeLeafItem: typeof LastTreeLeafItem;
}
declare const _default: {
Decorators: typeof decorator;
};
export default _default;
export { Widget, Single, BasicButton, Icon, LeftRightVerticalAdaptLayout, IconTextIconItem, IconButton, };
export { Widget, Single, BasicButton, Icon, LeftRightVerticalAdaptLayout, IconTextIconItem, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, IconButton, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, TextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, IconCombo, DynamicDateCombo, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, };

11
dist/lib/widget/downlist/combo.downlist.d.ts vendored

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _DownListCombo extends _Widget {
hideView: () => void;
showView: (e?: any) => void;
@ -9,3 +9,12 @@ export interface _DownListComboStatic {
EVENT_SON_VALUE_CHANGE: string;
EVENT_BEFORE_POPUPVIEW: string;
}
export declare class DownListCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_SON_VALUE_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
hideView: () => void;
showView: (e?: any) => void;
populate: (items?: any) => void;
}

18
dist/lib/widget/dynamicdate/dynamicdate.combo.d.ts vendored

@ -0,0 +1,18 @@
import { Single } from '../../base/single/single';
export declare class DynamicDateCombo extends Single {
static xtype: string;
static Static: 1;
static Dynamic: 2;
static EVENT_KEY_DOWN: string;
static EVENT_CONFIRM: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CHANGE: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_POPUPVIEW: string;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getKey(): string;
hidePopupView(): void;
}

28
dist/lib/widget/editor/editor.text.d.ts vendored

@ -0,0 +1,28 @@
import { Widget } from '../../core/widget';
export declare class TextEditor extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setWaterMark(v: string): void;
focus(): void;
blur(): void;
setErrorText(v: string): void;
getErrorText(): string;
isValid(): boolean;
}

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

378
dist/utils.js vendored

File diff suppressed because one or more lines are too long

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

4
src/core/inject.js

@ -92,6 +92,10 @@
configFunctions[type].push(configFn);
};
BI.getReference = BI.getReference || function (type, fn) {
return BI.Plugin.registerObject(type, fn);
};
var actions = {};
var globalAction = [];
BI.action = BI.action || function (type, actionFn) {

44
typescript/base/combination/group.button.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _ButtonGroup extends _Widget {
prependItems<T>(items: T[]): void;
@ -45,3 +45,45 @@ export interface _ButtonGroupChooseType {
export interface _ButtonGroupStatic {
EVENT_CHANGE: string;
}
export declare class ButtonGroup extends Widget {
static xtype: string;
static CHOOSE_TYPE_SINGLE: number;
static CHOOSE_TYPE_MULTI: number;
static CHOOSE_TYPE_ALL: number;
static CHOOSE_TYPE_NONE: number;
static CHOOSE_TYPE_DEFAULT: number;
static EVENT_CHANGE: string;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
removeItemAt(indexes: any): void;
removeItems(values: any): void;
populate(items?: any, ...args: any[]): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];
setEnabledValue(v: any): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getSelectedButtons<T>(): T[];
getNotSelectedButtons<T>(): T[];
getIndexByValue(value: any): number;
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

20
typescript/base/combination/tab.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _Tab extends _Widget {
setSelect(v: string | number): void;
@ -17,3 +17,21 @@ export interface _Tab extends _Widget {
export interface _TabStatic {
EVENT_CHANGE: string;
}
export declare class Tab extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
setSelect(v: string | number): void;
removeTab(v: string | number): void;
getSelect(): string | number;
getSelectedTab(): any;
getTab(v: string | number): any;
populate(): void;
}

6
typescript/base/combination/tree.button.ts

@ -0,0 +1,6 @@
import { ButtonGroup } from './group.button';
export declare class ButtonTree extends ButtonGroup {
static xtype: string;
static EVENT_CHANGE: string;
}

22
typescript/base/layer/layer.popover.ts

@ -0,0 +1,22 @@
import { Widget } from '../../core/widget';
export declare class Popover extends Widget {
static xtype: string;
static EVENT_CLOSE: string;
static EVENT_OPEN: string;
static EVENT_CANCEL: string;
static EVENT_CONFIRM: string;
hide(): void;
open(): void;
close(): void;
setZindex(zindex: number): void;
}
export declare class BarPopover extends Popover {
static xtype: string;
}

2
typescript/base/single/button/button.basic.ts

@ -41,6 +41,8 @@ export interface _BasicButtonStatic {
}
export declare class BasicButton extends Single {
static EVENT_CHANGE: string;
_createShadow(): void;
bindEvent(): void;

12
typescript/base/single/button/button.node.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "./button.basic";
import { _BasicButton, BasicButton } from "./button.basic";
export interface _NodeButton extends _BasicButton {
isOpened(): void;
@ -9,3 +9,13 @@ export interface _NodeButton extends _BasicButton {
triggerExpand(): void;
}
export declare class NodeButton extends BasicButton {
isOpened(): boolean;
setOpened(b: boolean): void;
triggerCollapse(): void;
triggerExpand(): void;
}

1
typescript/base/single/button/buttons/button.icon.ts

@ -2,4 +2,5 @@ import { BasicButton } from "../button.basic";
export declare class IconButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
}

17
typescript/base/single/button/buttons/button.text.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "../button.basic";
import { BasicButton, _BasicButton } from "../button.basic";
export interface _TextButton extends _BasicButton {
setStyle(style: any): void;
@ -15,3 +15,18 @@ export interface _TextButton extends _BasicButton {
export interface _TextButtonStatic {
EVENT_CHANGE: string;
}
export declare class TextButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
setStyle(style: any): void;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
}

20
typescript/base/single/button/buttons/button.ts

@ -1,4 +1,5 @@
import { _BasicButton } from "../button.basic";
import { IconLabel, Label } from "../../../..";
import { BasicButton, _BasicButton } from "../button.basic";
export interface _Button extends _BasicButton {
doRedMark(...args: any[]): void;
@ -13,3 +14,20 @@ export interface _Button extends _BasicButton {
export interface _ButtonStatic {
EVENT_CHANGE: string;
}
export declare class Button extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
text: Label;
icon?: IconLabel;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
}

1
typescript/base/single/button/listitem/icontexticonitem.ts

@ -2,4 +2,5 @@ import { BasicButton } from "../button.basic";
export declare class IconTextIconItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
}

55
typescript/base/single/editor/editor.ts

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { _Single, Single } from "../single";
export interface _Editor extends _Single {
setErrorText(v: string): void;
@ -54,3 +54,56 @@ export interface _EditorStatic {
EVENT_REMOVE: string;
EVENT_EMPTY: string;
}
export declare class Editor extends Single {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setErrorText(v: string): void;
getErrorText(): string;
setWaterMark(v: string): void;
disableError(): void;
enableError(): void;
disableWaterMark(): void;
enableWaterMark(): void;
focus(): void;
blur(): void;
selectAll(): void;
onKeyDown(keyCode: number): void;
getLastValidValue(): string;
getLastChangedValue(): string;
isEditing(): boolean;
isValid(): boolean;
}

5
typescript/base/single/label/icon.label.ts

@ -0,0 +1,5 @@
import { Single } from '../single';
export declare class IconLabel extends Single {
static xtype: string;
}

22
typescript/base/tree/customtree.ts

@ -0,0 +1,22 @@
import { Widget } from '../../core/widget';
export declare class CustomTree extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
initTree(nodes: any, ...args: any[]): void;
stroke(...args: any[]): void;
populate(nodes: any, ...args: any[]): void;
getAllButtons<T>(): T[];
getAllLeaves<T>(): T[];
getNodeById(id: any): any;
getNodeByValue(value: any): any;
getValue<T>(): T[];
}

13
typescript/case/button/icon/icon.change.ts

@ -1,4 +1,4 @@
import { _Single } from "../../../base/single/single";
import { Single, _Single } from "../../../base/single/single";
export interface _IconChangeButton extends _Single {
isSelected(): boolean;
@ -11,3 +11,14 @@ export interface _IconChangeButton extends _Single {
export interface _IconChangeButtonStatic {
EVENT_CHANGE: string;
}
export declare class IconChangeButton extends Single {
static xtype: string;
static EVENT_CHANGE: string;
isSelected(): boolean;
setSelected(v: boolean): void;
setIcon(cls: string): void;
}

16
typescript/case/button/item.multiselect.ts

@ -1,4 +1,4 @@
import { _BasicButton } from "../../base/single/button/button.basic";
import { _BasicButton, BasicButton } from "../../base/single/button/button.basic";
export interface _MultiSelectItem extends _BasicButton {
doClick(...args: any[]): void;
@ -13,3 +13,17 @@ export interface _MultiSelectItem extends _BasicButton {
export interface _MultiSelectItemStatic {
EVENT_CHANGE: string;
}
export declare class MultiSelectItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
doClick(...args: any[]): void;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
setSelected(v: boolean): void;
}

9
typescript/case/button/node/node.icon.arrow.ts

@ -0,0 +1,9 @@
import { NodeButton } from '../../../base/single/button/button.node';
export declare class IconArrowNode extends NodeButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
}

17
typescript/case/button/treeitem/item.first.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class FirstTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

17
typescript/case/button/treeitem/item.last.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class LastTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

17
typescript/case/button/treeitem/item.mid.treeleaf.ts

@ -0,0 +1,17 @@
import { BasicButton } from '../../../base/single/button/button.basic';
export declare class MidTreeLeafItem extends BasicButton {
static xtype: string;
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
doHighLight(...args: any[]): void;
unHighLight(...args: any[]): void;
getId(): string;
getPId(): string;
}

10
typescript/case/combo/combo.textvalue.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { _Widget, Widget } from "../../core/widget";
export interface _TextValueCombo extends _Widget {
populate(items: any): void;
@ -7,3 +7,11 @@ export interface _TextValueCombo extends _Widget {
export interface _TextValueComboStatic {
EVENT_CHANGE: string;
}
export declare class TextValueCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
populate(items: any): void;
}

13
typescript/case/combo/iconcombo/combo.icon.ts

@ -0,0 +1,13 @@
import { Widget } from '../../../core/widget';
export declare class IconCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
showView(): void;
hideView(): void;
populate(items: any[]): void;
}

65
typescript/index.ts

@ -1,13 +1,13 @@
import { _Combo, _ComboStatic } from "./base/combination/combo";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from "./base/combination/group.button";
import { _Tab, _TabStatic } from "./base/combination/tab";
import { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic, ButtonGroup } from "./base/combination/group.button";
import { _Tab, _TabStatic, Tab } from "./base/combination/tab";
import { _Pane, _PaneStatic } from "./base/pane";
import { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic";
import { _NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic } from "./base/single/button/buttons/button";
import { _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _NodeButton, NodeButton } from "./base/single/button/button.node";
import { _Button, _ButtonStatic, Button } from "./base/single/button/buttons/button";
import { TextButton, _TextButton, _TextButtonStatic } from "./base/single/button/buttons/button.text";
import { _IconTextItem, _IconTextItemStatic } from "./base/single/button/listitem/icontextitem";
import { _Editor, _EditorStatic } from "./base/single/editor/editor";
import { _Editor, _EditorStatic, Editor } from "./base/single/editor/editor";
import { _Iframe } from "./base/single/iframe/iframe";
import { _Checkbox, _CheckboxStatic } from "./base/single/input/checkbox";
import { _Input, _InputStatic } from "./base/single/input/input";
@ -16,10 +16,10 @@ import { _Label, Label } from "./base/single/label/label";
import { _Single, Single } from "./base/single/single";
import { _Text } from "./base/single/text";
import { _Trigger } from "./base/single/trigger/trigger";
import { _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change";
import { _MultiSelectItem, _MultiSelectItemStatic } from "./case/button/item.multiselect";
import { IconChangeButton, _IconChangeButton, _IconChangeButtonStatic } from "./case/button/icon/icon.change";
import { _MultiSelectItem, _MultiSelectItemStatic, MultiSelectItem } from "./case/button/item.multiselect";
import { _BubbleCombo, _BubbleComboStatic } from "./case/combo/bubblecombo/combo.bubble";
import { _TextValueCombo, _TextValueComboStatic } from "./case/combo/combo.textvalue";
import { _TextValueCombo, _TextValueComboStatic, TextValueCombo } from "./case/combo/combo.textvalue";
import { _SearchTextValueCombo, _SearchTextValueComboStatic } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue";
import { _SignEditor, _SignEditorStatic } from "./case/editor/editor.sign";
import { _LoadingPane } from "./case/loading/loading_pane";
@ -44,7 +44,7 @@ import { _AbsoluteLayout } from "./core/wrapper/layout/layout.absolute";
import { _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape";
import { _VerticalLayout } from "./core/wrapper/layout/layout.vertical";
import { _DefaultLayout } from "./core/wrapper/layout/layout.default";
import { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { DownListCombo, _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { Icon } from "./base/single/icon/icon";
import { _LeftVerticalAdapt } from "./core/wrapper/layout/adapt/adapt.leftvertical";
import { LeftRightVerticalAdaptLayout, RightVerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.leftrightvertical";
@ -53,6 +53,17 @@ import { HorizontalAutoLayout } from "./core/wrapper/layout/adapt/auto.horizonta
import { InlineVerticalAdaptLayout } from "./core/wrapper/layout/adapt/inline.vertical";
import { TableAdaptLayout } from "./core/wrapper/layout/adapt/adapt.table";
import { IconButton } from "./base/single/button/buttons/button.icon";
import { TextEditor } from "./widget/editor/editor.text";
import { IconLabel } from "./base/single/label/icon.label";
import { Popover, BarPopover } from "./base/layer/layer.popover";
import { IconCombo } from "./case/combo/iconcombo/combo.icon";
import { DynamicDateCombo } from "./widget/dynamicdate/dynamicdate.combo";
import { CustomTree } from "./base/tree/customtree";
import { ButtonTree } from "./base/combination/tree.button";
import { IconArrowNode } from "./case/button/node/node.icon.arrow";
import { MidTreeLeafItem } from "./case/button/treeitem/item.mid.treeleaf";
import { FirstTreeLeafItem } from "./case/button/treeitem/item.first.treeleaf";
import { LastTreeLeafItem } from "./case/button/treeitem/item.last.treeleaf";
type ClassConstructor<T extends {}> = T & {
@ -118,6 +129,18 @@ export interface BI extends _func, _i18n, _base, _inject {
RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout;
TableAdaptLayout: typeof TableAdaptLayout;
IconButton: typeof IconButton;
TextEditor: typeof TextEditor;
IconLabel: typeof IconLabel;
Popover: typeof Popover;
BarPopover: typeof BarPopover;
IconCombo: typeof IconCombo;
DynamicDateCombo: typeof DynamicDateCombo;
CustomTree: typeof CustomTree;
ButtonTree: typeof ButtonTree;
IconArrowNode: typeof IconArrowNode;
MidTreeLeafItem: typeof MidTreeLeafItem;
FirstTreeLeafItem: typeof FirstTreeLeafItem;
LastTreeLeafItem: typeof LastTreeLeafItem;
}
export default {
@ -137,4 +160,26 @@ export {
IconButton,
AbstractLabel,
Label,
TextButton,
DownListCombo,
IconChangeButton,
Button,
TextEditor,
TextValueCombo,
Editor,
IconLabel,
Popover,
BarPopover,
Tab,
IconCombo,
DynamicDateCombo,
MultiSelectItem,
CustomTree,
ButtonGroup,
ButtonTree,
NodeButton,
IconArrowNode,
MidTreeLeafItem,
FirstTreeLeafItem,
LastTreeLeafItem,
};

17
typescript/widget/downlist/combo.downlist.ts

@ -1,4 +1,4 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _DownListCombo extends _Widget {
hideView: () => void;
@ -12,4 +12,17 @@ export interface _DownListComboStatic {
EVENT_CHANGE: string;
EVENT_SON_VALUE_CHANGE: string;
EVENT_BEFORE_POPUPVIEW: string;
}
}
export declare class DownListCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_SON_VALUE_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
hideView: () => void;
showView: (e?: any) => void;
populate: (items?: any) => void;
}

24
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -0,0 +1,24 @@
import { Single } from '../../base/single/single';
export declare class DynamicDateCombo extends Single {
static xtype: string;
static Static: 1;
static Dynamic: 2;
static EVENT_KEY_DOWN: string;
static EVENT_CONFIRM: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CHANGE: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_POPUPVIEW: string;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getKey(): string;
hidePopupView(): void;
}

36
typescript/widget/editor/editor.text.ts

@ -0,0 +1,36 @@
import { Widget } from '../../core/widget';
export declare class TextEditor extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_CLICK: string;
static EVENT_KEY_DOWN: string;
static EVENT_SPACE: string;
static EVENT_BACKSPACE: string;
static EVENT_START: string;
static EVENT_PAUSE: string;
static EVENT_STOP: string;
static EVENT_CONFIRM: string;
static EVENT_CHANGE_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_ENTER: string;
static EVENT_RESTRICT: string;
static EVENT_REMOVE: string;
static EVENT_EMPTY: string;
setWaterMark(v: string): void;
focus(): void;
blur(): void;
setErrorText(v: string): void;
getErrorText(): string;
isValid(): boolean
}
Loading…
Cancel
Save