Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~dailer/fineui

es6
zsmj1994 4 years ago
parent
commit
57b8ae94c8
  1. 2
      changelog.md
  2. 4
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 4904
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 4
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 4
      dist/2.0/fineui_without_normalize.css
  11. 4
      dist/2.0/fineui_without_normalize.min.css
  12. 4
      dist/core.css
  13. 4862
      dist/core.js
  14. 2
      dist/core.js.map
  15. 4
      dist/demo.css
  16. 5312
      dist/demo.js
  17. 2
      dist/demo.js.map
  18. 4
      dist/fineui.css
  19. 4
      dist/fineui.ie.min.js
  20. 2
      dist/fineui.ie.min.js.map
  21. 4960
      dist/fineui.js
  22. 2
      dist/fineui.js.map
  23. 4
      dist/fineui.min.css
  24. 4
      dist/fineui.min.js
  25. 2
      dist/fineui.min.js.map
  26. 2781
      dist/fineui_without_jquery_polyfill.js
  27. 2
      dist/fineui_without_jquery_polyfill.js.map
  28. 781
      dist/fix/fix.js
  29. 2
      dist/font.css
  30. 27
      dist/lib/base/combination/group.button.d.ts
  31. 12
      dist/lib/base/combination/tab.d.ts
  32. 5
      dist/lib/base/combination/tree.button.d.ts
  33. 15
      dist/lib/base/layer/layer.popover.d.ts
  34. 22
      dist/lib/base/single/button/button.basic.d.ts
  35. 8
      dist/lib/base/single/button/button.node.d.ts
  36. 13
      dist/lib/base/single/button/buttons/button.d.ts
  37. 5
      dist/lib/base/single/button/buttons/button.icon.d.ts
  38. 11
      dist/lib/base/single/button/buttons/button.text.d.ts
  39. 5
      dist/lib/base/single/button/listitem/icontexticonitem.d.ts
  40. 38
      dist/lib/base/single/editor/editor.d.ts
  41. 4
      dist/lib/base/single/icon/icon.d.ts
  42. 10
      dist/lib/base/single/label/abstract.label.d.ts
  43. 4
      dist/lib/base/single/label/icon.label.d.ts
  44. 5
      dist/lib/base/single/label/label.d.ts
  45. 19
      dist/lib/base/single/single.d.ts
  46. 13
      dist/lib/base/tree/customtree.d.ts
  47. 9
      dist/lib/case/button/icon/icon.change.d.ts
  48. 10
      dist/lib/case/button/item.multiselect.d.ts
  49. 6
      dist/lib/case/button/node/node.icon.arrow.d.ts
  50. 10
      dist/lib/case/button/treeitem/item.first.treeleaf.d.ts
  51. 10
      dist/lib/case/button/treeitem/item.last.treeleaf.d.ts
  52. 10
      dist/lib/case/button/treeitem/item.mid.treeleaf.d.ts
  53. 7
      dist/lib/case/combo/combo.textvalue.d.ts
  54. 8
      dist/lib/case/combo/iconcombo/combo.icon.d.ts
  55. 25
      dist/lib/core/ob.d.ts
  56. 314
      dist/lib/core/widget.d.ts
  57. 20
      dist/lib/core/wrapper/layout.d.ts
  58. 4
      dist/lib/core/wrapper/layout/adapt/absolute.center.d.ts
  59. 4
      dist/lib/core/wrapper/layout/adapt/adapt.center.d.ts
  60. 4
      dist/lib/core/wrapper/layout/adapt/adapt.horizontal.d.ts
  61. 7
      dist/lib/core/wrapper/layout/adapt/adapt.leftrightvertical.d.ts
  62. 5
      dist/lib/core/wrapper/layout/adapt/adapt.leftvertical.d.ts
  63. 5
      dist/lib/core/wrapper/layout/adapt/adapt.table.d.ts
  64. 4
      dist/lib/core/wrapper/layout/adapt/adapt.vertical.d.ts
  65. 4
      dist/lib/core/wrapper/layout/adapt/auto.horizontal.d.ts
  66. 4
      dist/lib/core/wrapper/layout/adapt/inline.vertical.d.ts
  67. 5
      dist/lib/core/wrapper/layout/layout.absolute.d.ts
  68. 8
      dist/lib/core/wrapper/layout/layout.default.d.ts
  69. 4
      dist/lib/core/wrapper/layout/layout.flow.d.ts
  70. 8
      dist/lib/core/wrapper/layout/layout.tape.d.ts
  71. 5
      dist/lib/core/wrapper/layout/layout.vertical.d.ts
  72. 91
      dist/lib/index.d.ts
  73. 11
      dist/lib/widget/downlist/combo.downlist.d.ts
  74. 18
      dist/lib/widget/dynamicdate/dynamicdate.combo.d.ts
  75. 28
      dist/lib/widget/editor/editor.text.d.ts
  76. 2
      dist/resource.css
  77. 2
      dist/resource.js
  78. 380
      dist/utils.js
  79. 2
      dist/utils.js.map
  80. 4
      dist/utils.min.js
  81. 2
      dist/utils.min.js.map
  82. 2
      i18n/i18n.cn.js
  83. 4
      package.json
  84. 26
      src/base/pane.js
  85. 1
      src/base/single/input/file.js
  86. 4
      src/core/inject.js
  87. 4
      src/less/widget/multitree/trigger/multi.tree.button.checkselected.less
  88. 2
      src/widget/multitree/trigger/multi.tree.button.checkselected.js
  89. 6
      src/widget/multitree/trigger/searcher.multi.tree.js
  90. 44
      typescript/base/combination/group.button.ts
  91. 20
      typescript/base/combination/tab.ts
  92. 6
      typescript/base/combination/tree.button.ts
  93. 22
      typescript/base/layer/layer.popover.ts
  94. 40
      typescript/base/single/button/button.basic.ts
  95. 12
      typescript/base/single/button/button.node.ts
  96. 6
      typescript/base/single/button/buttons/button.icon.ts
  97. 17
      typescript/base/single/button/buttons/button.text.ts
  98. 20
      typescript/base/single/button/buttons/button.ts
  99. 6
      typescript/base/single/button/listitem/icontexticonitem.ts
  100. 55
      typescript/base/single/editor/editor.ts
  101. Some files were not shown because too many files have changed in this diff Show More

