Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~claire.tang/fineui

es6
Tangjinxia 3 years ago
parent
commit
4bfb8940e9
  1. 2
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 2934
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 2
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 2
      dist/2.0/fineui_without_normalize.css
  10. 2
      dist/2.0/fineui_without_normalize.min.css
  11. 2
      dist/core.css
  12. 2900
      dist/core.js
  13. 2
      dist/core.js.map
  14. 2
      dist/demo.css
  15. 3272
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 2
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 2928
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 2
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 2
      dist/fineui.proxy.css
  26. 2152
      dist/fineui.proxy.js
  27. 2
      dist/fineui.proxy.js.map
  28. 2
      dist/fineui.proxy.min.css
  29. 4
      dist/fineui.proxy.min.js
  30. 2
      dist/fineui.proxy.min.js.map
  31. 2041
      dist/fineui_without_jquery_polyfill.js
  32. 2
      dist/fineui_without_jquery_polyfill.js.map
  33. 2
      dist/font.css
  34. BIN
      dist/font/iconfont.eot
  35. 3
      dist/font/iconfont.svg
  36. BIN
      dist/font/iconfont.ttf
  37. BIN
      dist/font/iconfont.woff
  38. BIN
      dist/font/iconfont.woff2
  39. 5
      dist/lib/base/single/button/buttons/button.image.d.ts
  40. 11
      dist/lib/base/single/button/listitem/blankicontextitem.d.ts
  41. 2
      dist/lib/base/single/label/html.label.d.ts
  42. 2
      dist/lib/case/layer/pane.list.d.ts
  43. 2
      dist/lib/component/treevaluechooser/combo.listtreevaluechooser.d.ts
  44. 2
      dist/lib/component/treevaluechooser/combo.treevaluechooser.d.ts
  45. 2
      dist/lib/component/treevaluechooser/combo.treevaluechooser.insert.d.ts
  46. 11
      dist/lib/component/treevaluechooser/pane.treevaluechooser.d.ts
  47. 4
      dist/lib/index.d.ts
  48. 1
      dist/lib/widget/multilayerselecttree/multilayerselecttree.combo.d.ts
  49. 1
      dist/lib/widget/multilayersingletree/multilayersingletree.combo.d.ts
  50. 2
      dist/lib/widget/multitree/multi.tree.combo.d.ts
  51. 2
      dist/lib/widget/multitree/multi.tree.insert.combo.d.ts
  52. 2
      dist/lib/widget/multitree/multi.tree.list.combo.d.ts
  53. 2
      dist/resource.css
  54. 14
      dist/utils.js
  55. 2
      dist/utils.js.map
  56. 4
      dist/utils.min.js
  57. 2
      dist/utils.min.js.map
  58. 2
      package.json
  59. 10
      src/base/single/1.text.js
  60. 2
      src/case/layer/pane.list.js
  61. 4
      src/case/trigger/trigger.text.js
  62. 4
      src/case/trigger/trigger.text.select.js
  63. 22
      src/case/ztree/0.treeview.js
  64. 4
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  65. 4
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  66. 4
      src/component/treevaluechooser/combo.treevaluechooser.js
  67. 16
      src/core/4.widget.js
  68. 7
      src/core/platform/web/jquery/fn.js
  69. 43
      src/core/wrapper/layout/adapt/absolute.horizontal.js
  70. 147
      src/core/wrapper/layout/adapt/absolute.leftrightvertical.js
  71. 45
      src/core/wrapper/layout/adapt/absolute.vertical.js
  72. 4
      src/core/wrapper/layout/adapt/adapt.table.js
  73. 18
      src/core/wrapper/layout/flex/flex.horizontal.js
  74. 18
      src/core/wrapper/layout/flex/flex.vertical.js
  75. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  76. 16
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  77. 29
      src/core/wrapper/layout/layout.inline.js
  78. 12
      src/core/wrapper/layout/layout.table.js
  79. 89
      src/core/wrapper/layout/layout.tape.js
  80. 2
      src/core/wrapper/layout/layout.td.js
  81. 5
      src/widget/datetime/datetime.combo.js
  82. 51
      src/widget/dynamicdate/dynamicdate.caculate.js
  83. 49
      src/widget/dynamicdate/dynamicdate.trigger.js
  84. 9
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  85. 9
      src/widget/multilayersingletree/multilayersingletree.combo.js
  86. 2
      src/widget/multiselect/multiselect.combo.js
  87. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  88. 2
      src/widget/multiselect/multiselect.insert.combo.js
  89. 10
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  90. 12
      src/widget/multiselect/trigger/searcher.multiselect.js
  91. 2
      src/widget/multiselectlist/multiselectlist.insert.js
  92. 2
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  93. 2
      src/widget/multiselectlist/multiselectlist.js
  94. 4
      src/widget/multitree/multi.tree.combo.js
  95. 4
      src/widget/multitree/multi.tree.insert.combo.js
  96. 4
      src/widget/multitree/multi.tree.list.combo.js
  97. 6
      src/widget/multitree/trigger/searcher.list.multi.tree.js
  98. 10
      src/widget/multitree/trigger/searcher.multi.tree.js
  99. 2
      src/widget/singleselect/trigger/searcher.singleselect.js
  100. 4
      src/widget/singletree/singletree.trigger.js
  101. Some files were not shown because too many files have changed in this diff Show More

2
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

2934
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/core.css vendored

File diff suppressed because one or more lines are too long

2900
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/demo.css vendored

File diff suppressed because one or more lines are too long

3272
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

2928
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.css vendored

File diff suppressed because one or more lines are too long

2152
dist/fineui.proxy.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.proxy.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.proxy.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.proxy.min.js.map vendored

File diff suppressed because one or more lines are too long

2041
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

3
dist/font/iconfont.svg vendored

