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. 14
      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) && isEmpty(optionsItems) &&
nextTick( nextTick(
bind(() => { bind(() => {
isDefaultInit && isEmpty(optionsItems) && this._populate(); isDefaultInit && isEmpty(this.options.items) && this._populate();
}, this) }, this)
); );
const items = isFunction(optionsItems) 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, lgap: o.textLgap,
rgap: o.textRgap, rgap: o.textRgap,
text: o.text, text: o.text,
title: o.title,
value: o.value, value: o.value,
keyword: o.keyword, keyword: o.keyword,
height: o.height, 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 // We can still show some information
} }
this.fireEvent(File.EVENT_PROGRESS, { this.fireEvent(File.EVENT_PROGRESS, {
file: this.file, file: _wrap.file,
total: rpe.total, total: rpe.total,
loaded: rpe.loaded, loaded: rpe.loaded,
simulation: rpe.simulation, simulation: rpe.simulation,

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

@ -144,8 +144,8 @@ export class TextValueCombo extends Widget {
return { return {
type: Combo.xtype, type: Combo.xtype,
height: toPix(o.height, 2), height: toPix(o.height, o.simple ? 1 : 2),
width: toPix(o.width, 2), width: toPix(o.width, o.simple ? 0 : 2),
ref: ref => (this.combo = ref), ref: ref => (this.combo = ref),
container: o.container, container: o.container,
direction: o.direction, 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 { TreeView } from "./treeview";
import { TreeRenderPageService } from "./treerender.page.service"; import { TreeRenderPageService } from "./treerender.page.service";
import $ from "jquery"; import $ from "jquery";
import { IconLabel } from "@/base";
@shortcut() @shortcut()
export class AsyncTree extends TreeView { export class AsyncTree extends TreeView {
@ -197,7 +209,34 @@ export class AsyncTree extends TreeView {
}, },
options 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之前获取配置 // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置

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

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

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

@ -637,7 +637,7 @@ export const getEncodeURL = function(urlTemplate, param) {
export const encodeURIComponent = function(url) { export const encodeURIComponent = function(url) {
const specialCharsMap = getSpecialCharsMap(); const specialCharsMap = getSpecialCharsMap();
url = url || ""; url = url ?? "";
url = replaceAll(`${url}`, keys(specialCharsMap || []).join("|"), str => { url = replaceAll(`${url}`, keys(specialCharsMap || []).join("|"), str => {
switch (str) { switch (str) {
case "\\": 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-theme-dark, #body .bi-theme-dark {
.bi-button, #body .bi-button { .bi-button {
&.button-ignore { &.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark; background-color: @color-bi-background-ignore-button-theme-dark;
&:hover, &:focus { &:hover, &:focus {

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

@ -39,6 +39,7 @@ export class DownListItem extends BasicButton {
lgap: o.textLgap, lgap: o.textLgap,
rgap: o.textRgap, rgap: o.textRgap,
text: o.text, text: o.text,
title: o.title,
value: o.value, value: o.value,
keyword: o.keyword, keyword: o.keyword,
height: o.height, 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", cls: "list-group-item-text",
textAlign: "left", textAlign: "left",
text: o.text, text: o.text,
title: o.title,
value: o.value, value: o.value,
height: o.height, height: o.height,
}); });

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

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

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

@ -31,9 +31,7 @@ export class DynamicDateTimeCombo extends Single {
iconWidth: 24 iconWidth: 24
}; };
props = () => { props = {
const date = getDate();
return {
baseCls: "bi-dynamic-date--time-combo", baseCls: "bi-dynamic-date--time-combo",
height: 24, height: 24,
minDate: "1900-01-01", minDate: "1900-01-01",
@ -42,18 +40,10 @@ export class DynamicDateTimeCombo extends Single {
allowEdit: true, allowEdit: true,
supportDynamic: true, supportDynamic: true,
attributes: { attributes: {
tabIndex: -1 tabIndex: -1,
}, },
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
value: {
type: DynamicDateTimeCombo.Static,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1
}
}
};
}; };
static EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; 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, quitChecker: o.quitChecker,
value: o.value, value: o.value,
autoTrim: o.autoTrim, autoTrim: o.autoTrim,
autocomplete: o.autocomplete
}); });
this.clear = createWidget({ this.clear = createWidget({
type: IconButton.xtype, 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 { MultiTreeListCombo } from "./multitree/multi.tree.list.combo";
export { NumberEditor } from "./numbereditor/number.editor"; export { NumberEditor } from "./numbereditor/number.editor";
export { NumberInterval } from "./numberinterval/numberinterval"; export { NumberInterval } from "./numberinterval/numberinterval";
export { NumberIntervalSingleEidtor } from "./numberinterval/singleeditor/single.editor";
export { YearMonthInterval } from "./yearmonthinterval/yearmonthinterval"; export { YearMonthInterval } from "./yearmonthinterval/yearmonthinterval";
export { YearQuarterInterval } from "./yearquarterinterval/yearquarterinterval"; export { YearQuarterInterval } from "./yearquarterinterval/yearquarterinterval";
export { YearInterval } from "./yearinterval/yearinterval"; 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 }, el: { type: PartTree.xtype },
}; };
static CONSTANTS = {
height: 24,
};
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM"; static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
static EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR"; static EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR";
@ -32,7 +36,7 @@ export class MultiTreeSearchInsertPane extends Widget {
self.addTip = _ref; self.addTip = _ref;
}, },
text: i18nText("BI-Basic_Click_To_Add_Text", ""), text: i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height, height: MultiTreeSearchInsertPane.CONSTANTS.height,
cls: "bi-high-light", cls: "bi-high-light",
handler() { handler() {
self.fireEvent(MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter()); 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 { MultiSelectEditor } from "../../multiselect/trigger/editor.multiselect";
import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect"; import { MultiSelectSearcher } from "../../multiselect/trigger/searcher.multiselect";
import { Searcher } from "@/base"; import { Searcher } from "@/base";
@ -137,7 +137,7 @@ export class MultiListTreeSearcher extends Widget {
setState(ob) { setState(ob) {
const o = this.options; const o = this.options;
ob || (ob = {}); ob || (ob = {});
ob.value || (ob.value = []); isObject(ob) && (ob.value || (ob.value = []));
let count = 0; let count = 0;
if (isNumber(ob)) { if (isNumber(ob)) {
this.editor.setState(ob); this.editor.setState(ob);

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

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

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

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

Loading…
Cancel
Save