2
changelog.md

@ -1,5 +1,7 @@
# 更新日志
2.0(2020-12)
- 复选下拉树显示查看已选效果改成和复选下拉列表一致
- Pane系列提供small和big两种大小的加载动画
- 同步树列表系列支持不显示节点连接线和展开收起图标
- 规范了下拉树trigger中显示值的显示顺序
- bi.editor支持传入autocomplete

4
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

4904
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

4
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

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

4862
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

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

5312
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

4
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

4960
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

4
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

2781
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;
}

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

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { Single, _Single } from "../single";
export interface _BasicButton extends _Single {
_createShadow(): void;
bindEvent(): void;
@ -21,3 +21,23 @@ export interface _BasicButton extends _Single {
export interface _BasicButtonStatic {
EVENT_CHANGE: string;
}
export declare class BasicButton extends Single {
static EVENT_CHANGE: string;
_createShadow(): void;
bindEvent(): void;
_trigger(e: Event): void;
_doClick(e: Event): void;
beforeClick(): void;
doClick(): void;
handle(): BasicButton;
hover(): void;
dishover(): void;
setSelected(b: boolean): void;
isSelected(): boolean;
isOnce(): boolean;
isForceSelected(): boolean;
isForceNotSelected(): boolean;
isDisableSelected(): boolean;
setText(v: string): void;
getText(): string;
}

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;
}

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

@ -0,0 +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;
}

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