@ -20,6 +20,9 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="shujuyuchuli" unicode="&#59480;" d="M333.248 128H191.872v-128h208.64c20.032-24.32 43.264-45.888 69.12-64h-277.76a64 64 0 0 0-64 64v128a64 64 0 0 0 64 64h129.536c1.984-22.016 6.016-43.392 11.84-64z m-45.376-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM400.448 448H191.872v-128h141.376a350.72 350.72 0 0 1-11.84-64H191.872a64 64 0 0 0-64 64V448a64 64 0 0 0 64 64h277.632c-25.792-18.176-49.024-39.744-69.12-64z m-112.576-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64z m544 416a64 64 0 0 0 64-64v-128a64 64 0 0 0-64-64h-640a64 64 0 0 0-64 64V768a64 64 0 0 0 64 64z m0-64h-640v-128h640V768z m-544-32a32 32 0 1 0 0-64 32 32 0 0 0 0 64zM891.584 384l3.328-3.2 67.072-79.232a18.88 18.88 0 0 0-6.592-29.44l-4.48-1.28-26.88-4.992a256.832 256.832 0 0 0-206.72-297.92 253.824 253.824 0 0 0-143.552 15.616l-14.4 6.528-0.64 0.192a23.36 23.36 0 0 0 16.96 43.52l3.136-1.6c39.04-19.2 84.224-26.752 130.432-18.368a210.112 210.112 0 0 1 170.88 231.936l-1.728 11.712-29.568-5.376a18.816 18.816 0 0 0-22.08 20.864l1.024 4.032 35.2 97.92A18.816 18.816 0 0 0 891.52 384z m-119.36 71.872l16.768-7.68a23.168 23.168 0 0 0 10.112-28.608 23.36 23.36 0 0 0-30.144-13.248l-1.92 1.024a209.664 209.664 0 0 1-132.16 19.2 210.112 210.112 0 0 1-170.88-232l1.728-11.776 28.16 5.12a18.88 18.88 0 0 0 22.208-20.416l-1.024-4.48-35.2-97.92a18.88 18.88 0 0 0-28.8-9.024l-3.392 3.2-67.008 79.232a18.88 18.88 0 0 0 6.592 29.376l4.48 1.408 28.16 5.184a256.64 256.64 0 0 0 206.848 297.92 253.184 253.184 0 0 0 145.472-16.512zM672 355.20000000000005c15.168 0 28.544-10.048 32.768-24.64l62.4-216.768c3.392-11.648-4.032-23.552-16.512-26.624-12.416-3.136-25.28 3.776-28.608 15.36l-11.52 39.808H633.408l-11.392-39.808c-3.328-11.584-16.192-18.496-28.608-15.36-12.48 3.072-19.84 14.976-16.512 26.624l62.4 216.768a34.112 34.112 0 0 0 32.768 24.64z m0-78.912l-26.112-90.496h52.096L672 276.288z" horiz-adv-x="1024" />
<glyph glyph-name="jianceyichang" unicode="&#59479;" d="M512-42.666667c235.648 0 426.666667 191.018667 426.666667 426.666667S747.648 810.666667 512 810.666667 85.333333 619.648 85.333333 384s191.018667-426.666667 426.666667-426.666667zM298.666667 426.666667h426.666666a42.666667 42.666667 0 0 0 0-85.333334H298.666667a42.666667 42.666667 0 0 0 0 85.333334z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 393 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

5
dist/lib/base/single/button/buttons/button.image.d.ts vendored

@ -2,6 +2,11 @@ import { BasicButton } from "../button.basic";
export declare class ImageButton extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
props: {
src?: string;
iconWidth?: number;
iconHeight?: number;
} & BasicButton['props'];
setImageWidth(w: number | string): void;
setImageHeight(h: number | string): void;
getImageWidth(): number;

11
dist/lib/base/single/button/listitem/blankicontextitem.d.ts vendored

@ -2,6 +2,17 @@ import { BasicButton } from "../button.basic";
export declare class BlankIconTextItem extends BasicButton {
static xtype: string;
static EVENT_CHANGE: string;
props: {
blankWidth?: number;
iconHeight?: number | null;
iconWidth?: number | null;
textHgap?: number;
textVgap?: number;
textLgap?: number;
textRgap?: number;
text?: string;
keyword?: string;
} & BasicButton['props'];
doClick(): void;
setValue(): void;
getValue(): string;

2
dist/lib/base/single/label/html.label.d.ts vendored

@ -1,7 +1,7 @@
import { AbstractLabel } from "./abstract.label";
export declare class HtmlLabel extends AbstractLabel {
props: {
lineHeight: number;
textHeight: number;
} & AbstractLabel['props'];
static xtype: string;
}

2
dist/lib/case/layer/pane.list.d.ts vendored

@ -6,7 +6,7 @@ export declare class ListPane extends Pane {
hasNext(): boolean;
prependItems<T>(items: T[]): void;
addItems<T>(items: T[]): void;
removeItemAt(indexes: number): void;
removeItemAt(indexes?: number | number[]): void;
populate<T>(items?: T[]): void;
setNotSelectedValue(v: any): void;
getNotSelectedValue<T>(): T[];

2
dist/lib/component/treevaluechooser/combo.listtreevaluechooser.d.ts vendored

@ -1,3 +1,4 @@
import { Widget } from "../../core/widget";
import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list";
export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser {
static xtype: string;
@ -13,4 +14,5 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal
setValue(v: any): void;
getValue<T>(): T;
populate<T>(items: T[]): void;
getSearcher(): Widget;
}

2
dist/lib/component/treevaluechooser/combo.treevaluechooser.d.ts vendored

@ -1,3 +1,4 @@
import { Widget } from "../../core/widget";
import { AbstractTreeValueChooser } from "./abstract.treevaluechooser";
export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
static xtype: string;
@ -14,4 +15,5 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
getValue<T>(): T;
getAllValue<T>(): T;
populate<T>(items: T[]): void;
getSearcher(): Widget;
}

2
dist/lib/component/treevaluechooser/combo.treevaluechooser.insert.d.ts vendored

@ -1,3 +1,4 @@
import { Widget } from "../../core/widget";
import { AbstractTreeValueChooser } from "./abstract.treevaluechooser";
export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser {
static xtype: string;
@ -13,4 +14,5 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose
setValue(v: any): void;
getValue<T>(): T;
populate<T>(items: T[]): void;
getSearcher(): Widget;
}

11
dist/lib/component/treevaluechooser/pane.treevaluechooser.d.ts vendored

@ -0,0 +1,11 @@
import { TreeValue } from '../../base/tree/ztree/treeview';
import { AbstractTreeValueChooser } from "./abstract.treevaluechooser";
export declare class TreeValueChooserPane extends AbstractTreeValueChooser {
static xtype: string;
static EVENT_CHANGE: string;
setSelectedValue(v: TreeValue): void;
setValue(v: TreeValue): void;
getValue(): TreeValue;
getAllValue(): TreeValue;
populate<T>(items?: T[]): void;
}

4
dist/lib/index.d.ts vendored

@ -170,6 +170,7 @@ import { DynamicDateTimePane } from './widget/datetimepane/datetimepane';
import { SingleSelectInsertList } from './widget/singleselect/singleselectlist.insert';
import { MultiSelectTree } from './widget/multiselecttree/multiselecttree';
import { HtmlLabel } from "./base/single/label/html.label";
import { TreeValueChooserPane } from './component/treevaluechooser/pane.treevaluechooser';
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB;
Plugin: _Plugin;
@ -345,9 +346,10 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
SingleSelectInsertList: typeof SingleSelectInsertList;
MultiSelectTree: typeof MultiSelectTree;
HtmlLabel: typeof HtmlLabel;
TreeValueChooserPane: typeof TreeValueChooserPane;
}
declare const _default: {
Decorators: typeof decorator;
};
export default _default;
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, };
export { OB, Widget, Single, BasicButton, Checkbox, Icon, LeftVerticalAdaptLayout, LeftRightVerticalAdaptLayout, SearchTextValueCombo, Input, IconTextItem, AllValueMultiTextValueCombo, IconTextIconItem, Layout, HorizontalAutoLayout, InlineVerticalAdaptLayout, RightVerticalAdaptLayout, TableAdaptLayout, AbsoluteCenterLayout, HorizontalAdaptLayout, FloatLeftLayout, FloatRightLayout, VerticalLayout, AbsoluteLayout, DefaultLayout, HTapeLayout, CenterAdaptLayout, VTapeLayout, VerticalAdaptLayout, IconButton, Trigger, TriggerIconButton, Action, ActionFactory, ShowAction, Controller, LayerController, BroadcastController, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiPopupView, MultiSelectBar, SelectList, TextValueCombo, SmallTextValueCombo, Editor, IconLabel, Popover, BarPopover, Tab, AbstractTreeValueChooser, AbstractListTreeValueChooser, ListTreeValueChooserInsertCombo, TreeValueChooserCombo, TreeValueChooserInsertCombo, MultiLayerSelectTreePopup, MultiLayerSingleTreePopup, TreeView, ListTreeView, ListAsyncTree, AsyncTree, MultiLayerSingleTreeCombo, MultiLayerSelectTreeCombo, MultiTreeListCombo, MultiTreeInsertCombo, Combo, IconCombo, DynamicDateCombo, Radio, MultiSelectItem, CustomTree, ButtonGroup, ButtonTree, NodeButton, IconArrowNode, MidTreeLeafItem, FirstTreeLeafItem, LastTreeLeafItem, SmallTextEditor, MultifileEditor, SignEditor, StateEditor, MultiSelectInsertCombo, MultiSelectCombo, SearchEditor, Text, Pane, MultiLayerSingleLevelTree, SimpleColorChooser, AbstractAllValueChooser, AllValueChooserCombo, TextAreaEditor, SingleSelectItem, DynamicDateTimeCombo, MultiTreeCombo, CenterLayout, VirtualGroup, GridLayout, MultiTreePopup, SingleSelectRadioItem, SingleSelectInsertCombo, SingleSelectCombo, CardLayout, DynamicYearMonthCombo, TimeCombo, Iframe, TextValueDownListCombo, Switch, HorizontalLayout, ShelterEditor, TextTrigger, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, Pager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, DateCalendarPopup, Tree, Node, TextNode, TextValueCheckComboPopup, ImageButton, Router, History, DateTimeCombo, FloatHorizontalLayout, AdaptiveLayout, HexColorChooserPopup, BlankIconTextItem, TimeInterval, DynamicDateTimePane, SingleSelectInsertList, MultiSelectTree, HtmlLabel, TreeValueChooserPane, };

