jsl-ui 9.4.0 → 9.7.0
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/auto-suggest/AutoSuggestComponent.js +1 -1
- package/lib/components/button/ButtonComponent.js +1 -1
- package/lib/components/checkbox/CheckBoxComponent.js +1 -1
- package/lib/components/date/DateComponent.js +1 -1
- package/lib/components/date-range/DateRangeComponent.js +1 -1
- package/lib/components/dialog/DialogComponent.js +2 -2
- package/lib/components/expander/ExpanderComponent.js +8 -8
- package/lib/components/form-field/FormFieldComponent.js +2 -2
- package/lib/components/grid/GridComponent.js +1 -1
- package/lib/components/input/InputComponent.js +3 -3
- package/lib/components/navigation/NavigationComponent.js +13 -11
- package/lib/components/notification/Notification.js +1 -1
- package/lib/components/number/NumberComponent.js +1 -1
- package/lib/components/progress/ProgressComponent.js +2 -2
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +9 -7
- package/lib/components/select/SelectComponent.js +3 -3
- package/lib/components/select/SelectDDAreaComponent.js +23 -19
- package/lib/components/stack-panel/SplitterComponent.js +1 -1
- package/lib/components/tabs/TabsComponent.d.ts +1 -0
- package/lib/components/tabs/TabsComponent.js +38 -22
- package/lib/components/time/TimeComponent.js +4 -4
- package/lib/components/tree-view/TreeViewComponent.js +1 -1
- package/lib/components/virtual-render/VirtualRenderComponent.js +2 -2
- package/lib/core/culture.js +2 -2
- package/lib/grid/filterDialogs/excelFilter.js +4 -4
- package/lib/grid/slick.editors.date.d.ts +1 -0
- package/lib/grid/slick.editors.date.js +58 -0
- package/lib/grid/slick.formatters.js +1 -1
- package/lib/grid/slick.grid.js +2 -2
- package/lib/grid/slick.groupitemmetadataprovider.d.ts +4 -4
- package/lib/index.js.map +1 -1
- package/lib/interaction/dataconverter.js +1 -0
- package/lib/ui/dialog.d.ts +1 -0
- package/lib/ui/dialog.js +8 -2
- package/package.json +2 -2
|
@@ -15,16 +15,16 @@ import { helper } from "../../core/helper";
|
|
|
15
15
|
import { date } from "../../core/date";
|
|
16
16
|
var TimeComponent = /** @class */ (function () {
|
|
17
17
|
function TimeComponent(options) {
|
|
18
|
-
var _a
|
|
18
|
+
var _a;
|
|
19
19
|
this.options = __assign({
|
|
20
20
|
enabled: true,
|
|
21
21
|
id: helper.newDomGuid(),
|
|
22
22
|
inputMode: "HourMinute",
|
|
23
23
|
bindMode: "toModel",
|
|
24
|
-
placeholder: (
|
|
24
|
+
placeholder: (options === null || options === void 0 ? void 0 : options.inputMode) === "HourMinuteSecond" ? "__:__:__" : "__:__"
|
|
25
25
|
}, options);
|
|
26
26
|
if (this.options.bindTo != null && this.options.bindMode !== "fromModel" && this.options.property != null && this.options.value == null) {
|
|
27
|
-
this.options.value = (((
|
|
27
|
+
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
28
28
|
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
29
29
|
this.options.bindTo[this.options.property]);
|
|
30
30
|
}
|
|
@@ -51,7 +51,7 @@ var TimeComponent = /** @class */ (function () {
|
|
|
51
51
|
id: this.options.id,
|
|
52
52
|
enabled: this.options.enabled,
|
|
53
53
|
value: date.formatTime(val, this.options.inputMode),
|
|
54
|
-
class: "time-comp " + (_b = this.options.class
|
|
54
|
+
class: "time-comp " + ((_b = this.options.class) !== null && _b !== void 0 ? _b : ""),
|
|
55
55
|
style: this.options.style,
|
|
56
56
|
placeholder: this.options.placeholder,
|
|
57
57
|
change: this.raiseChangeEvent
|
|
@@ -9,7 +9,7 @@ var TreeViewComponent = /** @class */ (function () {
|
|
|
9
9
|
TreeViewComponent.prototype.render = function () {
|
|
10
10
|
var _a;
|
|
11
11
|
return {
|
|
12
|
-
tag: "div", attr: { style: this.options.style, class: "treeview-comp hover " + (_a = this.options.class
|
|
12
|
+
tag: "div", attr: { style: this.options.style, class: "treeview-comp hover " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") }, children: [
|
|
13
13
|
{ tag: "ul", children: [this.renderNode(this.options.data)] }
|
|
14
14
|
]
|
|
15
15
|
};
|
|
@@ -43,8 +43,8 @@ var VirtualRenderComponent = /** @class */ (function () {
|
|
|
43
43
|
};
|
|
44
44
|
var vrContainer = {
|
|
45
45
|
tag: "div", attr: {
|
|
46
|
-
class: "v-r-comp " + (_a = o.class
|
|
47
|
-
style: "overflow-y:auto;" + (_b = o.style
|
|
46
|
+
class: "v-r-comp " + ((_a = o.class) !== null && _a !== void 0 ? _a : ""),
|
|
47
|
+
style: "overflow-y:auto;" + ((_b = o.style) !== null && _b !== void 0 ? _b : ""),
|
|
48
48
|
scroll: function (e, node) {
|
|
49
49
|
var newScrollPos = node.dom.scrollTop;
|
|
50
50
|
if (Math.abs(_this.State.scrollPos - newScrollPos) < o.bufferSizeInPx) {
|
package/lib/core/culture.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
var _w = window;
|
|
3
3
|
_w._current_culture = "";
|
|
4
|
-
var culture = (_a = _w._culture
|
|
4
|
+
var culture = (_a = _w._culture) !== null && _a !== void 0 ? _a : {
|
|
5
5
|
info: { thousandSep: ",", decimalSep: ".", dateFormat: "yy-mm-dd", numberFormat: "#,0.####" },
|
|
6
6
|
/**
|
|
7
7
|
* sets a culture
|
|
@@ -377,7 +377,7 @@ var culture = (_a = _w._culture, (_a !== null && _a !== void 0 ? _a : {
|
|
|
377
377
|
// 'zh-cht':['.',',','d/m/yy'],
|
|
378
378
|
'': ['.', ',', 'yy-mm-dd']
|
|
379
379
|
}
|
|
380
|
-
}
|
|
380
|
+
};
|
|
381
381
|
_w._culture = culture;
|
|
382
382
|
/**
|
|
383
383
|
* culture info for date and number formatting and parsing
|
|
@@ -128,13 +128,13 @@ var ExcelFilter = /** @class */ (function () {
|
|
|
128
128
|
if (Array.isArray(values)) {
|
|
129
129
|
for (_a = 0, values_1 = values; _a < values_1.length; _a++) {
|
|
130
130
|
x = values_1[_a];
|
|
131
|
-
sortedValues.push({ id: [x], txt:
|
|
131
|
+
sortedValues.push({ id: [x], txt: x !== null && x !== void 0 ? x : "" });
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
135
|
for (o in values) {
|
|
136
136
|
if (values.hasOwnProperty(o)) {
|
|
137
|
-
sortedValues.push({ id: values[o], txt:
|
|
137
|
+
sortedValues.push({ id: values[o], txt: o !== null && o !== void 0 ? o : "" });
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -194,9 +194,9 @@ var ExcelFilter = /** @class */ (function () {
|
|
|
194
194
|
renderer.render(vr);
|
|
195
195
|
search.addEventListener("input", function (evt) {
|
|
196
196
|
var _a;
|
|
197
|
-
var term = (_a = evt.target.value
|
|
197
|
+
var term = ((_a = evt.target.value) !== null && _a !== void 0 ? _a : "").toLowerCase();
|
|
198
198
|
if (term) {
|
|
199
|
-
visibleValues = sortedValues.filter(function (x) { var _a; return (_a = x.txt
|
|
199
|
+
visibleValues = sortedValues.filter(function (x) { var _a; return ((_a = x.txt) !== null && _a !== void 0 ? _a : "").toLowerCase().indexOf(term) >= 0; });
|
|
200
200
|
}
|
|
201
201
|
else {
|
|
202
202
|
visibleValues = sortedValues;
|
|
@@ -65,3 +65,61 @@ export function DateEditor(args) {
|
|
|
65
65
|
};
|
|
66
66
|
this.init();
|
|
67
67
|
}
|
|
68
|
+
export function TimeEditor(args) {
|
|
69
|
+
var input;
|
|
70
|
+
var defaultValue;
|
|
71
|
+
var scope = this;
|
|
72
|
+
this.init = function () {
|
|
73
|
+
var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
|
|
74
|
+
input = document.createElement("input");
|
|
75
|
+
input.type = "time";
|
|
76
|
+
input.className = "editor-text";
|
|
77
|
+
if (args.column.maxLength > 0) {
|
|
78
|
+
input.maxLength = args.column.maxLength;
|
|
79
|
+
}
|
|
80
|
+
input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
|
|
81
|
+
args.container.appendChild(input);
|
|
82
|
+
input.focus();
|
|
83
|
+
input.select();
|
|
84
|
+
};
|
|
85
|
+
this.destroy = function () {
|
|
86
|
+
input.parentElement.removeChild(input);
|
|
87
|
+
};
|
|
88
|
+
this.focus = function () {
|
|
89
|
+
input.focus();
|
|
90
|
+
};
|
|
91
|
+
this.getValue = function () {
|
|
92
|
+
return input.value;
|
|
93
|
+
};
|
|
94
|
+
this.setValue = function (val) {
|
|
95
|
+
input.value = val;
|
|
96
|
+
};
|
|
97
|
+
this.loadValue = function (item) {
|
|
98
|
+
defaultValue = item[args.column.field] || "";
|
|
99
|
+
input.value = defaultValue;
|
|
100
|
+
input.defaultValue = defaultValue;
|
|
101
|
+
input.select();
|
|
102
|
+
};
|
|
103
|
+
this.serializeValue = function () {
|
|
104
|
+
return input.value;
|
|
105
|
+
};
|
|
106
|
+
this.applyValue = function (item, state) {
|
|
107
|
+
item[args.column.field] = state;
|
|
108
|
+
};
|
|
109
|
+
this.isValueChanged = function () {
|
|
110
|
+
return (!(input.value == "" && defaultValue == null)) && (input.value != defaultValue);
|
|
111
|
+
};
|
|
112
|
+
this.validate = function () {
|
|
113
|
+
if (args.column.validator) {
|
|
114
|
+
var validationResults = args.column.validator(input.value);
|
|
115
|
+
if (!validationResults.valid) {
|
|
116
|
+
return validationResults;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
valid: true,
|
|
121
|
+
msg: null
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
this.init();
|
|
125
|
+
}
|
|
@@ -84,7 +84,7 @@ export var MultiLookupFormatter = function (row, cell, value, columnDef, dataCon
|
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
86
|
var vlList = vl;
|
|
87
|
-
result = vlList.filter(function (x) { return value.indexOf(x.value) >= 0; }).map(function (x) { var _a; return _a = x.text
|
|
87
|
+
result = vlList.filter(function (x) { return value.indexOf(x.value) >= 0; }).map(function (x) { var _a; return (_a = x.text) !== null && _a !== void 0 ? _a : ""; }).join(", ");
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
package/lib/grid/slick.grid.js
CHANGED
|
@@ -81,7 +81,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
81
81
|
editorCellNavOnLRKeys: false,
|
|
82
82
|
doPaging: true,
|
|
83
83
|
resizeDelta: 2,
|
|
84
|
-
dragDelta: 3,
|
|
84
|
+
dragDelta: 3, // NEW
|
|
85
85
|
};
|
|
86
86
|
var columnDefaults = {
|
|
87
87
|
name: "",
|
|
@@ -2816,7 +2816,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2816
2816
|
if (item == null) {
|
|
2817
2817
|
return undefined;
|
|
2818
2818
|
}
|
|
2819
|
-
if (columnDef.field.indexOf(".") > 0) {
|
|
2819
|
+
if (columnDef.field && columnDef.field.indexOf(".") > 0) {
|
|
2820
2820
|
var fields = columnDef.field.split(".");
|
|
2821
2821
|
var result = item;
|
|
2822
2822
|
for (var i = 0; i < fields.length; i++) {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* @param options
|
|
14
14
|
*/
|
|
15
15
|
export declare function GroupItemMetadataProvider(options?: any): {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
init: (grid: any) => void;
|
|
17
|
+
destroy: () => void;
|
|
18
|
+
getGroupRowMetadata: (item: any) => {
|
|
19
19
|
selectable: boolean;
|
|
20
20
|
focusable: any;
|
|
21
21
|
cssClasses: any;
|
|
@@ -28,7 +28,7 @@ export declare function GroupItemMetadataProvider(options?: any): {
|
|
|
28
28
|
};
|
|
29
29
|
height: any;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
getTotalsRowMetadata: (item: any) => {
|
|
32
32
|
selectable: boolean;
|
|
33
33
|
focusable: any;
|
|
34
34
|
cssClasses: any;
|