Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~dailer/fineui

# Conflicts:
#	packages/fineui/src/widget/multiselect/multiselect.combo.js
research/test
dailer 1 year ago
parent
commit
23316ddd7d
  1. 2
      packages/fineui/src/base/combination/loader.js
  2. 1
      packages/fineui/src/base/single/button/listitem/icontextitem.js
  3. 2
      packages/fineui/src/base/single/input/file.js
  4. 4
      packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js
  5. 43
      packages/fineui/src/case/ztree/asynctree.js
  6. 2
      packages/fineui/src/case/ztree/parttree.js
  7. 2
      packages/fineui/src/core/func/alias.js
  8. 4
      packages/fineui/src/less/base/single/button/button.less
  9. 1
      packages/fineui/src/widget/downlist/item.downlist.js
  10. 1
      packages/fineui/src/widget/downlist/item.downlistgroup.js
  11. 1
      packages/fineui/src/widget/downlist/popup.downlist.js
  12. 36
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
  13. 1
      packages/fineui/src/widget/editor/editor.search.js
  14. 1
      packages/fineui/src/widget/index.js
  15. 6
      packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js
  16. 4
      packages/fineui/src/widget/multitree/trigger/searcher.list.multi.tree.js
  17. 5
      packages/fineui/src/widget/multitree/trigger/searcher.multi.tree.js
  18. 6
      packages/fineui/webpack/webpack.prod.js

2
packages/fineui/src/base/combination/loader.js

