jsl-ui 9.28.3 → 9.28.4
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/components/IntervalComponent.d.ts +17 -17
- package/lib/components/IntervalComponent.js +65 -65
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +22 -22
- package/lib/components/auto-suggest/AutoSuggestComponent.js +47 -47
- package/lib/components/button/ButtonComponent.d.ts +18 -18
- package/lib/components/button/ButtonComponent.js +29 -29
- package/lib/components/checkbox/CheckBoxComponent.d.ts +28 -28
- package/lib/components/checkbox/CheckBoxComponent.js +81 -81
- package/lib/components/date/DateComponent.d.ts +32 -32
- package/lib/components/date/DateComponent.js +89 -89
- package/lib/components/date-range/DateRangeComponent.d.ts +35 -35
- package/lib/components/date-range/DateRangeComponent.js +121 -123
- package/lib/components/date-time/DateTimeComponent.d.ts +15 -15
- package/lib/components/date-time/DateTimeComponent.js +39 -39
- package/lib/components/dialog/DialogComponent.d.ts +67 -67
- package/lib/components/dialog/DialogComponent.js +192 -198
- package/lib/components/drop-down/DropDownComponent.d.ts +27 -27
- package/lib/components/drop-down/DropDownComponent.js +60 -60
- package/lib/components/expander/ExpanderComponent.d.ts +27 -27
- package/lib/components/expander/ExpanderComponent.js +87 -89
- package/lib/components/form-field/FormComponent.d.ts +12 -12
- package/lib/components/form-field/FormComponent.js +23 -23
- package/lib/components/form-field/FormFieldComponent.d.ts +39 -39
- package/lib/components/form-field/FormFieldComponent.js +138 -138
- package/lib/components/grid/GridComponent.d.ts +26 -26
- package/lib/components/grid/GridComponent.js +110 -110
- package/lib/components/input/InputComponent.d.ts +33 -33
- package/lib/components/input/InputComponent.js +126 -126
- package/lib/components/loading/LoadingComponent.d.ts +8 -8
- package/lib/components/loading/LoadingComponent.js +20 -20
- package/lib/components/navigation/NavigationComponent.d.ts +34 -34
- package/lib/components/navigation/NavigationComponent.js +47 -45
- package/lib/components/notification/Notification.d.ts +19 -19
- package/lib/components/notification/Notification.js +65 -65
- package/lib/components/number/NumberComponent.d.ts +26 -26
- package/lib/components/number/NumberComponent.js +80 -80
- package/lib/components/overlay/OverlayComponent.d.ts +27 -27
- package/lib/components/overlay/OverlayComponent.js +134 -137
- package/lib/components/progress/ProgressComponent.d.ts +18 -18
- package/lib/components/progress/ProgressComponent.js +40 -40
- package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +12 -12
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +23 -23
- package/lib/components/select/SelectComponent.d.ts +79 -79
- package/lib/components/select/SelectComponent.js +352 -356
- package/lib/components/select/SelectDDAreaComponent.d.ts +32 -32
- package/lib/components/select/SelectDDAreaComponent.js +303 -303
- package/lib/components/slider/nouislider.d.ts +44 -44
- package/lib/components/slider/nouislider.js +2158 -2158
- package/lib/components/stack-panel/SplitterComponent.d.ts +21 -21
- package/lib/components/stack-panel/SplitterComponent.js +124 -124
- package/lib/components/stack-panel/StackPanelComponent.d.ts +20 -20
- package/lib/components/stack-panel/StackPanelComponent.js +50 -50
- package/lib/components/tabs/TabsComponent.d.ts +40 -40
- package/lib/components/tabs/TabsComponent.js +191 -200
- package/lib/components/time/TimeComponent.d.ts +29 -29
- package/lib/components/time/TimeComponent.js +102 -104
- package/lib/components/tree-view/TreeViewComponent.d.ts +23 -23
- package/lib/components/tree-view/TreeViewComponent.js +42 -43
- package/lib/components/virtual-render/VirtualRenderComponent.d.ts +30 -30
- package/lib/components/virtual-render/VirtualRenderComponent.js +90 -92
- package/lib/core/culture.d.ts +5 -5
- package/lib/core/culture.js +385 -385
- package/lib/core/date.d.ts +14 -14
- package/lib/core/date.js +346 -346
- package/lib/core/helper.d.ts +13 -13
- package/lib/core/helper.js +100 -100
- package/lib/core/jq.d.ts +37 -37
- package/lib/core/jq.js +362 -362
- package/lib/core/lang.d.ts +24 -24
- package/lib/core/lang.js +24 -24
- package/lib/core/numeric.d.ts +7 -7
- package/lib/core/numeric.js +139 -139
- package/lib/core/polyfills.js +22 -22
- package/lib/core.d.ts +6 -6
- package/lib/core.js +6 -6
- package/lib/grid/filterDialogs/dateRangeFilter.d.ts +7 -7
- package/lib/grid/filterDialogs/dateRangeFilter.js +106 -106
- package/lib/grid/filterDialogs/excelFilter.d.ts +9 -9
- package/lib/grid/filterDialogs/excelFilter.js +250 -250
- package/lib/grid/plugins/ext.overlay.d.ts +2 -2
- package/lib/grid/plugins/ext.overlay.js +295 -295
- package/lib/grid/plugins/slick.cellrangedecorator.d.ts +12 -12
- package/lib/grid/plugins/slick.cellrangedecorator.js +68 -68
- package/lib/grid/plugins/slick.cellrangeselector.d.ts +1 -1
- package/lib/grid/plugins/slick.cellrangeselector.js +144 -144
- package/lib/grid/plugins/slick.cellselectionmodel.d.ts +1 -1
- package/lib/grid/plugins/slick.cellselectionmodel.js +194 -194
- package/lib/grid/plugins/slick.headerbuttons.d.ts +55 -55
- package/lib/grid/plugins/slick.headerbuttons.js +156 -156
- package/lib/grid/plugins/slick.headermenu.d.ts +74 -74
- package/lib/grid/plugins/slick.headermenu.js +260 -260
- package/lib/grid/plugins/slick.rowmovemanager.d.ts +18 -18
- package/lib/grid/plugins/slick.rowmovemanager.js +249 -249
- package/lib/grid/plugins/slick.rowselectionmodel.d.ts +1 -1
- package/lib/grid/plugins/slick.rowselectionmodel.js +167 -167
- package/lib/grid/slick.core.d.ts +91 -91
- package/lib/grid/slick.core.js +574 -574
- package/lib/grid/slick.creator.d.ts +81 -81
- package/lib/grid/slick.creator.js +726 -726
- package/lib/grid/slick.dataview.d.ts +71 -71
- package/lib/grid/slick.dataview.js +1069 -1069
- package/lib/grid/slick.editors.core.d.ts +4 -4
- package/lib/grid/slick.editors.core.js +235 -235
- package/lib/grid/slick.editors.date.d.ts +2 -2
- package/lib/grid/slick.editors.date.js +125 -125
- package/lib/grid/slick.editors.lookup.d.ts +14 -14
- package/lib/grid/slick.editors.lookup.js +352 -352
- package/lib/grid/slick.editors.nav.d.ts +6 -6
- package/lib/grid/slick.editors.nav.js +22 -22
- package/lib/grid/slick.formatters.d.ts +17 -17
- package/lib/grid/slick.formatters.js +144 -144
- package/lib/grid/slick.grid.d.ts +285 -285
- package/lib/grid/slick.grid.js +5409 -5409
- package/lib/grid/slick.groupitemmetadataprovider.d.ts +39 -39
- package/lib/grid/slick.groupitemmetadataprovider.js +165 -165
- package/lib/grid/slick.tree.d.ts +33 -33
- package/lib/grid/slick.tree.js +208 -208
- package/lib/grid.css +705 -1
- package/lib/grid.d.ts +13 -13
- package/lib/grid.js +13 -13
- package/lib/index.css +2195 -8
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +55 -56
- package/lib/index.js +61 -61
- package/lib/index.js.map +1 -1
- package/lib/interaction/dataconverter.d.ts +4 -4
- package/lib/interaction/dataconverter.js +1 -0
- package/lib/interaction/eventhandler.d.ts +13 -13
- package/lib/interaction/eventhandler.js +39 -39
- package/lib/interaction/moveable.d.ts +39 -39
- package/lib/interaction/moveable.js +160 -160
- package/lib/interaction/resizable.d.ts +37 -37
- package/lib/interaction/resizable.js +109 -109
- package/lib/ui/auto.suggest.d.ts +18 -18
- package/lib/ui/auto.suggest.js +244 -244
- package/lib/ui/date.picker/date-picker-options.d.ts +11 -11
- package/lib/ui/date.picker/date-picker-options.js +76 -76
- package/lib/ui/date.picker/lib/date-manip.d.ts +74 -74
- package/lib/ui/date.picker/lib/date-manip.js +120 -120
- package/lib/ui/date.picker/lib/dom.d.ts +23 -23
- package/lib/ui/date.picker/lib/dom.js +28 -28
- package/lib/ui/date.picker/lib/emitter.d.ts +13 -13
- package/lib/ui/date.picker/lib/emitter.js +49 -49
- package/lib/ui/date.picker/lib/fns.d.ts +23 -23
- package/lib/ui/date.picker/lib/fns.js +39 -39
- package/lib/ui/date.picker/mode/base-mode.d.ts +26 -26
- package/lib/ui/date.picker/mode/base-mode.js +248 -248
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +28 -28
- package/lib/ui/date.picker/mode/dropdown-mode.js +50 -50
- package/lib/ui/date.picker/mode/index.d.ts +28 -28
- package/lib/ui/date.picker/mode/index.js +18 -18
- package/lib/ui/date.picker/mode/modal-mode.d.ts +25 -25
- package/lib/ui/date.picker/mode/modal-mode.js +17 -17
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +29 -29
- package/lib/ui/date.picker/mode/permanent-mode.js +19 -19
- package/lib/ui/date.picker/views/day-picker.d.ts +40 -40
- package/lib/ui/date.picker/views/day-picker.js +155 -155
- package/lib/ui/date.picker/views/month-picker.d.ts +26 -26
- package/lib/ui/date.picker/views/month-picker.js +65 -65
- package/lib/ui/date.picker/views/year-picker.d.ts +20 -20
- package/lib/ui/date.picker/views/year-picker.js +66 -66
- package/lib/ui/date.picker.d.ts +66 -66
- package/lib/ui/date.picker.js +32 -32
- package/lib/ui/dialog.d.ts +22 -22
- package/lib/ui/dialog.js +98 -98
- package/lib/ui/drop.down.d.ts +52 -52
- package/lib/ui/drop.down.js +2112 -2112
- package/lib/ui/number.input.d.ts +13 -13
- package/lib/ui/number.input.js +56 -56
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
import { IDropDownOptions, IDropDown } from "../../ui/drop.down";
|
|
3
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
-
import { IDataConverter } from "../../interaction/dataconverter";
|
|
5
|
-
export interface IDropDownComponentOptions<T = any> extends IDropDownOptions {
|
|
6
|
-
class?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
*/
|
|
11
|
-
onSelect?: (value: string | string[]) => void;
|
|
12
|
-
onChange?: EventHandler<string | string[]> | ((value?: string | string[]) => void);
|
|
13
|
-
value?: string | string[];
|
|
14
|
-
bindTo?: T;
|
|
15
|
-
property?: keyof T;
|
|
16
|
-
converter?: IDataConverter<any, string | string[]>;
|
|
17
|
-
enabled?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare class DropDownComponent<T = any> implements IJSLComponent {
|
|
20
|
-
private ref;
|
|
21
|
-
private options;
|
|
22
|
-
constructor(options: IDropDownComponentOptions<T>);
|
|
23
|
-
render(): IJSLVNode;
|
|
24
|
-
getRef(): IDropDown;
|
|
25
|
-
onCreate(node: IJSLVNode): void;
|
|
26
|
-
onRemove(): void;
|
|
27
|
-
}
|
|
1
|
+
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
+
import { IDropDownOptions, IDropDown } from "../../ui/drop.down";
|
|
3
|
+
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
+
import { IDataConverter } from "../../interaction/dataconverter";
|
|
5
|
+
export interface IDropDownComponentOptions<T = any> extends IDropDownOptions {
|
|
6
|
+
class?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated
|
|
10
|
+
*/
|
|
11
|
+
onSelect?: (value: string | string[]) => void;
|
|
12
|
+
onChange?: EventHandler<string | string[]> | ((value?: string | string[]) => void);
|
|
13
|
+
value?: string | string[];
|
|
14
|
+
bindTo?: T;
|
|
15
|
+
property?: keyof T;
|
|
16
|
+
converter?: IDataConverter<any, string | string[]>;
|
|
17
|
+
enabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare class DropDownComponent<T = any> implements IJSLComponent {
|
|
20
|
+
private ref;
|
|
21
|
+
private options;
|
|
22
|
+
constructor(options: IDropDownComponentOptions<T>);
|
|
23
|
+
render(): IJSLVNode;
|
|
24
|
+
getRef(): IDropDown;
|
|
25
|
+
onCreate(node: IJSLVNode): void;
|
|
26
|
+
onRemove(): void;
|
|
27
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { DropDown } from "../../ui/drop.down";
|
|
2
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
3
|
-
export class DropDownComponent {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
var _a;
|
|
6
|
-
this.options = { ...{ enabled: true }, ...options };
|
|
7
|
-
this.options.onChange = EventHandler.Create(this.options.onChange);
|
|
8
|
-
if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
|
|
9
|
-
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
10
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
11
|
-
this.options.bindTo[this.options.property]);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return {
|
|
16
|
-
tag: "select"
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
getRef() {
|
|
20
|
-
return this.ref;
|
|
21
|
-
}
|
|
22
|
-
onCreate(node) {
|
|
23
|
-
this.ref = DropDown(node.dom, this.options);
|
|
24
|
-
if (!this.options.enabled) {
|
|
25
|
-
this.ref.disable();
|
|
26
|
-
}
|
|
27
|
-
node.dom.parentElement.classList.add(this.options.class);
|
|
28
|
-
if (this.options.width) {
|
|
29
|
-
node.dom.parentElement.style.display = "inline-block";
|
|
30
|
-
}
|
|
31
|
-
node.dom.addEventListener("change", (evt) => {
|
|
32
|
-
var _a;
|
|
33
|
-
let value;
|
|
34
|
-
if (this.options.multiple) {
|
|
35
|
-
value = Array.prototype.slice.call(node.dom.querySelectorAll("option:checked"), 0).map((v) => v.value);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
value = node.dom.value;
|
|
39
|
-
}
|
|
40
|
-
if (this.options.bindTo != null && this.options.property != null) {
|
|
41
|
-
this.options.bindTo[this.options.property] =
|
|
42
|
-
((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
|
|
43
|
-
}
|
|
44
|
-
if (this.options.onSelect != null) {
|
|
45
|
-
this.options.onSelect(value);
|
|
46
|
-
}
|
|
47
|
-
if (this.options.onChange != null) {
|
|
48
|
-
this.options.onChange.notify(value);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
if (this.options.value != null) {
|
|
52
|
-
this.ref.setValue(this.options.value);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
onRemove() {
|
|
56
|
-
if (this.ref != null) {
|
|
57
|
-
this.ref.destroy();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
import { DropDown } from "../../ui/drop.down";
|
|
2
|
+
import { EventHandler } from "../../interaction/eventhandler";
|
|
3
|
+
export class DropDownComponent {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
var _a;
|
|
6
|
+
this.options = { ...{ enabled: true }, ...options };
|
|
7
|
+
this.options.onChange = EventHandler.Create(this.options.onChange);
|
|
8
|
+
if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
|
|
9
|
+
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
10
|
+
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
11
|
+
this.options.bindTo[this.options.property]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return {
|
|
16
|
+
tag: "select"
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
getRef() {
|
|
20
|
+
return this.ref;
|
|
21
|
+
}
|
|
22
|
+
onCreate(node) {
|
|
23
|
+
this.ref = DropDown(node.dom, this.options);
|
|
24
|
+
if (!this.options.enabled) {
|
|
25
|
+
this.ref.disable();
|
|
26
|
+
}
|
|
27
|
+
node.dom.parentElement.classList.add(this.options.class);
|
|
28
|
+
if (this.options.width) {
|
|
29
|
+
node.dom.parentElement.style.display = "inline-block";
|
|
30
|
+
}
|
|
31
|
+
node.dom.addEventListener("change", (evt) => {
|
|
32
|
+
var _a;
|
|
33
|
+
let value;
|
|
34
|
+
if (this.options.multiple) {
|
|
35
|
+
value = Array.prototype.slice.call(node.dom.querySelectorAll("option:checked"), 0).map((v) => v.value);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
value = node.dom.value;
|
|
39
|
+
}
|
|
40
|
+
if (this.options.bindTo != null && this.options.property != null) {
|
|
41
|
+
this.options.bindTo[this.options.property] =
|
|
42
|
+
((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
|
|
43
|
+
}
|
|
44
|
+
if (this.options.onSelect != null) {
|
|
45
|
+
this.options.onSelect(value);
|
|
46
|
+
}
|
|
47
|
+
if (this.options.onChange != null) {
|
|
48
|
+
this.options.onChange.notify(value);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
if (this.options.value != null) {
|
|
52
|
+
this.ref.setValue(this.options.value);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
onRemove() {
|
|
56
|
+
if (this.ref != null) {
|
|
57
|
+
this.ref.destroy();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import "./ExpanderStyle.scss";
|
|
2
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
-
export interface IExpanderOptions {
|
|
4
|
-
header: IJSLVNode | string | IJSLComponent;
|
|
5
|
-
body: IJSLVNode | string | IJSLComponent;
|
|
6
|
-
expanded?: boolean;
|
|
7
|
-
onToggle?: (isExpanding: boolean) => void | boolean;
|
|
8
|
-
expandedIcon?: IJSLVNode;
|
|
9
|
-
collapsedIcon?: IJSLVNode;
|
|
10
|
-
isToggleOnHeader?: boolean;
|
|
11
|
-
class?: string;
|
|
12
|
-
style?: string;
|
|
13
|
-
iconSize?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class ExpanderComponent implements IJSLComponent {
|
|
16
|
-
State: {
|
|
17
|
-
expanded: boolean;
|
|
18
|
-
waitingForAnimation: boolean;
|
|
19
|
-
};
|
|
20
|
-
private options;
|
|
21
|
-
constructor(optionsOrHeader: IExpanderOptions | IJSLVNode | string | IJSLComponent, body?: IJSLVNode | string | IJSLComponent, expanded?: boolean);
|
|
22
|
-
getIcon(expanded: boolean): IJSLVNode;
|
|
23
|
-
isEqual(node: IJSLComponent): boolean;
|
|
24
|
-
render(): IJSLVNode;
|
|
25
|
-
private toggleExpand;
|
|
26
|
-
private toNode;
|
|
27
|
-
}
|
|
1
|
+
import "./ExpanderStyle.scss";
|
|
2
|
+
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
+
export interface IExpanderOptions {
|
|
4
|
+
header: IJSLVNode | string | IJSLComponent;
|
|
5
|
+
body: IJSLVNode | string | IJSLComponent;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
onToggle?: (isExpanding: boolean) => void | boolean;
|
|
8
|
+
expandedIcon?: IJSLVNode;
|
|
9
|
+
collapsedIcon?: IJSLVNode;
|
|
10
|
+
isToggleOnHeader?: boolean;
|
|
11
|
+
class?: string;
|
|
12
|
+
style?: string;
|
|
13
|
+
iconSize?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ExpanderComponent implements IJSLComponent {
|
|
16
|
+
State: {
|
|
17
|
+
expanded: boolean;
|
|
18
|
+
waitingForAnimation: boolean;
|
|
19
|
+
};
|
|
20
|
+
private options;
|
|
21
|
+
constructor(optionsOrHeader: IExpanderOptions | IJSLVNode | string | IJSLComponent, body?: IJSLVNode | string | IJSLComponent, expanded?: boolean);
|
|
22
|
+
getIcon(expanded: boolean): IJSLVNode;
|
|
23
|
+
isEqual(node: IJSLComponent): boolean;
|
|
24
|
+
render(): IJSLVNode;
|
|
25
|
+
private toggleExpand;
|
|
26
|
+
private toNode;
|
|
27
|
+
}
|
|
@@ -1,89 +1,87 @@
|
|
|
1
|
-
import "./ExpanderStyle.scss";
|
|
2
|
-
export class ExpanderComponent {
|
|
3
|
-
constructor(optionsOrHeader, body, expanded) {
|
|
4
|
-
var _a;
|
|
5
|
-
this.State = { expanded: false, waitingForAnimation: false };
|
|
6
|
-
if (body != null) {
|
|
7
|
-
// old syntax
|
|
8
|
-
this.options = { header: optionsOrHeader, body, expanded: expanded !== null && expanded !== void 0 ? expanded : true };
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
this.options = optionsOrHeader;
|
|
12
|
-
this.options.expanded = (_a = this.options.expanded) !== null && _a !== void 0 ? _a : true;
|
|
13
|
-
}
|
|
14
|
-
this.State.expanded = this.options.expanded;
|
|
15
|
-
}
|
|
16
|
-
getIcon(expanded) {
|
|
17
|
-
var _a, _b, _c, _d;
|
|
18
|
-
return {
|
|
19
|
-
tag: "span", attr: {
|
|
20
|
-
class: "expand-collapse-icon", style: "padding:0 0.2rem 0 0.2rem;"
|
|
21
|
-
},
|
|
22
|
-
raw: true,
|
|
23
|
-
content: "<svg style='" +
|
|
24
|
-
"min-width:" + ((_a = this.options.iconSize) !== null && _a !== void 0 ? _a : "1.5rem") + "; min-height:" + ((_b = this.options.iconSize) !== null && _b !== void 0 ? _b : "1.5rem") +
|
|
25
|
-
";max-width:" + ((_c = this.options.iconSize) !== null && _c !== void 0 ? _c : "1.5rem") + "; max-height:" + ((_d = this.options.iconSize) !== null && _d !== void 0 ? _d : "1.5rem") + ";' " +
|
|
26
|
-
"xml:space='preserve' width='1024px' height='1024px' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='nonzero' clip-rule='evenodd' viewBox='0 0 10240 10240'>" +
|
|
27
|
-
(expanded
|
|
28
|
-
? "<path id='curve0' fill='#FFFFFF' d='M1273 3989l3621 3620c124,125 328,125 452,0l3621 -3620c124,-125 124,-328 0,-453l-905 -905c-125,-125 -328,-125 -453,0l-2489 2489 -2489 -2489c-125,-125 -328,-125 -453,0l-905 905c-124,125 -124,328 0,453z'/>"
|
|
29
|
-
: "<path id='curve0' fill='#FFFFFF' d='M3989 1273l3620 3621c125,124 125,328 0,452l-3620 3621c-125,124 -328,124 -453,0l-905 -905c-125,-125 -125,-328 0,-453l2489 -2489 -2489 -2489c-125,-125 -125,-328 0,-453l905 -905c125,-124 328,-124 453,0z'/>") +
|
|
30
|
-
"</svg>"
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
isEqual(node) {
|
|
34
|
-
return this.__proto__ === node.__proto__;
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
var _a, _b, _c;
|
|
38
|
-
const animate = this.State.waitingForAnimation;
|
|
39
|
-
this.State.waitingForAnimation = false;
|
|
40
|
-
return {
|
|
41
|
-
tag: "div",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
import "./ExpanderStyle.scss";
|
|
2
|
+
export class ExpanderComponent {
|
|
3
|
+
constructor(optionsOrHeader, body, expanded) {
|
|
4
|
+
var _a;
|
|
5
|
+
this.State = { expanded: false, waitingForAnimation: false };
|
|
6
|
+
if (body != null) {
|
|
7
|
+
// old syntax
|
|
8
|
+
this.options = { header: optionsOrHeader, body, expanded: expanded !== null && expanded !== void 0 ? expanded : true };
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
this.options = optionsOrHeader;
|
|
12
|
+
this.options.expanded = (_a = this.options.expanded) !== null && _a !== void 0 ? _a : true;
|
|
13
|
+
}
|
|
14
|
+
this.State.expanded = this.options.expanded;
|
|
15
|
+
}
|
|
16
|
+
getIcon(expanded) {
|
|
17
|
+
var _a, _b, _c, _d;
|
|
18
|
+
return {
|
|
19
|
+
tag: "span", attr: {
|
|
20
|
+
class: "expand-collapse-icon", style: "padding:0 0.2rem 0 0.2rem;"
|
|
21
|
+
},
|
|
22
|
+
raw: true,
|
|
23
|
+
content: "<svg style='" +
|
|
24
|
+
"min-width:" + ((_a = this.options.iconSize) !== null && _a !== void 0 ? _a : "1.5rem") + "; min-height:" + ((_b = this.options.iconSize) !== null && _b !== void 0 ? _b : "1.5rem") +
|
|
25
|
+
";max-width:" + ((_c = this.options.iconSize) !== null && _c !== void 0 ? _c : "1.5rem") + "; max-height:" + ((_d = this.options.iconSize) !== null && _d !== void 0 ? _d : "1.5rem") + ";' " +
|
|
26
|
+
"xml:space='preserve' width='1024px' height='1024px' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='nonzero' clip-rule='evenodd' viewBox='0 0 10240 10240'>" +
|
|
27
|
+
(expanded
|
|
28
|
+
? "<path id='curve0' fill='#FFFFFF' d='M1273 3989l3621 3620c124,125 328,125 452,0l3621 -3620c124,-125 124,-328 0,-453l-905 -905c-125,-125 -328,-125 -453,0l-2489 2489 -2489 -2489c-125,-125 -328,-125 -453,0l-905 905c-124,125 -124,328 0,453z'/>"
|
|
29
|
+
: "<path id='curve0' fill='#FFFFFF' d='M3989 1273l3620 3621c125,124 125,328 0,452l-3620 3621c-125,124 -328,124 -453,0l-905 -905c-125,-125 -125,-328 0,-453l2489 -2489 -2489 -2489c-125,-125 -125,-328 0,-453l905 -905c125,-124 328,-124 453,0z'/>") +
|
|
30
|
+
"</svg>"
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
isEqual(node) {
|
|
34
|
+
return this.__proto__ === node.__proto__;
|
|
35
|
+
}
|
|
36
|
+
render() {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
const animate = this.State.waitingForAnimation;
|
|
39
|
+
this.State.waitingForAnimation = false;
|
|
40
|
+
return {
|
|
41
|
+
tag: "div", attr: { class: "expander-comp " + (this.options.class || ""), style: (_a = this.options.style) !== null && _a !== void 0 ? _a : "" }, children: [
|
|
42
|
+
{
|
|
43
|
+
tag: "div", attr: {
|
|
44
|
+
class: "header",
|
|
45
|
+
click: (evt) => { var _a; if ((_a = this.options.isToggleOnHeader) !== null && _a !== void 0 ? _a : true) {
|
|
46
|
+
evt.stopPropagation();
|
|
47
|
+
this.toggleExpand();
|
|
48
|
+
} },
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
{
|
|
52
|
+
tag: "span", attr: { class: "toggler", click: (evt) => { evt.stopPropagation(); this.toggleExpand(); } },
|
|
53
|
+
children: [this.State.expanded
|
|
54
|
+
? ((_b = this.options.expandedIcon) !== null && _b !== void 0 ? _b : this.getIcon(true))
|
|
55
|
+
: ((_c = this.options.collapsedIcon) !== null && _c !== void 0 ? _c : this.getIcon(false))
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{ tag: "span", attr: { class: "content" }, children: [this.toNode(this.options.header)] }
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
tag: "div", attr: { class: "body", style: this.State.expanded ? undefined : { display: "none" } },
|
|
63
|
+
animation: (animate ? { attr: "opacity", from: "0", to: "1", duration: 500 } : undefined),
|
|
64
|
+
children: [this.toNode(this.options.body)]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
toggleExpand() {
|
|
70
|
+
const newVal = !this.State.expanded;
|
|
71
|
+
if (this.options.onToggle != null) {
|
|
72
|
+
if (this.options.onToggle(newVal) === false) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (newVal) {
|
|
77
|
+
this.State.waitingForAnimation = true;
|
|
78
|
+
}
|
|
79
|
+
this.State.expanded = newVal;
|
|
80
|
+
}
|
|
81
|
+
toNode(content) {
|
|
82
|
+
if (typeof content === "string") {
|
|
83
|
+
return { tag: "div", content };
|
|
84
|
+
}
|
|
85
|
+
return content;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
export interface IFormComponentOptions {
|
|
3
|
-
class?: string;
|
|
4
|
-
style?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class FormComponent implements IJSLComponent {
|
|
7
|
-
private children;
|
|
8
|
-
private options?;
|
|
9
|
-
constructor(children: Array<IJSLVNode | IJSLComponent>, options?: IFormComponentOptions);
|
|
10
|
-
render(): IJSLVNode;
|
|
11
|
-
validate(): boolean;
|
|
12
|
-
}
|
|
1
|
+
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
+
export interface IFormComponentOptions {
|
|
3
|
+
class?: string;
|
|
4
|
+
style?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class FormComponent implements IJSLComponent {
|
|
7
|
+
private children;
|
|
8
|
+
private options?;
|
|
9
|
+
constructor(children: Array<IJSLVNode | IJSLComponent>, options?: IFormComponentOptions);
|
|
10
|
+
render(): IJSLVNode;
|
|
11
|
+
validate(): boolean;
|
|
12
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export class FormComponent {
|
|
2
|
-
constructor(children, options) {
|
|
3
|
-
this.children = children;
|
|
4
|
-
this.options = options;
|
|
5
|
-
}
|
|
6
|
-
render() {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
return {
|
|
9
|
-
tag: "form",
|
|
10
|
-
attr: { class: (_a = this.options) === null || _a === void 0 ? void 0 : _a.class, style: (_b = this.options) === null || _b === void 0 ? void 0 : _b.style },
|
|
11
|
-
children: this.children
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
validate() {
|
|
15
|
-
let valid = true;
|
|
16
|
-
for (const c of this.children) {
|
|
17
|
-
if (c.validate && !c.validate()) {
|
|
18
|
-
valid = false;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return valid;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
export class FormComponent {
|
|
2
|
+
constructor(children, options) {
|
|
3
|
+
this.children = children;
|
|
4
|
+
this.options = options;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
return {
|
|
9
|
+
tag: "form",
|
|
10
|
+
attr: { class: (_a = this.options) === null || _a === void 0 ? void 0 : _a.class, style: (_b = this.options) === null || _b === void 0 ? void 0 : _b.style },
|
|
11
|
+
children: this.children
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
validate() {
|
|
15
|
+
let valid = true;
|
|
16
|
+
for (const c of this.children) {
|
|
17
|
+
if (c.validate && !c.validate()) {
|
|
18
|
+
valid = false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return valid;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import "./FormFieldStyle.scss";
|
|
2
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
-
import { IDatePickerOptions } from "../../ui/date.picker";
|
|
4
|
-
import { INumberInputOptions } from "../../ui/number.input";
|
|
5
|
-
import { IAutoSuggestOptions } from "../../ui/auto.suggest";
|
|
6
|
-
export interface IFormFieldOptions {
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
id?: string;
|
|
9
|
-
label: string;
|
|
10
|
-
type?: "text" | "password" | "date" | "number" | "autosuggest";
|
|
11
|
-
dateOptions?: IDatePickerOptions;
|
|
12
|
-
numberOptions?: INumberInputOptions;
|
|
13
|
-
autoSuggestOptions?: IAutoSuggestOptions;
|
|
14
|
-
value?: string;
|
|
15
|
-
maxLength?: number;
|
|
16
|
-
class?: string;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
onValidate?: (val: string) => boolean | string;
|
|
19
|
-
onBlur?: (evt: any, input: IJSLVNode) => void;
|
|
20
|
-
onFocus?: (evt: any, input: IJSLVNode) => void;
|
|
21
|
-
onInput?: (evt: any, input: IJSLVNode) => void;
|
|
22
|
-
}
|
|
23
|
-
export declare class FormFieldComponent implements IJSLComponent {
|
|
24
|
-
private options;
|
|
25
|
-
private id;
|
|
26
|
-
private type;
|
|
27
|
-
private datepickerRef;
|
|
28
|
-
private validationMessage;
|
|
29
|
-
constructor(options: IFormFieldOptions);
|
|
30
|
-
render(): IJSLVNode;
|
|
31
|
-
onCreate(node: IJSLVNode): void;
|
|
32
|
-
onRemove(node: IJSLVNode): void;
|
|
33
|
-
validate(): boolean;
|
|
34
|
-
getValue(): string;
|
|
35
|
-
setValue(value: string): void;
|
|
36
|
-
private setInActive;
|
|
37
|
-
private setActive;
|
|
38
|
-
private onInput;
|
|
39
|
-
}
|
|
1
|
+
import "./FormFieldStyle.scss";
|
|
2
|
+
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
3
|
+
import { IDatePickerOptions } from "../../ui/date.picker";
|
|
4
|
+
import { INumberInputOptions } from "../../ui/number.input";
|
|
5
|
+
import { IAutoSuggestOptions } from "../../ui/auto.suggest";
|
|
6
|
+
export interface IFormFieldOptions {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
label: string;
|
|
10
|
+
type?: "text" | "password" | "date" | "number" | "autosuggest";
|
|
11
|
+
dateOptions?: IDatePickerOptions;
|
|
12
|
+
numberOptions?: INumberInputOptions;
|
|
13
|
+
autoSuggestOptions?: IAutoSuggestOptions;
|
|
14
|
+
value?: string;
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
class?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
onValidate?: (val: string) => boolean | string;
|
|
19
|
+
onBlur?: (evt: any, input: IJSLVNode) => void;
|
|
20
|
+
onFocus?: (evt: any, input: IJSLVNode) => void;
|
|
21
|
+
onInput?: (evt: any, input: IJSLVNode) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare class FormFieldComponent implements IJSLComponent {
|
|
24
|
+
private options;
|
|
25
|
+
private id;
|
|
26
|
+
private type;
|
|
27
|
+
private datepickerRef;
|
|
28
|
+
private validationMessage;
|
|
29
|
+
constructor(options: IFormFieldOptions);
|
|
30
|
+
render(): IJSLVNode;
|
|
31
|
+
onCreate(node: IJSLVNode): void;
|
|
32
|
+
onRemove(node: IJSLVNode): void;
|
|
33
|
+
validate(): boolean;
|
|
34
|
+
getValue(): string;
|
|
35
|
+
setValue(value: string): void;
|
|
36
|
+
private setInActive;
|
|
37
|
+
private setActive;
|
|
38
|
+
private onInput;
|
|
39
|
+
}
|