jsl-ui 10.1.0 → 10.2.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.
Files changed (43) hide show
  1. package/docs/DataBinding.md +19 -0
  2. package/docs/DateTimeComponent.md +1 -0
  3. package/docs/GridComponent.md +8 -5
  4. package/docs/InputComponent.md +1 -1
  5. package/docs/README.md +1 -0
  6. package/examples/showcase/checks-and-expanders.ts +2 -17
  7. package/examples/showcase/data-binding.ts +138 -0
  8. package/examples/showcase/dates.ts +6 -16
  9. package/examples/showcase/fields.ts +14 -26
  10. package/examples/showcase/generate-sources.cjs +104 -0
  11. package/examples/showcase/grids.ts +246 -17
  12. package/examples/showcase/index.html +12 -2
  13. package/examples/showcase/selects.ts +6 -8
  14. package/examples/showcase/showcase-sources.ts +95 -0
  15. package/examples/showcase/showcase.css +23 -2
  16. package/examples/showcase/showcase.ts +28 -5
  17. package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +4 -4
  18. package/lib/components/auto-suggest/AutoSuggestComponent.js +1 -1
  19. package/lib/components/checkbox/CheckBoxComponent.d.ts +2 -3
  20. package/lib/components/checkbox/CheckBoxComponent.js +7 -20
  21. package/lib/components/date/DateComponent.d.ts +4 -4
  22. package/lib/components/date/DateComponent.js +11 -27
  23. package/lib/components/date-time/DateTimeComponent.d.ts +4 -4
  24. package/lib/components/date-time/DateTimeComponent.js +21 -32
  25. package/lib/components/input/InputComponent.d.ts +1 -4
  26. package/lib/components/input/InputComponent.js +14 -32
  27. package/lib/components/number/NumberComponent.d.ts +1 -4
  28. package/lib/components/number/NumberComponent.js +11 -29
  29. package/lib/components/select/SelectComponent.d.ts +1 -3
  30. package/lib/components/select/SelectComponent.js +8 -22
  31. package/lib/components/time/TimeComponent.d.ts +4 -3
  32. package/lib/components/time/TimeComponent.js +11 -24
  33. package/lib/grid/filterDialogs/excelFilter.js +12 -10
  34. package/lib/grid/plugins/slick.headermenu.css +98 -101
  35. package/lib/grid/slick-default-theme.css +10 -2
  36. package/lib/grid/slick.grid.css +112 -1
  37. package/lib/grid.css +852 -3392
  38. package/lib/index.css +260 -124
  39. package/lib/index.css.map +1 -1
  40. package/lib/index.js.map +1 -1
  41. package/lib/interaction/data-binding.d.ts +27 -0
  42. package/lib/interaction/data-binding.js +72 -0
  43. package/package.json +3 -1
@@ -3,29 +3,24 @@ import { NumberInput } from "../../ui/number.input";
3
3
  import { numeric } from "../../core/numeric";
4
4
  import { helper } from "../../core/helper";
5
5
  import { EventHandler } from "../../interaction/eventhandler";
