Browse Source

Merge pull request #225404 in DEC/fineui from bugfix/11.0 to release/11.0

* commit 'a843292033e2accce95a5cbfae05814fe9af1397':
  auto upgrade version to 2.0.20230227095536
  auto upgrade version to 2.0.20230223101228
  KERNEL-14300 fix:NumberInterval补充simple的ts声明
  FDL-3530🐞 fix:custom_tree的expander支持virtual_group
  update
  无JIRA 用core-js/stable替代已经废弃的@babel/polyfill
  auto upgrade version to 2.0.20230208163847
  无JIRA fix: 组件创建完之后再执行setMinMax修复
  auto upgrade version to 2.0.20230207102533
  BI-120672 feat:时间选择控件opt里支持传height
  BI-120672 feat:时间选择控件opt里支持传height
  auto upgrade version to 2.0.20230206100506
  auto upgrade version to 2.0.20230203202509
  JSY-26262 fix: 更改布局方式
  JSY-26289 fix: 统一setValue和getValue方法
  JSY-26289 fix: 修复无全选按钮时搜索面板勾选不生效
  JSY-26262 fix: multi_select_insert_no_bar_list 结果为空时,提示居中
master
superman 2 years ago
parent
commit
230f36aad0
  1. 6
      package.json
  2. 1
      src/base/tree/customtree.js
  3. 15
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  4. 14
      src/widget/multiselect/multiselect.loader.nobar.js
  5. 27
      src/widget/multiselect/search/multiselect.search.loader.js
  6. 174
      src/widget/singleslider/singleslider.js
  7. 1
      typescript/widget/numberinterval/numberinterval.ts
  8. 2
      webpack/attachments.js

6
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20230202142959", "version": "2.0.20230227095536",
"description": "fineui", "description": "fineui",
"main": "dist/fineui_without_conflict.min.js", "main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",
@ -9,8 +9,7 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.4", "@babel/core": "^7.17.4",
"@babel/polyfill": "7.6.0", "@fui/babel-preset-fineui": "^3.0.0",
"@fui/babel-preset-fineui": "^2.0.0",
"@fui/eslint-plugin": "^1.0.19", "@fui/eslint-plugin": "^1.0.19",
"@types/node": "15.6.1", "@types/node": "15.6.1",
"@typescript-eslint/eslint-plugin": "2.33.0", "@typescript-eslint/eslint-plugin": "2.33.0",
@ -18,7 +17,6 @@
"autoprefixer": "9.6.1", "autoprefixer": "9.6.1",
"babel-loader": "8.0.6", "babel-loader": "8.0.6",
"chai": "4.2.0", "chai": "4.2.0",
"cnpm": "6.1.1",
"concat": "1.0.3", "concat": "1.0.3",
"core-js": "3.3.2", "core-js": "3.3.2",
"cross-env": "6.0.0", "cross-env": "6.0.0",

1
src/base/tree/customtree.js

@ -51,6 +51,7 @@ BI.CustomTree = BI.inherit(BI.Widget, {
}, BI.deepClone(o.expander), { }, BI.deepClone(o.expander), {
id: node.id, id: node.id,
pId: node.pId, pId: node.pId,
key: node.key,
}); });
var el = BI.stripEL(node); var el = BI.stripEL(node);
if (!BI.isWidget(el)) { if (!BI.isWidget(el)) {

15
src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -1,11 +1,16 @@
BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
props: { props: function () {
baseCls: "bi-date-time-select" return {
baseCls: "bi-date-time-select",
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
};
}, },
render: function () { render: function () {
var self = this; var self = this;
var o = this.options;
return { return {
type: "bi.center_adapt", type: "bi.center_adapt",
items: [{ items: [{
@ -41,7 +46,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT height: o.height,
} }
}, { }, {
type: "bi.label", type: "bi.label",
@ -77,7 +82,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT height: o.height,
}, { }, {
type: "bi.label", type: "bi.label",
text: ":", text: ":",
@ -106,7 +111,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT height: o.height,
}] }]
}] }]
}; };

14
src/widget/multiselect/multiselect.loader.nobar.js

@ -98,13 +98,15 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
value: this.storeValue value: this.storeValue
}, opts.el)); }, opts.el));
BI.createWidget({ BI.createWidget(BI.extend({
type: "bi.vertical", element: this
element: this, }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({
items: [this.button_group], scrolly: true,
vgap: 5 vgap: 5
}); }, opts.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)
}))));
this.button_group.on(BI.Controller.EVENT_CHANGE, function () { this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });

27
src/widget/multiselect/search/multiselect.search.loader.js

@ -134,15 +134,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group.on(BI.Controller.EVENT_CHANGE, function () { this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
if (opts.allowSelectAll) { var searchLoaderEventChangeName = opts.allowSelectAll ? BI.SelectList.EVENT_CHANGE : BI.ListPane.EVENT_CHANGE
this.button_group.on(BI.SelectList.EVENT_CHANGE, function () { this.button_group.on(searchLoaderEventChangeName, function () {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments); self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);
}); });
} else {
this.button_group.on(BI.ListPane.EVENT_CHANGE, function (val) {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, val);
});
}
}, },
_createItems: function (items) { _createItems: function (items) {
@ -196,13 +191,23 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
}, },
setValue: function (v) { setValue: function (v) {
v || (v = {});
var o = this.options;
// 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了 // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了
this.storeValue = BI.deepClone(v); this.storeValue = BI.deepClone(v);
this.button_group.setValue(v); o.allowSelectAll ? (this.button_group.setValue(v)) : (this.button_group.setValue(v.value));
}, },
getValue: function () { getValue: function () {
return this.button_group.getValue(); var o = this.options;
if (o.allowSelectAll) {
return this.button_group.getValue();
}
return {
type: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
value: this.button_group.getValue(),
assist: this.button_group.getNotSelectedValue()
};
}, },
getAllButtons: function () { getAllButtons: function () {

174
src/widget/singleslider/singleslider.js

@ -58,16 +58,18 @@ BI.SingleSlider = BI.inherit(BI.Single, {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
cls: "slider-wrapper", cls: "slider-wrapper",
columnSize: ["fill"], columnSize: ["fill"],
items: [{ items: [
type: "bi.absolute", {
items: [ type: "bi.absolute",
{ items: [
el: this.slider, {
top: 8, el: this.slider,
} top: 8,
], }
height: c.SLIDER_HEIGHT ],
}], height: c.SLIDER_HEIGHT
}
],
hgap: c.SLIDER_WIDTH_HALF, hgap: c.SLIDER_WIDTH_HALF,
height: c.SLIDER_HEIGHT height: c.SLIDER_HEIGHT
}); });
@ -124,41 +126,49 @@ BI.SingleSlider = BI.inherit(BI.Single, {
this._setVisible(false); this._setVisible(false);
return { return {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [
el: { {
type: "bi.vertical", el: {
items: [{ type: "bi.vertical",
type: "bi.absolute", items: [
items: [{ {
el: this.track, type: "bi.absolute",
width: "100%", items: [
height: c.TRACK_HEIGHT {
}] el: this.track,
}], width: "100%",
hgap: c.TRACK_GAP_HALF, height: c.TRACK_HEIGHT
height: c.TRACK_HEIGHT }
}, ]
top: 23, }
left: 0, ],
width: "100%" hgap: c.TRACK_GAP_HALF,
}, { height: c.TRACK_HEIGHT
el: sliderVertical, },
top: 20, top: 23,
left: 0, left: 0,
width: "100%" width: "100%"
}, { }, {
el: { el: sliderVertical,
type: "bi.vertical", top: 20,
items: [{ left: 0,
type: "bi.horizontal_auto", width: "100%"
items: [this.label] }, {
}], el: {
// height: c.EDITOR_HEIGHT type: "bi.vertical",
}, items: [
top: 0, {
left: 0, type: "bi.horizontal_auto",
width: "100%" items: [this.label]
}] }
],
// height: c.EDITOR_HEIGHT
},
top: 0,
left: 0,
width: "100%"
}
]
}; };
}, },
@ -198,7 +208,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
self.fireEvent(BI.SingleSlider.EVENT_CHANGE); self.fireEvent(BI.SingleSlider.EVENT_CHANGE);
}, window); }, window);
widget.element.on("mousedown", function (event) { widget.element.on("mousedown", function (event) {
if(!widget.isEnabled()) { if (!widget.isEnabled()) {
return; return;
} }
defaultSize = this.offsetLeft; defaultSize = this.offsetLeft;
@ -206,7 +216,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
mouseMoveTracker.captureMouseMoves(event); mouseMoveTracker.captureMouseMoves(event);
}); });
function optimizeSize (s) { function optimizeSize(s) {
return BI.clamp(s, 0, self._getGrayTrackLength()); return BI.clamp(s, 0, self._getGrayTrackLength());
} }
}, },
@ -214,30 +224,36 @@ BI.SingleSlider = BI.inherit(BI.Single, {
_createTrackWrapper: function () { _createTrackWrapper: function () {
return BI.createWidget({ return BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [
el: { {
type: "bi.vertical", el: {
items: [{ type: "bi.vertical",
type: "bi.absolute", items: [
items: [{ {
el: this.grayTrack, type: "bi.absolute",
top: 0, items: [
left: 0, {
width: "100%" el: this.grayTrack,
}, { top: 0,
el: this.blueTrack, left: 0,
top: 0, width: "100%"
left: 0, }, {
width: "0%" el: this.blueTrack,
}] top: 0,
}], left: 0,
hgap: 8, width: "0%"
height: 8 }
}, ]
top: 8, }
left: 0, ],
width: "100%" hgap: 8,
}] height: 8
},
top: 8,
left: 0,
width: "100%"
}
]
}); });
}, },
@ -245,9 +261,9 @@ BI.SingleSlider = BI.inherit(BI.Single, {
var o = this.options; var o = this.options;
var valid = false; var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) { if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false) { if (o.digit === false) {
valid = true; valid = true;
}else{ } else {
var dotText = (v + "").split(".")[1] || ""; var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit); valid = (dotText.length === o.digit);
} }
@ -256,7 +272,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
}, },
_setBlueTrack: function (percent) { _setBlueTrack: function (percent) {
this.blueTrack.element.css({width: percent + "%"}); this.blueTrack.element.css({ width: percent + "%" });
}, },
_setLabelPosition: function (percent) { _setLabelPosition: function (percent) {
@ -264,7 +280,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
}, },
_setSliderPosition: function (percent) { _setSliderPosition: function (percent) {
this.slider.element.css({left: percent + "%"}); this.slider.element.css({ left: percent + "%" });
}, },
_setAllPosition: function (percent) { _setAllPosition: function (percent) {
@ -314,7 +330,7 @@ BI.SingleSlider = BI.inherit(BI.Single, {
_setEnable: function (b) { _setEnable: function (b) {
BI.SingleSlider.superclass._setEnable.apply(this, [b]); BI.SingleSlider.superclass._setEnable.apply(this, [b]);
if(b) { if (b) {
this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track"); this.blueTrack.element.removeClass("disabled-blue-track").addClass("blue-track");
} else { } else {
this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track"); this.blueTrack.element.removeClass("blue-track").addClass("disabled-blue-track");
@ -322,9 +338,9 @@ BI.SingleSlider = BI.inherit(BI.Single, {
}, },
setMinAndMax: function (v) { setMinAndMax: function (v) {
var minNumber = BI.parseFloat(v.min); var minNumber = this.options.min = BI.parseFloat(v.min);
var maxNumber = BI.parseFloat(v.max); var maxNumber = this.options.max = BI.parseFloat(v.max);
if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) { if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber)) {
this.min = minNumber; this.min = minNumber;
this.max = maxNumber; this.max = maxNumber;
} }

1
typescript/widget/numberinterval/numberinterval.ts

@ -16,6 +16,7 @@ export declare class NumberInterval extends Single {
closeMax?: boolean; closeMax?: boolean;
validation?: 'invalid' | 'valid'; validation?: 'invalid' | 'valid';
numTip?: string; numTip?: string;
simple?: boolean;
} & Single['props']; } & Single['props'];
isStateValid(): boolean; isStateValid(): boolean;

2
webpack/attachments.js

@ -7,7 +7,7 @@ const workerCompact = './dist/fix/worker.compact.js';
const lodashJs = "src/core/1.lodash.js"; const lodashJs = "src/core/1.lodash.js";
const jqueryJs = "src/core/platform/web/jquery/_jquery.js"; const jqueryJs = "src/core/platform/web/jquery/_jquery.js";
const runtimePolyfill = ["@babel/polyfill", "es6-promise/auto"]; const runtimePolyfill = ["core-js/stable"];
const basicAttachmentMap = { const basicAttachmentMap = {
polyfill: sync([ polyfill: sync([

Loading…
Cancel
Save