@ -0,0 +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;
}

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

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

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

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { _Single, Single } from "../single";
export interface _AbstractLabel extends _Single {
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
@ -8,3 +8,11 @@ export interface _AbstractLabel extends _Single {
getText(): string;
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;
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;
}

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

@ -1,5 +1,8 @@
import { _AbstractLabel } from "./abstract.label";
import { _AbstractLabel, AbstractLabel } from "./abstract.label";
export interface _Label extends _AbstractLabel {
doRedMark(...args: any[]): void;
unRedMark(...args: any[]): void;
}
export declare class Label extends AbstractLabel {
static xtype: string;
}

19
dist/lib/base/single/single.d.ts vendored

@ -1,11 +1,11 @@
import { _Widget } from "../../core/widget";
import { Widget, _Widget } from "../../core/widget";
export interface _Single extends _Widget {
_showToolTip(e: Event, opt?: SingleOpt): void;
_hideTooltip(): void;
_clearTimeOut(): void;
enableHover(opt?: SingleOpt): void;
disabledHover(): void;
setTitle(title: string, opt?: SingleOpt): void;
setTitle(title: string | Function, opt?: SingleOpt): void;
setWarningTitle(title: string, opt?: SingleOpt): void;
setTipType(v: string): void;
getTipType(): string;
@ -18,4 +18,19 @@ interface SingleOpt {
container?: any;
belowMouse?: boolean;
}
export declare class Single extends Widget {
_showToolTip(e: Event, opt?: SingleOpt): void;
_hideTooltip(): void;
_clearTimeOut(): void;
enableHover(opt?: SingleOpt): void;
disabledHover(): void;
setTitle(title: string | Function, opt?: SingleOpt): void;
setWarningTitle(title: string, opt?: SingleOpt): void;
setTipType(v: string): void;
getTipType(): string;
isReadOnly(): boolean;
getTitle(): string;
getWarningTitle(): string;
populate(..._args: any[]): void;
}
export {};

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;
}

25
dist/lib/core/ob.d.ts vendored

@ -32,4 +32,29 @@ interface Props {
}[];
[key: string]: any;
}
export declare class OB {
props: Props | (<T>(config: T) => Props & T);
options: this["props"];
events?: {
[eventName: string]: Function[];
};
init?(): void;
destroyed?(): void;
_defaultConfig(..._args: any[]): {
[key: string]: any;
} | {};
_init(): void;
_initListeners(): void;
_getEvents(): {
[eventName: string]: Function[];
};
on(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): void;
un(eName: string, fn: Function): void;
_initRef(): void;
_purgeRef(): void;
purgeListeners(): void;
fireEvent(eName: string, ...args: any[]): boolean | null;
destroy(): void;
}
export {};

314
dist/lib/core/widget.d.ts vendored

