jsl-ui 9.28.7 → 10.0.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/docs/AutoSuggestComponent.md +17 -0
- package/docs/ButtonComponent.md +14 -0
- package/docs/CheckBoxComponent.md +12 -0
- package/docs/DateComponent.md +12 -0
- package/docs/DateRangeComponent.md +13 -0
- package/docs/DateTimeComponent.md +13 -0
- package/docs/DialogComponent.md +15 -0
- package/docs/ExpanderComponent.md +13 -0
- package/docs/FormComponent.md +15 -0
- package/docs/FormFieldComponent.md +15 -0
- package/docs/GridComponent.md +19 -0
- package/docs/InputComponent.md +15 -0
- package/docs/IntervalComponent.md +13 -0
- package/docs/LoadingComponent.md +12 -0
- package/docs/NavigationComponent.md +17 -0
- package/docs/Notification.md +14 -0
- package/docs/NotificationComponent.md +13 -0
- package/docs/NumberComponent.md +12 -0
- package/docs/OverlayComponent.md +12 -0
- package/docs/ProgressComponent.md +12 -0
- package/docs/README.md +24 -0
- package/docs/RibbonMenuComponent.md +14 -0
- package/docs/SelectComponent.md +15 -0
- package/docs/SplitterComponent.md +14 -0
- package/docs/StackPanelComponent.md +13 -0
- package/docs/TabsComponent.md +16 -0
- package/docs/TimeComponent.md +13 -0
- package/docs/TreeViewComponent.md +16 -0
- package/examples/showcase/checks-and-expanders.ts +163 -0
- package/examples/showcase/cultures.ts +39 -0
- package/examples/showcase/dates.ts +182 -0
- package/examples/showcase/dialogs.ts +184 -0
- package/examples/showcase/feedback-and-navigation.ts +174 -0
- package/examples/showcase/fields.ts +178 -0
- package/examples/showcase/fonts/Jost-Variable.ttf +0 -0
- package/examples/showcase/fonts/OFL-Jost.txt +93 -0
- package/examples/showcase/grids.ts +150 -0
- package/examples/showcase/index.html +60 -0
- package/examples/showcase/layout-and-navigation.ts +47 -0
- package/examples/showcase/nivona.css +98 -0
- package/examples/showcase/selects.ts +158 -0
- package/examples/showcase/showcase.css +231 -0
- package/examples/showcase/showcase.ts +214 -0
- package/examples/showcase/tabs.ts +161 -0
- package/examples/showcase/themes.css +83 -0
- package/examples/showcase/themes.ts +54 -0
- package/lib/components/IntervalComponent.d.ts +5 -0
- package/lib/components/IntervalComponent.js +29 -13
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +11 -9
- package/lib/components/auto-suggest/AutoSuggestComponent.js +25 -38
- package/lib/components/button/ButtonComponent.d.ts +30 -1
- package/lib/components/button/ButtonComponent.js +85 -4
- package/lib/components/checkbox/CheckBoxComponent.d.ts +11 -1
- package/lib/components/checkbox/CheckBoxComponent.js +66 -56
- package/lib/components/checkbox/CheckBoxStyle.scss +72 -85
- package/lib/components/date/DateComponent.d.ts +10 -0
- package/lib/components/date/DateComponent.js +92 -44
- package/lib/components/date-range/DateRangeComponent.d.ts +14 -3
- package/lib/components/date-range/DateRangeComponent.js +96 -86
- package/lib/components/date-range/DateRangeStyle.scss +35 -11
- package/lib/components/date-time/DateTimeComponent.d.ts +8 -0
- package/lib/components/date-time/DateTimeComponent.js +64 -23
- package/lib/components/date-time/DateTimeStyle.scss +10 -7
- package/lib/components/dialog/DialogComponent.d.ts +21 -7
- package/lib/components/dialog/DialogComponent.js +179 -122
- package/lib/components/expander/ExpanderComponent.d.ts +15 -1
- package/lib/components/expander/ExpanderComponent.js +85 -64
- package/lib/components/expander/ExpanderStyle.scss +61 -47
- package/lib/components/form-field/FormFieldComponent.d.ts +45 -15
- package/lib/components/form-field/FormFieldComponent.js +249 -96
- package/lib/components/form-field/FormFieldStyle.scss +36 -87
- package/lib/components/form-field/create-control.d.ts +7 -0
- package/lib/components/form-field/create-control.js +48 -0
- package/lib/components/input/InputComponent.d.ts +18 -1
- package/lib/components/input/InputComponent.js +68 -93
- package/lib/components/loading/LoadingComponent.d.ts +9 -2
- package/lib/components/loading/LoadingComponent.js +13 -12
- package/lib/components/loading/LoadingStyle.css +19 -29
- package/lib/components/navigation/NavigationComponent.d.ts +34 -10
- package/lib/components/navigation/NavigationComponent.js +261 -33
- package/lib/components/navigation/NavigationStyle.scss +62 -226
- package/lib/components/notification/Notification.d.ts +37 -4
- package/lib/components/notification/Notification.js +160 -41
- package/lib/components/notification/Notification.scss +103 -19
- package/lib/components/number/NumberComponent.d.ts +16 -2
- package/lib/components/number/NumberComponent.js +54 -53
- package/lib/components/overlay/OverlayComponent.d.ts +13 -7
- package/lib/components/overlay/OverlayComponent.js +46 -114
- package/lib/components/overlay/overlay.css +18 -57
- package/lib/components/progress/ProgressComponent.d.ts +1 -0
- package/lib/components/progress/ProgressComponent.js +6 -6
- package/lib/components/progress/ProgressStyle.scss +5 -15
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +2 -2
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +6 -76
- package/lib/components/select/SelectComponent.d.ts +33 -3
- package/lib/components/select/SelectComponent.js +312 -278
- package/lib/components/select/SelectDDAreaComponent.d.ts +13 -7
- package/lib/components/select/SelectDDAreaComponent.js +215 -256
- package/lib/components/select/SelectStyle.scss +204 -186
- package/lib/components/slider/nouislider.css +40 -54
- package/lib/components/stack-panel/SplitterComponent.d.ts +19 -3
- package/lib/components/stack-panel/SplitterComponent.js +94 -111
- package/lib/components/stack-panel/SplitterStyle.scss +9 -45
- package/lib/components/stack-panel/StackPanelComponent.js +3 -3
- package/lib/components/stack-panel/StackPanelStyle.scss +10 -52
- package/lib/components/tabs/TabsComponent.d.ts +17 -1
- package/lib/components/tabs/TabsComponent.js +247 -123
- package/lib/components/tabs/TabsStyle.scss +138 -75
- package/lib/components/time/TimeComponent.d.ts +5 -0
- package/lib/components/time/TimeComponent.js +61 -69
- package/lib/components/time/TimeComponent.scss +4 -4
- package/lib/components/tree-view/TreeViewComponent.d.ts +10 -4
- package/lib/components/tree-view/TreeViewComponent.js +65 -32
- package/lib/components/tree-view/TreeViewStyle.scss +12 -96
- package/lib/core/date.d.ts +2 -0
- package/lib/core/date.js +6 -0
- package/lib/core/jq.js +11 -8
- package/lib/grid/slick-default-theme.css +107 -31
- package/lib/grid/slick.creator.js +23 -5
- package/lib/grid/slick.formatters.js +4 -3
- package/lib/grid/slick.grid.css +38 -26
- package/lib/grid/slick.grid.d.ts +1 -0
- package/lib/grid/slick.grid.js +2 -3
- package/lib/grid.css +3413 -454
- package/lib/index.css +2500 -1031
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction/moveable.d.ts +1 -0
- package/lib/interaction/moveable.js +8 -0
- package/lib/interaction/resizable.d.ts +1 -0
- package/lib/interaction/resizable.js +9 -0
- package/lib/ui/auto.suggest.css +31 -14
- package/lib/ui/auto.suggest.d.ts +1 -0
- package/lib/ui/auto.suggest.js +88 -18
- package/lib/ui/base.css +2 -48
- package/lib/ui/button.css +134 -0
- package/lib/ui/date-input.css +11 -0
- package/lib/ui/date.picker/css/tiny-date-picker.css +124 -325
- package/lib/ui/date.picker/date-picker-options.js +4 -3
- package/lib/ui/date.picker/lib/date-manip.js +9 -0
- package/lib/ui/date.picker/mode/base-mode.d.ts +2 -1
- package/lib/ui/date.picker/mode/base-mode.js +112 -22
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +2 -4
- package/lib/ui/date.picker/mode/dropdown-mode.js +29 -42
- package/lib/ui/date.picker/mode/index.d.ts +2 -1
- package/lib/ui/date.picker/mode/modal-mode.d.ts +2 -1
- package/lib/ui/date.picker/mode/modal-mode.js +4 -2
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +2 -1
- package/lib/ui/date.picker/views/day-picker.js +24 -15
- package/lib/ui/date.picker/views/month-picker.js +1 -1
- package/lib/ui/date.picker/views/year-picker.js +3 -2
- package/lib/ui/date.picker.d.ts +2 -1
- package/lib/ui/dialog.css +144 -108
- package/lib/ui/dialog.d.ts +19 -1
- package/lib/ui/dialog.js +178 -60
- package/lib/ui/input.css +35 -0
- package/lib/ui/number.input.js +50 -37
- package/lib/ui/theme.css +28 -0
- package/package.json +12 -8
- package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
- package/lib/components/drop-down/DropDownComponent.js +0 -60
- package/lib/components/expander/OldExpanderStyle.scss +0 -37
- package/lib/ui/drop.down.d.ts +0 -52
- package/lib/ui/drop.down.js +0 -2112
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import "../ui/theme.css";
|
|
1
2
|
/*
|
|
2
3
|
IMPORTANT:
|
|
3
4
|
In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
|
|
@@ -6,66 +7,73 @@ classes should alter those!
|
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
.slick-header-columns {
|
|
9
|
-
border-bottom: 2px solid
|
|
10
|
+
border-bottom: 2px solid var(--jsl-color-border-subtle);
|
|
11
|
+
background: var(--jsl-color-surface-subtle);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
.slick-header-column {
|
|
13
|
-
border-right: 1px solid
|
|
14
|
-
text-align:
|
|
15
|
-
font-weight:
|
|
15
|
+
border-right: 1px solid var(--jsl-color-border-subtle);
|
|
16
|
+
text-align: inherit;
|
|
17
|
+
font-weight: 600;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
.slick-header-column:hover, .slick-header-column-active {
|
|
19
|
-
background:
|
|
20
|
-
color:
|
|
21
|
+
background: var(--jsl-color-surface-hover);
|
|
22
|
+
color: var(--jsl-color-text);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
.slick-header-column > .slick-header-menubutton:hover {
|
|
25
|
-
background-color:
|
|
27
|
+
background-color: var(--jsl-color-surface-selected);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.slick-headerrow {
|
|
29
|
-
background:
|
|
31
|
+
background: var(--jsl-color-surface-subtle);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.slick-headerrow-column {
|
|
33
|
-
background:
|
|
35
|
+
background: var(--jsl-color-surface-subtle);
|
|
34
36
|
border-bottom: 0;
|
|
35
37
|
height: 100%;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
.slick-row.ui-state-active {
|
|
39
|
-
background:
|
|
41
|
+
background: var(--jsl-color-surface-selected);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
.slick-row {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
43
47
|
position: absolute;
|
|
44
|
-
background:
|
|
48
|
+
background: var(--jsl-color-surface);
|
|
45
49
|
border: 0px;
|
|
46
|
-
line-height:
|
|
50
|
+
line-height: inherit;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
/* what is this used for ? */
|
|
50
54
|
.slick-row.selected {
|
|
51
55
|
z-index: 10;
|
|
52
|
-
background:
|
|
56
|
+
background: var(--jsl-color-surface-selected);
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
.slick-cell {
|
|
60
|
+
align-content: center;
|
|
56
61
|
padding-left: 4px;
|
|
57
62
|
padding-right: 4px;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
.slick-group {
|
|
61
|
-
border-bottom: 2px solid
|
|
66
|
+
border-bottom: 2px solid var(--jsl-color-border-subtle);
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
.slick-group .slick-cell {
|
|
65
|
-
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
background: var(--jsl-color-surface-selected);
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
.slick-group-toggle {
|
|
76
|
+
flex-shrink: 0;
|
|
69
77
|
width: 20px;
|
|
70
78
|
height: 20px;
|
|
71
79
|
vertical-align: middle;
|
|
@@ -73,16 +81,16 @@ classes should alter those!
|
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
.slick-group-toggle.expanded {
|
|
76
|
-
|
|
84
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 122.88 119.8'%3E%3Cpath d='M23.59,0h75.7a23.63,23.63,0,0,1,23.59,23.59V96.21A23.64,23.64,0,0,1,99.29,119.8H23.59a23.53,23.53,0,0,1-16.67-6.93l-.38-.42A23.49,23.49,0,0,1,0,96.21V23.59A23.63,23.63,0,0,1,23.59,0Zm59.7,53.51a6.39,6.39,0,1,1,0,12.77H39.59a6.39,6.39,0,1,1,0-12.77Zm16-40.74H23.59A10.86,10.86,0,0,0,12.77,23.59V96.21a10.77,10.77,0,0,0,2.9,7.37l.28.26A10.76,10.76,0,0,0,23.59,107h75.7a10.87,10.87,0,0,0,10.82-10.82V23.59A10.86,10.86,0,0,0,99.29,12.77Z'/%3E%3C/svg%3E") no-repeat center center; mask-size: contain; background-color: currentColor;
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
.slick-group-toggle.collapsed {
|
|
80
|
-
|
|
88
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 122.88 119.72' style='enable-background:new 0 0 122.88 119.72' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M22.72,0h77.45c6.25,0,11.93,2.56,16.05,6.67c4.11,4.11,6.67,9.79,6.67,16.05v74.29c0,6.25-2.56,11.93-6.67,16.05 l-0.32,0.29c-4.09,3.94-9.64,6.38-15.73,6.38H22.72c-6.25,0-11.93-2.56-16.05-6.67l-0.3-0.32C2.43,108.64,0,103.09,0,97.01V22.71 c0-6.25,2.55-11.93,6.67-16.05C10.78,2.55,16.46,0,22.72,0L22.72,0z M55.47,38.34c0-3.3,2.67-5.97,5.97-5.97 c3.3,0,5.97,2.67,5.97,5.97v15.55h15.55c3.3,0,5.97,2.67,5.97,5.97c0,3.3-2.67,5.97-5.97,5.97H67.41v15.55 c0,3.3-2.67,5.97-5.97,5.97c-3.3,0-5.97-2.67-5.97-5.97V65.83H39.91c-3.3,0-5.97-2.67-5.97-5.97c0-3.3,2.67-5.97,5.97-5.97h15.55 V38.34L55.47,38.34z M100.16,10.24H22.72c-3.43,0-6.54,1.41-8.81,3.67c-2.26,2.26-3.67,5.38-3.67,8.81v74.29 c0,3.33,1.31,6.35,3.43,8.59l0.24,0.22c2.26,2.26,5.38,3.67,8.81,3.67h77.45c3.32,0,6.35-1.31,8.59-3.44l0.21-0.23 c2.26-2.26,3.67-5.38,3.67-8.81V22.71c0-3.42-1.41-6.54-3.67-8.81C106.71,11.65,103.59,10.24,100.16,10.24L100.16,10.24z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center center; mask-size: contain; background-color: currentColor;
|
|
81
89
|
}
|
|
82
90
|
|
|
83
91
|
.slick-group-totals {
|
|
84
|
-
color:
|
|
85
|
-
background:
|
|
92
|
+
color: var(--jsl-color-text-secondary);
|
|
93
|
+
background: var(--jsl-color-surface);
|
|
86
94
|
}
|
|
87
95
|
|
|
88
96
|
.slick-group-select-checkbox {
|
|
@@ -93,24 +101,24 @@ classes should alter those!
|
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
.slick-cell.selected {
|
|
96
|
-
background-color:
|
|
104
|
+
background-color: var(--jsl-color-surface-selected);
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
.slick-cell.active {
|
|
100
|
-
border-color:
|
|
108
|
+
border-color: var(--jsl-color-focus);
|
|
101
109
|
border-style: solid;
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
.slick-sortable-placeholder {
|
|
105
|
-
background:
|
|
113
|
+
background: var(--jsl-color-surface-selected) !important;
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
.slick-row.odd {
|
|
109
|
-
background:
|
|
117
|
+
background: var(--jsl-color-surface-subtle);
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
.slick-row.ui-state-active {
|
|
113
|
-
background:
|
|
121
|
+
background: var(--jsl-color-surface-selected);
|
|
114
122
|
}
|
|
115
123
|
|
|
116
124
|
.slick-row.loading {
|
|
@@ -119,7 +127,7 @@ classes should alter those!
|
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
.slick-cell.invalid {
|
|
122
|
-
border-color:
|
|
130
|
+
border-color: var(--jsl-color-danger);
|
|
123
131
|
animation-duration: 0.2s;
|
|
124
132
|
-moz-animation-duration: 0.2s;
|
|
125
133
|
-webkit-animation-duration: 0.2s;
|
|
@@ -129,28 +137,96 @@ classes should alter those!
|
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
@keyframes slickgrid-invalid-hilite {
|
|
132
|
-
from { box-shadow: 0 0 6px
|
|
140
|
+
from { box-shadow: 0 0 6px var(--jsl-color-danger); }
|
|
133
141
|
to { box-shadow: none; }
|
|
134
142
|
}
|
|
135
143
|
|
|
136
144
|
@-moz-keyframes slickgrid-invalid-hilite {
|
|
137
|
-
from { box-shadow: 0 0 6px
|
|
145
|
+
from { box-shadow: 0 0 6px var(--jsl-color-danger); }
|
|
138
146
|
to { box-shadow: none; }
|
|
139
147
|
}
|
|
140
148
|
|
|
141
149
|
@-webkit-keyframes slickgrid-invalid-hilite {
|
|
142
|
-
from { box-shadow: 0 0 6px
|
|
150
|
+
from { box-shadow: 0 0 6px var(--jsl-color-danger); }
|
|
143
151
|
to { box-shadow: none; }
|
|
144
152
|
}
|
|
145
153
|
|
|
146
154
|
/* .slick-grid {
|
|
147
|
-
background:
|
|
155
|
+
background: var(--jsl-color-surface);
|
|
148
156
|
outline: 0;
|
|
149
157
|
border: 1px solid #a0a0a0;
|
|
150
158
|
border-radius: 3px;
|
|
151
159
|
} */
|
|
152
160
|
|
|
153
161
|
.new-row .slick-cell {
|
|
154
|
-
border-top: solid 1px
|
|
155
|
-
background:
|
|
162
|
+
border-top: solid 1px var(--jsl-color-border);
|
|
163
|
+
background: var(--jsl-color-surface-selected);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.slickgrid { font: inherit; color: var(--jsl-color-text); background: var(--jsl-color-surface); }
|
|
167
|
+
|
|
168
|
+
/* Presentation only: preserve all measured cell and header dimensions. */
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
.slick-row:not(.slick-group):not(.slick-group-totals) > .slick-cell:not(.active):not(.invalid):not(.flashing) { border-right-color: transparent; }
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/* These utilities also work when importing the standalone grid entry point. */
|
|
176
|
+
.slickgrid .right { text-align: right; }
|
|
177
|
+
.slickgrid .center { text-align: center; }
|
|
178
|
+
.slickgrid .tabular-nums { font-variant-numeric: tabular-nums; }
|
|
179
|
+
|
|
180
|
+
/* Override the legacy float rules that otherwise defeat header text alignment. */
|
|
181
|
+
.slick-header-column .slick-column-name {
|
|
182
|
+
float: none;
|
|
183
|
+
margin-bottom: 0;
|
|
184
|
+
display: inline-block;
|
|
185
|
+
max-width: 100%;
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
text-overflow: ellipsis;
|
|
188
|
+
vertical-align: top;
|
|
189
|
+
}
|
|
190
|
+
.slick-header-sortable .slick-column-name { max-width: calc(100% - 1.25rem); }
|
|
191
|
+
.slick-header-column .slick-sort-indicator,
|
|
192
|
+
.slick-header-column .slick-sort-indicator-numbered {
|
|
193
|
+
display: inline-block;
|
|
194
|
+
float: none;
|
|
195
|
+
position: relative;
|
|
196
|
+
vertical-align: top;
|
|
197
|
+
margin: 0 0 0 .375rem;
|
|
198
|
+
height: var(--jsl-grid-header-height, 26px);
|
|
199
|
+
line-height: var(--jsl-grid-header-height, 26px);
|
|
200
|
+
color: var(--jsl-color-accent);
|
|
201
|
+
}
|
|
202
|
+
.slick-header-column .slick-sort-indicator { width: .65rem; }
|
|
203
|
+
.slick-header-column.right .slick-sort-indicator,
|
|
204
|
+
.slick-header-column.right .slick-sort-indicator-numbered { float: left; margin-left: 0; margin-right: .375rem; }
|
|
205
|
+
.slick-sort-indicator-asc::before, .slick-sort-indicator-desc::before {
|
|
206
|
+
content: "";
|
|
207
|
+
position: absolute;
|
|
208
|
+
left: 0;
|
|
209
|
+
top: 50%;
|
|
210
|
+
transform: translateY(-50%);
|
|
211
|
+
width: 8px;
|
|
212
|
+
height: 5px;
|
|
213
|
+
background: currentColor;
|
|
214
|
+
}
|
|
215
|
+
.slick-sort-indicator-asc::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
|
|
216
|
+
.slick-sort-indicator-desc::before { clip-path: polygon(0 0, 100% 0, 50% 100%); }
|
|
217
|
+
.slick-header-column .slick-sort-indicator-numbered { width: auto; min-width: .65rem; font-size: .8em; }
|
|
218
|
+
.slick-header-column .slick-sort-indicator.slick-sort-indicator-numbered { min-width: 1.5rem; padding-left: .75rem; }
|
|
219
|
+
|
|
220
|
+
/* Draw inside frozen panes without changing widths or intercepting resize/scroll gestures. */
|
|
221
|
+
.slickgrid:has(.slick-header-column.frozen) > .slick-pane-left::after {
|
|
222
|
+
content: "";
|
|
223
|
+
position: absolute;
|
|
224
|
+
top: 0;
|
|
225
|
+
bottom: 0;
|
|
226
|
+
right: 0;
|
|
227
|
+
width: 1px;
|
|
228
|
+
background: var(--jsl-color-border);
|
|
229
|
+
box-shadow: -2px 0 4px rgba(0, 0, 0, .08);
|
|
230
|
+
pointer-events: none;
|
|
231
|
+
z-index: 20;
|
|
156
232
|
}
|
|
@@ -313,10 +313,26 @@ export function createJSLGrid(selector, data, columns, option) {
|
|
|
313
313
|
const options = grid.getOptions();
|
|
314
314
|
if (options.mode === "client") {
|
|
315
315
|
grid.onSort.subscribe((e, args) => {
|
|
316
|
-
|
|
316
|
+
var _a;
|
|
317
|
+
if (args.multiColumnSort) {
|
|
318
|
+
const sorting = ((_a = args.sortCols) !== null && _a !== void 0 ? _a : []).map(item => ({
|
|
319
|
+
compare: getColumnComparer(item.sortCol), direction: item.sortAsc ? 1 : -1
|
|
320
|
+
}));
|
|
321
|
+
dataView.sort((a, b) => {
|
|
322
|
+
for (const item of sorting) {
|
|
323
|
+
const result = item.compare(a, b);
|
|
324
|
+
if (result !== 0) {
|
|
325
|
+
return result * item.direction;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return 0;
|
|
329
|
+
}, true);
|
|
330
|
+
}
|
|
331
|
+
else if (args.sortCol) {
|
|
332
|
+
sort(args.sortCol, args.sortAsc);
|
|
333
|
+
}
|
|
317
334
|
});
|
|
318
335
|
}
|
|
319
|
-
// TODO: multi column sort
|
|
320
336
|
}
|
|
321
337
|
function setupHeaderButtons() {
|
|
322
338
|
headerButtons = new HeaderButtons({});
|
|
@@ -427,7 +443,7 @@ export function createJSLGrid(selector, data, columns, option) {
|
|
|
427
443
|
function getHeight() {
|
|
428
444
|
return $(container).height();
|
|
429
445
|
}
|
|
430
|
-
function
|
|
446
|
+
function getColumnComparer(column) {
|
|
431
447
|
function _comparer(a, b) {
|
|
432
448
|
let x = grid.getDataItemValueForColumn(a, column);
|
|
433
449
|
let y = grid.getDataItemValueForColumn(b, column);
|
|
@@ -456,8 +472,10 @@ export function createJSLGrid(selector, data, columns, option) {
|
|
|
456
472
|
}
|
|
457
473
|
return (xStr === yStr ? 0 : (xStr > yStr ? 1 : -1));
|
|
458
474
|
}
|
|
459
|
-
|
|
460
|
-
|
|
475
|
+
return column.comparer || (column.sortByVisibleValue ? _visibleComparer : _comparer);
|
|
476
|
+
}
|
|
477
|
+
function sort(column, sortAsc) {
|
|
478
|
+
dataView.sort(getColumnComparer(column), sortAsc ? true : false);
|
|
461
479
|
}
|
|
462
480
|
function setData(newData) {
|
|
463
481
|
data = newData;
|
|
@@ -30,12 +30,12 @@ export let CheckmarkFormatter = function (row, cell, value, columnDef, dataConte
|
|
|
30
30
|
};
|
|
31
31
|
export let NumericFormatter = function (row, cell, value, columnDef, dataContext) {
|
|
32
32
|
return {
|
|
33
|
-
addClasses: ["right"],
|
|
33
|
+
addClasses: ["right", "tabular-nums"],
|
|
34
34
|
text: numeric.format(value, columnDef.format)
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
export let DateFormatter = function (row, cell, value, columnDef, dataContext) {
|
|
38
|
-
return date.format(value, columnDef.format);
|
|
38
|
+
return { text: date.format(value, columnDef.format), addClasses: ["tabular-nums"] };
|
|
39
39
|
};
|
|
40
40
|
export let HtmlFormatter = function (row, cell, value, columnDef, dataContext) {
|
|
41
41
|
return value || "";
|
|
@@ -136,7 +136,8 @@ export let TimeFormatter = function (row, cell, value, columnDef, dataContext) {
|
|
|
136
136
|
return value ? (pad(value.getHours()) + ":" + pad(value.getMinutes())) : "";
|
|
137
137
|
};
|
|
138
138
|
export let DateTimeFormatter = function (row, cell, value, columnDef, dataContext) {
|
|
139
|
-
|
|
139
|
+
const formattedDate = DateFormatter(row, cell, value, columnDef, dataContext);
|
|
140
|
+
return (typeof formattedDate === "string" ? formattedDate : formattedDate.text) + " " +
|
|
140
141
|
TimeFormatter(row, cell, value, columnDef, dataContext);
|
|
141
142
|
};
|
|
142
143
|
export let ButtonFormatter = function (row, cell, value, columnDef, dataContext) {
|
package/lib/grid/slick.grid.css
CHANGED
|
@@ -10,7 +10,7 @@ classes should alter those!
|
|
|
10
10
|
overflow: auto;
|
|
11
11
|
position: relative;
|
|
12
12
|
border-left: 0px !important;
|
|
13
|
-
background:
|
|
13
|
+
background: var(--jsl-color-surface);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.slick-header.ui-state-default {
|
|
@@ -39,19 +39,29 @@ classes should alter those!
|
|
|
39
39
|
line-height: 20px;
|
|
40
40
|
margin: 0;
|
|
41
41
|
padding: 4px;
|
|
42
|
-
border-right: 1px solid
|
|
42
|
+
border-right: 1px solid var(--jsl-color-border-subtle);
|
|
43
43
|
border-left: 0px !important;
|
|
44
|
-
border-top: 1px solid
|
|
44
|
+
border-top: 1px solid var(--jsl-color-border-subtle);
|
|
45
45
|
border-bottom: 0px !important;
|
|
46
46
|
float: left;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/* Column headers are 6px taller; grouped headers retain their existing size. */
|
|
50
|
+
.slick-header-column.ui-state-default {
|
|
51
|
+
height: var(--jsl-grid-header-height, 26px);
|
|
52
|
+
line-height: var(--jsl-grid-header-height, 26px);
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
.slick-footerrow-column.ui-state-default {
|
|
56
|
+
top: 0;
|
|
57
|
+
bottom: 0;
|
|
58
|
+
height: auto;
|
|
59
|
+
align-content: center;
|
|
50
60
|
-o-text-overflow: ellipsis;
|
|
51
61
|
text-overflow: ellipsis;
|
|
52
62
|
margin: 0;
|
|
53
63
|
padding: 4px;
|
|
54
|
-
border-right: 1px solid
|
|
64
|
+
border-right: 1px solid var(--jsl-color-border-subtle);
|
|
55
65
|
border-left: 0px;
|
|
56
66
|
border-top: 0px;
|
|
57
67
|
border-bottom: 0px;
|
|
@@ -65,7 +75,7 @@ classes should alter those!
|
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
.slick-header-column-sorted {
|
|
68
|
-
font-style:
|
|
78
|
+
font-style: inherit;
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
.slick-sort-indicator {
|
|
@@ -87,7 +97,7 @@ classes should alter those!
|
|
|
87
97
|
float: left;
|
|
88
98
|
font-style: normal;
|
|
89
99
|
font-weight: bold;
|
|
90
|
-
color:
|
|
100
|
+
color: var(--jsl-color-text-secondary);
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
|
|
@@ -113,7 +123,7 @@ classes should alter those!
|
|
|
113
123
|
} */
|
|
114
124
|
|
|
115
125
|
.slick-sortable-placeholder {
|
|
116
|
-
background:
|
|
126
|
+
background: var(--jsl-color-surface-selected);
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
.grid-canvas {
|
|
@@ -128,26 +138,28 @@ classes should alter those!
|
|
|
128
138
|
}
|
|
129
139
|
|
|
130
140
|
.slick-cell, .slick-headerrow-column , .slick-footerrow-column{
|
|
141
|
+
/* SlickGrid measures content dimensions; host border-box resets must not apply. */
|
|
142
|
+
box-sizing: content-box !important;
|
|
131
143
|
position: absolute;
|
|
132
144
|
border: 1px solid transparent;
|
|
133
|
-
/*border-right: 1px dotted
|
|
134
|
-
border-bottom-color:
|
|
135
|
-
border-right: 1px dotted
|
|
145
|
+
/*border-right: 1px dotted var(--jsl-color-border-subtle);
|
|
146
|
+
border-bottom-color: var(--jsl-color-border-subtle); */
|
|
147
|
+
border-right: 1px dotted var(--jsl-color-border-subtle);
|
|
136
148
|
overflow: hidden;
|
|
137
149
|
-o-text-overflow: ellipsis;
|
|
138
150
|
text-overflow: ellipsis;
|
|
139
151
|
vertical-align: middle;
|
|
140
152
|
z-index: 1;
|
|
141
|
-
padding: 1px 2px
|
|
153
|
+
padding: 1px 2px 1px 1px;
|
|
142
154
|
margin: 0;
|
|
143
155
|
white-space: nowrap;
|
|
144
156
|
cursor: default;
|
|
145
157
|
}
|
|
146
158
|
/*.slick-cell, */.slick-headerrow-column{
|
|
147
|
-
border-bottom-color:
|
|
159
|
+
border-bottom-color: var(--jsl-color-border-subtle);
|
|
148
160
|
}
|
|
149
161
|
.slick-footerrow-column {
|
|
150
|
-
border-top-color:
|
|
162
|
+
border-top-color: var(--jsl-color-border-subtle);
|
|
151
163
|
}
|
|
152
164
|
|
|
153
165
|
.slick-group-toggle {
|
|
@@ -155,8 +167,8 @@ classes should alter those!
|
|
|
155
167
|
}
|
|
156
168
|
|
|
157
169
|
.slick-cell.highlighted {
|
|
158
|
-
|
|
159
|
-
background:
|
|
170
|
+
|
|
171
|
+
background: var(--jsl-color-surface-selected);
|
|
160
172
|
-webkit-transition: all 0.5s;
|
|
161
173
|
-moz-transition: all 0.5s;
|
|
162
174
|
-o-transition: all 0.5s;
|
|
@@ -164,13 +176,13 @@ classes should alter those!
|
|
|
164
176
|
}
|
|
165
177
|
|
|
166
178
|
.slick-cell.flashing {
|
|
167
|
-
border: 1px solid
|
|
179
|
+
border: 1px solid var(--jsl-color-danger) !important;
|
|
168
180
|
}
|
|
169
181
|
|
|
170
182
|
.slick-cell.editable {
|
|
171
183
|
z-index: 11;
|
|
172
184
|
overflow: visible;
|
|
173
|
-
/* background:
|
|
185
|
+
/* background: var(--jsl-color-surface);
|
|
174
186
|
border-color: black;
|
|
175
187
|
border-style: solid; */
|
|
176
188
|
}
|
|
@@ -181,7 +193,7 @@ classes should alter those!
|
|
|
181
193
|
|
|
182
194
|
.slick-reorder-proxy {
|
|
183
195
|
display: inline-block;
|
|
184
|
-
background:
|
|
196
|
+
background: var(--jsl-color-accent);
|
|
185
197
|
opacity: 0.15;
|
|
186
198
|
filter: alpha(opacity = 15);
|
|
187
199
|
cursor: move;
|
|
@@ -190,7 +202,7 @@ classes should alter those!
|
|
|
190
202
|
.slick-reorder-guide {
|
|
191
203
|
display: inline-block;
|
|
192
204
|
height: 2px;
|
|
193
|
-
background:
|
|
205
|
+
background: var(--jsl-color-accent);
|
|
194
206
|
opacity: 0.7;
|
|
195
207
|
filter: alpha(opacity = 70);
|
|
196
208
|
}
|
|
@@ -198,7 +210,7 @@ classes should alter those!
|
|
|
198
210
|
.slick-selection {
|
|
199
211
|
z-index: 10;
|
|
200
212
|
position: absolute;
|
|
201
|
-
border: 2px dashed
|
|
213
|
+
border: 2px dashed var(--jsl-color-focus);
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
.slick-pane {
|
|
@@ -225,7 +237,7 @@ classes should alter those!
|
|
|
225
237
|
position: relative;
|
|
226
238
|
outline: 0;
|
|
227
239
|
width: 100%;
|
|
228
|
-
background:
|
|
240
|
+
background: var(--jsl-color-surface);
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
.slick-wrap {
|
|
@@ -258,7 +270,7 @@ input.editor-text, textarea.editor-text {
|
|
|
258
270
|
|
|
259
271
|
.slickgrid {
|
|
260
272
|
box-sizing: border-box;
|
|
261
|
-
border: solid 1px
|
|
273
|
+
border: solid 1px var(--jsl-color-border);
|
|
262
274
|
border-radius: 3px;
|
|
263
275
|
}
|
|
264
276
|
|
|
@@ -269,8 +281,8 @@ input.editor-text, textarea.editor-text {
|
|
|
269
281
|
}
|
|
270
282
|
|
|
271
283
|
.slick-ghost-content {
|
|
272
|
-
border: solid 2px
|
|
273
|
-
background:
|
|
284
|
+
border: solid 2px var(--jsl-color-border);
|
|
285
|
+
background: var(--jsl-color-surface-selected);
|
|
274
286
|
position: absolute;
|
|
275
287
|
left: 0;
|
|
276
288
|
right: 0;
|
|
@@ -281,8 +293,8 @@ input.editor-text, textarea.editor-text {
|
|
|
281
293
|
}
|
|
282
294
|
|
|
283
295
|
.slick-filtered-header {
|
|
284
|
-
color:
|
|
285
|
-
background:
|
|
296
|
+
color: var(--jsl-color-accent);
|
|
297
|
+
background: var(--jsl-color-surface-selected);
|
|
286
298
|
}
|
|
287
299
|
|
|
288
300
|
.slick-preheader-panel .slick-column-name {
|
package/lib/grid/slick.grid.d.ts
CHANGED
|
@@ -272,6 +272,7 @@ export interface ISlickGrid<T> {
|
|
|
272
272
|
width: number;
|
|
273
273
|
};
|
|
274
274
|
"canCellBeSelected": (row: number, cell: number) => boolean;
|
|
275
|
+
"getFooterRowColumn": (columnIdOrIdx: string | number) => HTMLElement;
|
|
275
276
|
"getGridPosition": () => {
|
|
276
277
|
top: number;
|
|
277
278
|
left: number;
|
package/lib/grid/slick.grid.js
CHANGED
|
@@ -28,7 +28,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
28
28
|
alwaysShowHorizontalScroll: false,
|
|
29
29
|
alwaysAllowHorizontalScroll: false,
|
|
30
30
|
explicitInitialization: false,
|
|
31
|
-
rowHeight:
|
|
31
|
+
rowHeight: 36,
|
|
32
32
|
defaultColumnWidth: 80,
|
|
33
33
|
enableAddRow: false,
|
|
34
34
|
leaveSpaceForNewRows: false,
|
|
@@ -999,8 +999,7 @@ export function SlickGrid(container, data, columns, options) {
|
|
|
999
999
|
else {
|
|
1000
1000
|
$footerRowTarget = $footerRowL;
|
|
1001
1001
|
}
|
|
1002
|
-
|
|
1003
|
-
return $footer && $footer[0];
|
|
1002
|
+
return $footerRowTarget.children()[idx];
|
|
1004
1003
|
}
|
|
1005
1004
|
function createColumnFooter() {
|
|
1006
1005
|
if (options.createFooterRow) {
|