diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot index bfd53b919..525a2255d 100644 Binary files a/dist/font/iconfont.eot and b/dist/font/iconfont.eot differ diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg index 35d6aab64..03bfcd64d 100644 --- a/dist/font/iconfont.svg +++ b/dist/font/iconfont.svg @@ -14,6 +14,62 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22,7 +78,7 @@ - + @@ -304,9 +360,9 @@ - + - + @@ -1896,7 +1952,7 @@ - + diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf index c08f197a3..e4c8c2ce8 100644 Binary files a/dist/font/iconfont.ttf and b/dist/font/iconfont.ttf differ diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff index 910630447..13c6cb98e 100644 Binary files a/dist/font/iconfont.woff and b/dist/font/iconfont.woff differ diff --git a/dist/font/iconfont.woff2 b/dist/font/iconfont.woff2 index d38205116..2c3383f13 100644 Binary files a/dist/font/iconfont.woff2 and b/dist/font/iconfont.woff2 differ diff --git a/package.json b/package.json index 0f26417fe..99f620e2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20221115175620", + "version": "2.0.20221122144609", "description": "fineui", "main": "dist/fineui_without_conflict.min.js", "types": "dist/lib/index.d.ts", diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 88ccf198a..0a9d40e05 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -156,13 +156,21 @@ BI.Calendar = BI.inherit(BI.Widget, { return BI.map(items, function (i, item) { return BI.map(item, function (j, td) { var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month); + var year = o.year; + if (month > 12) { + month = 1; + year++; + } else if (month < 1) { + month = 12; + year--; + } return BI.extend(td, { type: "bi.calendar_date_item", once: false, forceSelected: true, - value: o.year + "-" + month + "-" + td.text, + value: year + "-" + month + "-" + td.text, disabled: td.disabled, - cls: td.lastMonth || td.nextMonth ? "not-current-month-day": "", + cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", lgap: 2, rgap: 2, tgap: 4, diff --git a/src/case/linearsegment/linear.segment.js b/src/case/linearsegment/linear.segment.js index 3c1b677c3..b0b00f95b 100644 --- a/src/case/linearsegment/linear.segment.js +++ b/src/case/linearsegment/linear.segment.js @@ -3,9 +3,6 @@ BI.LinearSegment = BI.inherit(BI.Widget, { props: { baseCls: "bi-linear-segment", items: [], - layouts: [{ - type: "bi.center" - }], height: 30 }, @@ -13,11 +10,14 @@ BI.LinearSegment = BI.inherit(BI.Widget, { var self = this, o = this.options; return { type: "bi.button_group", - items: BI.createItems(o.items, { + items: [BI.createItems(o.items, { type: "bi.linear_segment_button", height: o.height - }), - layouts: o.layouts, + })], + layouts: [{ + type: "bi.table", + columnSize: BI.makeArrayByArray(o.items, "fill"), + }], value: o.value, listeners: [{ eventName: "__EVENT_CHANGE__", diff --git a/src/core/platform/web/function.js b/src/core/platform/web/function.js index 230fc6ad5..1c74836e2 100644 --- a/src/core/platform/web/function.js +++ b/src/core/platform/web/function.js @@ -125,5 +125,17 @@ BI._.extend(BI, { } } return false; + }, + + getSafariVersion: function () { + if (!_global.navigator) { + return 0; + } + var agent = navigator.userAgent.toLowerCase(); + var version = agent.match(/version\/([\d.]+)/); + if (version && version[1]) { + return version[1] * 1; + } + return 0; } }); diff --git a/src/less/base/tree/tree.display.less b/src/less/base/tree/tree.display.less index 2343d4054..6c483feac 100644 --- a/src/less/base/tree/tree.display.less +++ b/src/less/base/tree/tree.display.less @@ -17,4 +17,12 @@ background-color: inherit; .opacity(1); } +} + +.bi-theme-dark { + .bi-display-tree { + .ztree * { + color: @color-bi-text-display-tree-theme-dark; + } + } } \ No newline at end of file diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index a75904add..e9eee2c97 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -90,6 +90,12 @@ } } + .ztree li span.button.chk { + &.bi-checkbox { + border-color: @color-bi-border-dark-line-theme-dark; + } + } + &.bi-half-button { border: 1px solid @color-bi-border-hover-active-checkbox-theme-dark; } diff --git a/src/less/lib/colors.less b/src/less/lib/colors.less index dca2a9989..fd429ac08 100644 --- a/src/less/lib/colors.less +++ b/src/less/lib/colors.less @@ -13,6 +13,7 @@ @color-bi-text-black-theme-dark: @font-color-normal-theme-dark; //灰色字体颜色 @color-bi-text-gray: @font-color-gray; +@color-bi-text-gray-theme-dark: @font-color-gray-theme-dark; //浅灰色字体 @color-bi-text-light-gray: @font-color-light-gray; //深色主题浅灰色字体 diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index 17421baf0..fa69a4783 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -167,6 +167,7 @@ @font-color-light-disabled: @color-dark-gray; @font-color-light-disabled-theme-dark: @color-dark-gray-theme-dark; @font-color-gray: #999999; +@font-color-gray-theme-dark: @color-gray-theme-dark; @font-color-white: @color-white; @font-color-white-theme-dark: @color-white-theme-dark; @font-color-light-highlight: @color-light-blue-100; diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index ae3fd45bb..1092dd18a 100644 --- a/src/less/lib/theme.less +++ b/src/less/lib/theme.less @@ -233,6 +233,7 @@ @color-bi-color-error-input-text-area: @color-bi-text-failure; // tree @color-bi-text-display-tree: @color-bi-text-gray; +@color-bi-text-display-tree-theme-dark: @color-bi-text-gray-theme-dark; @color-bi-border-tree-expander-popup-line: @color-bi-border-dark-gray-line; @color-bi-border-tree-expander-popup-line-theme-dark: @color-bi-border-dark-gray-line-theme-dark; // popup diff --git a/src/widget/downlist/combo.downlist.js b/src/widget/downlist/combo.downlist.js index 8b9aa4c0c..10c39bfbf 100644 --- a/src/widget/downlist/combo.downlist.js +++ b/src/widget/downlist/combo.downlist.js @@ -44,7 +44,8 @@ popup: {}, minWidth: 140, maxHeight: 1000, - destroyWhenHide: false + destroyWhenHide: false, + isDefaultInit: true, }); }, @@ -57,7 +58,7 @@ type: "bi.combo", trigger: o.trigger, isNeedAdjustWidth: false, - isDefaultInit: true, + isDefaultInit: o.isDefaultInit, container: o.container, adjustLength: o.adjustLength, direction: o.direction, diff --git a/src/widget/year/combo.year.js b/src/widget/year/combo.year.js index 558a6c62a..d2d68d19b 100644 --- a/src/widget/year/combo.year.js +++ b/src/widget/year/combo.year.js @@ -141,7 +141,7 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: this._const.iconWidth, height: BI.toPix(o.height, border), ref: function () { diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js index 4a85db0f2..82d6e3ca8 100644 --- a/src/widget/yearmonth/combo.yearmonth.js +++ b/src/widget/yearmonth/combo.yearmonth.js @@ -141,7 +141,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: BI.toPix(o.height, border), height: BI.toPix(o.height, border), ref: function () { diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js index 455fd9901..1403d254f 100644 --- a/src/widget/yearquarter/combo.yearquarter.js +++ b/src/widget/yearquarter/combo.yearquarter.js @@ -144,7 +144,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { items: [{ el: { type: "bi.icon_button", - cls: "bi-trigger-icon-button", + cls: "bi-trigger-icon-button date-change-h-font", width: this._consts.iconWidth, height: BI.toPix(o.height, border), ref: function () { @@ -169,7 +169,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { } switch (type) { case BI.DynamicYearQuarterCombo.Dynamic: - this.comboWrapper.resize(); + this.changeIcon.setVisible(true); break; default: this.changeIcon.setVisible(false); diff --git a/typescript/case/combo/combo.textvalue.ts b/typescript/case/combo/combo.textvalue.ts index 0a50d2342..128ec03b6 100644 --- a/typescript/case/combo/combo.textvalue.ts +++ b/typescript/case/combo/combo.textvalue.ts @@ -5,5 +5,10 @@ export declare class TextValueCombo extends Widget { static EVENT_CHANGE: string; - populate(items: any): void; + clear(): void; + setText(text: string): void; + setValue(value: any): void; + setStatus(status: "success" | "warning" | "error"): void; + getValue(): any[]; + populate(items: any[]): void; } diff --git a/typescript/case/combo/popup.textvalue.ts b/typescript/case/combo/popup.textvalue.ts new file mode 100644 index 000000000..a3fe1b0d1 --- /dev/null +++ b/typescript/case/combo/popup.textvalue.ts @@ -0,0 +1,13 @@ +import { Pane } from "../../base/pane"; + +export declare class TextValueComboPopup extends Pane { + static xtype: string; + + static EVENT_CHANGE: string; + static EVENT_CLEAR: string; + static EVENT_CONFIRM: string; + + populate(items: any[]): void; + getValue(): any; + setValue(value: any): void; +} diff --git a/typescript/core/base.ts b/typescript/core/base.ts index b5a3ce55c..6182a0833 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -148,9 +148,9 @@ export interface _base { takeRight: (array: T[], n: number) => T[]; - findIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; + findIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; - findLastIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; + findLastIndex: (array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number; makeArray: (length: number, value?: T) => number[] | T[]; diff --git a/typescript/core/platform/web/function.ts b/typescript/core/platform/web/function.ts index 95b2d29ef..406eb95ee 100644 --- a/typescript/core/platform/web/function.ts +++ b/typescript/core/platform/web/function.ts @@ -9,4 +9,5 @@ export type _function = { isMac: () => boolean; isWindows: () => boolean; isSupportCss3: (style: any) => boolean; + getSafariVersion: () => number; } \ No newline at end of file diff --git a/typescript/core/worker/controller/worker.main_thread.controller.ts b/typescript/core/worker/controller/worker.main_thread.controller.ts index bd7dcfc96..b9ddb4fb6 100644 --- a/typescript/core/worker/controller/worker.main_thread.controller.ts +++ b/typescript/core/worker/controller/worker.main_thread.controller.ts @@ -10,9 +10,10 @@ export class WorkerMainThreadController extends WorkerBaseController { /** * 是否支持 new Worker, 默认为 Wroker Class 是否实现 + * 由于Blob url支持度问题 规避Safari 12以下版本 */ - public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass; + public canNewWorker: boolean = WorkerMainThreadController.hasWorkerClass && !(BI.isSafari() && BI.getSafariVersion() < 12); /** * 主线程 new Worker 起始时刻 diff --git a/typescript/index.ts b/typescript/index.ts index a1b9831c9..cf63c604d 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -20,6 +20,7 @@ import { IconChangeButton } from "./case/button/icon/icon.change"; import { MultiSelectItem } from "./case/button/item.multiselect"; import { BubbleCombo } from "./case/combo/bubblecombo/combo.bubble"; import { TextValueCombo } from "./case/combo/combo.textvalue"; +import { TextValueComboPopup } from "./case/combo/popup.textvalue"; import { SmallTextValueCombo } from "./case/combo/combo.textvaluesmall"; import { SearchTextValueCombo } from "./case/combo/searchtextvaluecombo/combo.searchtextvalue"; import { SignEditor } from "./case/editor/editor.sign"; @@ -226,6 +227,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { ButtonGroup: typeof ButtonGroup; Combo: typeof Combo; TextValueCombo: typeof TextValueCombo; + TextValueComboPopup: typeof TextValueComboPopup; SmallTextValueCombo: typeof SmallTextValueCombo; BubbleCombo: typeof BubbleCombo; AllValueMultiTextValueCombo: typeof AllValueMultiTextValueCombo; @@ -464,6 +466,7 @@ export { MultiSelectBar, SelectList, TextValueCombo, + TextValueComboPopup, SmallTextValueCombo, Editor, IconLabel,