1
dist/lib/widget/multilayerselecttree/multilayerselecttree.combo.d.ts vendored

@ -9,4 +9,5 @@ export declare class MultiLayerSelectTreeCombo extends Widget {
setValue(v: string[] | string): void;
getValue(): string[];
populate<T>(items: T[]): void;
getSearcher(): Widget;
}

1
dist/lib/widget/multilayersingletree/multilayersingletree.combo.d.ts vendored

@ -9,4 +9,5 @@ export declare class MultiLayerSingleTreeCombo extends Widget {
setValue(v: string[] | string): void;
getValue(): string[];
populate<T>(items: T[]): void;
getSearcher(): Widget;
}

2
dist/lib/widget/multitree/multi.tree.combo.d.ts vendored

@ -1,4 +1,5 @@
import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
export declare class MultiTreeCombo extends Single {
static xtype: string;
static EVENT_FOCUS: string;
@ -10,4 +11,5 @@ export declare class MultiTreeCombo extends Single {
static EVENT_BEFORE_POPUPVIEW: string;
showView(): void;
hideView(): void;
getSearcher(): Widget;
}

2
dist/lib/widget/multitree/multi.tree.insert.combo.d.ts vendored

@ -1,5 +1,6 @@
import { Single } from "../../base/single/single";
import { TreeValue } from "../../base/tree/ztree/treeview";
import { Widget } from "../../core/widget";
export declare class MultiTreeInsertCombo extends Single {
static xtype: string;
static EVENT_FOCUS: string;
@ -14,4 +15,5 @@ export declare class MultiTreeInsertCombo extends Single {
setValue(v: TreeValue): void;
getValue(): TreeValue;
populate(): void;
getSearcher(): Widget;
}

2
dist/lib/widget/multitree/multi.tree.list.combo.d.ts vendored

@ -1,4 +1,5 @@
import { Single } from "../../base/single/single";
import { Widget } from "../../core/widget";
export declare class MultiTreeListCombo extends Single {
static xtype: string;
static EVENT_FOCUS: string;
@ -13,4 +14,5 @@ export declare class MultiTreeListCombo extends Single {
setValue(v: string[]): void;
getValue(): string[];
populate(): void;
getSearcher(): Widget;
}

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

14
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2021-6-10 11:00:18 AM */
/*! time: 2021-6-21 18:30:18 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1262);
/******/ return __webpack_require__(__webpack_require__.s = 1264);
/******/ })
/************************************************************************/
/******/ ({
@ -2927,7 +2927,7 @@ BI.Req = {
/***/ }),
/***/ 1120:
/***/ 1122:
/***/ (function(module, exports) {
BI.i18n = {
@ -3132,7 +3132,7 @@ BI.i18n = {
/***/ }),
/***/ 1262:
/***/ 1264:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(91);
@ -3151,8 +3151,8 @@ __webpack_require__(97);
__webpack_require__(98);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(1120);
__webpack_require__(1263);
__webpack_require__(1122);
__webpack_require__(1265);
__webpack_require__(110);
__webpack_require__(111);
module.exports = __webpack_require__(112);
@ -3160,7 +3160,7 @@ module.exports = __webpack_require__(112);
/***/ }),
/***/ 1263:
/***/ 1265:
/***/ (function(module, exports) {
/**

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20210610110230",
"version": "2.0.20210621183219",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

10
src/base/single/1.text.js

@ -64,8 +64,8 @@
type: "bi.layout",
tagName: "span"
});
this.text.element.click(function () {
o.handler(self.getValue());
this.text.element.click(function (e) {
o.handler.call(self, self.getValue(), self, e);
});
BI.createWidget({
type: "bi.default",
@ -77,6 +77,7 @@
}
var text = this._getShowText();
// 只要不是undefined就可以显示text值,否则显示value
if (!BI.isUndefined(text)) {
this.setText(text);
} else if (BI.isKey(o.value)) {
@ -111,7 +112,7 @@
_doRedMark: function (keyword) {
var o = this.options;
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
// render之后做的doRedMark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
o.keyword = keyword;
this.text.element.__textKeywordMarked__(this._getShowText(), keyword, o.py);
},
@ -149,8 +150,7 @@
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
// 为textContext赋值为undefined时在ie和edge下会真的显示undefined
this.options.text = BI.isNotNull(text) ? text : "";
this.options.text = text;
this._doRedMark(this.options.keyword);
}
});

2
src/case/layer/pane.list.js

@ -104,7 +104,7 @@ BI.ListPane = BI.inherit(BI.Pane, {
},
removeItemAt: function (indexes) {
indexes = indexes || [];
indexes = BI.isNull(indexes) ? [] : indexes;
BI.removeAt(this.options.items, indexes);
this.button_group.removeItemAt.apply(this.button_group, arguments);
this.check();

4
src/case/trigger/trigger.text.js

@ -55,6 +55,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
},
getTextor: function() {
return this.text;
},
setTextCls: function(cls) {
var o = this.options;
var oldCls = o.textCls;

4
src/case/trigger/trigger.text.select.js

@ -64,6 +64,10 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setTipType(v);
},
getTextor: function() {
return this.trigger.getTextor();
},
populate: function (items) {
this.options.items = items;
}

22
src/case/ztree/0.treeview.js

@ -95,7 +95,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
expandSpeed: "",
nameIsHTML: true, // 节点可以用html标签代替
dblClickExpand: false,
showLine: o.showLine,
showLine: o.showLine
},
callback: {
beforeExpand: beforeExpand,
@ -238,7 +238,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) {
// 去除标红
return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
return BI.isUndefined(node.value) ? BI.replaceAll(node.text.replace(/<[^>]+>/g, ""), "&nbsp;", " ") : node.value;
},
// 获取半选框值
@ -334,14 +334,22 @@ BI.TreeView = BI.inherit(BI.Pane, {
var self = this, o = this.options;
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
n.value = BI.isUndefined(n.value) ? n.text : n.value;
n.text = BI.isUndefined(n.text) ? n.value : n.text;
if (n.text === null) {
n.text = "(null)";
}
if (BI.isNull(n.title)) {
n.title = n.text;
}
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
if (BI.isNotNull(n.text)) {
if (BI.isKey(o.paras.keyword)) {
n.text = BI.$("<div>").__textKeywordMarked__(BI.Text.formatText(n.text + ""), o.paras.keyword, n.py).html();
} else {
n.text = BI.htmlEncode(BI.Text.formatText(n.text + ""));
}
}
});
return nodes;

4
src/component/treevaluechooser/combo.listtreevaluechooser.js

@ -84,6 +84,10 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
this.combo.hideView();
},
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) {
this.combo.setValue(v);
},

4
src/component/treevaluechooser/combo.treevaluechooser.insert.js

@ -83,6 +83,10 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this.combo.hideView();
},
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) {
this.combo.setValue(v);
},

4
src/component/treevaluechooser/combo.treevaluechooser.js

@ -83,6 +83,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this.combo.hideView();
},
getSearcher: function () {
return this.combo.getSearcher();
},
setValue: function (v) {
this.combo.setValue(v);
},

16
src/core/4.widget.js

@ -553,6 +553,14 @@
this.purgeListeners();
},
_empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
},
isolate: function () {
if (this._parent) {
this._parent.removeWidget(this);
@ -561,11 +569,7 @@
},
empty: function () {
BI.each(this._children, function (i, widget) {
widget && widget._unMount && widget._unMount();
});
this._children = {};
this.element.empty();
this._empty();
},
// 默认的reset方法就是干掉重来
@ -576,7 +580,7 @@
}
// this._isMounted = false;
// this.purgeListeners();
this.empty();
this._empty();
this.element.unbind();
this._initCurrent();
this._init();

7
src/core/platform/web/jquery/fn.js vendored

@ -77,17 +77,20 @@ if (BI.jQuery) {
* 3text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为""
*/
__textKeywordMarked__: function (text, keyword, py) {
if (BI.isNull(text)) {
text = "";
}
if (!BI.isKey(keyword) || (text + "").length > 100) {
if (BI.isIE9Below()) {
return this.html(BI.htmlEncode(text));
}
// textContent性能更好,并且原生防xss
// textContent性能更好,并且原生防xss
this[0].textContent = text;
return this;
}
keyword = keyword + "";
keyword = BI.toUpperCase(keyword);
var textLeft = (text || "") + "";
var textLeft = text + "";
py = (py || BI.makeFirstPY(text, {
splitChar: "\u200b"
})) + "";

43
src/core/wrapper/layout/adapt/absolute.horizontal.js

@ -7,6 +7,8 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-h-a",
horizontalAlign: BI.HorizontalAlign.Center,
rowSize: [],
hgap: 0,
lgap: 0,
rgap: 0,
@ -17,26 +19,26 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
},
render: function () {
var self = this, o = this.options;
BI.AbsoluteHorizontalLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit,
right: (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit,
margin: "auto"
});
if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {
w.element.css("top", (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit);
}
if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {
w.element.css("bottom", (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit);
}
return w;
return {
type: "bi.vtape",
horizontalAlign: o.horizontalAlign,
rowSize: o.rowSize,
items: o.items,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
ref: function (_ref) {
self.layout = _ref;
},
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
};
},
resize: function () {
@ -44,8 +46,7 @@ BI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {
},
populate: function (items) {
BI.AbsoluteHorizontalLayout.superclass.populate.apply(this, arguments);
this._mount();
this.layout.populate.apply(this, arguments);
}
});
BI.shortcut("bi.absolute_horizontal_adapt", BI.AbsoluteHorizontalLayout);

147
src/core/wrapper/layout/adapt/absolute.leftrightvertical.js

@ -0,0 +1,147 @@
BI.AbsoluteLeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.AbsoluteLeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-lr-v-a",
verticalAlign: BI.VerticalAlign.Middle,
items: {},
llgap: 0,
lrgap: 0,
lhgap: 0,
ltgap: 0,
lbgap: 0,
lvgap: 0,
rlgap: 0,
rrgap: 0,
rhgap: 0,
rtgap: 0,
rbgap: 0,
rvgap: 0
});
},
render: function () {
var o = this.options, self = this;
BI.AbsoluteLeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.htape",
ref: function (_ref) {
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
items: this._formatItems(),
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
_formatItems: function () {
var o = this.options;
var leftItems = o.items.left || [];
var rightItems = o.items.right || [];
leftItems = BI.map(leftItems, function (i, item) {
var json = {
el: BI.stripEL(item),
width: item.width
};
if (o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
json.tgap = o.lvgap + o.ltgap + (item.tgap || 0) + (item.vgap || 0);
}
if (o.lhgap + o.llgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.lhgap : 0) + o.llgap + (item.lgap || 0) + (item.hgap || 0);
}
if (o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.lhgap + o.lrgap + (item.rgap || 0) + (item.hgap || 0);
}
if (o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
json.bgap = o.lvgap + o.lbgap + (item.bgap || 0) + (item.vgap || 0);
}
return json;
});
rightItems = BI.map(rightItems, function (i, item) {
var json = {
el: BI.stripEL(item),
width: item.width
};
if (o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
json.tgap = o.rvgap + o.rtgap + (item.tgap || 0) + (item.vgap || 0);
}
if (o.rhgap + o.rlgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
json.lgap = (i === 0 ? o.rhgap : 0) + o.rlgap + (item.lgap || 0) + (item.hgap || 0);
}
if (o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
json.rgap = o.rhgap + o.rrgap + (item.rgap || 0) + (item.hgap || 0);
}
if (o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
json.bgap = o.rvgap + o.rbgap + (item.bgap || 0) + (item.vgap || 0);
}
return json;
});
return leftItems.concat({}, rightItems);
},
resize: function () {
// console.log("absolute_left_right_vertical_adapt布局不需要resize");
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
populate: function (items) {
this.options.items = items;
this.layout.populate(this._formatItems());
}
});
BI.shortcut("bi.absolute_left_right_vertical_adapt", BI.AbsoluteLeftRightVerticalAdaptLayout);
BI.AbsoluteRightVerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.AbsoluteRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-r-v-a",
verticalAlign: BI.VerticalAlign.Middle,
items: [],
lgap: 0,
rgap: 0,
hgap: 0,
tgap: 0,
bgap: 0,
vgap: 0
});
},
render: function () {
var o = this.options, self = this;
BI.AbsoluteRightVerticalAdaptLayout.superclass.render.apply(this, arguments);
return {
type: "bi.htape",
ref: function (_ref) {
self.layout = _ref;
},
verticalAlign: o.verticalAlign,
items: [{}].concat(o.items),
hgap: o.hgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
vgap: o.vgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
};
},
resize: function () {
},
addItem: function () {
// do nothing
throw new Error("cannot be added");
},
populate: function (items) {
this.layout.populate(items);
}
});
BI.shortcut("bi.absolute_right_vertical_adapt", BI.AbsoluteRightVerticalAdaptLayout);

