baseui 0.0.0-alpha-afa08b4 → 0.0.0-alpha-c54ce6f
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/data-table/measure-column-widths.js +2 -0
- package/data-table/measure-column-widths.js.flow +3 -0
- package/es/data-table/measure-column-widths.js +2 -0
- package/es/timezonepicker/timezone-picker.js +3 -1
- package/esm/data-table/measure-column-widths.js +2 -0
- package/esm/timezonepicker/timezone-picker.js +3 -1
- package/package.json +2 -2
- package/timezonepicker/timezone-picker.js +3 -1
- package/timezonepicker/timezone-picker.js.flow +4 -1
- package/timezonepicker/types.js.flow +5 -0
|
@@ -45,6 +45,7 @@ function MeasureColumn(_ref) {
|
|
|
45
45
|
css = _useStyletron2[0];
|
|
46
46
|
|
|
47
47
|
var ref = (0, React.useRef)();
|
|
48
|
+
console.log('measure column', columnIndex);
|
|
48
49
|
React.useEffect(function () {
|
|
49
50
|
if (typeof document !== 'undefined') {
|
|
50
51
|
if (ref.current) {
|
|
@@ -139,6 +140,7 @@ function MeasureColumnWidths(_ref2) {
|
|
|
139
140
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
140
141
|
}, [columns, rows, widths, sampleSize]);
|
|
141
142
|
var handleDimensionsChange = React.useCallback(function (columnIndex, dimensions) {
|
|
143
|
+
console.log('handle dimensions change', columnIndex, dimensions);
|
|
142
144
|
var nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
143
145
|
|
|
144
146
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
@@ -27,6 +27,8 @@ function MeasureColumn({
|
|
|
27
27
|
|
|
28
28
|
const ref = useRef();
|
|
29
29
|
|
|
30
|
+
console.log('measure column', columnIndex);
|
|
31
|
+
|
|
30
32
|
React.useEffect(() => {
|
|
31
33
|
if (__BROWSER__) {
|
|
32
34
|
if (ref.current) {
|
|
@@ -134,6 +136,7 @@ export default function MeasureColumnWidths({
|
|
|
134
136
|
|
|
135
137
|
const handleDimensionsChange = React.useCallback(
|
|
136
138
|
(columnIndex, dimensions) => {
|
|
139
|
+
console.log('handle dimensions change', columnIndex, dimensions);
|
|
137
140
|
const nextWidth = Math.min(
|
|
138
141
|
Math.max(
|
|
139
142
|
columns[columnIndex].minWidth || 0,
|
|
@@ -19,6 +19,7 @@ function MeasureColumn({
|
|
|
19
19
|
}) {
|
|
20
20
|
const [css] = useStyletron();
|
|
21
21
|
const ref = useRef();
|
|
22
|
+
console.log('measure column', columnIndex);
|
|
22
23
|
React.useEffect(() => {
|
|
23
24
|
if (typeof document !== 'undefined') {
|
|
24
25
|
if (ref.current) {
|
|
@@ -107,6 +108,7 @@ export default function MeasureColumnWidths({
|
|
|
107
108
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
108
109
|
}, [columns, rows, widths, sampleSize]);
|
|
109
110
|
const handleDimensionsChange = React.useCallback((columnIndex, dimensions) => {
|
|
111
|
+
console.log('handle dimensions change', columnIndex, dimensions);
|
|
110
112
|
const nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
111
113
|
|
|
112
114
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
@@ -44,10 +44,12 @@ class TimezonePicker extends React.Component {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
const offsetMinutes = offset * 60;
|
|
47
48
|
timezones.push({
|
|
48
49
|
id: zoneName,
|
|
49
50
|
label,
|
|
50
|
-
offset
|
|
51
|
+
// offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
|
|
52
|
+
offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
|
|
51
53
|
});
|
|
52
54
|
} catch (error) {
|
|
53
55
|
// Ignores timezones that are not available within a user's browser/operating system
|
|
@@ -34,6 +34,7 @@ function MeasureColumn(_ref) {
|
|
|
34
34
|
css = _useStyletron2[0];
|
|
35
35
|
|
|
36
36
|
var ref = useRef();
|
|
37
|
+
console.log('measure column', columnIndex);
|
|
37
38
|
React.useEffect(function () {
|
|
38
39
|
if (typeof document !== 'undefined') {
|
|
39
40
|
if (ref.current) {
|
|
@@ -128,6 +129,7 @@ export default function MeasureColumnWidths(_ref2) {
|
|
|
128
129
|
return generateSampleIndices(0, rows.length - 1, sampleSize);
|
|
129
130
|
}, [columns, rows, widths, sampleSize]);
|
|
130
131
|
var handleDimensionsChange = React.useCallback(function (columnIndex, dimensions) {
|
|
132
|
+
console.log('handle dimensions change', columnIndex, dimensions);
|
|
131
133
|
var nextWidth = Math.min(Math.max(columns[columnIndex].minWidth || 0, widthMap.get(columnIndex) || 0, dimensions.width + 1), columns[columnIndex].maxWidth || Infinity);
|
|
132
134
|
|
|
133
135
|
if (nextWidth !== widthMap.get(columnIndex)) {
|
|
@@ -98,10 +98,12 @@ var TimezonePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
var offsetMinutes = offset * 60;
|
|
101
102
|
timezones.push({
|
|
102
103
|
id: zoneName,
|
|
103
104
|
label: label,
|
|
104
|
-
offset
|
|
105
|
+
// offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
|
|
106
|
+
offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
|
|
105
107
|
});
|
|
106
108
|
} catch (error) {
|
|
107
109
|
// Ignores timezones that are not available within a user's browser/operating system
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseui",
|
|
3
|
-
"version": "0.0.0-alpha-
|
|
3
|
+
"version": "0.0.0-alpha-c54ce6f",
|
|
4
4
|
"description": "A React Component library implementing the Base design language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"dependencies": {
|
|
194
194
|
"@date-io/date-fns": "^2.6.2",
|
|
195
195
|
"card-validator": "^6.2.0",
|
|
196
|
-
"d3": "^7.
|
|
196
|
+
"d3": "^6.7.0",
|
|
197
197
|
"date-fns": "^2.6.0",
|
|
198
198
|
"date-fns-tz": "^1.2.2",
|
|
199
199
|
"glob": "^7.1.6",
|
|
@@ -107,10 +107,12 @@ var TimezonePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
var offsetMinutes = offset * 60;
|
|
110
111
|
timezones.push({
|
|
111
112
|
id: zoneName,
|
|
112
113
|
label: label,
|
|
113
|
-
offset
|
|
114
|
+
// offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
|
|
115
|
+
offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1
|
|
114
116
|
});
|
|
115
117
|
} catch (error) {
|
|
116
118
|
// Ignores timezones that are not available within a user's browser/operating system
|
|
@@ -73,10 +73,13 @@ class TimezonePicker extends React.Component<
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
const offsetMinutes = offset * 60;
|
|
77
|
+
|
|
76
78
|
timezones.push({
|
|
77
79
|
id: zoneName,
|
|
78
80
|
label,
|
|
79
|
-
offset,
|
|
81
|
+
// offset output is in minutes, difference of UTC and this zone (negative for hours ahead of UTC, positive for hours behind)
|
|
82
|
+
offset: offsetMinutes === 0 ? 0 : offsetMinutes * -1,
|
|
80
83
|
});
|
|
81
84
|
} catch (error) {
|
|
82
85
|
// Ignores timezones that are not available within a user's browser/operating system
|
|
@@ -22,6 +22,11 @@ export type TimezonePickerStateT = {
|
|
|
22
22
|
export type TimezoneT = {
|
|
23
23
|
id: string,
|
|
24
24
|
label: string,
|
|
25
|
+
/**
|
|
26
|
+
* The difference, in minutes, between a UTC date, and a date in the indicated time zone.
|
|
27
|
+
* Positive values indicate hours behind UTC, negative values indicate hours ahead.
|
|
28
|
+
* This aligns with Date.getTimezoneOffset()
|
|
29
|
+
*/
|
|
25
30
|
offset: number,
|
|
26
31
|
};
|
|
27
32
|
export type TimezonePickerPropsT = {
|