@ -1,4 +1,4 @@
import { _OB } from "./ob";
import { OB, _OB } from "./ob";
export interface _WidgetStatic {
/**
*
@ -324,4 +324,316 @@ interface RenderEngine {
*/
createFragment: () => DocumentFragment;
}
export declare class Widget extends OB {
/**
*
* @param engine
*/
static registerRenderEngine(engine: RenderEngine): void;
/**
* loading的锁
*/
__asking: boolean;
/**
*
*/
__async: boolean;
/**
* widget类标识符
*/
widgetName: string | null;
/**
*
*/
_isRoot: boolean;
/**
*
*/
_parent: _Widget | null;
/**
* dom的类jQuery对象
*/
element: {
width(): number;
height(): number;
[key: string]: any;
};
/**
*
*/
_children: {
[key: string]: _Widget;
};
/**
*
*/
_isMounted: boolean;
/**
* enable
*/
_manualSetEnable: boolean;
/**
* valid
*/
_manualSetValid: boolean;
/**
*
*/
_renderEngine: RenderEngine;
_store(): void;
/**
*
*/
beforeInit?(cb: Function): void;
/**
*
*/
beforeCreate?(): void;
/**
*
*/
created?(): void;
/**
*
*/
render?(): any;
/**
*
*/
beforeMount?(): void;
/**
*
*/
mounted?(): void;
/**
*
*/
shouldUpdate?(): void;
/**
*
*/
update?(...args: any[]): void;
/**
*
*/
beforeDestroy?(): void;
/**
*
*/
destroyed?(): void;
/**
* render函数
*/
_initRender: () => void;
/**
* render函数
*/
_render: () => void;
/**
*
*/
_initRoot: () => void;
/**
*
*/
_initElementWidth: () => void;
/**
*
*/
_initElementHeight: () => void;
/**
*
*/
_initVisual: () => void;
/**
*
*/
_initEffects: () => void;
/**
* mounted锁
*/
_initState: () => void;
/**
* dom
*/
_initElement: () => void;
/**
*
*/
_setParent: () => void;
/**
* @param force
* @param deep force处理
* @param lifeHook
* @param predicate widget的回调
*/
_mount(force?: boolean, deep?: boolean, lifeHook?: boolean, predicate?: Function): boolean;
/**
*
*/
_mountChildren?(): void;
/**
*
*/
isMounted(): boolean;
/**
*
*/
setWidth(w: number): void;
/**
*
*/
setHeight(h: number): void;
/**
*
*/
_setEnable(enable: boolean): void;
/**
*
*/
_setValid(valid: boolean): void;
/**
*
*/
_setVisible(visible: boolean): void;
/**
*
*/
setEnable(enable: boolean): void;
/**
*
*/
setVisible(visible: boolean): void;
/**
*
*/
setValid(valid: boolean): void;
/**
*
* @param args arguments参数
*/
doBehavior(...args: any[]): void;
/**
*
*/
getWidth(): number;
/**
*
*/
getHeight(): number;
/**
*
*/
isValid(): boolean;
/**
*
*/
addWidget(_name: any, _widget: _Widget): _Widget;
/**
* wigetname获取子元素实例
*/
getWidgetByName(_name: string): _Widget | undefined;
/**
*
* @param nameOrWidget widgetName或widget实例
*/
removeWidget(nameOrWidget: string | _Widget): void;
/**
*
*/
hasWidget(name: string): boolean;
/**
* widgetName
*/
getName(): string;
/**
* tag
* @param tag html tag
*/
setTag(tag: string): void;
/**
* tag
*/
getTag(): string;
/**
*
* @param key
* @param value
*/
attr(key: string | {
[key: string]: any;
}, value?: any): any;
/**
* text
*/
getText(): string;
/**
* text
*/
setText(text: string): void;
/**
*
*/
getValue(): any;
/**
*
*/
setValue(...args: any[]): void;
/**
* enable
*/
isEnabled(): boolean;
/**
*
*/
isVisible(): boolean;
/**
* disable元素
*/
disable(): void;
/**
* enable元素
*/
enable(): void;
/**
* widget合法
*/
valid(): void;
/**
* 使
*/
invalid(): void;
/**
* 使
*/
invisible(..._args: any[]): void;
/**
*
*/
visible(..._args: any[]): void;
/**
*
*/
__d(): void;
/**
*
*/
_unMount(): void;
/**
* hang元素
*/
isolate(): void;
/**
*
*/
empty(): void;
/**
* destory方法
*/
_destroy(): void;
/**
* destory元素
*/
destroy(): void;
}
export {};

20
dist/lib/core/wrapper/layout.d.ts vendored