45
src/core/wrapper/layout/adapt/absolute.vertical.js

@ -7,6 +7,8 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-abs-v-a",
verticalAlign: BI.VerticalAlign.Middle,
columnSize: [],
hgap: 0,
lgap: 0,
rgap: 0,
@ -17,28 +19,26 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
},
render: function () {
var self = this, o = this.options;
BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
_addElement: function (i, item) {
var o = this.options;
var w = BI.AbsoluteVerticalLayout.superclass._addElement.apply(this, arguments);
w.element.css({
position: "absolute",
left: item.lgap / BI.pixRatio + BI.pixUnit,
right: item.rgap / BI.pixRatio + BI.pixUnit,
top: (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit,
bottom: (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0)) / BI.pixRatio + BI.pixUnit,
margin: "auto"
});
if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {
w.element.css("left", (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit);
}
if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {
w.element.css("right", (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0)) / BI.pixRatio + BI.pixUnit);
}
return w;
return {
type: "bi.htape",
verticalAlign: o.verticalAlign,
columnSize: o.columnSize,
items: o.items,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable,
ref: function (_ref) {
self.layout = _ref;
},
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
};
},
resize: function () {
@ -46,8 +46,7 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
},
populate: function (items) {
BI.AbsoluteVerticalLayout.superclass.populate.apply(this, arguments);
this._mount();
this.layout.populate.apply(this, arguments);
}
});
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);

