Browse Source

Merge remote-tracking branch 'origin/master'

research/test
jian 11 months ago
parent
commit
0727f7040d
  1. 5
      README
  2. 1
      package.json
  3. 0
      packages/fineui/bi.lessconfig.json
  4. 0
      packages/fineui/jsy.lessconfig.json
  5. 4
      packages/fineui/package.json
  6. 4
      packages/fineui/src/base/combination/expander.js
  7. 4
      packages/fineui/src/base/combination/group.button.js
  8. 2
      packages/fineui/src/base/combination/loader.js
  9. 2
      packages/fineui/src/base/combination/navigation.js
  10. 2
      packages/fineui/src/base/combination/switcher.js
  11. 2
      packages/fineui/src/base/combination/tab.js
  12. 1
      packages/fineui/src/base/index.js
  13. 2
      packages/fineui/src/base/single/0.single.js
  14. 3
      packages/fineui/src/base/single/button/button.basic.js
  15. 2
      packages/fineui/src/base/single/editor/editor.textarea.js
  16. 2
      packages/fineui/src/base/single/input/checkbox/checkbox.js
  17. 4
      packages/fineui/src/base/single/input/file.js
  18. 4
      packages/fineui/src/base/single/input/input.js
  19. 2
      packages/fineui/src/base/single/input/radio/radio.image.js
  20. 2
      packages/fineui/src/base/single/input/radio/radio.js
  21. 7
      packages/fineui/src/bundle.js
  22. 1
      packages/fineui/src/case/combo/bubblecombo/combo.bubble.js
  23. 43
      packages/fineui/src/case/ztree/asynctree.js
  24. 4
      packages/fineui/src/case/ztree/list/listasynctree.js
  25. 4
      packages/fineui/src/case/ztree/list/listparttree.js
  26. 2
      packages/fineui/src/case/ztree/list/listtreeview.js
  27. 13
      packages/fineui/src/case/ztree/parttree.js
  28. 4
      packages/fineui/src/case/ztree/tree.list.display.js
  29. 29
      packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js
  30. 2
      packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js
  31. 9
      packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js
  32. 2
      packages/fineui/src/core/controller/controller.masker.js
  33. 2
      packages/fineui/src/core/func/alias.js
  34. 2
      packages/fineui/src/core/loader/loader.style.js
  35. 2
      packages/fineui/src/core/structure/cache.js
  36. 2
      packages/fineui/src/index.js
  37. 19
      packages/fineui/src/less/core/utils/list-item.less
  38. 1
      packages/fineui/src/third/index.js
  39. 1
      packages/fineui/src/widget/downlist/popup.downlist.js
  40. 1
      packages/fineui/src/widget/editor/editor.search.js
  41. 1
      packages/fineui/src/widget/index.js
  42. 2
      packages/fineui/src/widget/multiselecttree/multiselecttree.js
  43. 4
      packages/fineui/src/widget/multitree/multi.tree.list.combo.js
  44. 6
      packages/fineui/src/widget/multitree/trigger/multi.tree.search.pane.js
  45. 36
      packages/fineui/src/worker.js
  46. 8
      packages/fineui/typescript/bundle.ts
  47. 2
      packages/fineui/typescript/case/button/icon/icon.change.ts
  48. 1
      packages/fineui/typescript/widget/timeinterval/timeinterval.ts
  49. 12
      packages/fineui/webpack/attachments.js
  50. 2
      packages/fineui/webpack/webpack.common.js
  51. 2
      packages/fineui/webpack/webpack.css.js
  52. 2293
      pnpm-lock.yaml
  53. 4
      scripts/lib/fui.component.json
  54. 4
      scripts/lib/fui.export.txt

5
README

@ -23,9 +23,12 @@ http://fanruan.design/doc.html?post=0169cf558d
`pnpm run build`
## 自定义less变量构建
```
cross-env LESS_CONFIG_PATH=your_less_config.json && pnpm build
```
## 构建自定义的css
```
cd ./packages/fineui
cross-env LESS_CONFIG_PATH=your_less_config.json LESS_FILE_NAME=your_file_name pnpm --filter @fui/core webpack:css
```

1
package.json

