Compare commits

..

No commits in common. 'master' and 'master' have entirely different histories.

  1. 1
      packages/demo/src/demo/widget/yearmonthinterval/demo.year_month_interval.js
  2. BIN
      packages/fineui/dist/font/iconfont.eot
  3. 388
      packages/fineui/dist/font/iconfont.svg
  4. BIN
      packages/fineui/dist/font/iconfont.ttf
  5. BIN
      packages/fineui/dist/font/iconfont.woff
  6. BIN
      packages/fineui/dist/font/iconfont.woff2
  7. 4
      packages/fineui/package.json
  8. 9
      packages/fineui/src/base/combination/tab.js
  9. 9
      packages/fineui/src/base/single/input/radio/radio.js
  10. 28
      packages/fineui/src/case/combo/iconcombo/combo.icon.js
  11. 1
      packages/fineui/src/case/toolbar/toolbar.multiselect.js
  12. 4
      packages/fineui/src/case/ztree/asynctree.js
  13. 41
      packages/fineui/src/core/1.lodash.js
  14. 2
      packages/fineui/src/core/2.base.js
  15. 2
      packages/fineui/src/core/5.inject.js
  16. 6
      packages/fineui/src/core/controller/controller.broadcast.js
  17. 5
      packages/fineui/src/core/utils/dom.js
  18. 4
      packages/fineui/src/less/base/single/button/button.less
  19. 7
      packages/fineui/src/less/base/tree/ztree.less
  20. 7
      packages/fineui/src/widget/downlist/combo.downlist.js
  21. 24
      packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js
  22. 2
      packages/fineui/src/widget/dynamicdate/dynamicdate.param.item.js
  23. 28
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
  24. 2
      packages/fineui/src/widget/multilayerdownlist/combo.downlist.js
  25. 32
      packages/fineui/src/widget/multiselect/multiselect.insert.combo.js
  26. 2
      packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js
  27. 2
      packages/fineui/src/widget/multiselect/multiselect.trigger.js
  28. 4
      packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js
  29. 8
      packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js
  30. 76
      packages/fineui/src/widget/multitree/multi.tree.combo.js
  31. 4
      packages/fineui/src/widget/multitree/multi.tree.popup.js
  32. 4
      packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js
  33. 26
      packages/fineui/src/widget/numberinterval/numberinterval.js
  34. 10
      packages/fineui/src/widget/singleselect/search/singleselect.search.loader.js
  35. 25
      packages/fineui/src/widget/singleselect/singleselect.insert.combo.js
  36. 4
      packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js
  37. 11
      packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js
  38. 20
      packages/fineui/src/widget/timeinterval/dateinterval.js
  39. 20
      packages/fineui/src/widget/timeinterval/timeinterval.js
  40. 24
      packages/fineui/src/widget/year/combo.year.js
  41. 24
      packages/fineui/src/widget/yearmonth/combo.yearmonth.js
  42. 18
      packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js
  43. 24
      packages/fineui/src/widget/yearquarter/combo.yearquarter.js
  44. 4
      packages/fineui/typescript/case/combo/iconcombo/combo.icon.ts
  45. 1
      packages/fineui/typescript/index.ts
  46. 3
      packages/fineui/typescript/widget/downlist/combo.downlist.ts
  47. 6
      packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts
  48. 4
      packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
  49. 12
      packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts
  50. 19
      packages/fineui/typescript/widget/multiselect/switcher.checkselected.ts
  51. 13
      packages/fineui/typescript/widget/multitree/multi.tree.combo.ts
  52. 3
      packages/fineui/typescript/widget/multitree/multi.tree.popup.ts
  53. 7
      packages/fineui/typescript/widget/numberinterval/numberinterval.ts
  54. 5
      packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts
  55. 9
      packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts
  56. 13
      packages/fineui/typescript/widget/timeinterval/dateinterval.ts
  57. 11
      packages/fineui/typescript/widget/timeinterval/timeinterval.ts
  58. 7
      packages/fineui/typescript/widget/year/combo.year.ts
  59. 7
      packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts
  60. 11
      packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts
  61. 7
      packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts

1
packages/demo/src/demo/widget/yearmonthinterval/demo.year_month_interval.js

@ -20,7 +20,6 @@ export class YearMonthIntervalDemo extends Widget {
ref(_ref) {
self.interval = _ref;
},
format: "%Y/%X",
value: {
start: {
type: 2,

BIN
packages/fineui/dist/font/iconfont.eot vendored

Binary file not shown.

388
packages/fineui/dist/font/iconfont.svg vendored

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
packages/fineui/dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff vendored

Binary file not shown.

BIN
packages/fineui/dist/font/iconfont.woff2 vendored

Binary file not shown.

4
packages/fineui/package.json

@ -57,7 +57,7 @@
"jquery": "3.6.3"
},
"devDependencies": {
"core-js": "^3.37.1",
"core-js": "^3.30.2",
"cross-env": "^7.0.3"
}
}
}

9
packages/fineui/src/base/combination/tab.js

