Browse Source

Merge remote-tracking branch 'origin/master' into bugfix

es6
iapyang 4 years ago
parent
commit
a26348c9e8
  1. 2
      changelog.md
  2. 2
      dist/2.0/fineui.css
  3. 4
      dist/2.0/fineui.ie.min.js
  4. 2
      dist/2.0/fineui.ie.min.js.map
  5. 2962
      dist/2.0/fineui.js
  6. 2
      dist/2.0/fineui.js.map
  7. 2
      dist/2.0/fineui.min.css
  8. 4
      dist/2.0/fineui.min.js
  9. 2
      dist/2.0/fineui.min.js.map
  10. 2
      dist/2.0/fineui_without_normalize.css
  11. 2
      dist/2.0/fineui_without_normalize.min.css
  12. 2
      dist/core.css
  13. 2928
      dist/core.js
  14. 2
      dist/core.js.map
  15. 2
      dist/demo.css
  16. 3296
      dist/demo.js
  17. 2
      dist/demo.js.map
  18. 2
      dist/fineui.css
  19. 4
      dist/fineui.ie.min.js
  20. 2
      dist/fineui.ie.min.js.map
  21. 2966
      dist/fineui.js
  22. 2
      dist/fineui.js.map
  23. 2
      dist/fineui.min.css
  24. 4
      dist/fineui.min.js
  25. 2
      dist/fineui.min.js.map
  26. 1700
      dist/fineui_without_jquery_polyfill.js
  27. 2
      dist/fineui_without_jquery_polyfill.js.map
  28. 2
      dist/fix/fix.js
  29. 2
      dist/font.css
  30. 4
      dist/lib/core/controller/controller.d.ts
  31. 13
      dist/lib/core/controller/controller.layer.d.ts
  32. 4
      dist/lib/core/utils/aes.d.ts
  33. 12
      dist/lib/core/utils/aspect.d.ts
  34. 4
      dist/lib/core/utils/base64.d.ts
  35. 14
      dist/lib/core/utils/cache.d.ts
  36. 52
      dist/lib/core/utils/cellSizeAndPositionManager.d.ts
  37. 6
      dist/lib/core/utils/chinesePY.d.ts
  38. 9
      dist/lib/core/utils/events/mousemovetracker.d.ts
  39. 4
      dist/lib/core/utils/events/wheelhandler.d.ts
  40. 11
      dist/lib/core/utils/heap.d.ts
  41. 33
      dist/lib/core/utils/index.d.ts
  42. 11
      dist/lib/core/utils/linkedHashMap.d.ts
  43. 12
      dist/lib/core/utils/lru.d.ts
  44. 18
      dist/lib/core/utils/prefixIntervalTree.d.ts
  45. 20
      dist/lib/core/utils/queue.d.ts
  46. 17
      dist/lib/core/utils/sectionManager.d.ts
  47. 48
      dist/lib/core/utils/tree.d.ts
  48. 22
      dist/lib/core/utils/vector.d.ts
  49. 9
      dist/lib/index.d.ts
  50. 2
      dist/resource.css
  51. 156
      dist/utils.js
  52. 2
      dist/utils.js.map
  53. 4
      dist/utils.min.js
  54. 2
      dist/utils.min.js.map
  55. 2
      package.json
  56. 8
      src/base/combination/combo.js
  57. 4
      src/base/layer/layer.popover.js
  58. 96
      src/component/valuechooser/combo.valuechooser.nobar.js
  59. 73
      src/widget/multilayerdownlist/popup.downlist.js
  60. 23
      typescript/core/controller/controller.layer.ts
  61. 5
      typescript/core/controller/controller.ts
  62. 4
      typescript/core/utils/aes.ts
  63. 4
      typescript/core/utils/aspect.ts
  64. 4
      typescript/core/utils/base64.ts
  65. 14
      typescript/core/utils/cache.ts
  66. 47
      typescript/core/utils/cellSizeAndPositionManager.ts
  67. 3
      typescript/core/utils/chinesePY.ts
  68. 9
      typescript/core/utils/events/mousemovetracker.ts
  69. 4
      typescript/core/utils/events/wheelhandler.ts
  70. 13
      typescript/core/utils/heap.ts
  71. 34
      typescript/core/utils/index.ts
  72. 11
      typescript/core/utils/linkedHashMap.ts
  73. 14
      typescript/core/utils/lru.ts
  74. 19
      typescript/core/utils/prefixIntervalTree.ts
  75. 21
      typescript/core/utils/queue.ts
  76. 12
      typescript/core/utils/sectionManager.ts
  77. 50
      typescript/core/utils/tree.ts
  78. 18
      typescript/core/utils/vector.ts
  79. 10
      typescript/index.ts

2
changelog.md