@ -41,6 +41,7 @@
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.7.5",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
"style-loader": "^3.3.1",

0
packages/fineui/lessconfig/bi.lessconfig.json → packages/fineui/bi.lessconfig.json

0
packages/fineui/lessconfig/jsy.lessconfig.json → packages/fineui/jsy.lessconfig.json

4
packages/fineui/package.json

@ -1,6 +1,6 @@
{
"name": "@fui/core",
"version": "3.0.20230707165537",
"version": "3.0.20230727164622",
"description": "fineui",
"main": "dist/fineui.min.js",
"module": "dist/lib/index.js",
@ -58,4 +58,4 @@
"core-js": "^3.30.2",
"cross-env": "^7.0.3"
}
}
}

4
packages/fineui/src/base/combination/expander.js

@ -276,7 +276,7 @@ export class Expander extends Widget {
}
_setEnable(arg) {
super._setEnable(arguments);
super._setEnable(...arguments);
!arg && this.element.removeClass(this.options.hoverClass);
!arg && this.isViewVisible() && this._hideView();
}
@ -341,6 +341,6 @@ export class Expander extends Widget {
}
destroy() {
super.destroy(arguments);
super.destroy(...arguments);
}
}

4
packages/fineui/src/base/combination/group.button.js

@ -418,12 +418,12 @@ export class ButtonGroup extends Widget {
}
empty() {
super.empty(arguments);
super.empty(...arguments);
this.options.items = [];
}
destroy() {
super.destroy(arguments);
super.destroy(...arguments);
this.options.items = [];
}
}

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

@ -342,6 +342,6 @@ export class Loader extends Widget {
}
destroy() {
super.destroy(arguments);
super.destroy(...arguments);
}
}

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

@ -191,6 +191,6 @@ export class Navigation extends Widget {
}
destroy() {
super.destroy(arguments);
super.destroy(...arguments);
}
}

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

@ -263,7 +263,7 @@ export class Switcher extends Widget {
}
_setEnable(arg) {
super._setEnable(arguments);
super._setEnable(...arguments);
!arg && this.isViewVisible() && this._hideView();
}

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

@ -200,6 +200,6 @@ export class Tab extends Widget {
destroy() {
this.cardMap = {};
super.destroy(arguments);
super.destroy(...arguments);
}
}

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

@ -11,3 +11,4 @@ export * from "./layer";
export * from "./list";
export * from "./single";
export * from "./el";
export * from "./context";

2
packages/fineui/src/base/single/0.single.js