@ -13,8 +13,7 @@ import {
contains,
any,
isEqual,
LogicFactory,
Events,
LogicFactory
} from "@/core";
/**
@ -107,11 +106,7 @@ export class Tab extends Widget {
Widget.execWithContext(this, () => {
this.cardMap[v] = cardCreator(v);
});
const card = this.layout.addCardByName(v, this.cardMap[v]);
card.on(Events.DESTROY, () => {
this.layout.deleteCardByName(v);
delete this.cardMap[v];
});
this.layout.addCardByName(v, this.cardMap[v]);
}
}

9
packages/fineui/src/base/single/input/radio/radio.js

@ -56,4 +56,13 @@ export class Radio extends BasicButton {
this.fireEvent(Radio.EVENT_CHANGE);
}
}
setSelected(b) {
super.setSelected(b);
if (b) {
this.radio.element.addClass("bi-high-light-background");
} else {
this.radio.element.removeClass("bi-high-light-background");
}
}
}

28
packages/fineui/src/case/combo/iconcombo/combo.icon.js

@ -8,7 +8,6 @@ export class IconCombo extends Widget {
static xtype = "bi.icon_combo";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@ -56,18 +55,18 @@ export class IconCombo extends Widget {
value: o.value,
isShowDown: o.isShowDown,
});
this.popupEl = createWidget(o.popup, {
this.popup = createWidget(o.popup, {
type: IconComboPopup.xtype,
chooseType: o.chooseType,
items: o.items,
value: o.value,
});
this.popupEl.on(IconComboPopup.EVENT_CHANGE, () => {
this.setValue(this.popupEl.getValue());
this.popup.on(IconComboPopup.EVENT_CHANGE, () => {
this.setValue(this.popup.getValue());
this.iconCombo.hideView();
this.fireEvent(IconCombo.EVENT_CHANGE);
});
this.popupEl.on(Controller.EVENT_CHANGE, (...args) => {
this.popup.on(Controller.EVENT_CHANGE, (...args) => {
this.fireEvent(Controller.EVENT_CHANGE, ...args);
});
this.iconCombo = createWidget({
@ -83,20 +82,11 @@ export class IconCombo extends Widget {
el: this.trigger,
hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen,
popup: {
el: this.popupEl,
el: this.popup,
maxWidth: o.maxWidth,
maxHeight: o.maxHeight,
minWidth: o.minWidth,
ref: (ref) => {
this.popup = ref;
},
},
listeners: [{
eventName: Combo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.fireEvent(IconCombo.EVENT_BEFORE_POPUPVIEW);
},
}],
});
}
@ -110,19 +100,15 @@ export class IconCombo extends Widget {
setValue(v) {
this.trigger.setValue(v);
this.popupEl.setValue(v);
this.popup.setValue(v);
}
getValue() {
const value = this.popupEl.getValue();
const value = this.popup.getValue();
return isNull(value) ? [] : isArray(value) ? value : [value];
}
getPopup() {
return this.popup;
}
populate(items) {
this.options.items = items;
this.iconCombo.populate(items);

1
packages/fineui/src/case/toolbar/toolbar.multiselect.js

@ -126,7 +126,6 @@ export class MultiSelectBar extends BasicButton {
}
setSelected(v) {
super.setSelected(v);
this.checkbox.setSelected(v);
this.setHalfSelected(false);
}

4
packages/fineui/src/case/ztree/asynctree.js

@ -221,11 +221,15 @@ export class AsyncTree extends TreeView {
{
el: {
type: IconLabel.xtype,
width: 20,
height: 20,
cls: "button-loading-font anim-rotate bi-card",
ref: ref => {
loadingIcon = ref;
},
},
left: 5,
top: 5,
},
],
});

41
packages/fineui/src/core/1.lodash.js

@ -6845,46 +6845,6 @@
}
});
/**
* Creates an array of elements split into two groups, the first of which
* contains elements `predicate` returns truthy for, the second of which
* contains elements `predicate` returns falsey for. The predicate is
* invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the array of grouped elements.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': true },
* { 'user': 'pebbles', 'age': 1, 'active': false }
* ];
*
* _.partition(users, function(o) { return o.active; });
* // => objects for [['fred'], ['barney', 'pebbles']]
*
* // The `_.matches` iteratee shorthand.
* _.partition(users, { 'age': 1, 'active': false });
* // => objects for [['pebbles'], ['barney', 'fred']]
*
* // The `_.matchesProperty` iteratee shorthand.
* _.partition(users, ['active', false]);
* // => objects for [['barney', 'pebbles'], ['fred']]
*
* // The `_.property` iteratee shorthand.
* _.partition(users, 'active');
* // => objects for [['fred'], ['barney', 'pebbles']]
*/
var partition = createAggregator(function(result, value, key) {
result[key ? 0 : 1].push(value);
}, function() { return [[], []]; });
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
@ -10092,7 +10052,6 @@
lodash.omit = omit;
lodash.omitBy = omitBy;
lodash.once = once;
lodash.partition = partition;
lodash.pick = pick;
lodash.pickBy = pickBy;
lodash.range = range;

2
packages/fineui/src/core/2.base.js

@ -1518,7 +1518,7 @@ export function getTime() {
}
if (isNotNull(BI.timeZone)) {
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;
return dt.getTime() + BI.timeZone + new Date().getTimezoneOffset() * 60000;
}
return dt.getTime();

2
packages/fineui/src/core/5.inject.js

@ -62,7 +62,7 @@ const constantInjection = {};
export function constant(xtype, cls) {
if (isNotNull(constantInjection[xtype])) {
_global.console && console.warn(`constant: [${xtype}]already registered`);
_global.console && console.error(`constant: [${xtype}]already registered`);
} else {
constantInjection[xtype] = cls;
}

6
packages/fineui/src/core/controller/controller.broadcast.js

@ -16,13 +16,13 @@ export class BroadcastController extends Controller {
this._broadcasts[name] = [];
}
this._broadcasts[name].push(fn);
return () => this.remove(name, fn);
}
send(name) {
const args = [].slice.call(arguments, 1);
each(this._broadcasts[name]?.slice?.(), (i, fn) => fn(...args));
each(this._broadcasts[name], (i, fn) => fn(...args));
}
remove(name, fn) {
@ -34,7 +34,7 @@ export class BroadcastController extends Controller {
} else {
delete this._broadcasts[name];
}
return this;
}
}

5
packages/fineui/src/core/utils/dom.js

@ -743,13 +743,12 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
}
if (needAdaptHeight === true && popup.resetHeight) {
const comboRect = combo.element[0].getBoundingClientRect();
const scale = comboRect.height === 0 ? 1 : comboRect.height / combo.element.height();
const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0;
const positionTop = position.top + relativeOffset;
if (positionTop < comboRect.top) {
popup.resetHeight(Math.min((viewportBounds.height - positionTop) / scale, comboRect.top / scale, maxHeight));
popup.resetHeight(Math.min(viewportBounds.height - positionTop, comboRect.top, maxHeight));
} else if (positionTop >= comboRect.bottom) {
popup.resetHeight(Math.min((viewportBounds.height - positionTop) / scale, (viewportBounds.height - comboRect.bottom) / scale, maxHeight));
popup.resetHeight(Math.min(viewportBounds.height - positionTop, viewportBounds.height - comboRect.bottom, maxHeight));
}
}

4
packages/fineui/src/less/base/single/button/button.less

@ -580,10 +580,6 @@ body .bi-button, #body .bi-button {
.bi-button {
background-color: @color-bi-background-button-theme-dark;
&.clear {
background-color: transparent;
}
&.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark;

7
packages/fineui/src/less/base/tree/ztree.less

@ -335,10 +335,3 @@
margin-right: 2px;
vertical-align: top;
}
.ztree .button-loading-font {
.use-scale(width, 20px);
.use-scale(height, 20px);
.use-scale(left, 5px);
.use-scale(top, 5px);
}

7
packages/fineui/src/widget/downlist/combo.downlist.js

@ -108,9 +108,6 @@ export class DownListCombo extends Widget {
stopPropagation: o.stopPropagation,
maxHeight: o.maxHeight,
minWidth: o.minWidth,
ref: (ref) => {
this.popup = ref;
},
...o.popup,
},
});
@ -128,10 +125,6 @@ export class DownListCombo extends Widget {
this.downlistcombo.showView(e);
}
getPopup() {
return this.popup;
}
populate(items) {
this.popupView.populate(items);
}

24
packages/fineui/src/widget/dynamicdate/dynamicdate.combo.js