@ -1,5 +1,7 @@
# 更新日志
2.0(2020-12)
- multi_layer_down_list_combo支持无限层级
- 新增不带全选的同步复选下拉框
- 日期选择控件为年月选择器子组件新增POPUP弹出前事件
- 文件上传控件新增API(setMaxFileLength)以动态设置最大上传文件数量
- 复选下拉树显示查看已选效果改成和复选下拉列表一致

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

2962
dist/2.0/fineui.js vendored

File diff suppressed because one or more lines are too long

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

2928
dist/core.js vendored

File diff suppressed because one or more lines are too long

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

3296
dist/demo.js vendored

File diff suppressed because one or more lines are too long

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

2966
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

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

1700
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/fix/fix.js vendored

@ -652,7 +652,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
args = inserted;
break;
case 'splice':
if (args.length > 2) {
args = [args[0], args[1]].concat(inserted ? inserted : []);
}
break;
}
var result = original.apply(this, args);

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

4
dist/lib/core/controller/controller.d.ts vendored

@ -0,0 +1,4 @@
import { OB } from "../ob";
export declare class Controller extends OB {
static EVENT_CHANGE: string;
}

13
dist/lib/core/controller/controller.layer.d.ts vendored

@ -0,0 +1,13 @@
import { Controller } from './controller';
export declare class LayerController extends Controller {
make<T>(name: string, container: any, op: any, context: any): T;
create<T>(name: string, from: any, op: any, context: any): T;
hide(name: string, callback: boolean): LayerController;
show(name: string, callback: boolean): LayerController;
isVisible(name: string): boolean;
add(name: string, layer: any, layout: any): LayerController;
get<T>(name: string): T;
has(name: string): boolean;
remove(name: string): LayerController;
removeAll(): LayerController;
}

4
dist/lib/core/utils/aes.d.ts vendored

@ -0,0 +1,4 @@
export declare type _aes = {
aesEncrypt: (text: string, key: string) => string;
aesDecrypt: (text: string, key: string) => string;
};

12
dist/lib/core/utils/aspect.d.ts vendored

@ -0,0 +1,12 @@
export declare type _aspect = {
before: (target: object, methodName: string, advice: Function) => {
advice: Function;
index: number;
remove: () => void;
};
after: (target: object, methodName: string, advice: Function) => {
advice: Function;
index: number;
remove: () => void;
};
};

4
dist/lib/core/utils/base64.d.ts vendored

@ -0,0 +1,4 @@
export declare type _base64 = {
encode: (input: string) => string;
decode: (text: string) => string;
};

14
dist/lib/core/utils/cache.d.ts vendored

@ -0,0 +1,14 @@
export declare type _cache = {
setUsername: (username: string) => void;
getUsername: () => string;
_getKeyPrefix: () => string;
_generateKey: (key?: string) => void;
getItem: (key?: string) => string;
setItem: (key: string, value: any) => void;
removeItem: (key: string) => void;
clear: () => void;
keys: () => string[];
addCookie: (name: string, value: any, path?: string, expiresHours?: number) => void;
getCookie: (name: string) => string;
deleteCookie: (name: string, path?: string) => void;
};

52
dist/lib/core/utils/cellSizeAndPositionManager.d.ts vendored

@ -0,0 +1,52 @@
export declare class CellSizeAndPositionManager {
_cellSizeGetter: (index: number) => number;
_cellCount: number;
_estimatedCellSize: number;
_cellSizeAndPositionData: object;
_lastMeasuredIndex: number;
constructor(cellCount: number, cellSizeGetter: (index: number) => number, estimatedCellSize: number);
configure(cellCount: number, estimatedCellSize: number): void;
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getSizeAndPositionOfCell(index: number): {
offset: number;
size: number;
};
getSizeAndPositionOfLastMeasuredCell(): {
offset: number;
size: number;
};
getTotalSize(): number;
getUpdatedOffsetForIndex(align: string, containerSize: number, currentOffset: number, targetIndex: number): number;
getVisibleCellRange(containerSize: number, offset: number): {
start: number;
stop: number;
};
resetCell(index: number): void;
_binarySearch(high: number, low: number, offset: number): number;
_exponentialSearch(index: number, offset: number): number;
_findNearestCell(offset: number): number;
}
export declare class ScalingCellSizeAndPositionManager {
_cellSizeAndPositionManager: CellSizeAndPositionManager;
_maxScrollSize: number;
constructor(cellCount: number, cellSizeGetter: (index: number) => number, estimatedCellSize: number, maxScrollSize: number);
configure(): void;
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getOffsetAdjustment(containerSize: number, offset: number): number;
getSizeAndPositionOfCell(index: number): number;
getSizeAndPositionOfLastMeasuredCell(): number;
getTotalSize(): number;
getUpdatedOffsetForIndex(align: number, containerSize: number, currentOffset: number, targetIndex: number): number;
getVisibleCellRange(containerSize: number, offset: number): {
start: number;
stop: number;
};
resetCell(index: number): void;
_getOffsetPercentage(containerSize: number, offset: number, totalSize: number): number;
_offsetToSafeOffset(containerSize: number, offset: number): number;
_safeOffsetToOffset(containerSize: number, offset: number): number;
}

