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/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IJSLComponent, JSLRender, IJSLVNode } from "jsl-render";
|
|
2
|
-
export interface IIntervalOptions {
|
|
3
|
-
interval: number;
|
|
4
|
-
stopOnError?: boolean;
|
|
5
|
-
noRefresh?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare class IntervalComponent implements IJSLComponent {
|
|
8
|
-
private fnc;
|
|
9
|
-
private options;
|
|
10
|
-
private renderer;
|
|
11
|
-
constructor(fnc: any, options: IIntervalOptions);
|
|
12
|
-
isEqual(node: IJSLComponent): boolean;
|
|
13
|
-
render(): IJSLVNode;
|
|
14
|
-
onInit(render: JSLRender): void;
|
|
15
|
-
onCreate(node: IJSLVNode): void;
|
|
16
|
-
onRemove(node: IJSLVNode): void;
|
|
17
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var IntervalComponent = /** @class */ (function () {
|
|
2
|
-
function IntervalComponent(fnc, options) {
|
|
3
|
-
this.fnc = fnc;
|
|
4
|
-
this.options = options;
|
|
5
|
-
}
|
|
6
|
-
IntervalComponent.prototype.isEqual = function (node) {
|
|
7
|
-
return this.__proto__ === node.__proto__;
|
|
8
|
-
};
|
|
9
|
-
IntervalComponent.prototype.render = function () {
|
|
10
|
-
return { tag: "input", attr: { type: "hidden" } };
|
|
11
|
-
};
|
|
12
|
-
IntervalComponent.prototype.onInit = function (render) {
|
|
13
|
-
this.renderer = render;
|
|
14
|
-
};
|
|
15
|
-
IntervalComponent.prototype.onCreate = function (node) {
|
|
16
|
-
var _this = this;
|
|
17
|
-
var timeoutRef = node.dom.value;
|
|
18
|
-
if (timeoutRef && timeoutRef !== "0") {
|
|
19
|
-
clearTimeout(parseInt(timeoutRef, 10));
|
|
20
|
-
node.dom.value = "";
|
|
21
|
-
}
|
|
22
|
-
var f = function () {
|
|
23
|
-
var result;
|
|
24
|
-
try {
|
|
25
|
-
result = _this.fnc();
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
console.error(e);
|
|
29
|
-
if (_this.options.stopOnError) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
var isPromise = result && typeof result.then === "function" && typeof result.catch === "function";
|
|
34
|
-
if (isPromise) {
|
|
35
|
-
result.then(function () {
|
|
36
|
-
if (!_this.options.noRefresh) {
|
|
37
|
-
_this.renderer.refresh();
|
|
38
|
-
}
|
|
39
|
-
node.dom.value = setTimeout(f, _this.options.interval).toString();
|
|
40
|
-
}).catch(function (e) {
|
|
41
|
-
console.error(e);
|
|
42
|
-
if (!_this.options.stopOnError) {
|
|
43
|
-
if (!_this.options.noRefresh) {
|
|
44
|
-
_this.renderer.refresh();
|
|
45
|
-
}
|
|
46
|
-
node.dom.value = setTimeout(f, _this.options.interval).toString();
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
if (!_this.options.noRefresh) {
|
|
52
|
-
_this.renderer.refresh();
|
|
53
|
-
}
|
|
54
|
-
node.dom.value = setTimeout(f, _this.options.interval).toString();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
f();
|
|
58
|
-
};
|
|
59
|
-
IntervalComponent.prototype.onRemove = function (node) {
|
|
60
|
-
var timeoutRef = node.dom.value;
|
|
61
|
-
if (timeoutRef && timeoutRef !== "0") {
|
|
62
|
-
clearTimeout(parseInt(timeoutRef, 10));
|
|
63
|
-
node.dom.value = "";
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
return IntervalComponent;
|
|
67
|
-
}());
|
|
68
|
-
export { IntervalComponent };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
import { IAutoSuggestOptions, IAutoSuggest } from "../../ui/auto.suggest";
|
|
3
|
-
export interface IAutoSuggestComponentOptions extends IAutoSuggestOptions {
|
|
4
|
-
value?: string;
|
|
5
|
-
class?: string;
|
|
6
|
-
style?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class AutoSuggestComponent implements IJSLComponent {
|
|
10
|
-
private options;
|
|
11
|
-
private ref;
|
|
12
|
-
private dom;
|
|
13
|
-
constructor(options: IAutoSuggestComponentOptions);
|
|
14
|
-
render(): IJSLVNode;
|
|
15
|
-
getRef(): IAutoSuggest;
|
|
16
|
-
getValue(): string;
|
|
17
|
-
setValue(val: string): void;
|
|
18
|
-
focus(): void;
|
|
19
|
-
onCreate(node: IJSLVNode): void;
|
|
20
|
-
onUpdate(node: IJSLVNode): void;
|
|
21
|
-
onRemove(): void;
|
|
22
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { AutoSuggest } from "../../ui/auto.suggest";
|
|
2
|
-
var AutoSuggestComponent = /** @class */ (function () {
|
|
3
|
-
function AutoSuggestComponent(options) {
|
|
4
|
-
this.options = options;
|
|
5
|
-
// this.id = this.options.id ?? helper.newDomGuid();
|
|
6
|
-
}
|
|
7
|
-
AutoSuggestComponent.prototype.render = function () {
|
|
8
|
-
var _a;
|
|
9
|
-
return {
|
|
10
|
-
tag: "input",
|
|
11
|
-
attr: { value: this.options.value, class: this.options.class, style: this.options.style, placeholder: (_a = this.options.placeholder) !== null && _a !== void 0 ? _a : "" }
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
AutoSuggestComponent.prototype.getRef = function () {
|
|
15
|
-
return this.ref;
|
|
16
|
-
};
|
|
17
|
-
AutoSuggestComponent.prototype.getValue = function () {
|
|
18
|
-
if (this.dom == null) {
|
|
19
|
-
return "";
|
|
20
|
-
}
|
|
21
|
-
return this.dom.value;
|
|
22
|
-
};
|
|
23
|
-
AutoSuggestComponent.prototype.setValue = function (val) {
|
|
24
|
-
if (this.dom == null) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
this.dom.value = val;
|
|
28
|
-
};
|
|
29
|
-
AutoSuggestComponent.prototype.focus = function () {
|
|
30
|
-
if (this.dom == null) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this.dom.focus();
|
|
34
|
-
};
|
|
35
|
-
AutoSuggestComponent.prototype.onCreate = function (node) {
|
|
36
|
-
this.dom = node.dom;
|
|
37
|
-
AutoSuggest(node.dom, this.options);
|
|
38
|
-
};
|
|
39
|
-
AutoSuggestComponent.prototype.onUpdate = function (node) {
|
|
40
|
-
this.dom = node.dom;
|
|
41
|
-
};
|
|
42
|
-
AutoSuggestComponent.prototype.onRemove = function () {
|
|
43
|
-
if (this.ref != null) {
|
|
44
|
-
this.ref.destroy();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return AutoSuggestComponent;
|
|
48
|
-
}());
|
|
49
|
-
export { AutoSuggestComponent };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
3
|
-
export interface IButtonOptions {
|
|
4
|
-
content: string | IJSLVNode | IJSLComponent;
|
|
5
|
-
enabled?: boolean;
|
|
6
|
-
class?: string;
|
|
7
|
-
outlined?: boolean;
|
|
8
|
-
style?: string;
|
|
9
|
-
click?: EventHandler<MouseEvent> | ((evt?: MouseEvent) => void);
|
|
10
|
-
}
|
|
11
|
-
export declare class ButtonComponent implements IJSLComponent {
|
|
12
|
-
private options;
|
|
13
|
-
get click(): EventHandler<MouseEvent>;
|
|
14
|
-
constructor(options: IButtonOptions);
|
|
15
|
-
isEqual(node: IJSLComponent): boolean;
|
|
16
|
-
render(): IJSLVNode;
|
|
17
|
-
private raiseEvent;
|
|
18
|
-
}
|
|
@@ -1,46 +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 { EventHandler } from "../../interaction/eventhandler";
|
|
13
|
-
var ButtonComponent = /** @class */ (function () {
|
|
14
|
-
function ButtonComponent(options) {
|
|
15
|
-
this.options = __assign({ enabled: true, class: "" }, options);
|
|
16
|
-
this.options.click = EventHandler.Create(this.options.click);
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(ButtonComponent.prototype, "click", {
|
|
19
|
-
get: function () {
|
|
20
|
-
return this.options.click;
|
|
21
|
-
},
|
|
22
|
-
enumerable: false,
|
|
23
|
-
configurable: true
|
|
24
|
-
});
|
|
25
|
-
ButtonComponent.prototype.isEqual = function (node) {
|
|
26
|
-
return this.__proto__ === node.__proto__;
|
|
27
|
-
};
|
|
28
|
-
ButtonComponent.prototype.render = function () {
|
|
29
|
-
return {
|
|
30
|
-
tag: "button",
|
|
31
|
-
attr: {
|
|
32
|
-
class: "jsl-button " + (this.options.outlined ? "jsl-button-outline " : "") +
|
|
33
|
-
this.options.class + (!this.options.enabled ? " disabled" : ""), style: this.options.style, click: this.raiseEvent
|
|
34
|
-
},
|
|
35
|
-
content: typeof this.options.content === "string" ? this.options.content : "",
|
|
36
|
-
children: typeof this.options.content !== "string" ? [this.options.content] : []
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
ButtonComponent.prototype.raiseEvent = function (evt) {
|
|
40
|
-
if (this.options.enabled) {
|
|
41
|
-
this.options.click.notify(evt);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return ButtonComponent;
|
|
45
|
-
}());
|
|
46
|
-
export { ButtonComponent };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "./CheckBoxStyle.scss";
|
|
2
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
-
import { IDataConverter } from "../../interaction/dataconverter";
|
|
5
|
-
export interface ICheckBoxOptions<T = any> {
|
|
6
|
-
value?: boolean;
|
|
7
|
-
label: string;
|
|
8
|
-
enabled?: boolean;
|
|
9
|
-
class?: string;
|
|
10
|
-
style?: string;
|
|
11
|
-
onChange?: EventHandler<boolean> | ((v?: boolean) => void);
|
|
12
|
-
id?: string;
|
|
13
|
-
bindTo?: T;
|
|
14
|
-
property?: keyof T;
|
|
15
|
-
bindMode?: "toModel" | "fromModel" | "both";
|
|
16
|
-
converter?: IDataConverter<any, boolean>;
|
|
17
|
-
}
|
|
18
|
-
export declare class CheckBoxComponent<T = any> implements IJSLComponent {
|
|
19
|
-
private options;
|
|
20
|
-
private currentDom;
|
|
21
|
-
get onChange(): EventHandler<boolean>;
|
|
22
|
-
constructor(options: ICheckBoxOptions<T>);
|
|
23
|
-
render(): IJSLVNode;
|
|
24
|
-
getValue(): boolean;
|
|
25
|
-
setValue(val: boolean): void;
|
|
26
|
-
onCreate(node: IJSLVNode): void;
|
|
27
|
-
private raiseEvent;
|
|
28
|
-
}
|
|
@@ -1,94 +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 "./CheckBoxStyle.scss";
|
|
13
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
14
|
-
import { helper } from "../../core/helper";
|
|
15
|
-
var CheckBoxComponent = /** @class */ (function () {
|
|
16
|
-
function CheckBoxComponent(options) {
|
|
17
|
-
var _a;
|
|
18
|
-
this.options = __assign({ enabled: true, class: "", bindMode: "toModel" }, options);
|
|
19
|
-
if (!this.options.id) {
|
|
20
|
-
this.options.id = helper.newDomGuid();
|
|
21
|
-
}
|
|
22
|
-
if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
|
|
23
|
-
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
24
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
25
|
-
this.options.bindTo[this.options.property]);
|
|
26
|
-
}
|
|
27
|
-
this.options.onChange = EventHandler.Create(this.options.onChange);
|
|
28
|
-
}
|
|
29
|
-
Object.defineProperty(CheckBoxComponent.prototype, "onChange", {
|
|
30
|
-
get: function () {
|
|
31
|
-
return this.options.onChange;
|
|
32
|
-
},
|
|
33
|
-
enumerable: false,
|
|
34
|
-
configurable: true
|
|
35
|
-
});
|
|
36
|
-
// public isEqual(node: IJSLComponent): boolean {
|
|
37
|
-
// return (this as any).__proto__ === (node as any).__proto__;
|
|
38
|
-
// }
|
|
39
|
-
CheckBoxComponent.prototype.render = function () {
|
|
40
|
-
var _a;
|
|
41
|
-
var val = this.options.value;
|
|
42
|
-
if (this.options.bindMode !== "toModel" && this.options.bindTo != null && this.options.property != null) {
|
|
43
|
-
var current = this.getValue();
|
|
44
|
-
var newVal = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
45
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
46
|
-
this.options.bindTo[this.options.property]);
|
|
47
|
-
if (newVal !== current) {
|
|
48
|
-
val = newVal;
|
|
49
|
-
if (this.currentDom != null) {
|
|
50
|
-
this.currentDom.checked = val;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
tag: "span",
|
|
56
|
-
attr: { style: this.options.style },
|
|
57
|
-
children: [{
|
|
58
|
-
tag: "input",
|
|
59
|
-
attr: {
|
|
60
|
-
type: "checkbox",
|
|
61
|
-
disabled: !this.options.enabled ? "disabled" : undefined,
|
|
62
|
-
class: "checkbox-comp " + (this.options.class || ""),
|
|
63
|
-
change: this.raiseEvent,
|
|
64
|
-
checked: val ? "checked" : undefined,
|
|
65
|
-
id: typeof this.options.id === "string" ? this.options.id : undefined
|
|
66
|
-
}
|
|
67
|
-
}, { tag: "label", content: this.options.label, attr: { for: this.options.id } }]
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
CheckBoxComponent.prototype.getValue = function () {
|
|
71
|
-
var _a;
|
|
72
|
-
return ((_a = this.currentDom) === null || _a === void 0 ? void 0 : _a.checked) || false;
|
|
73
|
-
};
|
|
74
|
-
CheckBoxComponent.prototype.setValue = function (val) {
|
|
75
|
-
if (this.currentDom != null) {
|
|
76
|
-
this.currentDom.checked = val;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
CheckBoxComponent.prototype.onCreate = function (node) {
|
|
80
|
-
this.currentDom = node.dom.querySelector("input");
|
|
81
|
-
};
|
|
82
|
-
CheckBoxComponent.prototype.raiseEvent = function (e, node) {
|
|
83
|
-
var _a;
|
|
84
|
-
if (this.options.enabled) {
|
|
85
|
-
var value = node.dom.checked;
|
|
86
|
-
if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
|
|
87
|
-
this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
|
|
88
|
-
}
|
|
89
|
-
this.options.onChange.notify(value);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
return CheckBoxComponent;
|
|
93
|
-
}());
|
|
94
|
-
export { CheckBoxComponent };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
@keyframes checkbox-comp-hover-color{
|
|
2
|
-
from{
|
|
3
|
-
border-color:#C0C0C0;
|
|
4
|
-
}
|
|
5
|
-
to{
|
|
6
|
-
border-color:#3B99FF;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
.checkbox-comp{
|
|
10
|
-
position:absolute;
|
|
11
|
-
display:none;
|
|
12
|
-
}
|
|
13
|
-
.checkbox-comp[disabled]{
|
|
14
|
-
cursor:not-allowed
|
|
15
|
-
}
|
|
16
|
-
.checkbox-comp+label{
|
|
17
|
-
position:relative;
|
|
18
|
-
// display:block;
|
|
19
|
-
padding-left:1.5em;
|
|
20
|
-
cursor:pointer;
|
|
21
|
-
vertical-align:middle;
|
|
22
|
-
}
|
|
23
|
-
.checkbox-comp+label:hover:before{
|
|
24
|
-
animation-duration:.4s;
|
|
25
|
-
animation-fill-mode:both;
|
|
26
|
-
animation-name:checkbox-comp-hover-color;
|
|
27
|
-
}
|
|
28
|
-
.checkbox-comp+label:before{
|
|
29
|
-
position:absolute;
|
|
30
|
-
top:0;
|
|
31
|
-
left:0;
|
|
32
|
-
display:inline-block;
|
|
33
|
-
width:1em;
|
|
34
|
-
height:1em;
|
|
35
|
-
content:'';
|
|
36
|
-
border:1px solid #C0C0C0;
|
|
37
|
-
}
|
|
38
|
-
.checkbox-comp+label:after{
|
|
39
|
-
position:absolute;
|
|
40
|
-
display:none;
|
|
41
|
-
content:''
|
|
42
|
-
}
|
|
43
|
-
.checkbox-comp[disabled]+label{
|
|
44
|
-
cursor:not-allowed;
|
|
45
|
-
// color:#C0C0C0;
|
|
46
|
-
}
|
|
47
|
-
.checkbox-comp[disabled]+label:hover,.checkbox-comp[disabled]+label:before,.checkbox-comp[disabled]+label:after{
|
|
48
|
-
cursor:not-allowed
|
|
49
|
-
}
|
|
50
|
-
.checkbox-comp[disabled]+label:hover:before{
|
|
51
|
-
border:1px solid #C0C0C0;
|
|
52
|
-
animation-name:none
|
|
53
|
-
}
|
|
54
|
-
.checkbox-comp[disabled]+label:before{
|
|
55
|
-
border-color:#C0C0C0;
|
|
56
|
-
}
|
|
57
|
-
.checkbox-comp:checked+label:before{
|
|
58
|
-
animation-name:none
|
|
59
|
-
}
|
|
60
|
-
.checkbox-comp:checked+label:after{
|
|
61
|
-
display:block
|
|
62
|
-
}
|
|
63
|
-
.checkbox-comp+label:before{
|
|
64
|
-
border-radius:0.2em;
|
|
65
|
-
}
|
|
66
|
-
.checkbox-comp+label:after{
|
|
67
|
-
top:0.1em; //2px;
|
|
68
|
-
left:0.3em; //7px;
|
|
69
|
-
box-sizing:border-box;
|
|
70
|
-
width:0.5em; //6px;
|
|
71
|
-
height:0.7em; //12px;
|
|
72
|
-
transform:rotate(45deg);
|
|
73
|
-
border-width:0.15em;
|
|
74
|
-
border-style:solid;
|
|
75
|
-
border-color:#fff;
|
|
76
|
-
border-top:0;
|
|
77
|
-
border-left:0
|
|
78
|
-
}
|
|
79
|
-
.checkbox-comp:checked+label:before{
|
|
80
|
-
border-color:#3B99FF;
|
|
81
|
-
background:#3B99FF;
|
|
82
|
-
}
|
|
83
|
-
.checkbox-comp:checked[disabled]+label:before{
|
|
84
|
-
border-color:#c9e2f9;
|
|
85
|
-
background:#c9e2f9
|
|
86
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
import { IDatePickerOptions, IDatePicker } from "../../ui/date.picker";
|
|
3
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
-
import { IDataConverter } from "../../interaction/dataconverter";
|
|
5
|
-
export interface IDateComponentOptions<T = any> extends IDatePickerOptions {
|
|
6
|
-
id?: string;
|
|
7
|
-
class?: string;
|
|
8
|
-
style?: string;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
value?: Date;
|
|
11
|
-
onChange?: EventHandler<Date> | ((v?: Date) => void);
|
|
12
|
-
bindTo?: T;
|
|
13
|
-
property?: keyof T;
|
|
14
|
-
bindMode?: "toModel" | "fromModel" | "both";
|
|
15
|
-
converter?: IDataConverter<any, Date>;
|
|
16
|
-
enabled?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class DateComponent<T = any> implements IJSLComponent {
|
|
19
|
-
private options;
|
|
20
|
-
private ref;
|
|
21
|
-
private currentDom;
|
|
22
|
-
constructor(options: IDateComponentOptions<T>);
|
|
23
|
-
get onChange(): EventHandler<Date>;
|
|
24
|
-
render(): IJSLVNode;
|
|
25
|
-
getValue(): string;
|
|
26
|
-
getValueAsDate(): Date;
|
|
27
|
-
getRef(): IDatePicker;
|
|
28
|
-
onCreate(node: IJSLVNode): void;
|
|
29
|
-
onUpdate(node: IJSLVNode): void;
|
|
30
|
-
onRemove(): void;
|
|
31
|
-
private raiseEvent;
|
|
32
|
-
}
|
|
@@ -1,106 +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 { DatePicker } from "../../ui/date.picker";
|
|
13
|
-
import { date } from "../../core/date";
|
|
14
|
-
import { helper } from "../../core/helper";
|
|
15
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
16
|
-
var DateComponent = /** @class */ (function () {
|
|
17
|
-
function DateComponent(options) {
|
|
18
|
-
var _a;
|
|
19
|
-
this.options = __assign({ enabled: true, id: helper.newDomGuid(), bindMode: "toModel" }, options);
|
|
20
|
-
if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
|
|
21
|
-
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
22
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
23
|
-
this.options.bindTo[this.options.property]);
|
|
24
|
-
}
|
|
25
|
-
this.options.onChange = EventHandler.Create(this.options.onChange);
|
|
26
|
-
}
|
|
27
|
-
Object.defineProperty(DateComponent.prototype, "onChange", {
|
|
28
|
-
get: function () {
|
|
29
|
-
return this.options.onChange;
|
|
30
|
-
},
|
|
31
|
-
enumerable: false,
|
|
32
|
-
configurable: true
|
|
33
|
-
});
|
|
34
|
-
DateComponent.prototype.render = function () {
|
|
35
|
-
var _a;
|
|
36
|
-
var val = this.options.value;
|
|
37
|
-
if (this.options.bindMode !== "toModel" && this.options.bindTo != null && this.options.property != null) {
|
|
38
|
-
var current = this.getValue();
|
|
39
|
-
var newVal = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
40
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
41
|
-
this.options.bindTo[this.options.property]);
|
|
42
|
-
var newValStr = date.format(newVal);
|
|
43
|
-
if (newValStr !== current) {
|
|
44
|
-
val = newVal;
|
|
45
|
-
if (this.currentDom != null) {
|
|
46
|
-
this.currentDom.value = newValStr;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
tag: "input",
|
|
52
|
-
attr: {
|
|
53
|
-
id: this.options.id,
|
|
54
|
-
class: this.options.class,
|
|
55
|
-
style: this.options.style,
|
|
56
|
-
disabled: !this.options.enabled ? "disabled" : undefined,
|
|
57
|
-
placeholder: this.options.placeholder,
|
|
58
|
-
value: date.format(val),
|
|
59
|
-
change: this.raiseEvent,
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
DateComponent.prototype.getValue = function () {
|
|
64
|
-
if (this.currentDom == null) {
|
|
65
|
-
return "";
|
|
66
|
-
}
|
|
67
|
-
return this.currentDom.value;
|
|
68
|
-
};
|
|
69
|
-
DateComponent.prototype.getValueAsDate = function () {
|
|
70
|
-
if (this.currentDom == null) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
if (this.options.parse) {
|
|
74
|
-
return this.options.parse(this.currentDom.value);
|
|
75
|
-
}
|
|
76
|
-
return date.parse(this.currentDom.value);
|
|
77
|
-
};
|
|
78
|
-
DateComponent.prototype.getRef = function () {
|
|
79
|
-
return this.ref;
|
|
80
|
-
};
|
|
81
|
-
DateComponent.prototype.onCreate = function (node) {
|
|
82
|
-
this.currentDom = node.dom;
|
|
83
|
-
this.ref = DatePicker(this.currentDom, this.options);
|
|
84
|
-
};
|
|
85
|
-
DateComponent.prototype.onUpdate = function (node) {
|
|
86
|
-
this.currentDom = node.dom;
|
|
87
|
-
};
|
|
88
|
-
DateComponent.prototype.onRemove = function () {
|
|
89
|
-
if (this.ref != null) {
|
|
90
|
-
this.ref.destroy();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
DateComponent.prototype.raiseEvent = function (e, node) {
|
|
94
|
-
var _a;
|
|
95
|
-
if (this.options.enabled) {
|
|
96
|
-
var val = date.parse(node.dom.value);
|
|
97
|
-
if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
|
|
98
|
-
this.options.bindTo[this.options.property] =
|
|
99
|
-
((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(val) : val;
|
|
100
|
-
}
|
|
101
|
-
this.options.onChange.notify(val);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
return DateComponent;
|
|
105
|
-
}());
|
|
106
|
-
export { DateComponent };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import "./DateRangeStyle.scss";
|
|
2
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
-
export interface IDateRangeValue {
|
|
5
|
-
minValue: Date;
|
|
6
|
-
maxValue: Date;
|
|
7
|
-
}
|
|
8
|
-
export interface IDateRangeOptions {
|
|
9
|
-
class?: string;
|
|
10
|
-
style?: string;
|
|
11
|
-
min: Date;
|
|
12
|
-
max: Date;
|
|
13
|
-
minValue?: Date;
|
|
14
|
-
maxValue?: Date;
|
|
15
|
-
increment: "days" | "weeks" | "month" | "years";
|
|
16
|
-
onChange?: EventHandler<IDateRangeValue> | ((v?: IDateRangeValue) => void);
|
|
17
|
-
}
|
|
18
|
-
export declare class DateRangeComponent implements IJSLComponent {
|
|
19
|
-
State: {
|
|
20
|
-
currentMin: any;
|
|
21
|
-
currentMax: any;
|
|
22
|
-
};
|
|
23
|
-
private manualChange;
|
|
24
|
-
private minDate;
|
|
25
|
-
private maxDate;
|
|
26
|
-
private options;
|
|
27
|
-
private slider;
|
|
28
|
-
constructor(o: IDateRangeOptions);
|
|
29
|
-
render(): IJSLVNode;
|
|
30
|
-
onCreate(node: IJSLVNode): void;
|
|
31
|
-
onRemove(): void;
|
|
32
|
-
getMin(): Date;
|
|
33
|
-
getMax(): Date;
|
|
34
|
-
private triggerChange;
|
|
35
|
-
}
|