@ -208,7 +208,7 @@ export class DynamicDateCombo extends Single {
min: opts.minDate,
max: opts.maxDate,
ref: _ref => {
this.popupEl = _ref;
this.popup = _ref;
},
listeners: [
{
@ -238,7 +238,7 @@ export class DynamicDateCombo extends Single {
{
eventName: DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
const value = this.popupEl.getValue();
const value = this.popup.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@ -249,7 +249,7 @@ export class DynamicDateCombo extends Single {
{
eventName: DynamicDatePopup.EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateCombo.EVENT_CONFIRM);
},
@ -262,10 +262,6 @@ export class DynamicDateCombo extends Single {
}
],
},
ref: (ref) => {
this.popup = ref;
},
...opts.popup,
},
// // DEC-4250 和复选下拉一样,点击triggerBtn不默认收起
// hideChecker: function (e) {
@ -275,9 +271,9 @@ export class DynamicDateCombo extends Single {
{
eventName: Combo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.popupEl.setMinDate(opts.minDate);
this.popupEl.setMaxDate(opts.maxDate);
this.popupEl.setValue(this.storeValue);
this.popup.setMinDate(opts.minDate);
this.popup.setMaxDate(opts.maxDate);
this.popup.setValue(this.storeValue);
this.fireEvent(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);
},
}
@ -336,14 +332,14 @@ export class DynamicDateCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
this.popupEl && this.popupEl.setMinDate(minDate);
this.popup && this.popup.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
this.popupEl && this.popupEl.setMaxDate(maxDate);
this.popup && this.popup.setMaxDate(maxDate);
}
setValue(v) {
@ -360,10 +356,6 @@ export class DynamicDateCombo extends Single {
return this.trigger.getKey();
}
getPopup() {
return this.popup;
}
hidePopupView() {
this.combo.hideView();
}

2
packages/fineui/src/widget/dynamicdate/dynamicdate.param.item.js

@ -79,7 +79,7 @@ export class DynamicDateParamItem extends Widget {
value: 0,
},
{
text: i18nText("BI-Basic_Later"),
text: i18nText("BI-Basic_Behind"),
value: 1,
}
],

28
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -216,7 +216,7 @@ export class DynamicDateTimeCombo extends Single {
min: opts.minDate,
max: opts.maxDate,
ref: _ref => {
this.popupEl = _ref;
this.popup = _ref;
},
listeners: [
{
@ -249,7 +249,7 @@ export class DynamicDateTimeCombo extends Single {
{
eventName: DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
const value = this.popupEl.getValue();
const value = this.popup.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@ -260,7 +260,7 @@ export class DynamicDateTimeCombo extends Single {
{
eventName: DynamicDateTimePopup.EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateTimeCombo.EVENT_CONFIRM);
}
@ -271,20 +271,16 @@ export class DynamicDateTimeCombo extends Single {
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_YEAR_MONTH_POPUPVIEW);
}
}
],
},
ref: (ref) => {
this.popup = ref;
},
...opts.popup,
]
}
},
listeners: [
{
eventName: Combo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.popupEl.setMinDate(opts.minDate);
this.popupEl.setMaxDate(opts.maxDate);
this.popupEl.setValue(this.storeValue);
this.popup.setMinDate(opts.minDate);
this.popup.setMaxDate(opts.maxDate);
this.popup.setValue(this.storeValue);
this.fireEvent(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);
}
}
@ -343,14 +339,14 @@ export class DynamicDateTimeCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
this.popupEl && this.popupEl.setMinDate(minDate);
this.popup && this.popup.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
this.popupEl && this.popupEl.setMaxDate(maxDate);
this.popup && this.popup.setMaxDate(maxDate);
}
setValue(v) {
@ -367,10 +363,6 @@ export class DynamicDateTimeCombo extends Single {
return this.trigger.getKey();
}
getPopup() {
return this.popup;
}
hidePopupView() {
this.combo.hideView();
}

2
packages/fineui/src/widget/multilayerdownlist/combo.downlist.js

@ -23,7 +23,6 @@ export class MultiLayerDownListCombo extends Widget {
container: null,
stopPropagation: false,
el: {},
popup: {},
});
}
@ -66,7 +65,6 @@ export class MultiLayerDownListCombo extends Widget {
el: this.popupview,
stopPropagation: o.stopPropagation,
maxHeight: 1000,
...o.popup,
},
});

32
packages/fineui/src/widget/multiselect/multiselect.insert.combo.js