6
dist/lib/core/utils/chinesePY.d.ts vendored

@ -0,0 +1,6 @@
export declare type _chinesePY = {
makeFirstPY: (str: string, options: {
ignoreMulti?: boolean;
splitChar?: string;
}) => string;
};

9
dist/lib/core/utils/events/mousemovetracker.d.ts vendored

@ -0,0 +1,9 @@
export declare class MouseMoveTracker {
constructor(...args: any[]);
captureMouseMoves(event: MouseEvent): void;
releaseMouseMoves(): void;
isDragging(): boolean;
_onMouseMove(event: MouseEvent): void;
_didMouseMove(): void;
_onMouseUp(): void;
}

4
dist/lib/core/utils/events/wheelhandler.d.ts vendored

@ -0,0 +1,4 @@
export declare class WheelHandler {
onWheel(event: WheelEvent): void;
_didWheel(): void;
}

11
dist/lib/core/utils/heap.d.ts vendored

@ -0,0 +1,11 @@
export declare class Heap<T> {
_items: T[];
_size: number;
_comparator: (a: T, b: T) => boolean;
constructor(items: T[], comparator?: (a: T, b: T) => boolean);
empty(): boolean;
pop(): T;
push(item: T): void;
size(): number;
peek(): T;
}

33
dist/lib/core/utils/index.d.ts vendored

@ -0,0 +1,33 @@
import { _aes } from './aes';
import { _aspect } from './aspect';
import { _base64 } from './base64';
import { _cache } from './cache';
import { _chinesePY } from './chinesePY';
import { MouseMoveTracker } from './events/mousemovetracker';
import { WheelHandler } from './events/wheelhandler';
import { CellSizeAndPositionManager, ScalingCellSizeAndPositionManager } from './cellSizeAndPositionManager';
import { Heap } from './heap';
import { LinkedHashMap } from './linkedHashMap';
import { LRU } from './lru';
import { PrefixIntervalTree } from './prefixIntervalTree';
import { Queue } from './queue';
import { Section } from './sectionManager';
import { Tree } from './tree';
import { Vector, Region } from './vector';
export interface _utils extends _aes, _base64, _chinesePY {
aspect: _aspect;
Cache: _cache;
MouseMoveTracker: typeof MouseMoveTracker;
WheelHandler: typeof WheelHandler;
CellSizeAndPositionManager: typeof CellSizeAndPositionManager;
ScalingCellSizeAndPositionManager: typeof ScalingCellSizeAndPositionManager;
Heap: typeof Heap;
LinkedHashMap: typeof LinkedHashMap;
LRU: typeof LRU;
PrefixIntervalTree: typeof PrefixIntervalTree;
Queue: typeof Queue;
Section: typeof Section;
Tree: typeof Tree;
Vector: typeof Vector;
Region: typeof Region;
}

11
dist/lib/core/utils/linkedHashMap.d.ts vendored

@ -0,0 +1,11 @@
export declare class LinkedHashMap {
array: any[];
map: object;
has(key: any): boolean;
add(key: any, value: any): void;
remove(key: any): void;
size(): number;
each(fn: (key?: any, value?: any, i?: number, array?: any[], map?: object) => any): void;
get(key: any): any;
toArray(): any[];
}

12
dist/lib/core/utils/lru.d.ts vendored

@ -0,0 +1,12 @@
export declare class LRU {
size: number;
limit: number;
head: object;
tail: object;
_keymap: object;
constructor(limit?: number);
put(key: any, value: any): void;
shift(): object;
get(key: any, returnEntry?: boolean): any;
has(key: any): boolean;
}

18
dist/lib/core/utils/prefixIntervalTree.d.ts vendored

@ -0,0 +1,18 @@
export declare class PrefixIntervalTree {
_size: number;
_half: number;
_heap: Int32Array;
constructor(xs: any[]);
set(index: number, value: any): void;
get(index: number): any;
getSize(): number;
sumUntil(end: number): number;
sumTo(inclusiveEnd: number): number;
sum(begin: number, end: number): number;
greatestLowerBound(t: number): number;
greatestStrictLowerBound(t: number): number;
leastUpperBound(t: number): number;
leastStrictUpperBound(t: number): number;
static uniform(size: number, initialValue: any): PrefixIntervalTree;
static empty(size: number, initialValue: any): PrefixIntervalTree;
}

20
dist/lib/core/utils/queue.d.ts vendored

@ -0,0 +1,20 @@
export declare class Queue {
capacity: number;
array: any[];
constructor(capacity: number);
contains(v: any): boolean;
indexOf(v: any): boolean;
getElementByIndex(index: number): any;
push(v: any): void;
pop(): void;
shift(): void;
unshift(v: any): void;
remove(v: any): void;
splice(...args: any[]): void;
slice(start?: number, end?: number): void;
size(): number;
each(fn: (i?: number, item?: any, array?: any[]) => any, scope: object): void;
toArray(): any[];
fromArray(array: any[]): void;
clear(): void;
}