@ -181,7 +181,7 @@ export class Loader extends Widget {
isEmpty(optionsItems) &&
nextTick(
bind(() => {
isDefaultInit && isEmpty(optionsItems) && this._populate();
isDefaultInit && isEmpty(this.options.items) && this._populate();
}, this)
);
const items = isFunction(optionsItems)

1
packages/fineui/src/base/single/button/listitem/icontextitem.js

@ -59,6 +59,7 @@ export class IconTextItem extends BasicButton {
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
title: o.title,
value: o.value,
keyword: o.keyword,
height: o.height,

2
packages/fineui/src/base/single/input/file.js

@ -541,7 +541,7 @@ export class File extends Widget {
// We can still show some information
}
this.fireEvent(File.EVENT_PROGRESS, {
file: this.file,
file: _wrap.file,
total: rpe.total,
loaded: rpe.loaded,
simulation: rpe.simulation,

4
packages/fineui/src/case/combo/textvaluecombo/combo.textvalue.js

@ -144,8 +144,8 @@ export class TextValueCombo extends Widget {
return {
type: Combo.xtype,
height: toPix(o.height, 2),
width: toPix(o.width, 2),
height: toPix(o.height, o.simple ? 1 : 2),
width: toPix(o.width, o.simple ? 0 : 2),
ref: ref => (this.combo = ref),
container: o.container,
direction: o.direction,

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

@ -1,7 +1,19 @@
import { cjkEncodeDO, deepClone, each, extend, isEmpty, isNotNull, isNull, shortcut } from "@/core";
import {
cjkEncodeDO,
deepClone,
each,
extend,
isEmpty,
isNotNull,
isNull,
shortcut,
AbsoluteLayout,
createWidget,
} from "@/core";
import { TreeView } from "./treeview";
import { TreeRenderPageService } from "./treerender.page.service";
import $ from "jquery";
import { IconLabel } from "@/base";
@shortcut()
export class AsyncTree extends TreeView {
@ -197,7 +209,34 @@ export class AsyncTree extends TreeView {
},
options
);
o.itemsCreator(op, complete);
let loadingIcon;
createWidget({
type: AbsoluteLayout.xtype,
element: self.element.find(`#${treeNode.tId}`),
css: {
position: "relative",
},
items: [
{
el: {
type: IconLabel.xtype,
width: 20,
height: 20,
cls: "button-loading-font anim-rotate bi-card",
ref: ref => {
loadingIcon = ref;
},
},
left: 5,
top: 5,
},
],
});
o.itemsCreator(op, (...args) => {
complete.apply(this, args);
loadingIcon.destroy();
});
}
// 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置

2
packages/fineui/src/case/ztree/parttree.js

@ -24,7 +24,7 @@ export class PartTree extends AsyncTree {
constructor(...args) {
super(...args);
this.seMethos = super._selectTreeNode;
this.seMethos = AsyncTree.superclass._selectTreeNode;
}
_loadMore() {

2
packages/fineui/src/core/func/alias.js

@ -637,7 +637,7 @@ export const getEncodeURL = function(urlTemplate, param) {
export const encodeURIComponent = function(url) {
const specialCharsMap = getSpecialCharsMap();
url = url || "";
url = url ?? "";
url = replaceAll(`${url}`, keys(specialCharsMap || []).join("|"), str => {
switch (str) {
case "\\":

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

@ -479,8 +479,8 @@ body .bi-button, #body .bi-button {
}
}
.bi-theme-dark {
.bi-button, #body .bi-button {
.bi-theme-dark, #body .bi-theme-dark {
.bi-button {
&.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark;
&:hover, &:focus {

1
packages/fineui/src/widget/downlist/item.downlist.js

@ -39,6 +39,7 @@ export class DownListItem extends BasicButton {
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text,
title: o.title,
value: o.value,
keyword: o.keyword,
height: o.height,

1
packages/fineui/src/widget/downlist/item.downlistgroup.js

@ -42,6 +42,7 @@ export class DownListGroupItem extends BasicButton {
cls: "list-group-item-text",
textAlign: "left",
text: o.text,
title: o.title,
value: o.value,
height: o.height,
});

1
packages/fineui/src/widget/downlist/popup.downlist.js

@ -1,5 +1,6 @@
import { ButtonTree, Pane } from "@/base";
import {
Selection,
VerticalLayout,
Layout,
shortcut,

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

@ -31,29 +31,19 @@ export class DynamicDateTimeCombo extends Single {
iconWidth: 24
};
props = () => {
const date = getDate();
return {
baseCls: "bi-dynamic-date--time-combo",
height: 24,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: "",
allowEdit: true,
supportDynamic: true,
attributes: {
tabIndex: -1
},
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
value: {
type: DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
}
};
props = {
baseCls: "bi-dynamic-date--time-combo",
height: 24,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: "",
allowEdit: true,
supportDynamic: true,
attributes: {
tabIndex: -1,
},
isNeedAdjustHeight: false,
isNeedAdjustWidth: false,
};
static EVENT_KEY_DOWN = "EVENT_KEY_DOWN";

1
packages/fineui/src/widget/editor/editor.search.js

@ -69,6 +69,7 @@ export class SearchEditor extends Widget {
quitChecker: o.quitChecker,
value: o.value,
autoTrim: o.autoTrim,
autocomplete: o.autocomplete
});
this.clear = createWidget({
type: IconButton.xtype,

1
packages/fineui/src/widget/index.js

@ -7,6 +7,7 @@ export { MultiTreeInsertCombo } from "./multitree/multi.tree.insert.combo";
export { MultiTreeListCombo } from "./multitree/multi.tree.list.combo";
export { NumberEditor } from "./numbereditor/number.editor";
export { NumberInterval } from "./numberinterval/numberinterval";
export { NumberIntervalSingleEidtor } from "./numberinterval/singleeditor/single.editor";
export { YearMonthInterval } from "./yearmonthinterval/yearmonthinterval";
export { YearQuarterInterval } from "./yearquarterinterval/yearquarterinterval";
export { YearInterval } from "./yearinterval/yearinterval";

6
packages/fineui/src/widget/multitree/trigger/multi.tree.search.insert.pane.js

@ -11,6 +11,10 @@ export class MultiTreeSearchInsertPane extends Widget {
el: { type: PartTree.xtype },
};
static CONSTANTS = {
height: 24,
};
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
static EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR";
@ -32,7 +36,7 @@ export class MultiTreeSearchInsertPane extends Widget {
self.addTip = _ref;
},
text: i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
height: MultiTreeSearchInsertPane.CONSTANTS.height,
cls: "bi-high-light",
handler() {
self.fireEvent(MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter());

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

@ -1,4 +1,4 @@
import { shortcut, Widget, extend, emptyFn, createWidget, isNotNull, isNumber, size, each, last, Selection } from "@/core";
import { shortcut, Widget, extend, emptyFn, createWidget, isNotNull, isNumber, size, each, last, Selection, isObject } from "@/core";
import { MultiSelectEditor } from "../../multiselect/trigger/editor.multiselect";
import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect";
import { Searcher } from "@/base";
@ -137,7 +137,7 @@ export class MultiListTreeSearcher extends Widget {
setState(ob) {
const o = this.options;
ob || (ob = {});
ob.value || (ob.value = []);
isObject(ob) && (ob.value || (ob.value = []));
let count = 0;
if (isNumber(ob)) {
this.editor.setState(ob);

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

@ -11,7 +11,8 @@ import {
each,
isEmptyObject,
Func,
Selection
Selection,
isObject
} from "@/core";
import { MultiSelectEditor } from "../../multiselect/trigger/editor.multiselect";
import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect";
@ -165,7 +166,7 @@ export class MultiTreeSearcher extends Widget {
setState(ob) {
const o = this.options;
ob || (ob = {});
ob.value || (ob.value = {});
isObject(ob) && (ob.value || (ob.value = {}));
let count = 0;
if (isNumber(ob)) {
this.editor.setState(ob);

6
packages/fineui/webpack/webpack.prod.js

@ -10,12 +10,14 @@ module.exports = merge(common, {
entry: {
"fineui.min": attachments.fineui,
"fineui.worker.min": attachments.fineuiForWorker,
"fineui.worker": attachments.fineuiForWorker
"fineui.worker": attachments.fineuiForWorker,
"fineui_without_jquery_polyfill.min":attachments.fineuiForWorker,
},
output: {
path: dirs.DEST,
filename: "[name].js"
filename: "[name].js",
publicPath: ""
},
devtool: "hidden-source-map"

Loading…
Cancel
Save