@ -47,16 +47,12 @@ export class MultiSelectInsertCombo extends Single {
static REQ_GET_ALL_DATA = "-1";
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW = "EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW";
static EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW = "EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@ -66,8 +62,6 @@ export class MultiSelectInsertCombo extends Single {
height: 24,
itemHeight: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
allowEdit: true,
popup: {},
masker: {},
});
}
@ -103,8 +97,6 @@ export class MultiSelectInsertCombo extends Single {
this.trigger = createWidget({
type: MultiSelectInsertTrigger.xtype,
popup: o.popup,
masker: o.masker,
allowEdit: o.allowEdit,
height: toPix(o.height, o.simple ? 1 : 2),
text: o.text,
@ -130,7 +122,6 @@ export class MultiSelectInsertCombo extends Single {
this.trigger.on(MultiSelectInsertTrigger.EVENT_START, function() {
self._setStartValue("");
this.getSearcher().setValue(self.storeValue);
self.fireEvent(MultiSelectInsertCombo.EVENT_START);
});
this.trigger.on(MultiSelectInsertTrigger.EVENT_STOP, () => {
self._setStartValue("");
@ -250,14 +241,12 @@ export class MultiSelectInsertCombo extends Single {
self.trigger.getSearcher().adjustView();
});
},
...o.popup,
},
value: o.value,
hideChecker(e) {
return (
triggerBtn.element.find(e.target).length === 0 &&
size(self.numberCounter.getView()?.element.find(e.target)) === 0 &&
size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0
self.numberCounter.element.find(e.target).length === 0
);
},
});
@ -270,7 +259,6 @@ export class MultiSelectInsertCombo extends Single {
nextTick(() => {
self._populate();
});
self.fireEvent(MultiSelectInsertCombo.EVENT_BEFORE_POPUPVIEW);
});
// 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件
this.wants2Quit = false;
@ -302,8 +290,6 @@ export class MultiSelectInsertCombo extends Single {
valueFormatter: o.valueFormatter,
itemsCreator: bind(this._itemsCreator4Trigger, this),
value: o.value,
masker: o.masker,
popup: o.popup,
});
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, () => {
if (!self.combo.isViewVisible()) {
@ -312,10 +298,6 @@ export class MultiSelectInsertCombo extends Single {
});
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function() {
this.updateSelectedValue(self.storeValue);
self.fireEvent(MultiSelectInsertCombo.EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW);
});
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_AFTER_POPUPVIEW, function() {
self.fireEvent(MultiSelectInsertCombo.EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW);
});
this.numberCounter.on(Events.VIEW, b => {
@ -573,16 +555,4 @@ export class MultiSelectInsertCombo extends Single {
this._populate(...arguments);
this.numberCounter.populateSwitcher(...arguments);
}
getPopup() {
return this.popup;
}
getNumberCounter() {
return this.numberCounter;
}
getTrigger() {
return this.trigger;
}
}

2
packages/fineui/src/widget/multiselect/multiselect.insert.trigger.js

@ -50,7 +50,7 @@ export class MultiSelectInsertTrigger extends Trigger {
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight,
watermark: o.watermark,
popup: o.popup,
popup: {},
adapter: o.adapter,
masker: o.masker,
value: o.value,

2
packages/fineui/src/widget/multiselect/multiselect.trigger.js

@ -50,7 +50,7 @@ export class MultiSelectTrigger extends Trigger {
valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
watermark: o.watermark,
popup: o.popup,
popup: {},
adapter: o.adapter,
masker: o.masker,
value: o.value,

4
packages/fineui/src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -132,10 +132,6 @@ export class MultiSelectInsertSearcher extends Widget {
}
}
getSearcher() {
return this.searcher;
}
adjustView() {
this.searcher.adjustView();
}

8
packages/fineui/src/widget/multiselect/trigger/switcher.checkselected.js

@ -9,8 +9,8 @@ export class MultiSelectCheckSelectedSwitcher extends Widget {
static EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
static EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
static EVENT_TRIGGER_COMBO = "EVENT_TRIGGER_COMBO";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@ -49,6 +49,7 @@ export class MultiSelectCheckSelectedSwitcher extends Widget {
itemsCreator: o.itemsCreator,
onClickContinueSelect() {
self.switcher.hideView();
self.fireEvent(MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO);
},
ref(_ref) {
self.checkPane = _ref;
@ -73,7 +74,6 @@ export class MultiSelectCheckSelectedSwitcher extends Widget {
const me = this;
nextTick(() => {
me._populate();
self.fireEvent(MultiSelectCheckSelectedSwitcher.EVENT_AFTER_POPUPVIEW);
});
});
}
@ -82,10 +82,6 @@ export class MultiSelectCheckSelectedSwitcher extends Widget {
this.switcher.adjustView();
}
getView() {
return this.switcher.getView();
}
hideView() {
this.switcher.empty();
this.switcher.hideView();

76
packages/fineui/src/widget/multitree/multi.tree.combo.js

@ -10,7 +10,7 @@ import {
VerticalAdaptLayout,
deepClone,
Selection,
size
SIZE_CONSANTS
} from "@/core";
import { Single, Combo } from "@/base";
import { MultiTreeSearcher } from "./trigger/searcher.multi.tree";
@ -27,15 +27,12 @@ export class MultiTreeCombo extends Single {
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
static EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW = "EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW";
static EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW = "EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@ -45,8 +42,6 @@ export class MultiTreeCombo extends Single {
height: 24,
allowEdit: true,
isNeedAdjustWidth: true,
popup: {},
masker: {},
});
}
@ -68,20 +63,23 @@ export class MultiTreeCombo extends Single {
this.storeValue = { value: o.value || {} };
this.trigger = createWidget({
type: MultiSelectTrigger.xtype,
popup: o.popup,
masker: o.masker,
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: toPix(o.height, o.simple ? 1 : 2),
valueFormatter: o.valueFormatter,
text: o.text,
defaultText: o.defaultText,
watermark: o.watermark,
adapter: () => {
return this.popup.getView();
masker: {
offset: {
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
},
searcher: {
type: MultiTreeSearcher.xtype,
type: "bi.multi_tree_searcher",
itemsCreator: o.itemsCreator,
listeners: [
{
@ -106,6 +104,8 @@ export class MultiTreeCombo extends Single {
type: MultiTreePopup.xtype,
ref() {
self.popup = this;
self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this);
},
listeners: [
{
@ -160,16 +160,13 @@ export class MultiTreeCombo extends Single {
});
},
maxWidth: o.isNeedAdjustWidth ? "auto" : 500,
...o.popup,
},
isNeedAdjustWidth: o.isNeedAdjustWidth,
value: { value: o.value || {} },
hideChecker(e) {
return (
triggerBtn.element.find(e.target).length === 0 &&
size(self.numberCounter.getView()?.element.find(e.target)) === 0 &&
size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0 &&
self.trigger.getSearcher().getSearcher().getView()?.element[0] !== e.target
self.numberCounter.element.find(e.target).length === 0
);
},
});
@ -185,6 +182,7 @@ export class MultiTreeCombo extends Single {
return self.combo.isViewVisible();
}
let shouldComboPopulate = true;
this.trigger.on(MultiSelectTrigger.EVENT_FOCUS, () => {
self.fireEvent(MultiTreeCombo.EVENT_FOCUS);
});
@ -196,7 +194,6 @@ export class MultiTreeCombo extends Single {
self.storeValue = { value: self.combo.getValue() };
this.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
self.fireEvent(MultiTreeCombo.EVENT_START);
});
this.trigger.on(MultiSelectTrigger.EVENT_STOP, function () {
self.storeValue = { value: this.getValue() };
@ -263,14 +260,14 @@ export class MultiTreeCombo extends Single {
}
self.combo.setValue(self.storeValue);
self.numberCounter.setValue(self.storeValue);
self.populate();
shouldComboPopulate && self.populate();
self.fireEvent(MultiTreeCombo.EVENT_BEFORE_POPUPVIEW);
});
this.combo.on(Combo.EVENT_BEFORE_HIDEVIEW, () => {
if (isSearching()) {
self._stopEditing();
self._dataChange &&
self.fireEvent(MultiTreeCombo.EVENT_CONFIRM);
self.fireEvent(MultiTreeCombo.EVENT_CONFIRM);
} else {
if (isPopupView()) {
self._stopEditing();
@ -279,7 +276,7 @@ export class MultiTreeCombo extends Single {
self.storeValue = { value: {} };
}
self._dataChange &&
self.fireEvent(MultiTreeCombo.EVENT_CONFIRM);
self.fireEvent(MultiTreeCombo.EVENT_CONFIRM);
}
}
clear = false;
@ -299,26 +296,39 @@ export class MultiTreeCombo extends Single {
});
this.numberCounter = createWidget({
type: MultiSelectCheckSelectedSwitcher,
type: "bi.multi_select_check_selected_switcher",
el: {
// type: "bi.multi_tree_check_selected_button",
type: MultiTreeCheckSelectedButton.xtype,
},
popup: {
// type: "bi.multi_tree_check_pane",
type: MultiTreeCheckPane.xtype,
...o.popup,
},
adapter: () => {
return this.popup.getView();
masker: {
offset: {
left: 0,
top: 0,
right: 0,
bottom: SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1,
},
},
masker: o.masker,
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
value: { value: o.value || {} },
});
this.numberCounter.on(
MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_COMBO,
() => {
self.populate();
shouldComboPopulate = true;
}
);
this.numberCounter.on(
MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE,
() => {
if (!self.combo.isViewVisible()) {
shouldComboPopulate = false;
self.combo.showView();
}
}
@ -333,12 +343,8 @@ export class MultiTreeCombo extends Single {
want2showCounter = null;
showCounter();
}
this.fireEvent(MultiTreeCombo.EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW);
}
);
this.numberCounter.on(MultiSelectCheckSelectedSwitcher.EVENT_AFTER_POPUPVIEW, function() {
self.fireEvent(MultiTreeCombo.EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW);
});
this.numberCounter.on(Events.VIEW, b => {
nextTick(() => {
@ -446,16 +452,4 @@ export class MultiTreeCombo extends Single {
setWaterMark(v) {
this.trigger.setWaterMark(v);
}
getPopup() {
return this.popup;
}
getNumberCounter() {
return this.numberCounter;
}
getTrigger() {
return this.trigger;
}
}

4
packages/fineui/src/widget/multitree/multi.tree.popup.js

@ -105,8 +105,4 @@ export class MultiTreePopup extends Pane {
resetWidth(w) {
this.popupView.resetWidth(w);
}
getView() {
return this.popupView.getView();
}
}

4
packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js

@ -220,10 +220,6 @@ export class MultiTreeSearcher extends Widget {
return this.editor.getState();
}
getSearcher() {
return this.searcher;
}
setValue(ob) {
this.setState(ob);
this.searcher.setValue(ob);

26
packages/fineui/src/widget/numberinterval/numberinterval.js

@ -41,8 +41,6 @@ export class NumberInterval extends Single {
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_VALID = "EVENT_VALID";
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_BEFORE_LEFT_POPUPVIEW = "EVENT_BEFORE_LEFT_POPUPVIEW";
static EVENT_BEFORE_RIGHT_POPUPVIEW = "EVENT_BEFORE_RIGHT_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@ -153,8 +151,6 @@ export class NumberInterval extends Single {
});
this.smallCombo = createWidget({
type: IconCombo.xtype,
container: o.container,
popup: o.popup,
cls: `number-interval-small-combo${
o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right bi-border-corner-right-radius"
}`,
@ -172,12 +168,6 @@ export class NumberInterval extends Single {
iconCls: "less-equal-font",
},
],
listeners: [{
eventName: IconCombo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.fireEvent(NumberInterval.EVENT_BEFORE_LEFT_POPUPVIEW);
},
}],
});
if (o.closeMin === true) {
this.smallCombo.setValue(1);
@ -186,8 +176,6 @@ export class NumberInterval extends Single {
}
this.bigCombo = createWidget({
type: IconCombo.xtype,
container: o.container,
popup: o.popup,
cls: `number-interval-big-combo${
o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left bi-border-corner-left-radius"
}`,
@ -205,12 +193,6 @@ export class NumberInterval extends Single {
iconCls: "less-equal-font",
},
],
listeners: [{
eventName: IconCombo.EVENT_BEFORE_POPUPVIEW,
action: () => {
this.fireEvent(NumberInterval.EVENT_BEFORE_RIGHT_POPUPVIEW);
},
}],
});
if (o.closeMax === true) {
this.bigCombo.setValue(1);
@ -639,14 +621,6 @@ export class NumberInterval extends Single {
this.bigEditor.focus();
}
getLeftCombo() {
return this.smallCombo;
}
getRightCombo() {
return this.bigCombo;
}
destroyed() {
const c = this.constants;
Bubbles.remove(c.typeError);

10
packages/fineui/src/widget/singleselect/search/singleselect.search.loader.js

@ -12,7 +12,7 @@ import {
isArray,
isKey,
Func,
SIZE_CONSANTS,
SIZE_CONSANTS
} from "@/core";
import { ButtonGroup, Loader } from "@/base";
import { SingleSelectList } from "../singleselect.list";
@ -71,7 +71,7 @@ export class SingleSelectSearchLoader extends Widget {
layouts: [
{
type: VerticalLayout.xtype,
},
}
],
},
},
@ -122,11 +122,11 @@ export class SingleSelectSearchLoader extends Widget {
height: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: false,
iconWrapperWidth: 26,
textHgap: o.allowNoSelect ? 10 : 0,
hgap: o.allowNoSelect ? 10 : 0,
title: item.title || item.text,
},
item,
),
item
)
);
}

25
packages/fineui/src/widget/singleselect/singleselect.insert.combo.js

@ -10,8 +10,7 @@ import {
isNotNull,
nextTick,
AbsoluteLayout,
makeObject,
size
makeObject
} from "@/core";
import { Single, Combo } from "@/base";
import { SingleSelectTrigger } from "./singleselect.trigger";
@ -26,12 +25,10 @@ export class SingleSelectInsertCombo extends Single {
static REQ_GET_ALL_DATA = -1;
static EVENT_FOCUS = "EVENT_FOCUS";
static EVENT_BLUR = "EVENT_BLUR";
static EVENT_START = "EVENT_START";
static EVENT_STOP = "EVENT_STOP";
static EVENT_SEARCHING = "EVENT_SEARCHING";
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
static EVENT_CONFIRM = "EVENT_CONFIRM";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
@ -43,8 +40,6 @@ export class SingleSelectInsertCombo extends Single {
height: 24,
allowEdit: true,
watermark: i18nText("BI-Basic_Search_And_Patch_Paste"),
popup: {},
masker: {},
});
}
@ -62,7 +57,6 @@ export class SingleSelectInsertCombo extends Single {
this.trigger = createWidget({
type: SingleSelectTrigger.xtype,
masker: o.masker,
watermark: o.watermark,
height: toPix(o.height, o.simple ? 1 : 2),
allowNoSelect: o.allowNoSelect,
@ -83,7 +77,6 @@ export class SingleSelectInsertCombo extends Single {
searcher: {
popup: {
type: SingleSelectSearchInsertPane.xtype,
...o.popup,
},
},
});
@ -98,7 +91,6 @@ export class SingleSelectInsertCombo extends Single {
this.trigger.on(SingleSelectTrigger.EVENT_START, function () {
self._setStartValue();
this.getSearcher().setValue(self.storeValue);
self.fireEvent(SingleSelectInsertCombo.EVENT_START);
});
this.trigger.on(SingleSelectTrigger.EVENT_STOP, () => {
self._setStartValue();
@ -164,13 +156,9 @@ export class SingleSelectInsertCombo extends Single {
self.trigger.getSearcher().adjustView();
});
},
...o.popup,
},
hideChecker(e) {
return (
triggerBtn.element.find(e.target).length === 0 &&
size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0
);
return triggerBtn.element.find(e.target).length === 0;
},
value: o.value,
});
@ -183,7 +171,6 @@ export class SingleSelectInsertCombo extends Single {
nextTick(() => {
self.populate();
});
self.fireEvent(SingleSelectInsertCombo .EVENT_BEFORE_POPUPVIEW);
});
// 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件
this.wants2Quit = false;
@ -274,12 +261,4 @@ export class SingleSelectInsertCombo extends Single {
populate() {
this.combo.populate(...arguments);
}
getPopup() {
return this.popup;
}
getTrigger() {
return this.trigger;
}
}

4
packages/fineui/src/widget/singleselect/trigger/searcher.singleselect.js

@ -131,10 +131,6 @@ export class SingleSelectSearcher extends Widget {
return this.searcher.getView() && this.searcher.getView().hasChecked();
}
getSearcher() {
return this.searcher;
}
setAdapter(adapter) {
this.searcher.setAdapter(adapter);
}

11
packages/fineui/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -20,7 +20,6 @@ export class TextValueDownListCombo extends Widget {
static xtype = "bi.text_value_down_list_combo";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
_defaultConfig(config) {
return extend(super._defaultConfig(...arguments), {
@ -43,7 +42,6 @@ export class TextValueDownListCombo extends Widget {
this.combo = createWidget({
type: DownListCombo.xtype,
element: this,
container: o.container,
chooseType: Selection.Single,
adjustLength: 2,
width: toPix(o.width, 2),
@ -61,7 +59,6 @@ export class TextValueDownListCombo extends Widget {
},
value: isNull(value) ? [] : [value],
items: deepClone(o.items),
popup: o.popup,
});
this.combo.on(DownListCombo.EVENT_CHANGE, () => {
@ -79,10 +76,6 @@ export class TextValueDownListCombo extends Widget {
this.fireEvent(TextValueDownListCombo.EVENT_CHANGE);
}
});
this.combo.on(DownListCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(TextValueDownListCombo.EVENT_BEFORE_POPUPVIEW);
});
}
_createValueMap() {
@ -121,8 +114,4 @@ export class TextValueDownListCombo extends Widget {
this.combo.populate(items);
this._createValueMap();
}
getPopup() {
return this.combo.getPopup();
}
}

20
packages/fineui/src/widget/timeinterval/dateinterval.js

@ -30,8 +30,6 @@ export class DateInterval extends Single {
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW";
static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@ -41,7 +39,6 @@ export class DateInterval extends Single {
minDate: "1900-01-01",
maxDate: "2099-12-31",
height: 24,
format: "",
supportDynamic: true,
simple: false,
});
@ -53,13 +50,6 @@ export class DateInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
this.left.on(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(DateInterval.EVENT_BEFORE_START_POPUPVIEW);
})
this.right.on(DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(DateInterval.EVENT_BEFORE_END_POPUPVIEW);
})
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@ -89,15 +79,12 @@ export class DateInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicDateCombo.xtype,
container: o.container,
popup: o.popup,
isPreview: o.isPreview,
supportDynamic: o.supportDynamic,
minDate: o.minDate,
maxDate: o.maxDate,
simple: o.simple,
behaviors: o.behaviors,
format: o.format,
watermark,
value: v,
height: o.height,
@ -256,11 +243,4 @@ export class DateInterval extends Single {
end: this.right.getValue(),
};
}
getPopup() {
return {
start: this.left.getPopup(),
end: this.right.getPopup(),
};
}
}

20
packages/fineui/src/widget/timeinterval/timeinterval.js

@ -29,8 +29,6 @@ export class TimeInterval extends Single {
static EVENT_VALID = "EVENT_VALID";
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
_defaultConfig() {
const conf = super._defaultConfig(...arguments);
@ -40,7 +38,6 @@ export class TimeInterval extends Single {
minDate: "1900-01-01",
maxDate: "2099-12-31",
height: 24,
format: "",
supportDynamic: true,
});
}
@ -51,13 +48,6 @@ export class TimeInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
this.left.on(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(TimeInterval.EVENT_BEFORE_START_POPUPVIEW);
})
this.right.on(DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(TimeInterval.EVENT_BEFORE_END_POPUPVIEW);
})
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@ -87,15 +77,12 @@ export class TimeInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicDateTimeCombo.xtype,
container: o.container,
popup: o.popup,
isPreview: o.isPreview,
timeSelectTypes: o.timeSelectTypes,
simple: o.simple,
supportDynamic: o.supportDynamic,
minDate: o.minDate,
maxDate: o.maxDate,
format: o.format,
behaviors: o.behaviors,
watermark,
value: v,
@ -263,11 +250,4 @@ export class TimeInterval extends Single {
end: this.right.getValue(),
};
}
getPopup() {
return {
start: this.left.getPopup(),
end: this.right.getPopup(),
};
}
}