17
dist/lib/core/utils/sectionManager.d.ts vendored

@ -0,0 +1,17 @@
export declare class Section {
height: number;
width: number;
x: number;
y: number;
constructor(height: number, width: number, x: number, y: number);
addCellIndex(index: any): void;
getCellIndices(): any[];
getSections(height: number, width: number, x: number, y: number): Section[];
getTotalSectionCount(): number;
registerCell(cellMetadatum: {
height: number;
width: number;
x: number;
y: number;
}, index: any): void;
}

48
dist/lib/core/utils/tree.d.ts vendored

@ -0,0 +1,48 @@
export declare class Node {
id: any;
set(key: any, value: any): void;
get(key: any): any;
isLeaf(): boolean;
getChildren(): Node[];
getChildrenLength(): number;
getFirstChild(): Node;
getLastChild(): Node;
setLeft(left: Node): void;
getLeft(): Node;
setRight(left: Node): void;
getRight(): Node;
setParent(parent: Node): void;
getParent(): Node;
getChild(index: number): Node;
getChildIndex(id: any): number;
removeChild(id: any): void;
removeChildByIndex(index: number): void;
removeAllChilds(): void;
addChild(child: Node, index: number): void;
equals(obj: Node): boolean;
clear(): void;
}
export declare class Tree {
root: Node;
addNode(node: Node, newNode: Node, index: number): void;
isRoot(node: Node): boolean;
getRoot(): Node;
clear(): void;
initTree(nodes: any[]): void;
toJSON<T>(node?: Node): T[];
toJSONWithNode<T>(node: Node): T[];
search(root: Node, target?: any, param?: any): Node;
traverse(callback: Function): void;
recursion(callback: Function): void;
inOrderTraverse(callback: Function): void;
nrInOrderTraverse(callback: Function): void;
preOrderTraverse(callback: Function): void;
nrPreOrderTraverse(callback: Function): void;
postOrderTraverse(callback: Function): void;
nrPostOrderTraverse(callback: Function): void;
static transformToArrayFormat(nodes: Node | Node[], pId: any): Node[];
static arrayFormat(nodes: Node | Node[], pId: any): Node[];
static transformToTreeFormat<T>(sNodes: T[]): Node[];
static treeFormat(sNodes: Node | Node[]): Node[];
static traversal(array: Node[], callback: Function, pNode: Node): void;
}

22
dist/lib/core/utils/vector.d.ts vendored

@ -0,0 +1,22 @@
export declare class Vector {
x: number;
y: number;
constructor(x: number, y: number);
cross(v: Vector): number;
length(v: Vector): number;
}
export declare class Region {
x: number;
y: number;
w: number;
h: number;
constructor(x: number, y: number, w: number, h: number);
isIntersects(obj: {
x: number;
y: number;
w: number;
h: number;
}): boolean;
isPointInside(x: number, y: number): boolean;
getPosition(): number[];
}

9
dist/lib/index.d.ts vendored

@ -144,7 +144,10 @@ import { FloatCenterLayout } from './core/wrapper/layout/middle/middle.float.cen
import { _msg } from './base/foundation/message';
import { _web } from './core/platform/web';
import { DynamicYearMonthPopup } from './widget/yearmonth/popup.yearmonth';
export interface BI extends _func, _i18n, _base, _inject, _var, _web {
import { _utils } from './core/utils';
import { Controller } from "./core/controller/controller";
import { LayerController } from "./core/controller/controller.layer";
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB;
Plugin: _Plugin;
Widget: typeof Widget;
@ -159,6 +162,8 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web {
Action: typeof Action;
ActionFactory: typeof ActionFactory;
ShowAction: typeof ShowAction;
Controller: typeof Controller;
LayerController: typeof LayerController;
Behavior: typeof Behavior;
BehaviorFactory: typeof BehaviorFactory;
HighlightBehavior: typeof HighlightBehavior;
@ -298,4 +303,4 @@ 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, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, 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, 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, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, };
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, Behavior, BehaviorFactory, RedMarkBehavior, HighlightBehavior, LoadingPane, Searcher, AbstractLabel, Label, TextButton, DownListCombo, IconChangeButton, Button, TextEditor, A, Html, Switcher, BubbleCombo, Loader, ListPane, MultiSelectBar, SelectList, TextValueCombo, 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, 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, SelectTextTrigger, DateInterval, DynamicDatePane, AllCountPager, PopupView, BubblePopupView, BubblePopupBarView, TextBubblePopupBarView, ArrowTreeGroupNodeCheckbox, NumberInterval, DynamicYearQuarterCombo, DynamicYearCombo, IntervalSlider, MultiSelectInsertList, YearMonthInterval, TextValueCheckCombo, NumberEditor, LinearSegment, Img, EditorIconCheckCombo, IconTextValueCombo, ListView, FloatCenterLayout, DynamicYearMonthPopup, };