@ -1,4 +1,4 @@
import { _Widget } from "../widget";
import { _Widget, Widget } from "../widget";
export interface _Layout extends _Widget {
addItem(item: any): any;
prependItem(item: any): any;
@ -16,3 +16,21 @@ export interface _Layout extends _Widget {
populate<T>(items?: T[]): void;
resize(): void;
}
export declare class Layout extends Widget {
static xtype: string;
addItem(item: any): any;
prependItem(item: any): any;
addItemAt(index: string, item: any): any;
removeItemAt(indexes: any): void;
shouldUpdateItem(index: number, item: any): boolean;
updateItemAt(index: number, item: any): any;
addItems<T>(items: T[], context?: any): void;
prependItems<T>(items: T[], context?: any): void;
getValue<T>(): T[];
setText(v: string): void;
update(opt: any): any;
stroke<T>(items: T[]): void;
removeWidget(nameOrWidget: any): void;
populate<T>(items?: T[]): void;
resize(): void;
}

4
dist/lib/core/wrapper/layout/adapt/absolute.center.d.ts vendored

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

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

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

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

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

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

@ -0,0 +1,7 @@
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.leftvertical.d.ts vendored

@ -0,0 +1,5 @@
import { _Layout } from "../../layout";
export interface _LeftVerticalAdapt extends _Layout {
resize(): void;
populate<T>(items?: T[]): void;
}

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/adapt.vertical.d.ts vendored

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

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;
}

5
dist/lib/core/wrapper/layout/layout.absolute.d.ts vendored

@ -1,6 +1,9 @@
import { _Layout } from "../layout";
import { Layout, _Layout } from "../layout";
export interface _AbsoluteLayout extends _Layout {
resize(): void;
stroke<T>(items: T[]): void;
populate<T>(items?: T[]): void;
}
export declare class AbsoluteLayout extends Layout {
static xtype: string;
}

8
dist/lib/core/wrapper/layout/layout.default.d.ts vendored

@ -0,0 +1,8 @@
import { Layout, _Layout } from "../layout";
export interface _DefaultLayout extends _Layout {
resize(): void;
populate<T>(items?: T[]): void;
}
export declare class DefaultLayout extends Layout {
static xtype: string;
}

4
dist/lib/core/wrapper/layout/layout.flow.d.ts vendored

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

8
dist/lib/core/wrapper/layout/layout.tape.d.ts vendored