4
src/core/wrapper/layout/adapt/adapt.table.js

@ -35,7 +35,7 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var td;
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]);
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] < 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]);
if (!this.hasWidget(this._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"});
@ -53,7 +53,7 @@ BI.TableAdaptLayout = BI.inherit(BI.Layout, {
// 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现
// 2、不能给多个td设置最大宽度,这样只会平分宽度
// 3、多百分比宽度就算了
td.element.css({"max-width": BI.isNumber(o.columnSize[i]) ? (o.columnSize[i] <= 1 ? width : width / BI.pixRatio + BI.pixUnit) : width});
td.element.css({"max-width": BI.isNumber(o.columnSize[i]) ? (o.columnSize[i] < 1 ? width : width / BI.pixRatio + BI.pixUnit) : width});
if (i === 0) {
td.element.addClass("first-element");
}

18
src/core/wrapper/layout/flex/flex.horizontal.js

@ -10,7 +10,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-f-h",
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch
horizontalAlign: BI.HorizontalAlign.Left, // 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch
columnSize: [],
scrollx: true,
hgap: 0,
@ -37,11 +37,17 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.columnSize[i] === "fill" || o.columnSize[i] === "") {
if (columnSize !== "auto") {
if (columnSize === "fill" || columnSize === "") {
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) {
if (o.scrollable === true || o.scrollx === true) {
w.element.addClass("f-s-n");
@ -51,10 +57,10 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
w.element.addClass("f-s-n");
}
}
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)));
if (columnSize > 0) {
w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit));
}
if (o.columnSize[i] === "fill") {
if (columnSize === "fill") {
w.element.addClass("f-f");
}
w.element.addClass("c-e");

18
src/core/wrapper/layout/flex/flex.vertical.js

@ -34,13 +34,19 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
},
_addElement: function (i, item) {
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
var o = this.options;
var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = null;
}
}
w.element.css({
position: "relative"
});
if (o.rowSize[i] !== "auto") {
if (o.rowSize[i] === "fill" || o.rowSize[i] === "") {
if (rowSize !== "auto") {
if (rowSize === "fill" || rowSize === "") {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
if (o.scrollable === true || o.scrolly === true) {
w.element.addClass("f-s-n");
@ -50,10 +56,10 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
w.element.addClass("f-s-n");
}
}
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)));
if (rowSize > 0) {
w.element.height(rowSize < 1 ? ((rowSize * 100).toFixed(1) + "%") : (rowSize / BI.pixRatio + BI.pixUnit));
}
if (o.rowSize[i] === "fill") {
if (rowSize === "fill") {
w.element.addClass("f-f");
}
w.element.addClass("c-e");

16
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -33,11 +33,17 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
w.element.css({
position: "relative"
});
if (o.columnSize[i] !== "auto") {
if (o.columnSize[i] === "fill" || o.columnSize[i] === "") {
if (columnSize !== "auto") {
if (columnSize === "fill" || columnSize === "") {
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch) {
if (o.scrollable === true || o.scrollx === true) {
w.element.addClass("f-s-n");
@ -47,10 +53,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
w.element.addClass("f-s-n");
}
}
if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)));
if (columnSize > 0) {
w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit));
}
if (o.columnSize[i] === "fill") {
if (columnSize === "fill") {
w.element.addClass("f-f");
this.element.addClass("f-f");
}

16
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -33,11 +33,17 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) {
var o = this.options;
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = null;
}
}
w.element.css({
position: "relative"
});
if (o.rowSize[i] !== "auto") {
if (o.rowSize[i] === "fill" || o.rowSize[i] === "") {
if (rowSize !== "auto") {
if (rowSize === "fill" || rowSize === "") {
if (o.verticalAlign !== BI.VerticalAlign.Stretch) {
if (o.scrollable === true || o.scrolly === true) {
w.element.addClass("f-s-n");
@ -47,10 +53,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
w.element.addClass("f-s-n");
}
}
if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] === "" ? "" : (o.rowSize[i] <= 1 ? ((o.rowSize[i] * 100).toFixed(1) + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)));
if (rowSize > 0) {
w.element.height(rowSize < 1 ? ((rowSize * 100).toFixed(1) + "%") : (rowSize / BI.pixRatio + BI.pixUnit));
}
if (o.rowSize[i] === "fill") {
if (rowSize === "fill") {
w.element.addClass("f-f");
this.element.addClass("f-f");
}

29
src/core/wrapper/layout/layout.inline.js

@ -33,25 +33,33 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
this.populate(o.items);
},
_addElement: function (i, item, length) {
_addElement: function (i, item) {
var o = this.options;
var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = null;
}
}
if (columnSize > 0) {
w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit));
}
w.element.css({
width: o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)),
position: "relative",
"vertical-align": o.verticalAlign
});
w.element.addClass("i-item");
if (o.columnSize[i] === "fill" || o.columnSize[i] === "") {
if (columnSize === "fill" || columnSize === "") {
var left = o.hgap + (item.lgap || 0) + (item.hgap || 0),
right = o.hgap + (item.rgap || 0) + (item.hgap || 0);
for (var k = 0; k < i; k++) {
left += o.hgap + o.lgap + o.rgap + o.columnSize[k];
left += o.hgap + o.lgap + o.rgap + (o.columnSize[k] || o.items[k].width);
}
for (var k = i + 1; k < o.columnSize.length; k++) {
right += o.hgap + o.lgap + o.rgap + o.columnSize[k];
right += o.hgap + o.lgap + o.rgap + (o.columnSize[k] || o.items[k].width);
}
if (o.columnSize[i] === "fill") {
if (columnSize === "fill") {
w.element.css("min-width", "calc(100% - " + ((left + right) / BI.pixRatio + BI.pixUnit) + ")");
}
if (o.horizontalAlign === BI.HorizontalAlign.Stretch || !(o.scrollable === true || o.scrollx === true)) {
@ -94,15 +102,6 @@ BI.InlineLayout = BI.inherit(BI.Layout, {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineLayout.superclass.populate.apply(this, arguments);
this._mount();

12
src/core/wrapper/layout/layout.table.js

@ -69,8 +69,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({
top: 0,
bottom: 0,
left: o.columnSize[i] <= 1 ? (left * 100).toFixed(1) + "%" : left,
width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100).toFixed(1) + "%" : o.columnSize[i]
left: o.columnSize[i] < 1 ? (left * 100).toFixed(1) + "%" : left,
width: o.columnSize[i] < 1 ? (o.columnSize[i] * 100).toFixed(1) + "%" : o.columnSize[i]
}, arr[i]));
left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap);
} else {
@ -83,8 +83,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({
top: 0,
bottom: 0,
right: o.columnSize[j] <= 1 ? (right * 100).toFixed(1) + "%" : right,
width: o.columnSize[j] <= 1 ? (o.columnSize[j] * 100).toFixed(1) + "%" : o.columnSize[j]
right: o.columnSize[j] < 1 ? (right * 100).toFixed(1) + "%" : right,
width: o.columnSize[j] < 1 ? (o.columnSize[j] * 100).toFixed(1) + "%" : o.columnSize[j]
}, arr[j]));
right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap);
} else {
@ -96,8 +96,8 @@ BI.TableLayout = BI.inherit(BI.Layout, {
abs.push(BI.extend({
top: 0,
bottom: 0,
left: left <= 1 ? (left * 100).toFixed(1) + "%" : left,
right: right <= 1 ? (right * 100).toFixed(1) + "%" : right
left: left < 1 ? (left * 100).toFixed(1) + "%" : left,
right: right < 1 ? (right * 100).toFixed(1) + "%" : right
}, arr[i]));
}
var w = BI._lazyCreateWidget({

89
src/core/wrapper/layout/layout.tape.js

@ -14,6 +14,7 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
rgap: 0,
tgap: 0,
bgap: 0,
columnSize: [],
items: []
});
},
@ -34,6 +35,9 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options;
items = BI.compact(items);
BI.each(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return;
}
if (!self.hasWidget(self._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
self.addWidget(self._getChildName(i), w);
@ -62,36 +66,57 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
right[items.length - 1] = 0;
BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return true;
}
var w = self.getWidgetByName(self._getChildName(i));
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (o.columnSize.length > 0) {
if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) {
columnSize = item.width;
}
}
if (BI.isNull(left[i])) {
left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
var preColumnSize = o.columnSize.length > 0 ? o.columnSize[i - 1] : items[i - 1].width;
left[i] = left[i - 1] + preColumnSize + (items[i - 1].lgap || 0) + (items[i - 1].rgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({left: (left[i] * 100).toFixed(1) + "%", width: (item.width * 100).toFixed(1) + "%"});
if (columnSize < 1 && columnSize > 0) {
w.element.css({
left: (left[i] * 100).toFixed(1) + "%",
width: (columnSize * 100).toFixed(1) + "%"
});
} else {
w.element.css({
left: (left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit,
width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : ""
width: BI.isNumber(columnSize) ? columnSize / BI.pixRatio + BI.pixUnit : ""
});
}
if (!BI.isNumber(item.width)) {
if (columnSize === "" || columnSize === "fill") {
return true;
}
});
BI.backAny(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return true;
}
var w = self.getWidgetByName(self._getChildName(i));
var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width;
if (BI.isNull(right[i])) {
right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
var nextColumnSize = o.columnSize.length > 0 ? o.columnSize[i + 1] : items[i + 1].width;
right[i] = right[i + 1] + nextColumnSize + (items[i + 1].lgap || 0) + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;
}
if (item.width < 1 && item.width >= 0) {
w.element.css({right: (right[i] * 100).toFixed(1) + "%", width: (item.width * 100).toFixed(1) + "%"});
if (columnSize < 1 && columnSize > 0) {
w.element.css({
right: (right[i] * 100).toFixed(1) + "%",
width: (columnSize * 100).toFixed(1) + "%"
});
} else {
w.element.css({
right: (right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit,
width: BI.isNumber(item.width) ? item.width / BI.pixRatio + BI.pixUnit : ""
width: BI.isNumber(columnSize) ? columnSize / BI.pixRatio + BI.pixUnit : ""
});
}
if (!BI.isNumber(item.width)) {
if (columnSize === "" || columnSize === "fill") {
return true;
}
});
@ -128,6 +153,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
rgap: 0,
tgap: 0,
bgap: 0,
rowSize: [],
items: []
});
},
@ -149,6 +175,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
var self = this, o = this.options;
items = BI.compact(items);
BI.each(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return;
}
if (!self.hasWidget(self._getChildName(i))) {
var w = BI._lazyCreateWidget(item);
self.addWidget(self._getChildName(i), w);
@ -158,7 +187,7 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
w.element.css({
position: "absolute",
left: ((item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap) / BI.pixRatio + BI.pixUnit,
right: +((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit
right: ((item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap) / BI.pixRatio + BI.pixUnit
});
if (o.horizontalAlign === BI.HorizontalAlign.Center) {
w.element.css({
@ -177,39 +206,57 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
bottom[items.length - 1] = 0;
BI.any(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return true;
}
var w = self.getWidgetByName(self._getChildName(i));
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height;
if (o.rowSize.length > 0) {
if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) {
rowSize = item.height;
}
}
if (BI.isNull(top[i])) {
top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
var preRowSize = o.rowSize.length > 0 ? o.rowSize[i - 1] : items[i - 1].height;
top[i] = top[i - 1] + preRowSize + (items[i - 1].tgap || 0) + (items[i - 1].bgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
w.element.css({top: (top[i] * 100).toFixed(1) + "%", height: (item.height * 100).toFixed(1) + "%"});
if (rowSize < 1 && rowSize > 0) {
w.element.css({
top: (top[i] * 100).toFixed(1) + "%",
height: (rowSize * 100).toFixed(1) + "%"
});
} else {
w.element.css({
top: (top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap) / BI.pixRatio + BI.pixUnit,
height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : ""
height: BI.isNumber(rowSize) ? rowSize / BI.pixRatio + BI.pixUnit : ""
});
}
if (!BI.isNumber(item.height)) {
if (rowSize === "" || rowSize === "fill") {
return true;
}
});
BI.backAny(items, function (i, item) {
if (BI.isEmptyObject(item)) {
return true;
}
var w = self.getWidgetByName(self._getChildName(i));
var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height;
if (BI.isNull(bottom[i])) {
bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
var nextRowSize = o.rowSize.length > 0 ? o.rowSize[i + 1] : items[i + 1].height;
bottom[i] = bottom[i + 1] + nextRowSize + (items[i + 1].tgap || 0) + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;
}
if (item.height < 1 && item.height >= 0) {
if (rowSize < 1 && rowSize > 0) {
w.element.css({
bottom: (bottom[i] * 100).toFixed(1) + "%",
height: (item.height * 100).toFixed(1) + "%"
height: (rowSize * 100).toFixed(1) + "%"
});
} else {
w.element.css({
bottom: (bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap) / BI.pixRatio + BI.pixUnit,
height: BI.isNumber(item.height) ? item.height / BI.pixRatio + BI.pixUnit : ""
height: BI.isNumber(rowSize) ? rowSize / BI.pixRatio + BI.pixUnit : ""
});
}
if (!BI.isNumber(item.height)) {
if (rowSize === "" || rowSize === "fill") {
return true;
}
});

2
src/core/wrapper/layout/layout.td.js

@ -102,7 +102,7 @@ BI.TdLayout = BI.inherit(BI.Layout, {
});
}
first(w, this.rows++, i);
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] <= 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]);
var width = o.columnSize[i] === "" ? "" : (o.columnSize[i] < 1 ? ((o.columnSize[i] * 100).toFixed(1) + "%") : (i === 0 ? o.hgap : 0) + o.hgap + o.lgap + o.rgap + o.columnSize[i]);
var td = BI._lazyCreateWidget({
type: "bi.default",
width: width,

5
src/widget/datetime/datetime.combo.js

@ -31,6 +31,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
};
this.trigger = BI.createWidget({
type: "bi.date_time_trigger",
height: opts.height,
min: opts.minDate,
max: opts.maxDate,
value: opts.value
@ -82,8 +83,8 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
var triggerBtn = BI.createWidget({
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-font",
width: 24,
height: 24
width: opts.height,
height: opts.height,
});
triggerBtn.on(BI.IconButton.EVENT_CHANGE, function () {
if (self.combo.isViewVisible()) {

51
src/widget/dynamicdate/dynamicdate.caculate.js

@ -7,6 +7,57 @@
return this.getCalculationByDate(date, obj);
},
getDescription: function (obj) {
var value = "";
var endText = "";
if(BI.isNotNull(obj.year)) {
if(BI.parseInt(obj.year) !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position);
}
if(BI.isNotNull(obj.quarter)) {
if(BI.parseInt(obj.quarter) !== 0) {
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position);
}
if(BI.isNotNull(obj.month)) {
if(BI.parseInt(obj.month) !== 0) {
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position);
}
if(BI.isNotNull(obj.week)) {
if(BI.parseInt(obj.week) !== 0) {
value += Math.abs(obj.week) + BI.i18nText("BI-Basic_Week") + (obj.week < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position);
}
if(BI.isNotNull(obj.day)) {
if(BI.parseInt(obj.day) !== 0) {
value += Math.abs(obj.day) + BI.i18nText("BI-Basic_Day") + (obj.day < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : "";
}
if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {
value += Math.abs(obj.workDay) + BI.i18nText("BI-Basic_Work_Day") + (obj.workDay < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
return value + endText;
function getPositionText (baseText, position) {
switch (position) {
case BI.DynamicDateCard.OFFSET.BEGIN:
return baseText + BI.i18nText("BI-Basic_Begin_Start");
case BI.DynamicDateCard.OFFSET.END:
return baseText + BI.i18nText("BI-Basic_End_Stop");
case BI.DynamicDateCard.OFFSET.CURRENT:
default:
return BI.i18nText("BI-Basic_Current_Day");
}
}
},
getCalculationByDate: function (date, obj) {
if (BI.isNotNull(obj.year)) {
date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());

49
src/widget/dynamicdate/dynamicdate.trigger.js

@ -240,54 +240,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
},
_getText: function (obj) {
var value = "";
var endText = "";
if(BI.isNotNull(obj.year)) {
if(BI.parseInt(obj.year) !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position);
}
if(BI.isNotNull(obj.quarter)) {
if(BI.parseInt(obj.quarter) !== 0) {
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position);
}
if(BI.isNotNull(obj.month)) {
if(BI.parseInt(obj.month) !== 0) {
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position);
}
if(BI.isNotNull(obj.week)) {
if(BI.parseInt(obj.week) !== 0) {
value += Math.abs(obj.week) + BI.i18nText("BI-Basic_Week") + (obj.week < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position);
}
if(BI.isNotNull(obj.day)) {
if(BI.parseInt(obj.day) !== 0) {
value += Math.abs(obj.day) + BI.i18nText("BI-Basic_Day") + (obj.day < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : "";
}
if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {
value += Math.abs(obj.workDay) + BI.i18nText("BI-Basic_Work_Day") + (obj.workDay < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
}
return value + endText;
function getPositionText (baseText, position) {
switch (position) {
case BI.DynamicDateCard.OFFSET.BEGIN:
return baseText + BI.i18nText("BI-Basic_Begin_Start");
case BI.DynamicDateCard.OFFSET.END:
return baseText + BI.i18nText("BI-Basic_End_Stop");
case BI.DynamicDateCard.OFFSET.CURRENT:
default:
return BI.i18nText("BI-Basic_Current_Day");
}
}
return BI.DynamicDateHelper.getDescription(obj);
},
setValue: function (v) {

9
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -199,11 +199,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
},
_getSyncConfig: function () {
var o = this.options;
var o = this.options, self = this;
var baseConfig = this._getBaseConfig();
return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {
el: {
type: "bi.single_tree_trigger",
ref: function(_ref) {
self.textTrigger = _ref;
},
text: o.text,
height: o.height,
items: o.items,
@ -226,6 +229,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
return this.combo.getValue();
},
getSearcher: function () {
return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor();
},
populate: function (items) {
this.combo.populate(items);
}

9
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -202,11 +202,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
},
_getSyncConfig: function () {
var o = this.options;
var o = this.options, self = this;
var baseConfig = this._getBaseConfig();
return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {
el: {
type: "bi.single_tree_trigger",
ref: function(_ref) {
self.textTrigger = _ref;
},
text: o.text,
height: o.height,
items: o.items,
@ -220,6 +223,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
return BI.extend(config, this._getSearchConfig());
},
getSearcher: function () {
return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor();
},
setValue: function (v) {
v = BI.isArray(v) ? v : [v];
this.combo.setValue(v);

2
src/widget/multiselect/multiselect.combo.js

@ -395,7 +395,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
BI.remove(self.storeValue.assist, v);
map[v] = v;
}

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -422,7 +422,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
BI.remove(self.storeValue.assist, v);
map[v] = v;
}

2
src/widget/multiselect/multiselect.insert.combo.js

@ -407,7 +407,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
// value更新的时候assist也需要更新
BI.remove(self.storeValue.assist, v);
map[v] = v;

10
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -135,9 +135,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = "";
BI.each(ob.assist, function (i, v) {
if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v);
state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else {
state += "," + (o.valueFormatter(v + "") || v);
state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
}
});
this.editor.setState(state);
@ -151,9 +151,9 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var state = "";
BI.each(ob.value, function (i, v) {
if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v);
state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else {
state += "," + (o.valueFormatter(v + "") || v);
state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
}
});
this.editor.setState(state);
@ -193,4 +193,4 @@ BI.MultiSelectInsertSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.MultiSelectInsertSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);
BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher);

12
src/widget/multiselect/trigger/searcher.multiselect.js

@ -133,9 +133,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = "";
BI.each(ob.assist, function (i, v) {
if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v);
state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else {
state += "," + (o.valueFormatter(v + "") || v);
state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
}
});
this.editor.setState(state);
@ -149,9 +149,9 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
var state = "";
BI.each(ob.value, function (i, v) {
if (i === 0) {
state += "" + (o.valueFormatter(v + "") || v);
state += "" + (v === null ? "" : (o.valueFormatter(v + "") || v));
} else {
state += "," + (o.valueFormatter(v + "") || v);
state += "," + (v === null ? "" : (o.valueFormatter(v + "") || v));
}
});
this.editor.setState(state);
@ -161,7 +161,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
}
},
getState: function() {
getState: function () {
return this.editor.getState();
},
@ -191,4 +191,4 @@ BI.MultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.MultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR";
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);
BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher);

2
src/widget/multiselectlist/multiselectlist.insert.js

@ -281,7 +281,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
map[v] = v;
}
});

2
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -285,7 +285,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
map[v] = v;
}
});

2
src/widget/multiselectlist/multiselectlist.js

@ -301,7 +301,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
var map = this._makeMap(this.storeValue.value);
BI.each(res.value, function (i, v) {
if (!map[v]) {
self.storeValue.value.push(v);
BI.pushDistinct(self.storeValue.value, v);
map[v] = v;
}
});

4
src/widget/multitree/multi.tree.combo.js

@ -334,6 +334,10 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
});
},
getSearcher: function () {
return this.trigger.getSearcher();
},
getValue: function () {
return BI.deepClone(this.storeValue.value);
},

4
src/widget/multitree/multi.tree.insert.combo.js

@ -331,6 +331,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.combo.hideView();
},
getSearcher: function () {
return this.trigger.getSearcher();
},
showView: function () {
this.combo.showView();
},

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

@ -363,6 +363,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.combo.hideView();
},
getSearcher: function () {
return this.trigger.getSearcher();
},
setValue: function (v) {
this.storeValue.value = v || [];
this.combo.setValue({

6
src/widget/multitree/trigger/searcher.list.multi.tree.js

@ -122,7 +122,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
var text = "";
BI.each(ob.value, function (idx, path) {
var childValue = BI.last(path);
text += (o.valueFormatter(childValue + "") || childValue) + "; ";
text += (path === "null" ? "" : (o.valueFormatter(childValue + "") || childValue) + "; ");
count++;
});
@ -134,7 +134,7 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
}
},
getState: function() {
getState: function () {
return this.editor.getState();
},
@ -161,4 +161,4 @@ BI.MultiListTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiListTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiListTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiListTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);
BI.shortcut("bi.multi_list_tree_searcher", BI.MultiListTreeSearcher);

10
src/widget/multitree/trigger/searcher.multi.tree.js

@ -16,7 +16,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
popup: {},
adapter: null,
masker: {},
masker: {}
});
},
@ -136,7 +136,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
var names = BI.Func.getSortedResult(BI.keys(value));
BI.each(names, function (idx, name) {
var childNodes = getChildrenNode(value[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
text += (name === "null" ? "" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + "; ";
if (childNodes === "") {
count++;
}
@ -156,7 +156,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
BI.each(names, function (idx, name) {
index++;
var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
text += (name === "null" ? "(null)" : (o.valueFormatter(name + "") || name)) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;
}
@ -165,7 +165,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
}
},
getState: function() {
getState: function () {
return this.editor.getState();
},
@ -193,4 +193,4 @@ BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiTreeSearcher.EVENT_START = "EVENT_START";
BI.MultiTreeSearcher.EVENT_STOP = "EVENT_STOP";
BI.MultiTreeSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);
BI.shortcut("bi.multi_tree_searcher", BI.MultiTreeSearcher);

2
src/widget/singleselect/trigger/searcher.singleselect.js

@ -108,7 +108,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
},
getKeyword: function () {
return this.editor.getValue();
return this.editor.getKeyword();
},
hasMatched: function () {

4
src/widget/singletree/singletree.trigger.js

@ -51,6 +51,10 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, {
return this.options.value || [];
},
getTextor: function() {
return this.trigger.getTextor();
},
populate: function (items) {
this.trigger.populate(items);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save