2
dist/resource.css vendored

File diff suppressed because one or more lines are too long

156
dist/utils.js vendored

File diff suppressed because one or more lines are too long

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.20201227192222",
"version": "2.0.20210104151203",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",

8
src/base/combination/combo.js

@ -85,9 +85,10 @@
]
}))));
o.isDefaultInit && (this._assertPopupView());
BI.Resizers.add(this.getName(), BI.bind(function () {
BI.Resizers.add(this.getName(), BI.bind(function (e) {
// 如果resize对象是combo的子元素,则不应该收起,或交由hideChecker去处理
if (this.isViewVisible()) {
this._hideView();
BI.isNotNull(e) ? this._hideIf(e) : this._hideView();
}
}, this));
},
@ -351,7 +352,8 @@
var self = this;
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
// popupVisible是为了获取其宽高, 放到可视范围之外以防止在IE下闪一下
this.popupView.css({left: -999999999, top: -99999999});
this.popupView.visible();
BI.each(needHideWhenAnotherComboOpen, function (i, combo) {
if (i !== self.getName()) {

4
src/base/layer/layer.popover.js

@ -45,7 +45,9 @@ BI.Popover = BI.inherit(BI.Widget, {
top: BI.clamp(self.startY, 0, H - self.element.height()) + "px",
});
// BI-12134 没有什么特别好的方法
BI.Resizers._resize();
BI.Resizers._resize({
target: self.element[0],
});
}, function () {
self.tracker.releaseMouseMoves();
}, _global);

96
src/component/valuechooser/combo.valuechooser.nobar.js

@ -0,0 +1,96 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2020/12/31
*/
BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, {
props: {
baseCls: "bi-value-chooser-combo",
width: 200,
height: 24,
items: null,
itemsCreator: BI.emptyFn,
cache: true
},
render: function () {
var self = this, o = this.options;
if (BI.isNotNull(o.items)) {
this.items = o.items;
}
return {
type: "bi.multi_select_no_bar_combo",
allowEdit: o.allowEdit,
text: o.text,
value: this._assertValue(o.value),
itemsCreator: BI.bind(this._itemsCreator, this),
valueFormatter: BI.bind(this._valueFormatter, this),
width: o.width,
height: o.height,
ref: function(_ref) {
self.combo = _ref;
},
listeners: [{
eventName: BI.MultiSelectCombo.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_FOCUS);
}
}, {
eventName: BI.MultiSelectCombo.EVENT_BLUR,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_BLUR);
}
}, {
eventName: BI.MultiSelectCombo.EVENT_STOP,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_STOP);
}
}, {
eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_CLICK_ITEM);
}
}, {
eventName: BI.MultiSelectCombo.EVENT_SEARCHING,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_SEARCHING);
}
}, {
eventName: BI.MultiSelectCombo.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_CONFIRM);
}
}]
}
},
setValue: function (v) {
this.combo.setValue(v);
},
getValue: function () {
return this.combo.getValue();
},
getAllValue: function() {
return this.getValue();
},
populate: function (items) {
// 直接用combo的populate不会作用到AbstractValueChooser上
if (BI.isNotNull(items)) {
this.items = items;
}
this.combo.populate();
}
});
BI.ValueChooserNoBarCombo.EVENT_BLUR = "EVENT_BLUR";
BI.ValueChooserNoBarCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.ValueChooserNoBarCombo.EVENT_STOP = "EVENT_STOP";
BI.ValueChooserNoBarCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.ValueChooserNoBarCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.ValueChooserNoBarCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_no_bar_combo", BI.ValueChooserNoBarCombo);

73
src/widget/multilayerdownlist/popup.downlist.js