24
packages/fineui/src/widget/year/combo.year.js

@ -98,13 +98,13 @@ export class DynamicYearCombo extends Widget {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
this.popupEl = _ref;
this.popup = _ref;
},
listeners: [
{
eventName: DynamicYearPopup.EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearCombo.EVENT_CONFIRM);
},
@ -129,7 +129,7 @@ export class DynamicYearCombo extends Widget {
{
eventName: DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicDateCombo.EVENT_CONFIRM);
},
@ -140,16 +140,12 @@ export class DynamicYearCombo extends Widget {
max: o.maxDate,
},
value: o.value || "",
ref: (ref) => {
this.popup = ref;
},
...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
this.popupEl.setMinDate(o.minDate);
this.popupEl.setMaxDate(o.maxDate);
this.popupEl.setValue(this.storeValue);
this.popup.setMinDate(o.minDate);
this.popup.setMaxDate(o.maxDate);
this.popup.setValue(this.storeValue);
this.fireEvent(DynamicYearCombo.EVENT_BEFORE_POPUPVIEW);
});
@ -209,14 +205,14 @@ export class DynamicYearCombo extends Widget {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
this.popupEl && this.popupEl.setMinDate(minDate);
this.popup && this.popup.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
this.popupEl && this.popupEl.setMaxDate(maxDate);
this.popup && this.popup.setMaxDate(maxDate);
}
hideView() {
@ -244,10 +240,6 @@ export class DynamicYearCombo extends Widget {
setWaterMark(v) {
this.trigger.setWaterMark(v);
}
getPopup() {
return this.popup;
}
}
extend(DynamicYearCombo, {
Static: 1,

24
packages/fineui/src/widget/yearmonth/combo.yearmonth.js

@ -109,13 +109,13 @@ export class DynamicYearMonthCombo extends Single {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
this.popupEl = _ref;
this.popup = _ref;
},
listeners: [
{
eventName: DynamicYearMonthPopup.EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearMonthCombo.EVENT_CONFIRM);
},
@ -147,7 +147,7 @@ export class DynamicYearMonthCombo extends Single {
{
eventName: DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
const value = this.popupEl.getValue();
const value = this.popup.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@ -161,16 +161,12 @@ export class DynamicYearMonthCombo extends Single {
max: o.maxDate,
},
value: o.value || "",
ref: (ref) => {
this.popup = ref;
},
...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
this.popupEl.setMinDate(o.minDate);
this.popupEl.setMaxDate(o.maxDate);
this.popupEl.setValue(this.storeValue);
this.popup.setMinDate(o.minDate);
this.popup.setMaxDate(o.maxDate);
this.popup.setValue(this.storeValue);
this.fireEvent(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW);
});
@ -245,18 +241,14 @@ export class DynamicYearMonthCombo extends Single {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
this.popupEl && this.popupEl.setMinDate(minDate);
this.popup && this.popup.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
this.popupEl && this.popupEl.setMaxDate(maxDate);
}
getPopup() {
return this.popup;
this.popup && this.popup.setMaxDate(maxDate);
}
hideView() {

18
packages/fineui/src/widget/yearmonthinterval/yearmonthinterval.js

@ -20,8 +20,6 @@ export class YearMonthInterval extends Single {
static EVENT_ERROR = "EVENT_ERROR";
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
static EVENT_BEFORE_START_POPUPVIEW = "EVENT_BEFORE_START_POPUPVIEW";
static EVENT_BEFORE_END_POPUPVIEW = "EVENT_BEFORE_END_POPUPVIEW";
constants = {
width: 25,
@ -45,13 +43,6 @@ export class YearMonthInterval extends Single {
this.left = this._createCombo(o.value.start, o.watermark?.start);
this.right = this._createCombo(o.value.end, o.watermark?.end);
this.left.on(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(YearMonthInterval.EVENT_BEFORE_START_POPUPVIEW);
})
this.right.on(DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, () => {
this.fireEvent(YearMonthInterval.EVENT_BEFORE_END_POPUPVIEW);
})
return {
type: HorizontalFillLayout.xtype,
columnSize: ["fill", "", "fill"],
@ -81,8 +72,6 @@ export class YearMonthInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicYearMonthCombo.xtype,
container: o.container,
popup: o.popup,
isPreview: o.isPreview,
simple: o.simple,
supportDynamic: o.supportDynamic,
@ -246,11 +235,4 @@ export class YearMonthInterval extends Single {
getValue() {
return { start: this.left.getValue(), end: this.right.getValue() };
}
getPopup() {
return {
start: this.left.getPopup(),
end: this.right.getPopup(),
};
}
}

24
packages/fineui/src/widget/yearquarter/combo.yearquarter.js

@ -112,13 +112,13 @@ export class DynamicYearQuarterCombo extends Widget {
supportDynamic: o.supportDynamic,
isPreview: o.isPreview,
ref: _ref => {
this.popupEl = _ref;
this.popup = _ref;
},
listeners: [
{
eventName: DynamicYearQuarterPopup.EVENT_CHANGE,
action: () => {
this.setValue(this.popupEl.getValue());
this.setValue(this.popup.getValue());
this.combo.hideView();
this.fireEvent(DynamicYearQuarterCombo.EVENT_CONFIRM);
},
@ -150,7 +150,7 @@ export class DynamicYearQuarterCombo extends Widget {
{
eventName: DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,
action: () => {
const value = this.popupEl.getValue();
const value = this.popup.getValue();
if (this._checkValue(value)) {
this.setValue(value);
}
@ -164,16 +164,12 @@ export class DynamicYearQuarterCombo extends Widget {
max: o.maxDate,
},
value: o.value || "",
ref: (ref) => {
this.popup = ref;
},
...o.popup,
},
});
this.combo.on(Combo.EVENT_BEFORE_POPUPVIEW, () => {
this.popupEl.setMinDate(o.minDate);
this.popupEl.setMaxDate(o.maxDate);
this.popupEl.setValue(this.storeValue);
this.popup.setMinDate(o.minDate);
this.popup.setMaxDate(o.maxDate);
this.popup.setValue(this.storeValue);
this.fireEvent(DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW);
});
@ -248,18 +244,14 @@ export class DynamicYearQuarterCombo extends Widget {
const o = this.options;
o.minDate = minDate;
this.trigger.setMinDate(minDate);
this.popupEl && this.popupEl.setMinDate(minDate);
this.popup && this.popup.setMinDate(minDate);
}
setMaxDate(maxDate) {
const o = this.options;
o.maxDate = maxDate;
this.trigger.setMaxDate(maxDate);
this.popupEl && this.popupEl.setMaxDate(maxDate);
}
getPopup() {
return this.popup;
this.popup && this.popup.setMaxDate(maxDate);
}
hideView() {

4
packages/fineui/typescript/case/combo/iconcombo/combo.icon.ts

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

1
packages/fineui/typescript/index.ts

@ -103,7 +103,6 @@ export { CenterAdaptLayout } from "./core/wrapper/layout/adapt/adapt.center";
export { VerticalAdaptLayout } from "./core/wrapper/layout/adapt/adapt.vertical";
export { MultiSelectInsertCombo } from "./widget/multiselect/multiselect.insert.combo";
export { MultiSelectCombo } from "./widget/multiselect/multiselect.combo";
export { MultiSelectCheckSelectedSwitcher } from "./widget/multiselect/switcher.checkselected";
export { SearchEditor } from "./widget/editor/editor.search";
export { MultiLayerSingleLevelTree } from "./widget/multilayersingletree/multilayersingletree.leveltree";
export { SimpleColorChooser } from "./case/colorchooser/colorchooser.simple";

3
packages/fineui/typescript/widget/downlist/combo.downlist.ts

@ -1,4 +1,3 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DownListCombo extends Widget {
@ -16,6 +15,4 @@ export declare class DownListCombo extends Widget {
adjustWidth: (e?: MouseEvent) => void;
adjustHeight: (e?: MouseEvent) => void;
getPopup(): PopupView;
}

6
packages/fineui/typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -1,5 +1,4 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
import { Single } from '../../base/single/single';
export declare class DynamicDateCombo extends Single {
static xtype: string;
@ -27,7 +26,6 @@ export declare class DynamicDateCombo extends Single {
};
watermark?: string;
simple?: boolean;
popup?: any;
} & Single['props']
setMinDate(minDate: string): void;
@ -45,8 +43,6 @@ export declare class DynamicDateCombo extends Single {
blur(): void;
setWaterMark(v: string): void;
getPopup(): PopupView;
}
export interface DynamicDataComboValue {

4
packages/fineui/typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts

@ -1,4 +1,3 @@
import { PopupView } from '../../base/layer/layer.popup';
import { Single } from '../../base/single/single';
export declare class DynamicDateTimeCombo extends Single {
@ -24,7 +23,6 @@ export declare class DynamicDateTimeCombo extends Single {
tabIndex?: number;
};
watermark?: string;
popup?: any;
} & Single['props'];
getValue(): DynamicDateTimeComboValue;
@ -42,8 +40,6 @@ export declare class DynamicDateTimeCombo extends Single {
blur(): void;
setWaterMark(v: string): void
getPopup(): PopupView;
}
export interface DynamicDateTimeComboValue {

12
packages/fineui/typescript/widget/multiselect/multiselect.insert.combo.ts

@ -1,12 +1,9 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
import { MultiSelectCheckSelectedSwitcher } from "./switcher.checkselected";
export declare class MultiSelectInsertCombo extends Single {
static xtype: string;
static EVENT_FOCUS: string;
static EVENT_BLUR: string;
static EVENT_START: string;
static EVENT_STOP: string;
static EVENT_SEARCHING: string;
static EVENT_CLICK_ITEM: string;
@ -15,9 +12,6 @@ export declare class MultiSelectInsertCombo extends Single {
static REQ_GET_DATA_LENGTH: 1;
static REQ_GET_ALL_DATA: -1;
static EVENT_AFTER_HIDEVIEW: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW: string;
static EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW: string;
props: {
itemsCreator?: Function;
@ -27,8 +21,6 @@ export declare class MultiSelectInsertCombo extends Single {
text?: string;
watermark?: string;
container?: any;
popup?: any;
masker?: any;
} & Single["props"];
_itemsCreator4Trigger(op: any, callback: Function): void;
@ -75,9 +67,5 @@ export declare class MultiSelectInsertCombo extends Single {
assist: string[];
};
getPopup(): PopupView;
getNumberCounter(): MultiSelectCheckSelectedSwitcher;
populate(...args: any[]): void;
}

19
packages/fineui/typescript/widget/multiselect/switcher.checkselected.ts

@ -1,19 +0,0 @@
import { Widget } from '../../core/widget';
export declare class MultiSelectCheckSelectedSwitcher extends Widget {
static xtype: string;
static EVENT_TRIGGER_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_AFTER_HIDEVIEW: string;
props: {
itemsCreator?: Function;
valueFormatter?: Function;
};
adjustView(): void;
hideView(): void;
getView(): Widget;
}

13
packages/fineui/typescript/widget/multitree/multi.tree.combo.ts

@ -1,7 +1,5 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
import { MultiSelectCheckSelectedSwitcher } from "../multiselect/switcher.checkselected";
export declare class MultiTreeCombo extends Single {
static xtype: string;
@ -12,13 +10,6 @@ export declare class MultiTreeCombo extends Single {
static EVENT_CLICK_ITEM: string;
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_BEFORE_NUMBER_COUNTER_POPUPVIEW: string;
static EVENT_AFTER_NUMBER_COUNTER_POPUPVIEW: string;
props: {
popup?: any;
masker?: any;
} & Single["props"];
showView(): void;
hideView(): void;
@ -30,8 +21,4 @@ export declare class MultiTreeCombo extends Single {
blur(): void;
setWaterMark(v: string): void;
getPopup(): PopupView;
getNumberCounter(): MultiSelectCheckSelectedSwitcher;
}

3
packages/fineui/typescript/widget/multitree/multi.tree.popup.ts

@ -1,4 +1,3 @@
import { ButtonGroup } from "../../base/combination/group.button";
import { Pane } from "../../base/pane";
export declare class MultiTreePopup extends Pane {
@ -13,6 +12,4 @@ export declare class MultiTreePopup extends Pane {
resetHeight(h: number): void;
resetWidth(w: number): void;
getView(): ButtonGroup;
}

7
packages/fineui/typescript/widget/numberinterval/numberinterval.ts

@ -1,4 +1,3 @@
import { Combo } from '../../base/combination/combo';
import { Single } from '../../base/single/single';
export declare class NumberInterval extends Single {
@ -7,8 +6,6 @@ export declare class NumberInterval extends Single {
static EVENT_CONFIRM: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_LEFT_POPUPVIEW: string;
static EVENT_BEFORE_RIGHT_POPUPVIEW: string;
props: {
watermark?: string;
@ -43,8 +40,4 @@ export declare class NumberInterval extends Single {
focusMinEditor(): void;
focusMaxEditor(): void;
getLeftCombo(): Combo;
getRightCombo(): Combo;
}

5
packages/fineui/typescript/widget/singleselect/singleselect.insert.combo.ts

@ -1,4 +1,3 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
export declare class SingleSelectInsertCombo extends Single {
@ -9,7 +8,6 @@ export declare class SingleSelectInsertCombo extends Single {
static EVENT_SEARCHING: string;
static EVENT_CLICK_ITEM: string;
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
props: {
text?: string,
@ -18,8 +16,5 @@ export declare class SingleSelectInsertCombo extends Single {
valueFormatter?: Function,
allowEdit?: boolean,
watermark?: string,
popup?: any;
} & Single['props']
getPopup(): PopupView;
}

9
packages/fineui/typescript/widget/textvaluedownlistcombo/combo.textvaluedownlist.ts

@ -1,17 +1,8 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class TextValueDownListCombo extends Widget {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
props: {
container?: string;
popup?: any;
};
getValue<T>(): [T];
getPopup(): PopupView;
}

13
packages/fineui/typescript/widget/timeinterval/dateinterval.ts

@ -1,5 +1,5 @@
import { Single } from "../../base/single/single";
import { DynamicDataComboValue, DynamicDateCombo } from "../dynamicdate/dynamicdate.combo";
import { DynamicDataComboValue } from "../dynamicdate/dynamicdate.combo";
export declare class DateInterval extends Single {
static xtype: string;
@ -7,17 +7,13 @@ export declare class DateInterval extends Single {
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW: string;
static EVENT_BEFORE_START_POPUPVIEW: string;
static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
minDate?: string;
maxDate?: string;
supportDynamic?: boolean;
watermark?: string;
container?: string;
popup?: any;
} & Single["props"];
} & Single['props']
getValue(): {
start: DynamicDataComboValue;
@ -27,9 +23,4 @@ export declare class DateInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(minDate: string): void;
getPopup(): {
start: DynamicDateCombo;
end: DynamicDateCombo;
};
}

11
packages/fineui/typescript/widget/timeinterval/timeinterval.ts

@ -1,13 +1,11 @@
import { Single } from "../../base/single/single";
import { DynamicDateTimeCombo, DynamicDateTimeComboValue } from "../dynamicdatetime/dynamicdatetime.combo";
import { DynamicDateTimeComboValue } from "../dynamicdatetime/dynamicdatetime.combo";
export declare class TimeInterval extends Single {
static xtype: string;
static EVENT_CHANGE: string;
static EVENT_VALID: string;
static EVENT_ERROR: string;
static EVENT_BEFORE_START_POPUPVIEW: string;
static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
minDate?: string;
@ -15,8 +13,6 @@ export declare class TimeInterval extends Single {
supportDynamic?: boolean;
watermark?: string;
simple?: boolean;
container?: string;
popup?: any;
} & Single['props'];
getValue(): {
@ -27,9 +23,4 @@ export declare class TimeInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(minDate: string): void;
getPopup(): {
start: DynamicDateTimeCombo;
end: DynamicDateTimeCombo;
};
}

7
packages/fineui/typescript/widget/year/combo.year.ts

@ -1,4 +1,3 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DynamicYearCombo extends Widget {
@ -8,17 +7,11 @@ export declare class DynamicYearCombo extends Widget {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
props: {
popup?: any;
};
getValue(): DynamicYearComboValue;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getPopup(): PopupView;
}
export interface DynamicYearComboValue {

7
packages/fineui/typescript/widget/yearmonth/combo.yearmonth.ts

@ -1,4 +1,3 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Single } from "../../base/single/single";
export declare class DynamicYearMonthCombo extends Single {
@ -9,10 +8,6 @@ export declare class DynamicYearMonthCombo extends Single {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
props: {
popup?: any;
} & Single["props"];
hideView(): void;
getKey(): string;
@ -22,8 +17,6 @@ export declare class DynamicYearMonthCombo extends Single {
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getPopup(): PopupView;
}
export interface DynamicYearMonthComboValue {

11
packages/fineui/typescript/widget/yearmonthinterval/yearmonthinterval.ts

@ -1,5 +1,5 @@
import { Single } from '../../base/single/single';
import { DynamicYearMonthCombo, DynamicYearMonthComboValue } from '../yearmonth/combo.yearmonth';
import { DynamicYearMonthComboValue } from '../yearmonth/combo.yearmonth';
export declare class YearMonthInterval extends Single {
static xtype: string;
@ -7,13 +7,9 @@ export declare class YearMonthInterval extends Single {
static EVENT_ERROR: string;
static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
static EVENT_BEFORE_START_POPUPVIEW: string;
static EVENT_BEFORE_END_POPUPVIEW: string;
props: {
simple?: boolean;
container?: string;
popup?: any;
} & Single['props'];
getValue(): {
@ -24,9 +20,4 @@ export declare class YearMonthInterval extends Single {
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getPopup(): {
start: DynamicYearMonthCombo;
end: DynamicYearMonthCombo;
};
}

7
packages/fineui/typescript/widget/yearquarter/combo.yearquarter.ts

@ -1,4 +1,3 @@
import { PopupView } from "../../base/layer/layer.popup";
import { Widget } from "../../core/widget";
export declare class DynamicYearQuarterCombo extends Widget {
@ -6,17 +5,11 @@ export declare class DynamicYearQuarterCombo extends Widget {
static EVENT_CONFIRM: string;
static EVENT_BEFORE_POPUPVIEW: string;
props: {
popup?: any;
};
getValue(): DynamicYearQuarterComboValue;
setMinDate(minDate: string): void;
setMaxDate(maxDate: string): void;
getPopup(): PopupView;
}
export interface DynamicYearQuarterComboValue {

Loading…
Cancel
Save