jsl-ui 9.3.2 → 9.6.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.d.ts +1 -0
- package/lib/components/form-field/FormFieldComponent.js +3 -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.js +24 -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.d.ts +1 -0
- package/lib/grid/slick.grid.js +5 -5
- 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
|
@@ -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.d.ts
CHANGED
|
@@ -244,5 +244,6 @@ export interface ISlickGrid<T> {
|
|
|
244
244
|
commitCurrentEdit: () => boolean;
|
|
245
245
|
cancelCurrentEdit: () => boolean;
|
|
246
246
|
};
|
|
247
|
+
"resetActiveCell": () => void;
|
|
247
248
|
}
|
|
248
249
|
export declare function SlickGrid(container: HTMLDivElement | string, data: any, columns: ISlickColumn[], options: ISlickGridOptions): void;
|
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: "",
|
|
@@ -2866,7 +2866,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2866
2866
|
}
|
|
2867
2867
|
}
|
|
2868
2868
|
// do not render cells outside of the viewport.
|
|
2869
|
-
if (columnPosRight[Math.min(ii - 1, i + colspan - 1)] > range.leftPx) {
|
|
2869
|
+
if (columnPosRight[Math.min(ii - 1, i + colspan - 1)] > range.leftPx || m.alwaysRenderColumn) {
|
|
2870
2870
|
if (!m.alwaysRenderColumn && columnPosLeft[i] > range.rightPx) {
|
|
2871
2871
|
// all columns to the right are outside the range.
|
|
2872
2872
|
break;
|
|
@@ -2878,9 +2878,9 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
2878
2878
|
html.L += appendCellHtml(row, i, colspan, d);
|
|
2879
2879
|
}
|
|
2880
2880
|
}
|
|
2881
|
-
else if (m.alwaysRenderColumn || (hasFrozenColumns() && i <= options.frozenColumn)) {
|
|
2882
|
-
|
|
2883
|
-
}
|
|
2881
|
+
// else if (m.alwaysRenderColumn || (hasFrozenColumns() && i <= options.frozenColumn)) {
|
|
2882
|
+
// html.L += appendCellHtml(row, i, colspan, d);
|
|
2883
|
+
// }
|
|
2884
2884
|
if (colspan > 1) {
|
|
2885
2885
|
i += (colspan - 1);
|
|
2886
2886
|
}
|
|
@@ -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;
|