@ -72,7 +72,7 @@ export class Single extends Widget {
this.setValue(newValue);
})
: value;
super._init(arguments);
super._init(...arguments);
}
_mounted() {

3
packages/fineui/src/base/single/button/button.basic.js

@ -69,7 +69,7 @@ export class BasicButton extends Single {
this.setSelected(newValue);
})
: opts.selected;
super._init(arguments);
super._init(...arguments);
if (opts.shadow) {
this._createShadow();
@ -193,6 +193,7 @@ export class BasicButton extends Single {
trigger: "",
// bubble的提示不需要一直存在在界面上
destroyWhenHide: true,
hideWhenAnotherComboOpen: true,
ref: _ref => {
this.combo = _ref;
},

2
packages/fineui/src/base/single/editor/editor.textarea.js

@ -279,7 +279,7 @@ export class TextAreaEditor extends Single {
}
_setValid(b) {
super._setValid(arguments);
super._setValid(...arguments);
// this.content.setValid(b);
// this.watermark && this.watermark.setValid(b);
}

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

@ -52,7 +52,7 @@ export class Checkbox extends BasicButton {
}
doClick() {
super.doClick(arguments);
super.doClick(...arguments);
if (this.isValid()) {
this.fireEvent(Checkbox.EVENT_CHANGE);
}

4
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,
@ -759,7 +759,7 @@ export class File extends Widget {
}
_setEnable(enable) {
super._setEnable(arguments);
super._setEnable(...arguments);
if (enable === true) {
this.element.removeAttr("disabled");
} else {

4
packages/fineui/src/base/single/input/input.js

@ -144,7 +144,7 @@ export class Input extends Single {
_blur() {
const blur = () => {
if (!this.isValid() && this.options.quitChecker.apply(this, [trim(this.getValue())]) !== false) {
this.element.val(this._lastValidValue ? this._lastValidValue : "");
this.element.val(this._lastValidValue ?? this.options.value ?? "");
this._checkValidationOnValueChange();
this._defaultState();
}
@ -344,7 +344,7 @@ export class Input extends Single {
}
_setValid() {
super._setValid(arguments);
super._setValid(...arguments);
if (this.isValid()) {
this._lastChangedValue = this.getValue();
this.element.removeClass("bi-input-error");

2
packages/fineui/src/base/single/input/radio/radio.image.js

@ -28,7 +28,7 @@ export class ImageRadio extends IconButton {
}
doClick() {
super.doClick(arguments);
super.doClick(...arguments);
if (this.isValid()) {
this.fireEvent(ImageRadio.EVENT_CHANGE);
}

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

@ -51,7 +51,7 @@ export class Radio extends BasicButton {
}
doClick() {
super.doClick(arguments);
super.doClick(...arguments);
if (this.isValid()) {
this.fireEvent(Radio.EVENT_CHANGE);
}

7
packages/fineui/src/bundle.js

@ -5,12 +5,15 @@ import {_defineVarProperties} from "@/core/constant/writable.var";
_global.BI = _global.BI || {};
// for fr, 已经有的就不对外暴露了.
// 要知道BI只有`BI.$`, 挂在全局对象上的只是为了兼容而已
if (!_global.$ && !_global.jQuery) {
_global.jQuery = _global.$ = fuiExport.$;
}
Object.assign(_global, {
Fix: fuiExport.Fix,
_: fuiExport._,
$: fuiExport.$,
jQuery: fuiExport.$,
});
Object.assign(_global.BI, fuiExport, injectFn);

1
packages/fineui/src/case/combo/bubblecombo/combo.bubble.js

@ -27,6 +27,7 @@ export class BubbleCombo extends Widget {
destroyWhenHide: false,
hideWhenClickOutside: true,
hideWhenBlur: true,
hideWhenAnotherComboOpen: false,
isNeedAdjustHeight: true, // 是否需要高度调整
isNeedAdjustWidth: true,
stopPropagation: false,

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之前获取配置

4
packages/fineui/src/case/ztree/list/listasynctree.js

@ -1,4 +1,4 @@
import { Listtreeview } from "./listtreeview";
import { ListTreeView } from "./listtreeview";
import { cjkEncodeDO, delay, isEmpty, shortcut, extend } from "@/core";
import $ from "jquery";
@ -11,7 +11,7 @@ import $ from "jquery";
*/
@shortcut()
export class Listasynctree extends Listtreeview {
export class ListAsyncTree extends ListTreeView {
static xtype = "bi.list_async_tree";
// 配置属性

4
packages/fineui/src/case/ztree/list/listparttree.js

@ -1,4 +1,4 @@
import { Listasynctree } from "./listasynctree";
import { ListAsyncTree } from "./listasynctree";
import { shortcut, extend, Events, delay } from "@/core";
import { TreeView } from "../treeview";
import $ from "jquery";
@ -11,7 +11,7 @@ import $ from "jquery";
*/
@shortcut()
export class ListPartTree extends Listasynctree {
export class ListPartTree extends ListAsyncTree {
static xtype = "bi.list_part_tree";
_loadMore() {

2
packages/fineui/src/case/ztree/list/listtreeview.js

@ -11,7 +11,7 @@ import $ from "jquery";
*/
@shortcut()
export class Listtreeview extends TreeView {
export class ListTreeView extends TreeView {
static xtype = "bi.list_tree_view";
_constants = {

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

@ -16,6 +16,12 @@ export class PartTree extends AsyncTree {
static EVENT_CLICK_TREE_NODE = "EVENT_CLICK_TREE_NODE";
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
isSelectedAny: true, //是否返回所有被checked的结点(包括被checked的结点的子结点)
});
}
constructor(...args) {
super(...args);
this.seMethos = super._selectTreeNode;
@ -55,8 +61,11 @@ export class PartTree extends AsyncTree {
const name = this._getNodeValue(treeNode);
this.fireEvent(PartTree.EVENT_CLICK_TREE_NODE);
if (treeNode.checked === true) {
this.options.paras.selectedValues = this._getUnionValue();
// this._buildTree(self.options.paras.selectedValues, concat(parentValues, name));
if (this.options.isSelectedAny) {
this.options.paras.selectedValues = this._getUnionValue(); //获取所有被selected的结点
} else {
this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});//给selectedValues增加被click的结点(不包含该节点的子结点)
}
o.itemsCreator(
extend({}, o.paras, {
type: TreeView.REQ_TYPE_ADJUST_DATA,

4
packages/fineui/src/case/ztree/tree.list.display.js

@ -1,4 +1,4 @@
import { Listtreeview } from "./list/listtreeview";
import { ListTreeView } from "./list/listtreeview";
import { each, shortcut, i18nText } from "@/core";
import $ from "jquery";
@ -10,7 +10,7 @@ import $ from "jquery";
*/
@shortcut()
export class ListDisplayTree extends Listtreeview {
export class ListDisplayTree extends ListTreeView {
static xtype = "bi.list_display_tree";
static EVENT_CHANGE = "EVENT_CHANGE";

29
packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.js

@ -174,6 +174,7 @@ export class AbstractTreeValueChooser extends Widget {
}
_reqSelectedTreeNode(op, callback) {
const self = this;
const selectedValues = deepClone(op.selectedValues);
const notSelectedValue = op.notSelectedValue || {};
const keyword = op.keyword || "";
@ -188,7 +189,7 @@ export class AbstractTreeValueChooser extends Widget {
dealWithSelectedValues(selectedValues);
callback(selectedValues);
const dealWithSelectedValues = selectedValues => {
function dealWithSelectedValues(selectedValues) {
let p = parentValues.concat(notSelectedValue);
// 存储的值中存在这个值就把它删掉
// 例如选中了中国-江苏-南京, 取消中国或江苏或南京
@ -197,18 +198,18 @@ export class AbstractTreeValueChooser extends Widget {
// 如果搜索的值在父亲链中
if (isSearchValueInParent(p)) {
// 例如选中了 中国-江苏, 搜索江苏, 取消江苏(干掉了江苏)
this._deleteNode(selectedValues, p);
self._deleteNode(selectedValues, p);
} else {
const searched = [];
// 要找到所有以notSelectedValue为叶子节点的链路
const find = search(parentValues, notSelectedValue, [], searched);
if (find && isNotEmptyArray(searched)) {
each(searched, (i, arr) => {
const node = this._getNode(selectedValues, arr);
const node = self._getNode(selectedValues, arr);
if (node) {
// 例如选中了 中国-江苏, 搜索江苏, 取消中国(实际上只想删除中国-江苏,因为搜的是江苏)
// 例如选中了 中国-江苏-南京,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)
this._deleteNode(selectedValues, arr);
self._deleteNode(selectedValues, arr);
} else {
// 例如选中了 中国-江苏,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)
expandSelectedValue(selectedValues, arr, last(arr));
@ -239,14 +240,14 @@ export class AbstractTreeValueChooser extends Widget {
// 添加去掉搜索的结果集
if (result.length > 0) {
each(result, (i, strs) => {
this._buildTree(selectedValues, strs);
self._buildTree(selectedValues, strs);
});
}
}
}
};
const expandSelectedValue = (selectedValues, parents, notSelectedValue) => {
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
let next = selectedValues;
const childrenCount = [];
const path = [];
@ -259,7 +260,7 @@ export class AbstractTreeValueChooser extends Widget {
}
if (isEmpty(next)) {
const split = parents.slice(0, i);
const expanded = this._getChildren(split);
const expanded = self._getChildren(split);
path.push(split);
childrenCount.push(expanded.length);
// 如果只有一个值且取消的就是这个值
@ -270,7 +271,7 @@ export class AbstractTreeValueChooser extends Widget {
) {
for (let j = childrenCount.length - 1; j >= 0; j--) {
if (childrenCount[j] === 1) {
this._deleteNode(selectedValues, path[j]);
self._deleteNode(selectedValues, path[j]);
} else {
break;
}
@ -295,16 +296,16 @@ export class AbstractTreeValueChooser extends Widget {
});
};
const search = (parents, current, result, searched) => {
function search(parents, current, result, searched) {
const newParents = clone(parents);
newParents.push(current);
if (this._isMatch(parents, current, keyword)) {
if (self._isMatch(parents, current, keyword)) {
searched && searched.push(newParents);
return true;
}
const children = this._getChildren(newParents);
const children = self._getChildren(newParents);
const notSearch = [];
let can = false;
@ -327,9 +328,9 @@ export class AbstractTreeValueChooser extends Widget {
return can;
};
const isSearchValueInParent = parentValues => {
function isSearchValueInParent(parentValues) {
for (let i = 0, len = parentValues.length; i < len; i++) {
if (this._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) {
if (self._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) {
return true;
}
}
@ -389,7 +390,7 @@ export class AbstractTreeValueChooser extends Widget {
each(selected, (k, v) => {
const p = clone(parents);
p.push(k);
if (!dealWithSelectedValues(selected[k], p)) {
if (!dealWithSelectedValues(selected[k], p) || op.searcherPaneAutoShrink === false) {
each(selected[k], (nk, nv) => {
const t = clone(p);
t.push(nk);

2
packages/fineui/src/component/treevaluechooser/abstract.treevaluechooser.list.js

@ -31,7 +31,7 @@ export class AbstractListTreeValueChooser extends AbstractTreeValueChooser {
return;
}
doCheck([], this.tree.getRoot(), selectedValues);
doCheck.call(this, [], this.tree.getRoot(), selectedValues);
callback({
items: values(result),

9
packages/fineui/src/component/treevaluechooser/pane.treevaluechooser.js

@ -15,6 +15,9 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser {
items: null,
itemsCreator: emptyFn,
showLine: true,
//searcherPaneAutoShrink和searcherPaneIsSelectedAny同时为false时,返回值和非搜索状态下的树逻辑一致
searcherPaneAutoShrink: true,//其搜索树是否会判别子结点全选则取父结点的值
searcherPaneIsSelectedAny: true, //其搜索树是否返回所有被checked的结点(包括被checked的结点的子结点)
});
}
@ -25,7 +28,11 @@ export class TreeValueChooserPane extends AbstractTreeValueChooser {
type: o.hideSearch ? MultiSelectTreePopup.xtype : MultiSelectTree.xtype,
element: this,
showLine: o.showLine,
itemsCreator: bind(this._itemsCreator, this),
searcherPaneIsSelectedAny: o.hideSearch || o.searcherPaneIsSelectedAny,
itemsCreator: (options, callback) => {
options.searcherPaneAutoShrink = o.hideSearch || o.searcherPaneAutoShrink;
this._itemsCreator.call(this, options, callback);
},
});
this.pane.on(MultiSelectTree.EVENT_CHANGE, () => {

2
packages/fineui/src/core/controller/controller.masker.js

@ -12,7 +12,7 @@ export class MaskersController extends LayerController {
}
init() {
super.init(arguments);
super.init(...arguments);
this.zindex = zIndex_masker;
}
}

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 "\\":

2
packages/fineui/src/core/loader/loader.style.js

@ -13,7 +13,7 @@ export class StyleLoaderManager extends OB {
}
_init() {
super._init(arguments);
super._init(...arguments);
this.stylesManager = {};
}

2
packages/fineui/src/core/structure/cache.js

@ -13,7 +13,7 @@ export const Cache = {
return Cache._getKeyPrefix() + (key || "");
},
getItem: function (key, opt = {}) {
const { defaultValue, typeConversion } = opt;
const { defaultValue = null, typeConversion } = opt;
const storageKey = Cache._generateKey(key);
let value = localStorage.getItem(storageKey);

2
packages/fineui/src/index.js

@ -10,10 +10,12 @@ export * from "./widget";
export * from "./component";
export * from "./fix";
export * from "./router";
export * from "./third";
export * as Popper from "@popperjs/core";
export const jQuery = jquery;
export const $ = jquery;
import * as D from "@/core/decorator";
import { Fix } from "./fix";
export const Decorators = { ...D, Model: Fix.Model };

19
packages/fineui/src/less/core/utils/list-item.less

@ -93,6 +93,25 @@
}
}
.bi-theme-dark {
.bi-list-item-simple {
&.disabled {
&, &:hover, &:active {
color: @color-bi-text-disabled-theme-dark !important;
& .bi-input {
color: @color-bi-text-disabled-theme-dark !important;
}
& .bi-textarea {
color: @color-bi-text-disabled-theme-dark !important;
}
& .bi-high-light {
color: @color-bi-text-disabled-theme-dark !important;
}
}
}
}
}
// hover的时候文字变黑
// active的时候文字高亮
.bi-list-item-effect {

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

@ -0,0 +1 @@
export * from "./sort.gb2312";

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

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

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

2
packages/fineui/src/widget/multiselecttree/multiselecttree.js

@ -16,6 +16,7 @@ export class MultiSelectTree extends Single {
baseCls: "bi-multi-select-tree",
itemsCreator: emptyFn,
simple: false,
searcherPaneIsSelectedAny: true,
});
}
@ -44,6 +45,7 @@ export class MultiSelectTree extends Single {
this.searcherPane = createWidget({
type: MultiTreeSearchPane.xtype,
cls: "bi-border-left bi-border-right bi-border-bottom",
isSelectedAny: o.searcherPaneIsSelectedAny,
keywordGetter() {
return self.searcher.getKeyword();
},

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

@ -19,7 +19,7 @@ import { Single, Combo } from "@/base";
import { MultiTreeSearchInsertPane } from "./trigger/multi.tree.search.insert.pane";
import { MultiTreePopup } from "./multi.tree.popup";
import { MultiSelectTrigger } from "../multiselect/multiselect.trigger";
import { TriggerIconButton, ListPartTree, ListDisplayTree, Listasynctree } from "@/case";
import { TriggerIconButton, ListPartTree, ListDisplayTree, ListAsyncTree } from "@/case";
import { MultiSelectCheckSelectedSwitcher } from "../multiselect/trigger/switcher.checkselected";
@shortcut()
@ -126,7 +126,7 @@ export class MultiTreeListCombo extends Single {
self.numberCounter.setAdapter(this);
},
el: {
type: Listasynctree.xtype,
type: ListAsyncTree.xtype,
},
listeners: [
{

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

@ -6,7 +6,10 @@ import { TreeView, PartTree } from "@/case";
export class MultiTreeSearchPane extends Pane {
static xtype = "bi.multi_tree_search_pane";
props = { baseCls: "bi-multi-tree-search-pane bi-card" };
props = {
baseCls: "bi-multi-tree-search-pane bi-card",
isSelectedAny: true,
};
static EVENT_CHANGE = "EVENT_CHANGE";
static EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
@ -22,6 +25,7 @@ export class MultiTreeSearchPane extends Pane {
type: PartTree.xtype,
element: this,
tipText: i18nText("BI-No_Select"),
isSelectedAny: opts.isSelectedAny,
itemsCreator(op, callback) {
op.keyword = opts.keywordGetter();
opts.itemsCreator(op, callback);

36
packages/fineui/src/worker.js

@ -0,0 +1,36 @@
// sideEffects
import "./core/system";
import * as _core from "./core";
import * as _base from "./base";
import * as _fix from "./fix";
import * as _router from "./router";
export * as Popper from "@popperjs/core";
import * as D from "@/core/decorator";
import { Fix } from "./fix";
const Decorators = { ...D, Model: Fix.Model };
const fuiExport = {
..._core,
..._base,
..._fix,
..._router
};
import * as injectFn from "@/core/5.inject";
import { _global } from "@/core/0.foundation";
import { _defineVarProperties } from "@/core/constant/writable.var";
_global.BI = _global.BI || {};
Object.assign(_global, {
Fix: fuiExport.Fix,
_: fuiExport._,
});
Object.assign(_global.BI, fuiExport, injectFn, { Decorators, });
_defineVarProperties(_global.BI);

8
packages/fineui/typescript/bundle.ts

@ -1,3 +1,5 @@
// import fineui from "./index";
// BI.extend(BI, fineui);
import { Workers } from "./core/worker/workers";
// 仅Workers是ts实现的代码,所以要挂载到BI上
BI?.extend(BI, {
Workers: Workers
});

2
packages/fineui/typescript/case/button/icon/icon.change.ts

@ -6,7 +6,7 @@ export declare class IconChangeButton extends Single {
static EVENT_CHANGE: string;
props: {
iconCls: string;
iconCls: string | (() => string);
} & IconButton['props']
isSelected(): boolean;

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

@ -12,6 +12,7 @@ export declare class TimeInterval extends Single {
maxDate?: string;
supportDynamic?: boolean;
watermark?: string;
simple?: boolean;
} & Single['props']
getValue(): {

12
packages/fineui/webpack/attachments.js

@ -10,7 +10,7 @@ const basicAttachmentMap = {
resource: sync(["src/less/resource/**/*.less"]),
font: sync(["public/less/font.less"]),
ts: ["./typescript/bundle.ts"],
ui: sync(["ui/less/app.less", "ui/less/**/*.less", "ui/js/**/*.js"]),
ui: sync(["ui/less/app.less", "ui/less/**/*.less",]),
less: sync([
"src/less/core/**/*.less",
"src/less/theme/**/*.less",
@ -19,24 +19,22 @@ const basicAttachmentMap = {
"src/less/widget/**/*.less",
"src/less/component/**/*.less"
]),
js_bundle: sync(["src/bundle.js"])
js_bundle: sync(["src/bundle.js"]),
js_worker: sync(["src/worker.js"]),
};
const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"]));
const bundleCss = uniq([].concat(basicAttachmentMap.less, basicAttachmentMap.ui, sync(["public/less/app.less", "public/less/**/*.less"])));
const fineui = [].concat(
bundleCss,
basicAttachmentMap.polyfill,
basicAttachmentMap.js_bundle,
basicAttachmentMap.ui,
basicAttachmentMap.ts,
configJS
);
const fineuiForWorker = [].concat(
jqueryPolyfill,
basicAttachmentMap.js_bundle,
basicAttachmentMap.ui,
basicAttachmentMap.js_worker,
basicAttachmentMap.ts
);

2
packages/fineui/webpack/webpack.common.js

@ -14,7 +14,7 @@ let lessVariables = {};
if (process.env.LESS_CONFIG_PATH) {
const lessConfigPath = path.isAbsolute(process.env.LESS_CONFIG_PATH)
? process.env.LESS_CONFIG_PATH
: path.resolve(__dirname, "../lessconfig", process.env.LESS_CONFIG_PATH);
: path.resolve(__dirname, "../", process.env.LESS_CONFIG_PATH);
lessVariables = fs.existsSync(lessConfigPath) ? require(lessConfigPath) || {} : {};
}

2
packages/fineui/webpack/webpack.css.js

@ -6,6 +6,6 @@ prod.entry = {};
module.exports = merge(prod, {
mode: "production",
entry: {
[`${process.env.LESS_FILE_NAME}.min`]: attachments.bundleCss,
[`${process.env.LESS_FILE_NAME || "custom"}.min`]: attachments.bundleCss,
},
});

2293
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

4
scripts/lib/fui.component.json

@ -167,9 +167,9 @@
"bi.small_select_text_trigger": "SmallSelectTextTrigger",
"bi.small_text_trigger": "SmallTextTrigger",
"bi.async_tree": "AsyncTree",
"bi.list_async_tree": "Listasynctree",
"bi.list_async_tree": "ListAsyncTree",
"bi.list_part_tree": "ListPartTree",
"bi.list_tree_view": "Listtreeview",
"bi.list_tree_view": "ListTreeView",
"bi.part_tree": "PartTree",
"bi.display_tree": "DisplayTree",
"bi.list_display_tree": "ListDisplayTree",

4
scripts/lib/fui.export.txt

@ -233,8 +233,8 @@ ListLoader
ListPane
ListPartTree
ListView
Listasynctree
Listtreeview
ListAsyncTree
ListTreeView
Loader
LoadingBar
Logic

Loading…
Cancel
Save