@ -1,4 +1,4 @@
import { _Layout } from "../layout";
import { _Layout, Layout } from "../layout";
export interface _HTapeLayout extends _Layout {
resize(): void;
stroke<T>(items: T[]): void;
@ -11,3 +11,9 @@ export interface _VTapeLayout extends _Layout {
update(): void;
populate<T>(items?: T[]): void;
}
export declare class HTapeLayout extends Layout {
static xtype: string;
}
export declare class VTapeLayout extends Layout {
static xtype: string;
}

5
dist/lib/core/wrapper/layout/layout.vertical.d.ts vendored

@ -1,5 +1,8 @@
import { _Layout } from "../layout";
import { Layout, _Layout } from "../layout";
export interface _VerticalLayout extends _Layout {
resize(): void;
populate<T>(items?: T[]): void;
}
export declare class VerticalLayout extends Layout {
static xtype: string;
}

91
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 } 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 { _BasicButton, _BasicButtonStatic, BasicButton } from "./base/single/button/button.basic";
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 { _Single } from "./base/single/single";
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";
@ -37,13 +37,38 @@ import { _func } from "./core/func";
import { _i18n } from "./core/i18n";
import { _Plugin } from "./core/plugin";
import { _OB } from "./core/ob";
import { _Widget, _WidgetStatic } from "./core/widget";
import { _Widget, _WidgetStatic, Widget } from "./core/widget";
import { _inject } from "./core/inject";
import { _Layout } from "./core/wrapper/layout";
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 { _DownListCombo, _DownListComboStatic } from "./widget/downlist/combo.downlist";
import { Layout, _Layout } from "./core/wrapper/layout";
import { AbsoluteLayout, _AbsoluteLayout } from "./core/wrapper/layout/layout.absolute";
import { HTapeLayout, VTapeLayout, _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape";
import { VerticalLayout, _VerticalLayout } from "./core/wrapper/layout/layout.vertical";
import { DefaultLayout, _DefaultLayout } from "./core/wrapper/layout/layout.default";
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";
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";
import { AbsoluteCenterLayout } from "./core/wrapper/layout/adapt/absolute.center";
import { HorizontalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.horizontal";
import { FloatLeftLayout } from "./core/wrapper/layout/layout.flow";
import { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center";
import { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical";
declare type ClassConstructor<T extends {}> = T & {
new (config: any): T;
(config: any): T;
@ -94,10 +119,38 @@ export interface BI extends _func, _i18n, _base, _inject {
Iframe: ClassConstructor<_Iframe>;
AbsoluteLayout: ClassConstructor<_AbsoluteLayout>;
VerticalLayout: ClassConstructor<_VerticalLayout>;
DefaultLayout: ClassConstructor<_DefaultLayout>;
Input: ClassConstructor<_Input> & _InputStatic;
SearchTextValueCombo: ClassConstructor<_SearchTextValueCombo> & _SearchTextValueComboStatic;
Icon: typeof Icon;
LeftVerticalAdaptLayout: ClassConstructor<_LeftVerticalAdapt>;
LeftRightVerticalAdaptLayout: typeof LeftRightVerticalAdaptLayout;
IconTextIconItem: typeof IconTextIconItem;
HorizontalAutoLayout: typeof HorizontalAutoLayout;
InlineVerticalAdaptLayout: typeof InlineVerticalAdaptLayout;
RightVerticalAdaptLayout: typeof RightVerticalAdaptLayout;
TableAdaptLayout: typeof TableAdaptLayout;
AbsoluteCenterLayout: typeof AbsoluteCenterLayout;
HorizontalAdaptLayout: typeof HorizontalAdaptLayout;
FloatLeftLayout: typeof FloatLeftLayout;
CenterAdaptLayout: typeof CenterAdaptLayout;
VerticalAdaptLayout: typeof VerticalAdaptLayout;
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, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, 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

2
dist/resource.js vendored

@ -92,7 +92,7 @@ BI.i18n = {
"BI-Summary_Values": "汇总",
"BI-Basic_Clear": "清除",
"BI-Upload_File_Size_Error": "文件大小不支持",
"BI-Upload_File_Count_Error": "超出上传数量上限,请重新上传",
"BI-Upload_File_Count_Error": "超出上传数量上限{R1},请重新上传",
"BI-Up_Page": "向上翻页",
"BI-Basic_Simple_Sunday": "日",
"BI-Multi_Date_Relative_Current_Time": "相对当前时间",

380
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
i18n/i18n.cn.js

@ -91,7 +91,7 @@ BI.i18n = {
"BI-Summary_Values": "汇总",
"BI-Basic_Clear": "清除",
"BI-Upload_File_Size_Error": "文件大小不支持",
"BI-Upload_File_Count_Error": "超出上传数量上限,请重新上传",
"BI-Upload_File_Count_Error": "超出上传数量上限{R1},请重新上传",
"BI-Up_Page": "向上翻页",
"BI-Basic_Simple_Sunday": "日",
"BI-Multi_Date_Relative_Current_Time": "相对当前时间",

4
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20201209195210",
"version": "2.0.20201214202141",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",
@ -55,7 +55,7 @@
},
"scripts": {
"webpack:dev": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js -p --progress --host 0.0.0.0 --config=webpack/webpack.dev.js --mode development",
"webpack:prod": "webpack -p --progress --config=webpack/webpack.prod.js --mode production",
"webpack:prod": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.prod.js --mode production",
"start": "node server.js",
"build": "npm run webpack:prod && tsc",
"postbuild": "node ./lib/postbuild/postbuild.js",

26
src/base/pane.js

@ -13,6 +13,7 @@ BI.Pane = BI.inherit(BI.Widget, {
_baseCls: "bi-pane",
tipText: BI.i18nText("BI-No_Selected_Item"),
loadingText: "",
loadingSize: "small",
overlap: true,
onLoaded: BI.emptyFn
});
@ -41,25 +42,25 @@ BI.Pane = BI.inherit(BI.Widget, {
var loadingAnimation = BI.createWidget({
type: "bi.horizontal",
cls: "bi-loading-widget" + (isIE ? " wave-loading hack" : ""),
height: 30,
width: 30,
hgap: 5,
height: this._getSize(60),
width: this._getSize(60),
hgap: this._getSize(10),
vgap: 2.5,
items: isIE ? [] : [{
type: "bi.layout",
cls: "animate-rect rect1",
height: 25,
width: 3
height: this._getSize(50),
width: this._getSize(5),
}, {
type: "bi.layout",
cls: "animate-rect rect2",
height: 25,
width: 3
height: this._getSize(50),
width: this._getSize(5),
}, {
type: "bi.layout",
cls: "animate-rect rect3",
height: 25,
width: 3
height: this._getSize(50),
width: this._getSize(5),
}]
});
// pane在同步方式下由items决定tipText的显示与否
@ -88,6 +89,10 @@ BI.Pane = BI.inherit(BI.Widget, {
this.element.addClass("loading-status");
},
_getSize: function(v) {
return Math.ceil(v / (this.options.loadingSize === 'small' ? 2 : 1));
},
_getLoadingTipItems: function (loadingTip) {
var o = this.options;
var loadingTipItems = [{
@ -96,7 +101,8 @@ BI.Pane = BI.inherit(BI.Widget, {
}];
BI.isNotEmptyString(o.loadingText) && loadingTipItems.push({
type: "bi.text",
text: o.loadingText
text: o.loadingText,
tgap: this._getSize(10),
});
return [{

1
src/base/single/input/file.js

@ -551,7 +551,6 @@
var input = wrap.dom.input.cloneNode(true);
var files = F(wrap.dom.input);
if (wrap.maxLength !== -1 && wrap.maxLength < files.length) {
BI.Msg.toast(BI.i18nText("BI-Upload_File_Count_Error"), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 2
});

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) {

4
src/less/widget/multitree/trigger/multi.tree.button.checkselected.less

@ -5,4 +5,8 @@
color: @color-bi-text-highlight;
z-index: 1;
}
.trigger-check-text {
.border-radius(8px);
z-index: 1;
}
}

2
src/widget/multitree/trigger/multi.tree.button.checkselected.js

@ -26,7 +26,7 @@ BI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, {
this.checkSelected = BI.createWidget({
type: "bi.text_button",
cls: "trigger-check-selected",
cls: "bi-high-light-background trigger-check-text",
invisible: true,
hgap: 4,
text: BI.i18nText("BI-Check_Selected"),

6
src/widget/multitree/trigger/searcher.multi.tree.js

@ -132,8 +132,10 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
this.editor.setState(BI.Selection.None);
} else {
var text = "";
BI.each(ob.value, function (name, children) {
var childNodes = getChildrenNode(children);
var value = ob.value;
var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;

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;
}

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

@ -1,4 +1,4 @@
import { _Single } from "../single";
import { Single, _Single } from "../single";
export interface _BasicButton extends _Single {
_createShadow(): void;
@ -39,3 +39,41 @@ export interface _BasicButton extends _Single {
export interface _BasicButtonStatic {
EVENT_CHANGE: string;
}
export declare class BasicButton extends Single {
static EVENT_CHANGE: string;
_createShadow(): void;
bindEvent(): void;
_trigger(e: Event): void;
_doClick(e: Event): void;
beforeClick(): void;
doClick(): void;
handle(): BasicButton;
hover(): void;
dishover(): void;
setSelected(b: boolean): void;
isSelected(): boolean;
isOnce(): boolean;
isForceSelected(): boolean;
isForceNotSelected(): boolean;
isDisableSelected(): boolean;
setText(v: string): void;
getText(): string;
}

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;
}

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

@ -0,0 +1,6 @@
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;
}

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

@ -0,0 +1,6 @@
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;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save