jsl-ui 9.18.2 → 9.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grid.css +0 -8
- package/lib/index.css.map +1 -1
- package/lib/index.js +10198 -61
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/IntervalComponent.d.ts +0 -17
- package/lib/components/IntervalComponent.js +0 -68
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +0 -22
- package/lib/components/auto-suggest/AutoSuggestComponent.js +0 -49
- package/lib/components/button/ButtonComponent.d.ts +0 -18
- package/lib/components/button/ButtonComponent.js +0 -46
- package/lib/components/checkbox/CheckBoxComponent.d.ts +0 -28
- package/lib/components/checkbox/CheckBoxComponent.js +0 -94
- package/lib/components/checkbox/CheckBoxStyle.scss +0 -86
- package/lib/components/date/DateComponent.d.ts +0 -32
- package/lib/components/date/DateComponent.js +0 -106
- package/lib/components/date-range/DateRangeComponent.d.ts +0 -35
- package/lib/components/date-range/DateRangeComponent.js +0 -136
- package/lib/components/date-range/DateRangeStyle.scss +0 -12
- package/lib/components/date-time/DateTimeComponent.d.ts +0 -15
- package/lib/components/date-time/DateTimeComponent.js +0 -53
- package/lib/components/date-time/DateTimeStyle.scss +0 -7
- package/lib/components/dialog/DialogComponent.d.ts +0 -67
- package/lib/components/dialog/DialogComponent.js +0 -242
- package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
- package/lib/components/drop-down/DropDownComponent.js +0 -74
- package/lib/components/expander/ExpanderComponent.d.ts +0 -27
- package/lib/components/expander/ExpanderComponent.js +0 -90
- package/lib/components/expander/ExpanderStyle.scss +0 -47
- package/lib/components/expander/OldExpanderStyle.scss +0 -37
- package/lib/components/form-field/FormComponent.d.ts +0 -12
- package/lib/components/form-field/FormComponent.js +0 -26
- package/lib/components/form-field/FormFieldComponent.d.ts +0 -38
- package/lib/components/form-field/FormFieldComponent.js +0 -139
- package/lib/components/form-field/FormFieldStyle.scss +0 -87
- package/lib/components/grid/GridComponent.d.ts +0 -26
- package/lib/components/grid/GridComponent.js +0 -116
- package/lib/components/input/InputComponent.d.ts +0 -33
- package/lib/components/input/InputComponent.js +0 -144
- package/lib/components/loading/LoadingComponent.d.ts +0 -8
- package/lib/components/loading/LoadingComponent.js +0 -22
- package/lib/components/loading/LoadingStyle.css +0 -29
- package/lib/components/navigation/NavigationComponent.d.ts +0 -34
- package/lib/components/navigation/NavigationComponent.js +0 -70
- package/lib/components/navigation/NavigationStyle.scss +0 -226
- package/lib/components/notification/Notification.d.ts +0 -17
- package/lib/components/notification/Notification.js +0 -56
- package/lib/components/notification/Notification.scss +0 -19
- package/lib/components/number/NumberComponent.d.ts +0 -25
- package/lib/components/number/NumberComponent.js +0 -87
- package/lib/components/overlay/OverlayComponent.d.ts +0 -27
- package/lib/components/overlay/OverlayComponent.js +0 -149
- package/lib/components/overlay/overlay.css +0 -57
- package/lib/components/progress/ProgressComponent.d.ts +0 -18
- package/lib/components/progress/ProgressComponent.js +0 -42
- package/lib/components/progress/ProgressStyle.scss +0 -15
- package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +0 -12
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +0 -34
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +0 -76
- package/lib/components/select/SelectComponent.d.ts +0 -79
- package/lib/components/select/SelectComponent.js +0 -362
- package/lib/components/select/SelectDDAreaComponent.d.ts +0 -32
- package/lib/components/select/SelectDDAreaComponent.js +0 -317
- package/lib/components/select/SelectStyle.scss +0 -187
- package/lib/components/slider/nouislider.css +0 -310
- package/lib/components/slider/nouislider.d.ts +0 -44
- package/lib/components/slider/nouislider.js +0 -2158
- package/lib/components/stack-panel/SplitterComponent.d.ts +0 -21
- package/lib/components/stack-panel/SplitterComponent.js +0 -126
- package/lib/components/stack-panel/SplitterStyle.scss +0 -45
- package/lib/components/stack-panel/StackPanelComponent.d.ts +0 -20
- package/lib/components/stack-panel/StackPanelComponent.js +0 -64
- package/lib/components/stack-panel/StackPanelStyle.scss +0 -53
- package/lib/components/tabs/TabsComponent.d.ts +0 -39
- package/lib/components/tabs/TabsComponent.js +0 -177
- package/lib/components/tabs/TabsStyle.scss +0 -76
- package/lib/components/time/TimeComponent.d.ts +0 -29
- package/lib/components/time/TimeComponent.js +0 -113
- package/lib/components/time/TimeComponent.scss +0 -4
- package/lib/components/tree-view/TreeViewComponent.d.ts +0 -23
- package/lib/components/tree-view/TreeViewComponent.js +0 -45
- package/lib/components/tree-view/TreeViewStyle.scss +0 -96
- package/lib/components/virtual-render/VirtualRenderComponent.d.ts +0 -30
- package/lib/components/virtual-render/VirtualRenderComponent.js +0 -104
- package/lib/components/virtual-render/VirtualRenderStyle.scss +0 -9
- package/lib/core/culture.d.ts +0 -5
- package/lib/core/culture.js +0 -385
- package/lib/core/date.d.ts +0 -14
- package/lib/core/date.js +0 -350
- package/lib/core/helper.d.ts +0 -12
- package/lib/core/helper.js +0 -101
- package/lib/core/jq.d.ts +0 -37
- package/lib/core/jq.js +0 -371
- package/lib/core/lang.d.ts +0 -24
- package/lib/core/lang.js +0 -28
- package/lib/core/numeric.d.ts +0 -7
- package/lib/core/numeric.js +0 -143
- package/lib/core/polyfills.d.ts +0 -0
- package/lib/core/polyfills.js +0 -22
- package/lib/core.d.ts +0 -6
- package/lib/core.js +0 -6
- package/lib/grid/controls/slick.columnpicker.css +0 -46
- package/lib/grid/controls/slick.draggablegrouping.css +0 -52
- package/lib/grid/controls/slick.gridmenu.css +0 -127
- package/lib/grid/controls/slick.pager.css +0 -41
- package/lib/grid/examples/examples.css +0 -203
- package/lib/grid/filterDialogs/dateRangeFilter.d.ts +0 -7
- package/lib/grid/filterDialogs/dateRangeFilter.js +0 -156
- package/lib/grid/filterDialogs/excelFilter.d.ts +0 -9
- package/lib/grid/filterDialogs/excelFilter.js +0 -313
- package/lib/grid/plugins/ext.overlay.css +0 -28
- package/lib/grid/plugins/ext.overlay.d.ts +0 -2
- package/lib/grid/plugins/ext.overlay.js +0 -291
- package/lib/grid/plugins/slick.cellrangedecorator.d.ts +0 -12
- package/lib/grid/plugins/slick.cellrangedecorator.js +0 -68
- package/lib/grid/plugins/slick.cellrangeselector.d.ts +0 -1
- package/lib/grid/plugins/slick.cellrangeselector.js +0 -144
- package/lib/grid/plugins/slick.cellselectionmodel.d.ts +0 -1
- package/lib/grid/plugins/slick.cellselectionmodel.js +0 -194
- package/lib/grid/plugins/slick.headerbuttons.css +0 -40
- package/lib/grid/plugins/slick.headerbuttons.d.ts +0 -55
- package/lib/grid/plugins/slick.headerbuttons.js +0 -156
- package/lib/grid/plugins/slick.headermenu.css +0 -101
- package/lib/grid/plugins/slick.headermenu.d.ts +0 -74
- package/lib/grid/plugins/slick.headermenu.js +0 -260
- package/lib/grid/plugins/slick.rowdetailview.css +0 -37
- package/lib/grid/plugins/slick.rowmovemanager.css +0 -8
- package/lib/grid/plugins/slick.rowmovemanager.d.ts +0 -18
- package/lib/grid/plugins/slick.rowmovemanager.js +0 -249
- package/lib/grid/plugins/slick.rowselectionmodel.d.ts +0 -1
- package/lib/grid/plugins/slick.rowselectionmodel.js +0 -167
- package/lib/grid/slick-default-theme.css +0 -154
- package/lib/grid/slick.core.d.ts +0 -90
- package/lib/grid/slick.core.js +0 -574
- package/lib/grid/slick.creator.d.ts +0 -80
- package/lib/grid/slick.creator.js +0 -723
- package/lib/grid/slick.dataview.d.ts +0 -71
- package/lib/grid/slick.dataview.js +0 -1080
- package/lib/grid/slick.editors.core.d.ts +0 -4
- package/lib/grid/slick.editors.core.js +0 -232
- package/lib/grid/slick.editors.date.d.ts +0 -2
- package/lib/grid/slick.editors.date.js +0 -125
- package/lib/grid/slick.editors.lookup.d.ts +0 -14
- package/lib/grid/slick.editors.lookup.js +0 -353
- package/lib/grid/slick.editors.nav.d.ts +0 -6
- package/lib/grid/slick.editors.nav.js +0 -22
- package/lib/grid/slick.formatters.d.ts +0 -17
- package/lib/grid/slick.formatters.js +0 -137
- package/lib/grid/slick.grid.css +0 -325
- package/lib/grid/slick.grid.d.ts +0 -284
- package/lib/grid/slick.grid.js +0 -5395
- package/lib/grid/slick.groupitemmetadataprovider.d.ts +0 -39
- package/lib/grid/slick.groupitemmetadataprovider.js +0 -165
- package/lib/grid/slick.tree.css +0 -20
- package/lib/grid/slick.tree.d.ts +0 -33
- package/lib/grid/slick.tree.js +0 -220
- package/lib/grid.d.ts +0 -13
- package/lib/grid.js +0 -13
- package/lib/index.css +0 -2584
- package/lib/index.d.ts +0 -56
- package/lib/interaction/dataconverter.d.ts +0 -4
- package/lib/interaction/dataconverter.js +0 -1
- package/lib/interaction/eventhandler.d.ts +0 -13
- package/lib/interaction/eventhandler.js +0 -42
- package/lib/interaction/moveable.css +0 -0
- package/lib/interaction/moveable.d.ts +0 -39
- package/lib/interaction/moveable.js +0 -172
- package/lib/interaction/resizable.css +0 -33
- package/lib/interaction/resizable.d.ts +0 -37
- package/lib/interaction/resizable.js +0 -123
- package/lib/ui/auto.suggest.css +0 -14
- package/lib/ui/auto.suggest.d.ts +0 -17
- package/lib/ui/auto.suggest.js +0 -255
- package/lib/ui/base.css +0 -150
- package/lib/ui/date.picker/css/date-range-picker.css +0 -87
- package/lib/ui/date.picker/css/tiny-date-picker.css +0 -326
- package/lib/ui/date.picker/date-picker-options.d.ts +0 -11
- package/lib/ui/date.picker/date-picker-options.js +0 -76
- package/lib/ui/date.picker/lib/date-manip.d.ts +0 -74
- package/lib/ui/date.picker/lib/date-manip.js +0 -120
- package/lib/ui/date.picker/lib/dom.d.ts +0 -23
- package/lib/ui/date.picker/lib/dom.js +0 -28
- package/lib/ui/date.picker/lib/emitter.d.ts +0 -13
- package/lib/ui/date.picker/lib/emitter.js +0 -49
- package/lib/ui/date.picker/lib/fns.d.ts +0 -23
- package/lib/ui/date.picker/lib/fns.js +0 -43
- package/lib/ui/date.picker/mode/base-mode.d.ts +0 -26
- package/lib/ui/date.picker/mode/base-mode.js +0 -248
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +0 -28
- package/lib/ui/date.picker/mode/dropdown-mode.js +0 -50
- package/lib/ui/date.picker/mode/index.d.ts +0 -28
- package/lib/ui/date.picker/mode/index.js +0 -18
- package/lib/ui/date.picker/mode/modal-mode.d.ts +0 -25
- package/lib/ui/date.picker/mode/modal-mode.js +0 -17
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +0 -29
- package/lib/ui/date.picker/mode/permanent-mode.js +0 -19
- package/lib/ui/date.picker/views/day-picker.d.ts +0 -40
- package/lib/ui/date.picker/views/day-picker.js +0 -155
- package/lib/ui/date.picker/views/month-picker.d.ts +0 -26
- package/lib/ui/date.picker/views/month-picker.js +0 -65
- package/lib/ui/date.picker/views/year-picker.d.ts +0 -20
- package/lib/ui/date.picker/views/year-picker.js +0 -66
- package/lib/ui/date.picker.d.ts +0 -66
- package/lib/ui/date.picker.js +0 -32
- package/lib/ui/dialog.css +0 -109
- package/lib/ui/dialog.d.ts +0 -22
- package/lib/ui/dialog.js +0 -113
- package/lib/ui/drop.down.css +0 -472
- package/lib/ui/drop.down.d.ts +0 -52
- package/lib/ui/drop.down.js +0 -2112
- package/lib/ui/number.input.css +0 -3
- package/lib/ui/number.input.d.ts +0 -12
- package/lib/ui/number.input.js +0 -64
- package/lib/ui/tabs.css +0 -53
package/lib/index.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "./ui/base.css";
|
|
2
|
-
export * from "./core/culture";
|
|
3
|
-
export * from "./core/date";
|
|
4
|
-
export * from "./core/helper";
|
|
5
|
-
export * from "./core/jq";
|
|
6
|
-
export * from "./core/numeric";
|
|
7
|
-
import "./core/polyfills";
|
|
8
|
-
export * from "./interaction/resizable";
|
|
9
|
-
export * from "./interaction/moveable";
|
|
10
|
-
export * from "./interaction/eventhandler";
|
|
11
|
-
export * from "./ui/date.picker";
|
|
12
|
-
export * from "./ui/dialog";
|
|
13
|
-
export * from "./ui/drop.down";
|
|
14
|
-
export * from "./ui/number.input";
|
|
15
|
-
export * from "./components/notification/Notification";
|
|
16
|
-
export * from "./grid/slick.core";
|
|
17
|
-
export * from "./grid/slick.creator";
|
|
18
|
-
export * from "./grid/slick.dataview";
|
|
19
|
-
export * from "./grid/slick.editors.core";
|
|
20
|
-
export * from "./grid/slick.editors.date";
|
|
21
|
-
export * from "./grid/slick.editors.lookup";
|
|
22
|
-
export * from "./grid/slick.formatters";
|
|
23
|
-
export * from "./grid/slick.grid";
|
|
24
|
-
export * from "./grid/slick.groupitemmetadataprovider";
|
|
25
|
-
export * from "./grid/plugins/slick.cellrangedecorator";
|
|
26
|
-
export * from "./grid/plugins/slick.cellrangeselector";
|
|
27
|
-
export * from "./grid/plugins/slick.cellselectionmodel";
|
|
28
|
-
export * from "./grid/plugins/slick.headermenu";
|
|
29
|
-
export * from "./grid/plugins/slick.rowselectionmodel";
|
|
30
|
-
export * from "./components/progress/ProgressComponent";
|
|
31
|
-
export * from "./components/date/DateComponent";
|
|
32
|
-
export * from "./components/time/TimeComponent";
|
|
33
|
-
export * from "./components/date-time/DateTimeComponent";
|
|
34
|
-
export * from "./components/expander/ExpanderComponent";
|
|
35
|
-
export * from "./components/loading/LoadingComponent";
|
|
36
|
-
export * from "./components/form-field/FormComponent";
|
|
37
|
-
export * from "./components/form-field/FormFieldComponent";
|
|
38
|
-
export * from "./components/grid/GridComponent";
|
|
39
|
-
export * from "./components/tree-view/TreeViewComponent";
|
|
40
|
-
export * from "./components/tabs/TabsComponent";
|
|
41
|
-
export * from "./components/number/NumberComponent";
|
|
42
|
-
export * from "./components/dialog/DialogComponent";
|
|
43
|
-
export * from "./components/auto-suggest/AutoSuggestComponent";
|
|
44
|
-
export * from "./components/button/ButtonComponent";
|
|
45
|
-
export * from "./components/input/InputComponent";
|
|
46
|
-
export * from "./components/checkbox/CheckBoxComponent";
|
|
47
|
-
export * from "./components/IntervalComponent";
|
|
48
|
-
export * from "./components/select/SelectComponent";
|
|
49
|
-
export * from "./components/stack-panel/StackPanelComponent";
|
|
50
|
-
export * from "./components/stack-panel/SplitterComponent";
|
|
51
|
-
export * from "./grid/filterDialogs/excelFilter";
|
|
52
|
-
export * from "./grid/slick.tree";
|
|
53
|
-
export * from "./components/navigation/NavigationComponent";
|
|
54
|
-
export * from "./components/notification/Notification";
|
|
55
|
-
export * from "./components/ribbon-menu/RibbonMenuComponent";
|
|
56
|
-
export * from "./components/overlay/OverlayComponent";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface IEvent<T, T2 = void> {
|
|
2
|
-
subscribe(fnc: (args?: T, args2?: T2) => any): any;
|
|
3
|
-
notify(val?: T): any;
|
|
4
|
-
}
|
|
5
|
-
export declare class EventHandler<T, T2 = void> implements IEvent<T, T2> {
|
|
6
|
-
static Create(click: (EventHandler<any, any> | ((p?: any, p2?: any) => any))): EventHandler<any, any>;
|
|
7
|
-
private handlers;
|
|
8
|
-
constructor(fnc?: (args?: T, args2?: T2) => any);
|
|
9
|
-
subscribe(fnc: (args?: T, args2?: T2) => any): void;
|
|
10
|
-
notify(val?: T, val2?: T2): void;
|
|
11
|
-
count(): number;
|
|
12
|
-
unSubscribe(fnc: (args?: T, args2?: T2) => any): void;
|
|
13
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var EventHandler = /** @class */ (function () {
|
|
2
|
-
function EventHandler(fnc) {
|
|
3
|
-
this.handlers = [];
|
|
4
|
-
if (fnc != null) {
|
|
5
|
-
this.handlers.push(fnc);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
EventHandler.Create = function (click) {
|
|
9
|
-
if (click == null) {
|
|
10
|
-
return new EventHandler();
|
|
11
|
-
}
|
|
12
|
-
if (typeof click === "function") {
|
|
13
|
-
var res = new EventHandler();
|
|
14
|
-
res.subscribe(click);
|
|
15
|
-
return res;
|
|
16
|
-
}
|
|
17
|
-
return click;
|
|
18
|
-
};
|
|
19
|
-
EventHandler.prototype.subscribe = function (fnc) {
|
|
20
|
-
this.handlers.push(fnc);
|
|
21
|
-
};
|
|
22
|
-
EventHandler.prototype.notify = function (val, val2) {
|
|
23
|
-
for (var _i = 0, _a = this.handlers; _i < _a.length; _i++) {
|
|
24
|
-
var h = _a[_i];
|
|
25
|
-
h(val, val2);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
EventHandler.prototype.count = function () {
|
|
29
|
-
return this.handlers.length;
|
|
30
|
-
};
|
|
31
|
-
EventHandler.prototype.unSubscribe = function (fnc) {
|
|
32
|
-
if (this.handlers.indexOf(fnc) >= 0) {
|
|
33
|
-
this.handlers.splice(this.handlers.indexOf(fnc), 1);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
// TODO? throw exception?
|
|
37
|
-
console.warn("handler not found in EventHandler.unSubscribe");
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return EventHandler;
|
|
41
|
-
}());
|
|
42
|
-
export { EventHandler };
|
|
File without changes
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import "./moveable.css";
|
|
2
|
-
import "../core/polyfills";
|
|
3
|
-
import { EventHandler } from "./eventhandler";
|
|
4
|
-
export interface IMoveEventArg {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
target: HTMLElement;
|
|
8
|
-
evt: MouseEvent;
|
|
9
|
-
cancelEvent: () => void;
|
|
10
|
-
}
|
|
11
|
-
export interface IMoveableOptions {
|
|
12
|
-
moveDelta?: number;
|
|
13
|
-
onStart?: EventHandler<IMoveEventArg>;
|
|
14
|
-
onStop?: EventHandler<IMoveEventArg>;
|
|
15
|
-
onMove?: EventHandler<IMoveEventArg>;
|
|
16
|
-
gridX?: number;
|
|
17
|
-
gridY?: number;
|
|
18
|
-
selector?: string;
|
|
19
|
-
handleSelector?: string;
|
|
20
|
-
direction?: "x" | "y" | "both";
|
|
21
|
-
containInParent?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare class MoveableContainer {
|
|
24
|
-
private container;
|
|
25
|
-
private options;
|
|
26
|
-
private element;
|
|
27
|
-
private resizeX;
|
|
28
|
-
private resizeY;
|
|
29
|
-
private initialX;
|
|
30
|
-
private initialY;
|
|
31
|
-
private startSize;
|
|
32
|
-
constructor(container: HTMLElement, options: IMoveableOptions);
|
|
33
|
-
private init;
|
|
34
|
-
private mouseDownContainer;
|
|
35
|
-
private mouseMove;
|
|
36
|
-
private mouseUp;
|
|
37
|
-
private extractArg;
|
|
38
|
-
}
|
|
39
|
-
export declare function Moveable(selector: HTMLElement | string, options?: IMoveableOptions): MoveableContainer;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import "./moveable.css";
|
|
13
|
-
import "../core/polyfills";
|
|
14
|
-
import { EventHandler } from "./eventhandler";
|
|
15
|
-
var defaultOptions = {
|
|
16
|
-
onStart: new EventHandler(),
|
|
17
|
-
onStop: new EventHandler(),
|
|
18
|
-
onMove: new EventHandler(),
|
|
19
|
-
direction: "both",
|
|
20
|
-
moveDelta: 0,
|
|
21
|
-
containInParent: true
|
|
22
|
-
};
|
|
23
|
-
var MoveableContainer = /** @class */ (function () {
|
|
24
|
-
function MoveableContainer(container, options) {
|
|
25
|
-
var _this = this;
|
|
26
|
-
this.container = container;
|
|
27
|
-
this.options = options;
|
|
28
|
-
this.resizeX = false;
|
|
29
|
-
this.resizeY = false;
|
|
30
|
-
this.initialX = null;
|
|
31
|
-
this.initialY = null;
|
|
32
|
-
this.startSize = { x: null, y: null };
|
|
33
|
-
this.mouseDownContainer = function (evt) {
|
|
34
|
-
var target = evt.target;
|
|
35
|
-
var directChild = target;
|
|
36
|
-
while (directChild.parentElement != null && directChild.parentElement !== _this.container) {
|
|
37
|
-
if (_this.options.selector != null && directChild.matches(_this.options.selector)) {
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
directChild = directChild.parentElement;
|
|
41
|
-
}
|
|
42
|
-
if (directChild.parentElement == null) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (_this.options.selector != null && !directChild.matches(_this.options.selector)) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
_this.element = directChild;
|
|
49
|
-
var canceled = false;
|
|
50
|
-
var args = {
|
|
51
|
-
evt: evt,
|
|
52
|
-
target: _this.element,
|
|
53
|
-
x: _this.element.offsetLeft,
|
|
54
|
-
y: _this.element.offsetTop,
|
|
55
|
-
cancelEvent: function () { canceled = true; }
|
|
56
|
-
};
|
|
57
|
-
_this.options.onStart.notify(args);
|
|
58
|
-
if (canceled) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
evt.preventDefault();
|
|
62
|
-
evt.stopPropagation();
|
|
63
|
-
evt.stopImmediatePropagation();
|
|
64
|
-
_this.initialX = _this.extractArg(evt, "clientX") - _this.element.offsetLeft;
|
|
65
|
-
_this.initialY = _this.extractArg(evt, "clientY") - _this.element.offsetTop;
|
|
66
|
-
// register event listeners
|
|
67
|
-
window.addEventListener("mousemove", _this.mouseMove, false);
|
|
68
|
-
window.addEventListener("mouseup", _this.mouseUp, false);
|
|
69
|
-
window.addEventListener("touchmove", _this.mouseMove, false);
|
|
70
|
-
window.addEventListener("touchend", _this.mouseUp, false);
|
|
71
|
-
};
|
|
72
|
-
this.mouseMove = function (evt) {
|
|
73
|
-
var raiseEvt = false;
|
|
74
|
-
var x = 0;
|
|
75
|
-
if (_this.resizeX) {
|
|
76
|
-
var val = _this.extractArg(evt, "clientX");
|
|
77
|
-
if (_this.startSize != null && _this.startSize.x == null) {
|
|
78
|
-
_this.startSize.x = val;
|
|
79
|
-
}
|
|
80
|
-
if (_this.startSize == null || Math.abs(_this.startSize.x - val) >= _this.options.moveDelta) {
|
|
81
|
-
//if (!this.options.gridX || Math.round(val) % this.options.gridX === 0) {
|
|
82
|
-
x = val - _this.initialX;
|
|
83
|
-
if (_this.options.gridX) {
|
|
84
|
-
x = Math.round(x / _this.options.gridX) * _this.options.gridX;
|
|
85
|
-
}
|
|
86
|
-
if (_this.options.containInParent) {
|
|
87
|
-
if (x < 0) {
|
|
88
|
-
x = 0;
|
|
89
|
-
}
|
|
90
|
-
var maxX = _this.container.clientWidth - _this.element.offsetWidth;
|
|
91
|
-
if (x > maxX) {
|
|
92
|
-
x = maxX;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
_this.element.style.left = x + "px";
|
|
96
|
-
raiseEvt = true;
|
|
97
|
-
_this.startSize = null;
|
|
98
|
-
//}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
var y = 0;
|
|
102
|
-
if (_this.resizeY) {
|
|
103
|
-
var val = _this.extractArg(evt, "clientY");
|
|
104
|
-
if (_this.startSize != null && _this.startSize.y == null) {
|
|
105
|
-
_this.startSize.y = val;
|
|
106
|
-
}
|
|
107
|
-
if (_this.startSize == null || Math.abs(_this.startSize.y - val) >= _this.options.moveDelta) {
|
|
108
|
-
//if (!this.options.gridY || Math.round(val) % this.options.gridY === 0) {
|
|
109
|
-
y = val - _this.initialY;
|
|
110
|
-
if (_this.options.gridY) {
|
|
111
|
-
y = Math.round(y / _this.options.gridY) * _this.options.gridY;
|
|
112
|
-
}
|
|
113
|
-
if (y < 0) {
|
|
114
|
-
y = 0;
|
|
115
|
-
}
|
|
116
|
-
var maxY = _this.container.clientHeight - _this.element.offsetHeight;
|
|
117
|
-
if (y > maxY) {
|
|
118
|
-
y = maxY;
|
|
119
|
-
}
|
|
120
|
-
_this.element.style.top = y + "px";
|
|
121
|
-
raiseEvt = true;
|
|
122
|
-
_this.startSize = null;
|
|
123
|
-
//}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (raiseEvt) {
|
|
127
|
-
_this.options.onMove.notify({
|
|
128
|
-
evt: evt,
|
|
129
|
-
target: _this.element,
|
|
130
|
-
x: x,
|
|
131
|
-
y: y,
|
|
132
|
-
cancelEvent: function () { }
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
this.mouseUp = function (evt) {
|
|
137
|
-
window.removeEventListener("mousemove", _this.mouseMove, false);
|
|
138
|
-
window.removeEventListener("mouseup", _this.mouseUp, false);
|
|
139
|
-
window.removeEventListener("touchmove", _this.mouseMove, false);
|
|
140
|
-
window.removeEventListener("touchend", _this.mouseUp, false);
|
|
141
|
-
_this.options.onStop.notify({
|
|
142
|
-
evt: evt,
|
|
143
|
-
target: _this.element,
|
|
144
|
-
x: _this.element.offsetLeft,
|
|
145
|
-
y: _this.element.offsetTop,
|
|
146
|
-
cancelEvent: function () { }
|
|
147
|
-
});
|
|
148
|
-
_this.startSize = { x: null, y: null };
|
|
149
|
-
};
|
|
150
|
-
if (options.direction === "x" || options.direction === "both") {
|
|
151
|
-
this.resizeX = true;
|
|
152
|
-
}
|
|
153
|
-
if (options.direction === "y" || options.direction === "both") {
|
|
154
|
-
this.resizeY = true;
|
|
155
|
-
}
|
|
156
|
-
this.init();
|
|
157
|
-
}
|
|
158
|
-
MoveableContainer.prototype.init = function () {
|
|
159
|
-
this.container.addEventListener("mousedown", this.mouseDownContainer, false);
|
|
160
|
-
this.container.addEventListener("touchstart", this.mouseDownContainer, false);
|
|
161
|
-
};
|
|
162
|
-
MoveableContainer.prototype.extractArg = function (evt, key) {
|
|
163
|
-
return evt[key] != null ? evt[key] : (evt.touches.length > 0 ? evt.touches : evt.changedTouches)[0][key];
|
|
164
|
-
};
|
|
165
|
-
return MoveableContainer;
|
|
166
|
-
}());
|
|
167
|
-
export { MoveableContainer };
|
|
168
|
-
export function Moveable(selector, options) {
|
|
169
|
-
return new MoveableContainer(typeof selector === "string" ?
|
|
170
|
-
document.querySelector(selector) :
|
|
171
|
-
selector, __assign(__assign({}, defaultOptions), options));
|
|
172
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.resizable {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.resizable > .rs-r {
|
|
6
|
-
position: absolute;
|
|
7
|
-
top:0;
|
|
8
|
-
bottom:0;
|
|
9
|
-
right:0;
|
|
10
|
-
width:0.5rem;
|
|
11
|
-
box-sizing:border-box;
|
|
12
|
-
background:rgba(20,20,20,0.2);
|
|
13
|
-
cursor: w-resize;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.resizable > .rs-b {
|
|
17
|
-
position: absolute;
|
|
18
|
-
left:0;
|
|
19
|
-
bottom:0;
|
|
20
|
-
right:0;
|
|
21
|
-
height:0.5rem;
|
|
22
|
-
box-sizing:border-box;
|
|
23
|
-
background:rgba(20,20,20,0.2);
|
|
24
|
-
cursor: n-resize;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.resizable > .rs-r.rs-b {
|
|
28
|
-
top: initial;
|
|
29
|
-
left: initial;
|
|
30
|
-
right: 0;
|
|
31
|
-
bottom: 0;
|
|
32
|
-
cursor: nw-resize;
|
|
33
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import "./resizable.css";
|
|
2
|
-
import "../core/polyfills";
|
|
3
|
-
import { EventHandler } from "./eventhandler";
|
|
4
|
-
export interface IResizeEventArg {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
target: HTMLElement;
|
|
8
|
-
evt: MouseEvent;
|
|
9
|
-
}
|
|
10
|
-
export interface IResizeOptions {
|
|
11
|
-
minWidth?: number;
|
|
12
|
-
maxWidth?: number;
|
|
13
|
-
minHeight?: number;
|
|
14
|
-
maxHeight?: number;
|
|
15
|
-
resizeDelta?: number;
|
|
16
|
-
resizeHandlePrefix?: string;
|
|
17
|
-
onStart?: EventHandler<IResizeEventArg>;
|
|
18
|
-
onStop?: EventHandler<IResizeEventArg>;
|
|
19
|
-
onResize?: EventHandler<IResizeEventArg>;
|
|
20
|
-
gridX?: number;
|
|
21
|
-
gridY?: number;
|
|
22
|
-
}
|
|
23
|
-
export declare class ResizeContainer {
|
|
24
|
-
private container;
|
|
25
|
-
private options;
|
|
26
|
-
private element;
|
|
27
|
-
private resizeX;
|
|
28
|
-
private resizeY;
|
|
29
|
-
private startSize;
|
|
30
|
-
constructor(container: HTMLElement, options: IResizeOptions);
|
|
31
|
-
private init;
|
|
32
|
-
private mouseDownContainer;
|
|
33
|
-
private mouseMove;
|
|
34
|
-
private mouseUp;
|
|
35
|
-
private extractArg;
|
|
36
|
-
}
|
|
37
|
-
export declare function Resizable(selector: HTMLElement | string, options?: IResizeOptions): ResizeContainer;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import "./resizable.css";
|
|
13
|
-
import "../core/polyfills";
|
|
14
|
-
import { EventHandler } from "./eventhandler";
|
|
15
|
-
var defaultOptions = {
|
|
16
|
-
resizeHandlePrefix: "rs-",
|
|
17
|
-
onStart: new EventHandler(),
|
|
18
|
-
onStop: new EventHandler(),
|
|
19
|
-
onResize: new EventHandler(),
|
|
20
|
-
resizeDelta: 0
|
|
21
|
-
};
|
|
22
|
-
var ResizeContainer = /** @class */ (function () {
|
|
23
|
-
function ResizeContainer(container, options) {
|
|
24
|
-
var _this = this;
|
|
25
|
-
this.container = container;
|
|
26
|
-
this.options = options;
|
|
27
|
-
this.startSize = { x: null, y: null };
|
|
28
|
-
this.mouseDownContainer = function (evt) {
|
|
29
|
-
var target = evt.target;
|
|
30
|
-
if ((" " + target.className).indexOf(" " + _this.options.resizeHandlePrefix) < 0) {
|
|
31
|
-
return; // not a resize handle
|
|
32
|
-
}
|
|
33
|
-
evt.preventDefault();
|
|
34
|
-
evt.stopPropagation();
|
|
35
|
-
evt.stopImmediatePropagation();
|
|
36
|
-
_this.resizeX = target.classList.contains(_this.options.resizeHandlePrefix + "r") ||
|
|
37
|
-
target.classList.contains(_this.options.resizeHandlePrefix + "l");
|
|
38
|
-
_this.resizeY = target.classList.contains(_this.options.resizeHandlePrefix + "t") ||
|
|
39
|
-
target.classList.contains(_this.options.resizeHandlePrefix + "b");
|
|
40
|
-
_this.element = target.parentElement; // TODO change to closest class
|
|
41
|
-
_this.options.onStart.notify({ evt: evt, target: _this.element, x: _this.extractArg(evt, "pageX"), y: _this.extractArg(evt, "pageY") });
|
|
42
|
-
// register event listeners
|
|
43
|
-
window.addEventListener("mousemove", _this.mouseMove, false);
|
|
44
|
-
window.addEventListener("mouseup", _this.mouseUp, false);
|
|
45
|
-
window.addEventListener("touchmove", _this.mouseMove, false);
|
|
46
|
-
window.addEventListener("touchend", _this.mouseUp, false);
|
|
47
|
-
};
|
|
48
|
-
this.mouseMove = function (evt) {
|
|
49
|
-
var raiseEvt = false;
|
|
50
|
-
if (_this.resizeX) {
|
|
51
|
-
var val = _this.extractArg(evt, "clientX") - _this.element.getBoundingClientRect().left;
|
|
52
|
-
if (_this.options.minWidth && val < _this.options.minWidth) {
|
|
53
|
-
val = _this.options.minWidth;
|
|
54
|
-
}
|
|
55
|
-
else if (_this.options.maxWidth && val > _this.options.maxWidth) {
|
|
56
|
-
val = _this.options.maxWidth;
|
|
57
|
-
}
|
|
58
|
-
if (_this.startSize != null && _this.startSize.x == null) {
|
|
59
|
-
_this.startSize.x = val;
|
|
60
|
-
}
|
|
61
|
-
if (_this.startSize == null || Math.abs(_this.startSize.x - val) >= _this.options.resizeDelta) {
|
|
62
|
-
// if (!this.options.gridX || Math.round(val) % this.options.gridX === 0) {
|
|
63
|
-
if (_this.options.gridX) {
|
|
64
|
-
val = Math.round(val / _this.options.gridX) * _this.options.gridX;
|
|
65
|
-
}
|
|
66
|
-
_this.element.style.width = Math.round(val) + "px";
|
|
67
|
-
raiseEvt = true;
|
|
68
|
-
_this.startSize = null;
|
|
69
|
-
// }
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (_this.resizeY) {
|
|
73
|
-
var val = _this.extractArg(evt, "clientY") - _this.element.getBoundingClientRect().top;
|
|
74
|
-
if (_this.options.minHeight && val < _this.options.minHeight) {
|
|
75
|
-
val = _this.options.minHeight;
|
|
76
|
-
}
|
|
77
|
-
else if (_this.options.maxHeight && val > _this.options.maxHeight) {
|
|
78
|
-
val = _this.options.maxHeight;
|
|
79
|
-
}
|
|
80
|
-
if (_this.startSize != null && _this.startSize.y == null) {
|
|
81
|
-
_this.startSize.y = val;
|
|
82
|
-
}
|
|
83
|
-
if (_this.startSize == null || Math.abs(_this.startSize.y - val) >= _this.options.resizeDelta) {
|
|
84
|
-
// if (!this.options.gridY || Math.round(val) % this.options.gridY === 0) {
|
|
85
|
-
if (_this.options.gridY) {
|
|
86
|
-
val = Math.round(val / _this.options.gridY) * _this.options.gridY;
|
|
87
|
-
}
|
|
88
|
-
_this.element.style.height = Math.round(val) + "px";
|
|
89
|
-
raiseEvt = true;
|
|
90
|
-
_this.startSize = null;
|
|
91
|
-
// }
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (raiseEvt) {
|
|
95
|
-
_this.options.onResize.notify({ evt: evt, target: _this.element, x: _this.extractArg(evt, "pageX"), y: _this.extractArg(evt, "pageY") });
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
this.mouseUp = function (evt) {
|
|
99
|
-
window.removeEventListener("mousemove", _this.mouseMove, false);
|
|
100
|
-
window.removeEventListener("mouseup", _this.mouseUp, false);
|
|
101
|
-
window.removeEventListener("touchmove", _this.mouseMove, false);
|
|
102
|
-
window.removeEventListener("touchend", _this.mouseUp, false);
|
|
103
|
-
_this.options.onStop.notify({ evt: evt, target: _this.element, x: _this.extractArg(evt, "pageX"), y: _this.extractArg(evt, "pageY") });
|
|
104
|
-
_this.startSize = { x: null, y: null };
|
|
105
|
-
};
|
|
106
|
-
this.init();
|
|
107
|
-
}
|
|
108
|
-
ResizeContainer.prototype.init = function () {
|
|
109
|
-
this.container.classList.add("resizable");
|
|
110
|
-
this.container.addEventListener("mousedown", this.mouseDownContainer, false);
|
|
111
|
-
this.container.addEventListener("touchstart", this.mouseDownContainer, false);
|
|
112
|
-
};
|
|
113
|
-
ResizeContainer.prototype.extractArg = function (evt, key) {
|
|
114
|
-
return evt[key] != null ? evt[key] : (evt.touches.length > 0 ? evt.touches : evt.changedTouches)[0][key];
|
|
115
|
-
};
|
|
116
|
-
return ResizeContainer;
|
|
117
|
-
}());
|
|
118
|
-
export { ResizeContainer };
|
|
119
|
-
export function Resizable(selector, options) {
|
|
120
|
-
return new ResizeContainer(typeof selector === "string" ?
|
|
121
|
-
document.querySelector(selector) :
|
|
122
|
-
selector, __assign(__assign({}, defaultOptions), options));
|
|
123
|
-
}
|
package/lib/ui/auto.suggest.css
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
.autocomplete-suggestions {
|
|
2
|
-
text-align: left;
|
|
3
|
-
cursor: default;
|
|
4
|
-
border: 1px solid #ccc;
|
|
5
|
-
border-top: 0;
|
|
6
|
-
background: #fff;
|
|
7
|
-
box-shadow: -1px 1px 3px rgba(0,0,0,.1);
|
|
8
|
-
|
|
9
|
-
/* core styles should not be changed */
|
|
10
|
-
position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
|
|
11
|
-
}
|
|
12
|
-
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
|
|
13
|
-
.autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; }
|
|
14
|
-
.autocomplete-suggestion.selected { background: #f0f0f0; }
|
package/lib/ui/auto.suggest.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "./auto.suggest.css";
|
|
2
|
-
export interface IAutoSuggestOptions {
|
|
3
|
-
selector?: HTMLElement | string;
|
|
4
|
-
source: (val: string, suggest: (items: any[]) => void) => void;
|
|
5
|
-
minChars?: number;
|
|
6
|
-
delay?: number;
|
|
7
|
-
offsetLeft?: number;
|
|
8
|
-
offsetTop?: number;
|
|
9
|
-
cache?: boolean;
|
|
10
|
-
menuClass?: string;
|
|
11
|
-
renderItem?: (item: any, search: string) => string;
|
|
12
|
-
onSelect?: (e: any, term: string, dom: HTMLElement) => void;
|
|
13
|
-
}
|
|
14
|
-
export interface IAutoSuggest {
|
|
15
|
-
destroy: () => void;
|
|
16
|
-
}
|
|
17
|
-
export declare function AutoSuggest(input: HTMLElement | string, opts: IAutoSuggestOptions): IAutoSuggest;
|