6
+ import { DataBinding } from "../../interaction/data-binding";
6
7
  export class NumberComponent {
7
8
  constructor(options) {
8
9
  this.options = { enabled: true, format: "0.###", bindMode: "toModel", ...options };
9
- if (this.hasBinding() && this.options.value == null) {
10
- this.options.value = this.readModel();
11
- }
12
- this.modelValue = this.options.value;
10
+ this.binding = new DataBinding(options);
11
+ this.options.value = this.binding.initialValueOr(this.options.value);
13
12
  this.options.onChange = EventHandler.Create(this.options.onChange);
14
13
  this.id = options.id || helper.newDomGuid();
15
14
  }
16
15
  get onChange() { return this.options.onChange; }
17
16
  render() {
18
17
  var _a, _b;
19
- if (this.options.bindMode !== "toModel" && this.hasBinding()) {
20
- const value = this.readModel();
21
- if (!Object.is(value, this.modelValue)) {
22
- this.options.value = value;
23
- this.modelValue = value;
24
- if (this.currentDom) {
25
- this.currentDom.value = numeric.format(value, this.options.format);
26
- }
18
+ this.binding.sync(value => {
19
+ this.options.value = value;
20
+ if (this.currentDom) {
21
+ this.currentDom.value = numeric.format(value, this.options.format);
27
22
  }
28
- }
23
+ });
29
24
  return {
30
25
  tag: "input", attr: {
31
26
  id: this.id, type: "text", inputmode: (_a = this.options.inputmode) !== null && _a !== void 0 ? _a : "decimal",
@@ -50,32 +45,19 @@ export class NumberComponent {
50
45
  this.currentDom.setCustomValidity("");
51
46
  this.currentDom.removeAttribute("aria-invalid");
52
47
  }
53
- this.writeModel(value);
48
+ this.binding.write(value);
54
49
  }
55
50
  focus() { var _a; (_a = this.currentDom) === null || _a === void 0 ? void 0 : _a.focus(); }
56
- onInit(renderer) { this.renderer = renderer; }
51
+ onInit(renderer) { this.renderer = renderer; this.binding.initialize(); }
57
52
  onCreate(node) {
58
53
  this.currentDom = node.dom;
59
54
  NumberInput(this.currentDom, { ...this.options, onChange: value => {
60
55
  var _a;
61
56
  this.options.value = value;
62
- this.writeModel(value);
57
+ this.binding.write(value);
63
58
  this.onChange.notify(value);
64
59
  (_a = this.renderer) === null || _a === void 0 ? void 0 : _a.refresh();
65
60
  } });
66
61
  }
67
62
  onRemove() { this.currentDom = null; }
68
- hasBinding() { return this.options.bindTo != null && this.options.property != null; }
69
- readModel() {
70
- var _a;
71
- const value = this.options.bindTo[this.options.property];
72
- return ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ? this.options.converter.toUI(value) : value;
73
- }
74
- writeModel(value) {
75
- var _a;
76
- if (this.hasBinding() && this.options.bindMode !== "fromModel") {
77
- this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
78
- this.modelValue = value;
79
- }
80
- }
81
63
  }
@@ -66,6 +66,7 @@ export declare class SelectComponent<T = any, TValue = any, TBinding = any> impl
66
66
  private dropdownComponent;
67
67
  private focused;
68
68
  private selected;
69
+ private binding;
69
70
  private listId;
70
71
  private focusFrame;
71
72
  private dropdownLimit;
@@ -94,9 +95,6 @@ export declare class SelectComponent<T = any, TValue = any, TBinding = any> impl
94
95
  focus(): void;
95
96
  hasSelection(): boolean;
96
97
  protected renderSelection(): IJSLVNode;
97
- private hasBinding;
98
- private readModel;
99
- private writeModel;
100
98
  private selectValue;
101
99
  private refresh;
102
100
  private focusWithoutOpening;
@@ -2,10 +2,11 @@ import "./SelectStyle.scss";
2
2
  import { JSLRender } from "jsl-render";
3
3
  import { SelectDDAreaComponent } from "./SelectDDAreaComponent";
4
4
  import { EventHandler } from "../../interaction/eventhandler";
5
+ import { DataBinding } from "../../interaction/data-binding";
5
6
  import { helper } from "../../core/helper";
6
7
  export class SelectComponent {
7
8
  constructor(o) {
8
- var _a, _b;
9
+ var _a;
9
10
  this.expanded = false;
10
11
  this.suppressOpenOnFocus = false;
11
12
  this.listId = helper.newDomGuid();
@@ -69,15 +70,12 @@ export class SelectComponent {
69
70
  };
70
71
  this.options.rowHeight = Math.max(1, this.options.rowHeight);
71
72
  this.options.onChange = EventHandler.Create(o.onChange);
72
- const value = (_b = o.value) !== null && _b !== void 0 ? _b : (this.hasBinding() ? this.readModel() : null);
73
- this.selectValue(value);
74
- this.writeModel(value);
73
+ this.binding = new DataBinding(o);
74
+ this.selectValue(this.binding.initialValueOr(o.value));
75
75
  }
76
76
  render() {
77
77
  var _a, _b, _c, _d, _e;
78
- if (this.options.bindMode !== "toModel" && this.hasBinding()) {
79
- this.selectValue(this.readModel());
80
- }
78
+ this.binding.sync(value => this.selectValue(value));
81
79
  const label = (_c = (_b = (_a = this.options.ariaLabel) !== null && _a !== void 0 ? _a : this.options.placeholder) !== null && _b !== void 0 ? _b : this.options.placehoder) !== null && _c !== void 0 ? _c : "Select an option";
82
80
  return {
83
81
  tag: "div", attr: {
@@ -138,7 +136,7 @@ export class SelectComponent {
138
136
  }
139
137
  onCreate(node) { this.dom = node.dom; this.disposed = false; }
140
138
  onUpdate(node) { this.dom = node.dom; }
141
- onInit(renderer) { this.renderer = renderer; }
139
+ onInit(renderer) { this.renderer = renderer; this.binding.initialize(); }
142
140
  onRemove() { this.disposed = true; this.destroy(); }
143
141
  toggle() { if (this.expanded) {
144
142
  this.close();
@@ -248,7 +246,7 @@ export class SelectComponent {
248
246
  /** Changes selection and the bound model without raising onChange. */
249
247
  setValue(value) {
250
248
  this.selectValue(value);
251
- this.writeModel(value);
249
+ this.binding.write(value);
252
250
  this.refresh();
253
251
  }
254
252
  getSelected() { return this.selected; }
@@ -262,7 +260,7 @@ export class SelectComponent {
262
260
  this.selected = item;
263
261
  }
264
262
  const value = this.getValue();
265
- this.writeModel(value);
263
+ this.binding.write(value);
266
264
  this.options.onChange.notify(value, this.selected);
267
265
  this.refresh();
268
266
  }
@@ -316,18 +314,6 @@ export class SelectComponent {
316
314
  }
317
315
  return node;
318
316
  }
319
- hasBinding() { return this.options.bindTo != null && this.options.property != null; }
320
- readModel() {
321
- var _a;
322
- const value = this.options.bindTo[this.options.property];
323
- return ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ? this.options.converter.toUI(value) : value;
324
- }
325
- writeModel(value) {
326
- var _a;
327
- if (this.hasBinding() && this.options.bindMode !== "fromModel") {
328
- this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
329
- }
330
- }
331
317
  selectValue(value) {
332
318
  var _a;
333
319
  if (value == null) {
@@ -20,15 +20,16 @@ export interface ITimeComponentOptions<T> {
20
20
  export declare class TimeComponent<T = any> implements IJSLComponent {
21
21
  private options;
22
22
  private currentDom;
23
- private modelValue;
23
+ private binding;
24
24
  constructor(options: ITimeComponentOptions<T>);
25
25
  render(): IJSLVNode;
26
+ onInit(): void;
26
27
  onCreate(node: IJSLVNode): void;
27
28
  onUpdate(node: IJSLVNode): void;
28
29
  getValue(): string;
29
30
  getValueAsDate(datePart: Date): Date;
30
- /** Updates the input without raising onChange. */
31
+ /** Updates the input and writable binding without raising onChange. */
31
32
  setValue(value: Date): void;
32
- private readModel;
33
+ private applyValue;
33
34
  private raiseChangeEvent;
34
35
  }
@@ -1,30 +1,22 @@
1
1
  import "./TimeComponent.scss";
2
2
  import { EventHandler } from "../../interaction/eventhandler";
3
+ import { DataBinding } from "../../interaction/data-binding";
3
4
  import { helper } from "../../core/helper";
4
5
  import { date } from "../../core/date";
5
6
  export class TimeComponent {
6
7
  constructor(options) {
7
- var _a;
8
8
  this.options = {
9
9
  enabled: true, id: helper.newDomGuid(), inputMode: "HourMinute", bindMode: "toModel",
10
10
  placeholder: (options === null || options === void 0 ? void 0 : options.inputMode) === "HourMinuteSecond" ? "HH:MM:SS" : "HH:MM",
11
11
  ...options
12
12
  };
13
- if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
14
- this.options.value = this.readModel();
15
- }
16
- this.modelValue = (_a = this.options.value) === null || _a === void 0 ? void 0 : _a.getTime();
13
+ this.binding = new DataBinding(options);
14
+ this.options.value = this.binding.initialValueOr(this.options.value);
17
15
  this.options.onChange = EventHandler.Create(this.options.onChange);
18
16
  }
19
17
  render() {
20
18
  var _a;
21
- if (this.options.bindMode !== "toModel" && this.options.bindTo != null && this.options.property != null) {
22
- const value = this.readModel();
23
- if ((value === null || value === void 0 ? void 0 : value.getTime()) !== this.modelValue) {
24
- this.setValue(value);
25
- this.modelValue = value === null || value === void 0 ? void 0 : value.getTime();
26
- }
27
- }
19
+ this.binding.sync(value => this.applyValue(value));
28
20
  return {
29
21
  tag: "input", attr: {
30
22
  id: this.options.id, type: "text", inputmode: "numeric", autocomplete: "off",
@@ -37,6 +29,7 @@ export class TimeComponent {
37
29
  }
38
30
  };
39
31
  }
32
+ onInit() { this.binding.initialize(); }
40
33
  onCreate(node) { this.currentDom = node.dom; }
41
34
  onUpdate(node) { this.currentDom = node.dom; }
42
35
  getValue() {
@@ -55,8 +48,12 @@ export class TimeComponent {
55
48
  value.setHours(+parts[1], +parts[2], +((_b = parts[3]) !== null && _b !== void 0 ? _b : 0), 0);
56
49
  return isNaN(value.getTime()) ? null : value;
57
50
  }
58
- /** Updates the input without raising onChange. */
51
+ /** Updates the input and writable binding without raising onChange. */
59
52
  setValue(value) {
53
+ this.applyValue(value);
54
+ this.binding.write(value);
55
+ }
56
+ applyValue(value) {
60
57
  this.options.value = value ? new Date(value.getTime()) : null;
61
58
  if (this.currentDom) {
62
59
  this.currentDom.value = date.formatTime(value, this.options.inputMode);
@@ -64,13 +61,7 @@ export class TimeComponent {
64
61
  this.currentDom.removeAttribute("aria-invalid");
65
62
  }
66
63
  }
67
- readModel() {
68
- var _a;
69
- const value = this.options.bindTo[this.options.property];
70
- return ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ? this.options.converter.toUI(value) : value;
71
- }
72
64
  raiseChangeEvent(e, node) {
73
- var _a;
74
65
  if (!this.options.enabled) {
75
66
  return;
76
67
  }
@@ -84,11 +75,7 @@ export class TimeComponent {
84
75
  }
85
76
  this.currentDom.removeAttribute("aria-invalid");
86
77
  this.options.value = value;
87
- if (this.options.bindTo != null && this.options.bindMode !== "fromModel" && this.options.property != null) {
88
- this.options.bindTo[this.options.property] =
89
- ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
90
- this.modelValue = value === null || value === void 0 ? void 0 : value.getTime();
91
- }
78
+ this.binding.write(value);
92
79
  this.options.onChange.notify(value);
93
80
  }
94
81
  }
@@ -46,8 +46,8 @@ export class ExcelFilter {
46
46
  }
47
47
  }
48
48
  const dlg = document.createElement("div");
49
- dlg.classList.add("jsl-dialog-overlay");
50
- dlg.innerHTML = '<div class="jsl-dialog" style="width:50vw;min-height:50vh;"><div class="dlg-header">' + UILang.grid.Filter + '</div><div class="dlg-body" style="max-height:calc(100vh - 7.5rem)"></div>' +
49
+ dlg.classList.add("jsl-dialog-overlay", "jsl-grid-filter-overlay");
50
+ dlg.innerHTML = '<div class="jsl-dialog jsl-grid-filter-dialog"><div class="dlg-header">' + UILang.grid.Filter + '</div><div class="dlg-body jsl-grid-filter-body"></div>' +
51
51
  '<div class="dlg-footer">' +
52
52
  '<button class="jsl-button ok-button">' + UILang.core.Ok + "</button>" +
53
53
  (currentFilters.length > 0 ? ('<button class="jsl-button clear-button">' + UILang.grid.ClearFilter + '</button>') : "") +
@@ -56,9 +56,11 @@ export class ExcelFilter {
56
56
  const dlgBody = dlg.querySelector(".dlg-body");
57
57
  const id = helper.newDomGuid();
58
58
  const search = document.createElement("div");
59
+ search.classList.add("jsl-grid-filter-search");
59
60
  search.innerHTML = "<input type='text' placeholder='" + UILang.grid.Search + "' />";
60
61
  dlgBody.appendChild(search);
61
62
  const cbAllContainer = document.createElement("div");
63
+ cbAllContainer.classList.add("jsl-grid-filter-all");
62
64
  const cbAll = document.createElement("input");
63
65
  cbAll.type = "checkbox";
64
66
  cbAll.id = id;
@@ -93,17 +95,16 @@ export class ExcelFilter {
93
95
  let visibleValues = sortedValues;
94
96
  const checkedValues = { ...oldCheckedValues };
95
97
  const cbContainer = document.createElement("div");
98
+ cbContainer.classList.add("jsl-grid-filter-values");
96
99
  dlgBody.appendChild(cbContainer);
97
- const rowHeight = /*this.grid.getOptions().rowHeight ||*/ Math.round(ExcelFilter.convertRemToPixels(1.5));
98
- let height = sortedValues.length * rowHeight;
99
- height = Math.min(height, Math.round(window.innerHeight - ExcelFilter.convertRemToPixels(13)));
100
+ const rowHeight = Math.round(ExcelFilter.convertRemToPixels(1.75));
101
+ const maxHeight = Math.max(rowHeight, Math.round(window.innerHeight - ExcelFilter.convertRemToPixels(19)));
102
+ const height = Math.min(sortedValues.length * rowHeight, maxHeight);
100
103
  const vr = new VirtualRenderComponent({
101
104
  data: visibleValues,
102
105
  renderRow: (args) => {
103
- args.container.attr.style["padding-left"] = "1rem";
104
- args.container.attr.style["overflow"] = "hidden";
105
- args.container.attr.style["display"] = "flex";
106
- args.container.attr.style["align-items"] = "center";
106
+ var _a;
107
+ args.container.attr.class = "jsl-grid-filter-value-row";
107
108
  args.container.children.push({
108
109
  tag: "input",
109
110
  attr: {
@@ -132,7 +133,8 @@ export class ExcelFilter {
132
133
  tag: "label",
133
134
  attr: {
134
135
  for: id + "_" + args.index,
135
- style: "margin-left:0.2rem;cursor:pointer"
136
+ class: "jsl-grid-filter-value-label",
137
+ title: String((_a = args.rowData.txt) !== null && _a !== void 0 ? _a : "")
136
138
  },
137
139
  raw: true,
138
140
  content: args.rowData.txt
@@ -1,101 +1,98 @@
1
- /* Menu button */
2
- .slick-header-menubutton {
3
- position: absolute;
4
- right: 0;
5
- top: 0;
6
- bottom: 0;
7
- width: 14px;
8
- background-repeat: no-repeat;
9
- background-position: left center;
10
- background-image: url('data:image/gif;base64,R0lGODlhDgAOAIABADtKYwAAACH5BAEAAAEALAAAAAAOAA4AAAISjI+py+0PHZgUsGobhTn6DxoFADs=');
11
- cursor: pointer;
12
-
13
- display: none;
14
- border-left: thin ridge silver;
15
- }
16
-
17
- .slick-header-menubutton.resize-offset {
18
- right: 0.5rem;
19
- }
20
-
21
- .slick-header-column:hover > .slick-header-menubutton,
22
- .slick-header-column-active .slick-header-menubutton {
23
- display: inline-block;
24
- }
25
-
26
- /* Menu */
27
- .slick-header-menu {
28
- position: absolute;
29
- display: inline-block;
30
- margin: 0;
31
- padding: 2px;
32
- cursor: default;
33
- }
34
-
35
-
36
- /* Menu items */
37
- .slick-header-menuitem {
38
- list-style: none;
39
- margin: 0;
40
- padding: 0;
41
- cursor: pointer;
42
- }
43
-
44
- .slick-header-menuicon {
45
- display: inline-block;
46
- width: 16px;
47
- height: 16px;
48
- vertical-align: middle;
49
- margin-right: 4px;
50
- background-repeat: no-repeat;
51
- background-position: center center;
52
- }
53
-
54
- .slick-header-menucontent {
55
- display: inline-block;
56
- vertical-align: middle;
57
- }
58
-
59
-
60
- /* Disabled */
61
- .slick-header-menuitem-disabled {
62
- color: silver;
63
- }
64
-
65
- /* Divider */
66
- .slick-header-menuitem.slick-header-menuitem-divider {
67
- cursor: default;
68
- border: none;
69
- overflow: hidden;
70
- padding: 0;
71
- height: 1px;
72
- margin: 8px 2px;
73
- background-color: #cecece;
74
- }
75
- .slick-header-menuitem-divider.slick-header-menuitem:hover {
76
- background-color: #cecece;
77
- }
78
-
79
- .slick-header-menu {
80
- border: 1px solid #bebebe;
81
- background: #ffffff;
82
- padding: 2px;
83
- box-shadow: 2px 2px 2px silver;
84
- z-index: 20;
85
- }
86
-
87
-
88
- .slick-header-menuitem {
89
- padding: 2px 4px;
90
- border-radius: 3px;
91
- }
92
-
93
- .slick-header-menuitem:hover {
94
- background: #3B99FF;
95
- color:white;
96
- }
97
-
98
- .slick-header-menuitem-disabled {
99
- border-color: transparent !important;
100
- background: inherit !important;
101
- }
1
+ /* Menu button */
2
+ .slick-header-menubutton {
3
+ position: absolute;
4
+ right: 0;
5
+ top: 0;
6
+ bottom: 0;
7
+ width: 14px;
8
+ background-repeat: no-repeat;
9
+ background-position: left center;
10
+ background-image: url('data:image/gif;base64,R0lGODlhDgAOAIABADtKYwAAACH5BAEAAAEALAAAAAAOAA4AAAISjI+py+0PHZgUsGobhTn6DxoFADs=');
11
+ cursor: pointer;
12
+
13
+ display: none;
14
+ border-left: thin ridge silver;
15
+ }
16
+
17
+ .slick-header-menubutton.resize-offset {
18
+ right: 0.5rem;
19
+ }
20
+
21
+ .slick-header-column:hover > .slick-header-menubutton,
22
+ .slick-header-column-active .slick-header-menubutton {
23
+ display: inline-block;
24
+ }
25
+
26
+ /* Menu */
27
+ .slick-header-menu {
28
+ position: absolute;
29
+ display: inline-block;
30
+ margin: 0;
31
+ padding: 2px;
32
+ cursor: default;
33
+ }
34
+
35
+ /* Menu items */
36
+ .slick-header-menuitem {
37
+ list-style: none;
38
+ margin: 0;
39
+ padding: 0;
40
+ cursor: pointer;
41
+ }
42
+
43
+ .slick-header-menuicon {
44
+ display: inline-block;
45
+ width: 16px;
46
+ height: 16px;
47
+ vertical-align: middle;
48
+ margin-right: 4px;
49
+ background-repeat: no-repeat;
50
+ background-position: center center;
51
+ }
52
+
53
+ .slick-header-menucontent {
54
+ display: inline-block;
55
+ vertical-align: middle;
56
+ }
57
+
58
+ /* Disabled */
59
+ .slick-header-menuitem-disabled {
60
+ color: silver;
61
+ }
62
+
63
+ /* Divider */
64
+ .slick-header-menuitem.slick-header-menuitem-divider {
65
+ cursor: default;
66
+ border: none;
67
+ overflow: hidden;
68
+ padding: 0;
69
+ height: 1px;
70
+ margin: 8px 2px;
71
+ background-color: #cecece;
72
+ }
73
+ .slick-header-menuitem-divider.slick-header-menuitem:hover {
74
+ background-color: #cecece;
75
+ }
76
+
77
+ .slick-header-menu {
78
+ border: 1px solid #bebebe;
79
+ background: #ffffff;
80
+ padding: 2px;
81
+ box-shadow: 2px 2px 2px silver;
82
+ z-index: 20;
83
+ }
84
+
85
+ .slick-header-menuitem {
86
+ padding: 2px 4px;
87
+ border-radius: 3px;
88
+ }
89
+
90
+ .slick-header-menuitem:hover {
91
+ background: var(--jsl-color-accent);
92
+ color: var(--jsl-color-on-accent);
93
+ }
94
+
95
+ .slick-header-menuitem-disabled {
96
+ border-color: transparent !important;
97
+ background: inherit !important;
98
+ }
@@ -204,11 +204,17 @@ classes should alter those!
204
204
  .slickgrid .tabular-nums { font-variant-numeric: tabular-nums; }
205
205
 
206
206
  /* Override the legacy float rules that otherwise defeat header text alignment. */
207
+ .slick-header-column { --jsl-grid-header-controls-width: 0px; }
208
+ .slick-header-column.resizable { --jsl-grid-header-controls-width: .5rem; }
209
+ .slick-header-column:has(> .slick-header-menubutton) { --jsl-grid-header-controls-width: 14px; }
210
+ .slick-header-column.resizable:has(> .slick-header-menubutton) { --jsl-grid-header-controls-width: calc(14px + .5rem); }
211
+ .js-touch .slick-header-column.resizable { --jsl-grid-header-controls-width: 1.2rem; }
212
+ .js-touch .slick-header-column.resizable:has(> .slick-header-menubutton) { --jsl-grid-header-controls-width: 2.4rem; }
207
213
  .slick-header-column .slick-column-name {
208
214
  float: none;
209
215
  margin-bottom: 0;
210
216
  display: inline-block;
211
- max-width: 100%;
217
+ max-width: max(0px, calc(100% - var(--jsl-grid-header-controls-width)));
212
218
  max-height: 2.4em;
213
219
  overflow: hidden;
214
220
  text-overflow: ellipsis;
@@ -216,7 +222,9 @@ classes should alter those!
216
222
  line-height: 1.2;
217
223
  vertical-align: middle;
218
224
  }
219
- .slick-header-sortable .slick-column-name { max-width: calc(100% - 1.25rem); }
225
+ .slick-header-column.right .slick-column-name,
226
+ .slick-header-column.center .slick-column-name { margin-right: var(--jsl-grid-header-controls-width); }
227
+ .slick-header-sortable .slick-column-name { max-width: max(0px, calc(100% - var(--jsl-grid-header-controls-width) - 1.875rem)); }
220
228
  .slick-header-column .slick-sort-indicator,
221
229
  .slick-header-column .slick-sort-indicator-numbered {
222
230
  display: inline-block;