Browse Source

Merge pull request #225403 in DEC/fineui from feature/x to bugfix/11.0

* commit '7207aa35725ab261b70886ae8e0159b59d816949':
  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 结果为空时,提示居中
research/test
superman 2 years ago
parent
commit
a843292033
  1. 6
      package.json
  2. 1
      src/base/tree/customtree.js
  3. 15
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  4. 12
      src/widget/multiselect/multiselect.loader.nobar.js
  5. 21
      src/widget/multiselect/search/multiselect.search.loader.js
  6. 68
      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,
}] }]
}] }]
}; };

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

@ -98,12 +98,14 @@ 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);

21
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 () {
var o = this.options;
if (o.allowSelectAll) {
return this.button_group.getValue(); 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 () {

68
src/widget/singleslider/singleslider.js

@ -58,7 +58,8 @@ 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", type: "bi.absolute",
items: [ items: [
{ {
@ -67,7 +68,8 @@ BI.SingleSlider = BI.inherit(BI.Single, {
} }
], ],
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,17 +126,22 @@ BI.SingleSlider = BI.inherit(BI.Single, {
this._setVisible(false); this._setVisible(false);
return { return {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [
{
el: { el: {
type: "bi.vertical", type: "bi.vertical",
items: [{ items: [
{
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [
{
el: this.track, el: this.track,
width: "100%", width: "100%",
height: c.TRACK_HEIGHT height: c.TRACK_HEIGHT
}] }
}], ]
}
],
hgap: c.TRACK_GAP_HALF, hgap: c.TRACK_GAP_HALF,
height: c.TRACK_HEIGHT height: c.TRACK_HEIGHT
}, },
@ -149,16 +156,19 @@ BI.SingleSlider = BI.inherit(BI.Single, {
}, { }, {
el: { el: {
type: "bi.vertical", type: "bi.vertical",
items: [{ items: [
{
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
items: [this.label] items: [this.label]
}], }
],
// height: c.EDITOR_HEIGHT // height: c.EDITOR_HEIGHT
}, },
top: 0, top: 0,
left: 0, left: 0,
width: "100%" 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,12 +224,15 @@ 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: { el: {
type: "bi.vertical", type: "bi.vertical",
items: [{ items: [
{
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [
{
el: this.grayTrack, el: this.grayTrack,
top: 0, top: 0,
left: 0, left: 0,
@ -229,15 +242,18 @@ BI.SingleSlider = BI.inherit(BI.Single, {
top: 0, top: 0,
left: 0, left: 0,
width: "0%" width: "0%"
}] }
}], ]
}
],
hgap: 8, hgap: 8,
height: 8 height: 8
}, },
top: 8, top: 8,
left: 0, left: 0,
width: "100%" 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