@ -109,33 +109,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
},
innerVGap: 5
};
item.el.childValues = [];
BI.each(item.children, function (i, child) {
child = child.el ? BI.extend(child.el, {children: child.children}) : child;
var fatherValue = BI.deepClone(item.el.value);
var childValue = BI.deepClone(child.value);
self.singleValues.push(child.value);
child.type = "bi.down_list_item";
child.extraCls = " child-down-list-item";
child.title = child.title || child.text;
child.textRgap = 10;
child.isNeedAdjustWidth = false;
child.logic = {
dynamic: true
};
child.father = fatherValue;
self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;
self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;
child.value = self._createChildValue(fatherValue, childValue);
item.el.childValues.push(child.value);
if (BI.isNotEmptyArray(child.children)) {
child.type = "bi.down_list_group_item";
self._createChildren(child);
child.height = self.constants.height;
child.iconCls2 = self.constants.nextIcon;
item.el.childValues = BI.concat(item.el.childValues, child.childValues);
}
});
self._createChildren(item);
} else {
item.type = "bi.down_list_item";
item.title = item.title || item.text;
@ -177,27 +151,46 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
return result;
},
_createChildren: function (child) {
_createChildren: function (item) {
var self = this;
child.childValues = [];
BI.each(child.children, function (i, c) {
var fatherValue = BI.deepClone(child.value);
var childValue = BI.deepClone(c.value);
c.type = "bi.down_list_item";
c.title = c.title || c.text;
c.textRgap = 10;
c.isNeedAdjustWidth = false;
c.logic = {
this._formatEL(item).el.childValues = [];
BI.each(item.children, function (i, child) {
child = child.el ? BI.extend(child.el, {children: child.children}) : child;
var fatherValue = BI.deepClone(self._formatEL(item).el.value);
var childValue = BI.deepClone(child.value);
self.singleValues.push(child.value);
child.type = "bi.down_list_item";
child.extraCls = " child-down-list-item";
child.title = child.title || child.text;
child.textRgap = 10;
child.isNeedAdjustWidth = false;
child.logic = {
dynamic: true
};
c.father = fatherValue;
child.father = fatherValue;
self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;
self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;
c.value = self._createChildValue(fatherValue, childValue);
child.childValues.push(c.value);
child.value = self._createChildValue(fatherValue, childValue);
self._formatEL(item).el.childValues.push(child.value);
if (BI.isNotEmptyArray(child.children)) {
child.type = "bi.down_list_group_item";
child.iconCls2 = self.constants.nextIcon;
child.height = self.constants.height;
self._createChildren(child);
}
});
},
_formatEL: function(obj) {
if (obj && obj.el) {
return obj;
}
return {
el: obj
};
},
_isGroup: function (i) {
return i.length > 1;
},

23
typescript/core/controller/controller.layer.ts

@ -0,0 +1,23 @@
import { Controller } from './controller';
export declare class LayerController extends Controller {
make<T>(name: string, container: any, op: any, context: any): T;
create<T>(name: string, from: any, op: any, context: any): T;
hide(name: string, callback: boolean): LayerController;
show(name: string, callback: boolean): LayerController;
isVisible(name: string): boolean;
add(name: string, layer: any, layout: any): LayerController;
get<T>(name: string): T;
has(name: string): boolean;
remove(name: string): LayerController;
removeAll(): LayerController;
}

5
typescript/core/controller/controller.ts

@ -0,0 +1,5 @@
import { OB } from "../ob";
export declare class Controller extends OB {
static EVENT_CHANGE: string;
}

4
typescript/core/utils/aes.ts

@ -0,0 +1,4 @@
export type _aes = {
aesEncrypt: (text: string, key:string) => string
aesDecrypt: (text: string, key:string) => string
}

4
typescript/core/utils/aspect.ts

@ -0,0 +1,4 @@
export type _aspect = {
before: (target: object, methodName: string, advice: Function) => { advice: Function, index: number, remove: () => void}
after: (target: object, methodName: string, advice: Function) => { advice: Function, index: number, remove: () => void}
}

4
typescript/core/utils/base64.ts

@ -0,0 +1,4 @@
export type _base64 = {
encode: (input: string) => string
decode: (text: string) => string
}

14
typescript/core/utils/cache.ts

@ -0,0 +1,14 @@
export type _cache = {
setUsername: (username: string) => void
getUsername: () => string
_getKeyPrefix: () => string
_generateKey: (key?: string) => void
getItem: (key?: string) => string
setItem: (key: string, value: any) => void
removeItem: (key: string) => void
clear: () => void
keys: () => string[]
addCookie: (name: string, value: any, path?: string, expiresHours?: number) => void
getCookie: (name: string) => string
deleteCookie: (name: string, path?: string) => void
}

47
typescript/core/utils/cellSizeAndPositionManager.ts

@ -0,0 +1,47 @@
export declare class CellSizeAndPositionManager {
_cellSizeGetter: (index: number) => number;
_cellCount: number;
_estimatedCellSize: number;
_cellSizeAndPositionData: object;
_lastMeasuredIndex: number;
constructor(cellCount: number, cellSizeGetter: (index: number) => number, estimatedCellSize: number);
configure(cellCount: number, estimatedCellSize: number): void;
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getSizeAndPositionOfCell(index: number): { offset: number, size: number};
getSizeAndPositionOfLastMeasuredCell(): { offset: number, size: number};
getTotalSize(): number;
getUpdatedOffsetForIndex(align: string, containerSize:number, currentOffset:number, targetIndex:number): number;
getVisibleCellRange(containerSize: number, offset: number): { start: number, stop: number};
resetCell(index: number): void;
_binarySearch(high: number, low: number, offset: number): number;
_exponentialSearch(index: number, offset: number): number;
_findNearestCell(offset: number):number;
}
export declare class ScalingCellSizeAndPositionManager {
_cellSizeAndPositionManager: CellSizeAndPositionManager;
_maxScrollSize: number;
constructor(cellCount: number, cellSizeGetter: (index: number) => number, estimatedCellSize: number, maxScrollSize: number);
configure(): void;
getCellCount(): number;
getEstimatedCellSize(): number;
getLastMeasuredIndex(): number;
getOffsetAdjustment(containerSize: number, offset: number):number;
getSizeAndPositionOfCell(index: number): number;
getSizeAndPositionOfLastMeasuredCell(): number;
getTotalSize(): number;
getUpdatedOffsetForIndex(align: number, containerSize: number, currentOffset: number, targetIndex: number): number;
getVisibleCellRange(containerSize: number, offset: number): { start: number, stop: number};
resetCell(index: number): void;
_getOffsetPercentage(containerSize: number, offset: number, totalSize: number): number;
_offsetToSafeOffset(containerSize: number, offset: number): number;
_safeOffsetToOffset(containerSize: number, offset: number): number;
}

3
typescript/core/utils/chinesePY.ts

@ -0,0 +1,3 @@
export type _chinesePY = {
makeFirstPY: (str: string, options: { ignoreMulti?: boolean, splitChar?: string }) => string
}

9
typescript/core/utils/events/mousemovetracker.ts

@ -0,0 +1,9 @@
export declare class MouseMoveTracker {
constructor(...args: any[]);
captureMouseMoves(event: MouseEvent): void;
releaseMouseMoves(): void;
isDragging(): boolean;
_onMouseMove(event: MouseEvent): void;
_didMouseMove(): void;
_onMouseUp(): void;
}

4
typescript/core/utils/events/wheelhandler.ts

@ -0,0 +1,4 @@
export declare class WheelHandler {
onWheel(event: WheelEvent): void
_didWheel(): void
}

13
typescript/core/utils/heap.ts

@ -0,0 +1,13 @@
export declare class Heap<T> {
_items: T[];
_size: number;
_comparator: (a: T, b: T) => boolean;
constructor(items: T[], comparator?: (a: T, b: T) => boolean);
empty(): boolean;
pop(): T;
push(item: T): void;
size(): number;
peek(): T;
}

34
typescript/core/utils/index.ts

@ -0,0 +1,34 @@
import { _aes } from './aes';
import { _aspect } from './aspect';
import { _base64 } from './base64';
import { _cache } from './cache';
import { _chinesePY } from './chinesePY';
import { MouseMoveTracker } from './events/mousemovetracker';
import { WheelHandler } from './events/wheelhandler';
import { CellSizeAndPositionManager, ScalingCellSizeAndPositionManager } from './cellSizeAndPositionManager';
import { Heap } from './heap';
import { LinkedHashMap } from './linkedHashMap';
import { LRU } from './lru';
import { PrefixIntervalTree } from './prefixIntervalTree';
import { Queue } from './queue';
import { Section } from './sectionManager';
import { Tree } from './tree';
import { Vector, Region } from './vector';
export interface _utils extends _aes, _base64, _chinesePY {
aspect: _aspect
Cache: _cache
MouseMoveTracker: typeof MouseMoveTracker
WheelHandler: typeof WheelHandler
CellSizeAndPositionManager: typeof CellSizeAndPositionManager
ScalingCellSizeAndPositionManager: typeof ScalingCellSizeAndPositionManager
Heap: typeof Heap
LinkedHashMap: typeof LinkedHashMap
LRU: typeof LRU
PrefixIntervalTree: typeof PrefixIntervalTree
Queue: typeof Queue
Section: typeof Section
Tree: typeof Tree
Vector: typeof Vector
Region: typeof Region
}

11
typescript/core/utils/linkedHashMap.ts

@ -0,0 +1,11 @@
export declare class LinkedHashMap {
array: any[];
map: object;
has(key: any): boolean;
add(key: any,value: any): void;
remove(key: any): void;
size(): number;
each(fn: (key?: any, value?: any, i?: number, array?: any[], map?: object) => any): void;
get(key: any): any;
toArray(): any[];
}

14
typescript/core/utils/lru.ts

@ -0,0 +1,14 @@
export declare class LRU {
size: number;
limit: number;
head: object;
tail: object;
_keymap: object;
constructor(limit?: number);
put(key: any, value: any):void
shift(): object;
get(key: any, returnEntry?: boolean): any;
has(key: any): boolean
}

19
typescript/core/utils/prefixIntervalTree.ts

@ -0,0 +1,19 @@
export declare class PrefixIntervalTree {
_size: number;
_half: number;
_heap: Int32Array;
constructor(xs: any[]);
set(index: number, value: any): void;
get(index: number): any;
getSize(): number;
sumUntil(end: number):number;
sumTo(inclusiveEnd: number): number;
sum(begin: number, end: number):number;
greatestLowerBound(t: number): number;
greatestStrictLowerBound(t: number): number;
leastUpperBound(t: number): number;
leastStrictUpperBound(t: number): number;
static uniform(size: number, initialValue: any): PrefixIntervalTree;
static empty(size: number, initialValue: any): PrefixIntervalTree;
}

21
typescript/core/utils/queue.ts

@ -0,0 +1,21 @@
export declare class Queue {
capacity: number;
array: any[];
constructor(capacity: number);
contains(v: any): boolean;
indexOf(v: any): boolean;
getElementByIndex(index: number): any;
push(v: any): void;
pop(): void;
shift(): void;
unshift(v: any): void;
remove(v: any): void;
splice(...args: any[]): void;
slice(start?: number, end?: number): void;
size(): number;
each(fn: (i?: number, item?: any, array?: any[]) => any, scope: object): void
toArray(): any[];
fromArray(array: any[]): void
clear(): void;
}

12
typescript/core/utils/sectionManager.ts

@ -0,0 +1,12 @@
export declare class Section {
height: number;
width: number;
x: number;
y: number;
constructor(height: number, width: number, x: number, y: number);
addCellIndex(index: any): void;
getCellIndices(): any[];
getSections(height: number, width: number, x: number, y: number): Section[];
getTotalSectionCount(): number;
registerCell(cellMetadatum: { height: number, width: number, x: number, y: number }, index: any): void;
}

50
typescript/core/utils/tree.ts

@ -0,0 +1,50 @@
export declare class Node {
id: any;
set(key: any, value: any): void;
get(key: any): any;
isLeaf(): boolean;
getChildren(): Node[];
getChildrenLength(): number;
getFirstChild(): Node;
getLastChild(): Node;
setLeft(left: Node): void;
getLeft(): Node;
setRight(left: Node): void;
getRight(): Node;
setParent(parent: Node): void;
getParent(): Node;
getChild(index: number): Node;
getChildIndex(id: any): number;
removeChild(id: any): void;
removeChildByIndex(index: number): void;
removeAllChilds(): void;
addChild(child: Node, index: number): void;
equals(obj: Node): boolean;
clear(): void;
}
export declare class Tree {
root: Node;
addNode(node: Node, newNode: Node, index: number):void;
isRoot(node: Node): boolean;
getRoot(): Node;
clear():void;
initTree(nodes: any[]):void;
toJSON<T>(node?: Node): T[];
toJSONWithNode<T>(node: Node): T[];
search(root: Node, target?: any, param?: any): Node;
traverse(callback: Function): void;
recursion(callback: Function): void;
inOrderTraverse(callback: Function): void;
nrInOrderTraverse(callback: Function): void;
preOrderTraverse(callback: Function): void;
nrPreOrderTraverse(callback: Function): void;
postOrderTraverse(callback: Function): void;
nrPostOrderTraverse(callback: Function): void;
static transformToArrayFormat(nodes: Node | Node[], pId: any): Node[];
static arrayFormat(nodes: Node | Node[], pId: any): Node[];
static transformToTreeFormat<T>(sNodes: T[]): Node[];
static treeFormat(sNodes: Node | Node[]): Node[];
static traversal(array: Node[], callback: Function, pNode: Node): void;
}

18
typescript/core/utils/vector.ts

@ -0,0 +1,18 @@
export declare class Vector {
x: number;
y: number;
constructor(x: number,y: number);
cross(v: Vector): number;
length(v: Vector): number;
}
export declare class Region {
x: number;
y: number;
w: number;
h: number;
constructor(x: number,y: number,w: number,h: number);
isIntersects(obj: { x: number,y: number,w: number,h: number }):boolean;
isPointInside(x: number,y: number): boolean;
getPosition(): number[];
}

10
typescript/index.ts

@ -144,8 +144,12 @@ import { FloatCenterLayout } from './core/wrapper/layout/middle/middle.float.cen
import { _msg } from './base/foundation/message';
import { _web } from './core/platform/web';
import { DynamicYearMonthPopup } from './widget/yearmonth/popup.yearmonth';
import { _utils } from './core/utils';
import { Controller } from "./core/controller/controller";
import { LayerController } from "./core/controller/controller.layer";
export interface BI extends _func, _i18n, _base, _inject, _var, _web {
export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils {
OB: typeof OB;
Plugin: _Plugin;
Widget: typeof Widget;
@ -160,6 +164,8 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web {
Action: typeof Action;
ActionFactory: typeof ActionFactory;
ShowAction: typeof ShowAction;
Controller: typeof Controller;
LayerController: typeof LayerController;
Behavior: typeof Behavior;
BehaviorFactory: typeof BehaviorFactory;
HighlightBehavior: typeof HighlightBehavior;
@ -335,6 +341,8 @@ export {
Action,
ActionFactory,
ShowAction,
Controller,
LayerController,
Behavior,
BehaviorFactory,
RedMarkBehavior,

Loading…
Cancel
Save