@gpa-gemstone/common-pages 0.0.161 → 0.0.163
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/TimeFilter/QuickSelects.d.ts +7 -5
- package/lib/TimeFilter/QuickSelects.js +196 -19
- package/lib/TimeFilter/StartEndFilter/DateFilter.js +4 -6
- package/lib/TimeFilter/StartEndFilter/DateTimeLocalFilter.js +10 -13
- package/lib/TimeFilter/StartEndFilter/StartEndFilter.d.ts +2 -2
- package/lib/TimeFilter/StartEndFilter/TimeFilter.js +4 -6
- package/lib/TimeFilter/TimeFilter.d.ts +5 -2
- package/lib/TimeFilter/TimeFilter.js +3 -3
- package/lib/TimeFilter/WindowFilter/WindowFilter.js +7 -7
- package/package.json +6 -6
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { DateTimeSetting, ITimeFilter } from './TimeFilter';
|
|
2
|
+
import { Gemstone } from '@gpa-gemstone/application-typings';
|
|
2
3
|
import { TimeUnit } from './TimeWindowUtils';
|
|
3
|
-
export type DateUnit = ('datetime-local' | 'date' | 'time');
|
|
4
4
|
interface IQuickSelect {
|
|
5
5
|
label: string;
|
|
6
|
-
hideQuickPick: (
|
|
7
|
-
createFilter: (timeZone: string, format?: DateUnit) => ITimeFilter;
|
|
6
|
+
hideQuickPick: (quickSelectRange?: Gemstone.TSX.Types.QuickSelectRange) => boolean;
|
|
7
|
+
createFilter: (timeZone: string, format?: Gemstone.TSX.Types.DateUnit) => ITimeFilter;
|
|
8
8
|
}
|
|
9
9
|
interface IProps {
|
|
10
10
|
DateTimeSetting: DateTimeSetting;
|
|
11
11
|
Format?: "YYYY-MM-DD" | "HH:mm:ss.SSS" | "MM/DD/YYYY HH:mm:ss.SSS";
|
|
12
|
-
DateUnit?: DateUnit;
|
|
12
|
+
DateUnit?: Gemstone.TSX.Types.DateUnit;
|
|
13
|
+
QuickSelectRange?: Gemstone.TSX.Types.QuickSelectRange;
|
|
13
14
|
Timezone: string;
|
|
14
15
|
ActiveQP: number;
|
|
15
16
|
SetActiveQP: (qp: number) => void;
|
|
@@ -19,5 +20,6 @@ interface IProps {
|
|
|
19
20
|
}
|
|
20
21
|
declare const QuickSelects: (props: IProps) => JSX.Element;
|
|
21
22
|
export default QuickSelects;
|
|
22
|
-
export declare function getFormat(format?: DateUnit): "MM/DD/YYYY HH:mm:ss.SSS" | "YYYY-MM-DD" | "HH:mm:ss.SSS";
|
|
23
|
+
export declare function getFormat(format?: Gemstone.TSX.Types.DateUnit): "MM/DD/YYYY HH:mm:ss.SSS" | "YYYY-MM-DD" | "HH:mm:ss.SSS";
|
|
24
|
+
export declare function getQuickSelectRange(dateUnit?: Gemstone.TSX.Types.DateUnit): "medium" | "long" | "full" | undefined;
|
|
23
25
|
export declare const AvailableQuickSelects: IQuickSelect[];
|
|
@@ -51,13 +51,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
exports.AvailableQuickSelects = void 0;
|
|
53
53
|
exports.getFormat = getFormat;
|
|
54
|
+
exports.getQuickSelectRange = getQuickSelectRange;
|
|
54
55
|
var React = __importStar(require("react"));
|
|
55
56
|
var TimeFilter_1 = require("./TimeFilter");
|
|
56
57
|
var moment_1 = __importDefault(require("moment"));
|
|
57
58
|
var moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
58
59
|
var QuickSelects = function (props) {
|
|
59
60
|
var _a;
|
|
60
|
-
var CurrentQuickSelects = React.useMemo(function () { return exports.AvailableQuickSelects.filter(function (qs) { return !qs.hideQuickPick(props.DateUnit); }); }, [props.DateUnit]);
|
|
61
|
+
var CurrentQuickSelects = React.useMemo(function () { return exports.AvailableQuickSelects.filter(function (qs) { var _a; return !qs.hideQuickPick((_a = props.QuickSelectRange) !== null && _a !== void 0 ? _a : getQuickSelectRange(props.DateUnit)); }); }, [props.QuickSelectRange, props.DateUnit]);
|
|
61
62
|
return (React.createElement(Container, { AddRow: (_a = props.AddRowContainer) !== null && _a !== void 0 ? _a : true }, CurrentQuickSelects.map(function (qs, i) {
|
|
62
63
|
var _a;
|
|
63
64
|
if (i % 3 !== 0)
|
|
@@ -98,6 +99,14 @@ function getFormat(format) {
|
|
|
98
99
|
else
|
|
99
100
|
return 'MM/DD/YYYY HH:mm:ss.SSS';
|
|
100
101
|
}
|
|
102
|
+
function getQuickSelectRange(dateUnit) {
|
|
103
|
+
if (dateUnit === 'datetime-local')
|
|
104
|
+
return 'full';
|
|
105
|
+
if (dateUnit === 'time')
|
|
106
|
+
return 'medium';
|
|
107
|
+
if (dateUnit === 'date')
|
|
108
|
+
return 'long';
|
|
109
|
+
}
|
|
101
110
|
var getColSize = function (dateTimeSetting, splitSelects) {
|
|
102
111
|
if (dateTimeSetting === 'startEnd') {
|
|
103
112
|
if (splitSelects)
|
|
@@ -112,6 +121,174 @@ var getColSize = function (dateTimeSetting, splitSelects) {
|
|
|
112
121
|
};
|
|
113
122
|
//update all quick selects to use new timefilters
|
|
114
123
|
exports.AvailableQuickSelects = [
|
|
124
|
+
{
|
|
125
|
+
label: 'Last 1 Second', createFilter: function (tz, format) {
|
|
126
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(1, 'second').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
127
|
+
var t = moment_1.default.utc().add(offset, 'second').startOf('second');
|
|
128
|
+
return {
|
|
129
|
+
end: t.format(getFormat(format)),
|
|
130
|
+
unit: 's',
|
|
131
|
+
duration: 1,
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
hideQuickPick: function (f) {
|
|
135
|
+
return f !== 'short';
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: 'Last 5 Seconds', createFilter: function (tz, format) {
|
|
140
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(5, 'seconds').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
141
|
+
var t = moment_1.default.utc().add(offset, 'seconds').startOf('second');
|
|
142
|
+
return {
|
|
143
|
+
end: t.format(getFormat(format)),
|
|
144
|
+
unit: 's',
|
|
145
|
+
duration: 5,
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
hideQuickPick: function (f) {
|
|
149
|
+
return f !== 'short';
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'Last 10 Seconds', createFilter: function (tz, format) {
|
|
154
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(10, 'seconds').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
155
|
+
var t = moment_1.default.utc().add(offset, 'seconds').startOf('second');
|
|
156
|
+
return {
|
|
157
|
+
end: t.format(getFormat(format)),
|
|
158
|
+
unit: 's',
|
|
159
|
+
duration: 10,
|
|
160
|
+
};
|
|
161
|
+
},
|
|
162
|
+
hideQuickPick: function (f) {
|
|
163
|
+
return f !== 'short';
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: 'Last 15 Seconds', createFilter: function (tz, format) {
|
|
168
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(15, 'seconds').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
169
|
+
var t = moment_1.default.utc().add(offset, 'seconds').startOf('second');
|
|
170
|
+
return {
|
|
171
|
+
end: t.format(getFormat(format)),
|
|
172
|
+
unit: 's',
|
|
173
|
+
duration: 15,
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
hideQuickPick: function (f) {
|
|
177
|
+
return f !== 'short';
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: 'Last 30 Seconds', createFilter: function (tz, format) {
|
|
182
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(30, 'seconds').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
183
|
+
var t = moment_1.default.utc().add(offset, 'seconds').startOf('second');
|
|
184
|
+
return {
|
|
185
|
+
end: t.format(getFormat(format)),
|
|
186
|
+
unit: 's',
|
|
187
|
+
duration: 30,
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
hideQuickPick: function (f) {
|
|
191
|
+
return f !== 'short';
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'Last 45 Seconds', createFilter: function (tz, format) {
|
|
196
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('second').subtract(45, 'seconds').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
197
|
+
var t = moment_1.default.utc().add(offset, 'seconds').startOf('second');
|
|
198
|
+
return {
|
|
199
|
+
end: t.format(getFormat(format)),
|
|
200
|
+
unit: 's',
|
|
201
|
+
duration: 45,
|
|
202
|
+
};
|
|
203
|
+
},
|
|
204
|
+
hideQuickPick: function (f) {
|
|
205
|
+
return f !== 'short';
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
label: 'Last 1 Minute', createFilter: function (tz, format) {
|
|
210
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(1, 'minute').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
211
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
212
|
+
return {
|
|
213
|
+
end: t.format(getFormat(format)),
|
|
214
|
+
unit: 'm',
|
|
215
|
+
duration: 1,
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
hideQuickPick: function (f) {
|
|
219
|
+
return f !== 'short';
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: 'Last 5 Minutes', createFilter: function (tz, format) {
|
|
224
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(5, 'minutes').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
225
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
226
|
+
return {
|
|
227
|
+
end: t.format(getFormat(format)),
|
|
228
|
+
unit: 'm',
|
|
229
|
+
duration: 5,
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
hideQuickPick: function (f) {
|
|
233
|
+
return f !== 'short';
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
label: 'Last 10 Minutes', createFilter: function (tz, format) {
|
|
238
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(10, 'minutes').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
239
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
240
|
+
return {
|
|
241
|
+
end: t.format(getFormat(format)),
|
|
242
|
+
unit: 'm',
|
|
243
|
+
duration: 10,
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
hideQuickPick: function (f) {
|
|
247
|
+
return f !== 'short';
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: 'Last 15 Minutes', createFilter: function (tz, format) {
|
|
252
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(15, 'minutes').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
253
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
254
|
+
return {
|
|
255
|
+
end: t.format(getFormat(format)),
|
|
256
|
+
unit: 'm',
|
|
257
|
+
duration: 15,
|
|
258
|
+
};
|
|
259
|
+
},
|
|
260
|
+
hideQuickPick: function (f) {
|
|
261
|
+
return f !== 'short';
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
label: 'Last 30 Minutes', createFilter: function (tz, format) {
|
|
266
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(30, 'minutes').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
267
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
268
|
+
return {
|
|
269
|
+
end: t.format(getFormat(format)),
|
|
270
|
+
unit: 'm',
|
|
271
|
+
duration: 30,
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
hideQuickPick: function (f) {
|
|
275
|
+
return f !== 'short';
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
label: 'Last 45 Minutes', createFilter: function (tz, format) {
|
|
280
|
+
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('minute').subtract(45, 'minutes').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
281
|
+
var t = moment_1.default.utc().add(offset, 'minutes').startOf('minute');
|
|
282
|
+
return {
|
|
283
|
+
end: t.format(getFormat(format)),
|
|
284
|
+
unit: 'm',
|
|
285
|
+
duration: 45,
|
|
286
|
+
};
|
|
287
|
+
},
|
|
288
|
+
hideQuickPick: function (f) {
|
|
289
|
+
return f !== 'short';
|
|
290
|
+
}
|
|
291
|
+
},
|
|
115
292
|
{
|
|
116
293
|
label: 'This Hour', createFilter: function (tz, format) {
|
|
117
294
|
var offset = moment_timezone_1.default.tz(moment_1.default.utc().startOf('hour').format('YYYY-MM-DDTHH:mm:ss.SSSSS'), tz).utcOffset();
|
|
@@ -122,7 +299,7 @@ exports.AvailableQuickSelects = [
|
|
|
122
299
|
};
|
|
123
300
|
},
|
|
124
301
|
hideQuickPick: function (f) {
|
|
125
|
-
return f == '
|
|
302
|
+
return f == 'long';
|
|
126
303
|
}
|
|
127
304
|
},
|
|
128
305
|
{
|
|
@@ -136,7 +313,7 @@ exports.AvailableQuickSelects = [
|
|
|
136
313
|
};
|
|
137
314
|
},
|
|
138
315
|
hideQuickPick: function (f) {
|
|
139
|
-
return f == '
|
|
316
|
+
return f == 'long';
|
|
140
317
|
}
|
|
141
318
|
},
|
|
142
319
|
{
|
|
@@ -150,7 +327,7 @@ exports.AvailableQuickSelects = [
|
|
|
150
327
|
};
|
|
151
328
|
},
|
|
152
329
|
hideQuickPick: function (f) {
|
|
153
|
-
return f == '
|
|
330
|
+
return f == 'long';
|
|
154
331
|
}
|
|
155
332
|
},
|
|
156
333
|
{
|
|
@@ -164,7 +341,7 @@ exports.AvailableQuickSelects = [
|
|
|
164
341
|
};
|
|
165
342
|
},
|
|
166
343
|
hideQuickPick: function (f) {
|
|
167
|
-
return f == '
|
|
344
|
+
return f == 'medium';
|
|
168
345
|
}
|
|
169
346
|
},
|
|
170
347
|
{
|
|
@@ -178,7 +355,7 @@ exports.AvailableQuickSelects = [
|
|
|
178
355
|
};
|
|
179
356
|
},
|
|
180
357
|
hideQuickPick: function (f) {
|
|
181
|
-
return f == '
|
|
358
|
+
return f == 'medium';
|
|
182
359
|
}
|
|
183
360
|
},
|
|
184
361
|
{
|
|
@@ -192,7 +369,7 @@ exports.AvailableQuickSelects = [
|
|
|
192
369
|
};
|
|
193
370
|
},
|
|
194
371
|
hideQuickPick: function (f) {
|
|
195
|
-
return f == '
|
|
372
|
+
return f == 'long' || f == 'medium';
|
|
196
373
|
}
|
|
197
374
|
},
|
|
198
375
|
{
|
|
@@ -206,7 +383,7 @@ exports.AvailableQuickSelects = [
|
|
|
206
383
|
};
|
|
207
384
|
},
|
|
208
385
|
hideQuickPick: function (f) {
|
|
209
|
-
return f == '
|
|
386
|
+
return f == 'medium' || f == 'short';
|
|
210
387
|
}
|
|
211
388
|
},
|
|
212
389
|
{
|
|
@@ -220,7 +397,7 @@ exports.AvailableQuickSelects = [
|
|
|
220
397
|
};
|
|
221
398
|
},
|
|
222
399
|
hideQuickPick: function (f) {
|
|
223
|
-
return f == '
|
|
400
|
+
return f == 'medium' || f == 'short';
|
|
224
401
|
}
|
|
225
402
|
},
|
|
226
403
|
{
|
|
@@ -234,7 +411,7 @@ exports.AvailableQuickSelects = [
|
|
|
234
411
|
};
|
|
235
412
|
},
|
|
236
413
|
hideQuickPick: function (f) {
|
|
237
|
-
return f == '
|
|
414
|
+
return f == 'medium' || f == 'short';
|
|
238
415
|
}
|
|
239
416
|
},
|
|
240
417
|
{
|
|
@@ -248,7 +425,7 @@ exports.AvailableQuickSelects = [
|
|
|
248
425
|
};
|
|
249
426
|
},
|
|
250
427
|
hideQuickPick: function (f) {
|
|
251
|
-
return f == '
|
|
428
|
+
return f == 'medium' || f == 'short';
|
|
252
429
|
}
|
|
253
430
|
},
|
|
254
431
|
{
|
|
@@ -262,7 +439,7 @@ exports.AvailableQuickSelects = [
|
|
|
262
439
|
};
|
|
263
440
|
},
|
|
264
441
|
hideQuickPick: function (f) {
|
|
265
|
-
return f == '
|
|
442
|
+
return f == 'medium' || f == 'short';
|
|
266
443
|
}
|
|
267
444
|
},
|
|
268
445
|
{
|
|
@@ -276,7 +453,7 @@ exports.AvailableQuickSelects = [
|
|
|
276
453
|
};
|
|
277
454
|
},
|
|
278
455
|
hideQuickPick: function (f) {
|
|
279
|
-
return f == '
|
|
456
|
+
return f == 'medium' || f == 'short';
|
|
280
457
|
}
|
|
281
458
|
},
|
|
282
459
|
{
|
|
@@ -294,7 +471,7 @@ exports.AvailableQuickSelects = [
|
|
|
294
471
|
};
|
|
295
472
|
},
|
|
296
473
|
hideQuickPick: function (f) {
|
|
297
|
-
return f == '
|
|
474
|
+
return f == 'medium' || f == 'short';
|
|
298
475
|
}
|
|
299
476
|
},
|
|
300
477
|
{
|
|
@@ -312,7 +489,7 @@ exports.AvailableQuickSelects = [
|
|
|
312
489
|
};
|
|
313
490
|
},
|
|
314
491
|
hideQuickPick: function (f) {
|
|
315
|
-
return f == '
|
|
492
|
+
return f == 'medium' || f == 'short';
|
|
316
493
|
}
|
|
317
494
|
},
|
|
318
495
|
{
|
|
@@ -326,7 +503,7 @@ exports.AvailableQuickSelects = [
|
|
|
326
503
|
};
|
|
327
504
|
},
|
|
328
505
|
hideQuickPick: function (f) {
|
|
329
|
-
return f == '
|
|
506
|
+
return f == 'medium' || f == 'short';
|
|
330
507
|
}
|
|
331
508
|
},
|
|
332
509
|
{
|
|
@@ -340,7 +517,7 @@ exports.AvailableQuickSelects = [
|
|
|
340
517
|
};
|
|
341
518
|
},
|
|
342
519
|
hideQuickPick: function (f) {
|
|
343
|
-
return f == '
|
|
520
|
+
return f == 'medium' || f == 'short';
|
|
344
521
|
}
|
|
345
522
|
},
|
|
346
523
|
{
|
|
@@ -354,7 +531,7 @@ exports.AvailableQuickSelects = [
|
|
|
354
531
|
};
|
|
355
532
|
},
|
|
356
533
|
hideQuickPick: function (f) {
|
|
357
|
-
return f == '
|
|
534
|
+
return f == 'medium' || f == 'short';
|
|
358
535
|
}
|
|
359
536
|
},
|
|
360
537
|
{
|
|
@@ -368,7 +545,7 @@ exports.AvailableQuickSelects = [
|
|
|
368
545
|
};
|
|
369
546
|
},
|
|
370
547
|
hideQuickPick: function (f) {
|
|
371
|
-
return f == '
|
|
548
|
+
return f == 'medium' || f == 'short';
|
|
372
549
|
}
|
|
373
550
|
}
|
|
374
551
|
];
|
|
@@ -43,15 +43,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
43
43
|
__setModuleDefault(result, mod);
|
|
44
44
|
return result;
|
|
45
45
|
};
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
47
|
var React = __importStar(require("react"));
|
|
51
48
|
var react_forms_1 = require("@gpa-gemstone/react-forms");
|
|
52
49
|
var TimeFilter_1 = require("../TimeFilter");
|
|
53
|
-
var QuickSelects_1 =
|
|
50
|
+
var QuickSelects_1 = __importStar(require("../QuickSelects"));
|
|
54
51
|
var DateFilter = function (props) {
|
|
52
|
+
var _a, _b;
|
|
55
53
|
var FirstFallbackBreakpoint = 1050;
|
|
56
54
|
var SecondFallbackBreakpoint = 541;
|
|
57
55
|
var FirstFallbackBreakpointNoQS = 375;
|
|
@@ -82,7 +80,7 @@ var DateFilter = function (props) {
|
|
|
82
80
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: props.DateUnit, Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
83
81
|
props.ShowQuickSelects ?
|
|
84
82
|
React.createElement("div", { className: quickSelectClass },
|
|
85
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit })) : null));
|
|
83
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_a = props.QuickSelectRange) !== null && _a !== void 0 ? _a : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })) : null));
|
|
86
84
|
else
|
|
87
85
|
return (React.createElement(React.Fragment, null,
|
|
88
86
|
React.createElement("div", { className: 'row m-0' },
|
|
@@ -92,6 +90,6 @@ var DateFilter = function (props) {
|
|
|
92
90
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: props.DateUnit, Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy }))),
|
|
93
91
|
props.ShowQuickSelects ?
|
|
94
92
|
React.createElement("div", { className: quickSelectClass },
|
|
95
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, SplitSelects: props.ContainerWidth < SecondFallbackBreakpoint })) : null));
|
|
93
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, SplitSelects: props.ContainerWidth < SecondFallbackBreakpoint, QuickSelectRange: (_b = props.QuickSelectRange) !== null && _b !== void 0 ? _b : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })) : null));
|
|
96
94
|
};
|
|
97
95
|
exports.default = DateFilter;
|
|
@@ -43,20 +43,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
43
43
|
__setModuleDefault(result, mod);
|
|
44
44
|
return result;
|
|
45
45
|
};
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
47
|
var React = __importStar(require("react"));
|
|
51
48
|
var react_forms_1 = require("@gpa-gemstone/react-forms");
|
|
52
49
|
var TimeFilter_1 = require("../TimeFilter");
|
|
53
|
-
var QuickSelects_1 =
|
|
50
|
+
var QuickSelects_1 = __importStar(require("../QuickSelects"));
|
|
54
51
|
var react_interactive_1 = require("@gpa-gemstone/react-interactive");
|
|
55
52
|
var DateTimeLocalFilter = function (props) {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f;
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
57
54
|
var FirstFallbackBreakpointQS = 1768;
|
|
58
55
|
var SecondFallbackBreakpointQS = 612, FirstFallbacKBreakpointNoQS = 612;
|
|
59
|
-
var
|
|
56
|
+
var _k = React.useState(false), showQuickPickModal = _k[0], setShowQuickPickModal = _k[1];
|
|
60
57
|
var handleSetTimeWindowFilter = React.useCallback(function (record) {
|
|
61
58
|
var flt = (0, TimeFilter_1.getTimeWindowFromFilter)({ start: record.start, end: record.end }, props.Format);
|
|
62
59
|
props.SetTimeWindowFilter(flt);
|
|
@@ -89,32 +86,32 @@ var DateTimeLocalFilter = function (props) {
|
|
|
89
86
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: (_b = props.DateUnit) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
90
87
|
props.ShowQuickSelects ?
|
|
91
88
|
React.createElement("div", { className: quickSelectCol },
|
|
92
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit })) : null));
|
|
89
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_c = props.QuickSelectRange) !== null && _c !== void 0 ? _c : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })) : null));
|
|
93
90
|
}
|
|
94
91
|
else if (props.ContainerWidth > SecondFallbackBreakpointQS) {
|
|
95
92
|
return (React.createElement("div", { className: 'row m-0' },
|
|
96
93
|
React.createElement("div", { className: startEndCol },
|
|
97
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "start", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'Start', Type: (
|
|
94
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "start", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'Start', Type: (_d = props.DateUnit) !== null && _d !== void 0 ? _d : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
98
95
|
React.createElement("div", { className: startEndCol },
|
|
99
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: (
|
|
96
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: (_e = props.DateUnit) !== null && _e !== void 0 ? _e : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
100
97
|
React.createElement("div", { className: 'row m-0 w-100' }, props.ShowQuickSelects ?
|
|
101
98
|
React.createElement("div", { className: quickSelectCol },
|
|
102
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit }))
|
|
99
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_f = props.QuickSelectRange) !== null && _f !== void 0 ? _f : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) }))
|
|
103
100
|
: null)));
|
|
104
101
|
}
|
|
105
102
|
else {
|
|
106
103
|
return (React.createElement("div", { className: 'row m-0' },
|
|
107
104
|
React.createElement("div", { className: startEndCol },
|
|
108
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "start", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'Start', Type: (
|
|
105
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "start", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'Start', Type: (_g = props.DateUnit) !== null && _g !== void 0 ? _g : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
109
106
|
React.createElement("div", { className: startEndCol },
|
|
110
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: (
|
|
107
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: (_h = props.DateUnit) !== null && _h !== void 0 ? _h : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
111
108
|
props.ShowQuickSelects ?
|
|
112
109
|
React.createElement("div", { className: 'row m-0 w-100' },
|
|
113
110
|
React.createElement("div", { className: 'col-12 d-flex align-items-center justify-content-center' },
|
|
114
111
|
React.createElement("button", { className: 'btn btn-primary w-100', onClick: function () { return setShowQuickPickModal(true); } }, "Quick Selects")),
|
|
115
112
|
React.createElement(react_interactive_1.Modal, { Show: showQuickPickModal, Title: 'Quick Selects', CallBack: function () { return setShowQuickPickModal(false); }, ShowX: true, ShowCancel: false, ShowConfirm: false, Size: 'xlg' },
|
|
116
113
|
React.createElement("div", { className: quickSelectCol },
|
|
117
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit }))))
|
|
114
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_j = props.QuickSelectRange) !== null && _j !== void 0 ? _j : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) }))))
|
|
118
115
|
: null));
|
|
119
116
|
}
|
|
120
117
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ITimeWindow } from "../TimeFilter";
|
|
3
|
-
import { DateUnit } from '../QuickSelects';
|
|
4
3
|
import { Gemstone } from '@gpa-gemstone/application-typings';
|
|
5
4
|
import { TimeUnit } from '../TimeWindowUtils';
|
|
6
5
|
export interface IFilterProps {
|
|
@@ -8,7 +7,8 @@ export interface IFilterProps {
|
|
|
8
7
|
SetTimeWindowFilter: React.Dispatch<React.SetStateAction<ITimeWindow>>;
|
|
9
8
|
HelpMessage?: string;
|
|
10
9
|
Format: "YYYY-MM-DD" | "HH:mm:ss.SSS" | "MM/DD/YYYY HH:mm:ss.SSS";
|
|
11
|
-
DateUnit: DateUnit;
|
|
10
|
+
DateUnit: Gemstone.TSX.Types.DateUnit;
|
|
11
|
+
QuickSelectRange?: Gemstone.TSX.Types.QuickSelectRange;
|
|
12
12
|
Timezone: string;
|
|
13
13
|
Accuracy?: Gemstone.TSX.Types.Accuracy;
|
|
14
14
|
ActiveQP: number;
|
|
@@ -43,15 +43,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
43
43
|
__setModuleDefault(result, mod);
|
|
44
44
|
return result;
|
|
45
45
|
};
|
|
46
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
-
};
|
|
49
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
47
|
var React = __importStar(require("react"));
|
|
51
48
|
var react_forms_1 = require("@gpa-gemstone/react-forms");
|
|
52
49
|
var TimeFilter_1 = require("../TimeFilter");
|
|
53
|
-
var QuickSelects_1 =
|
|
50
|
+
var QuickSelects_1 = __importStar(require("../QuickSelects"));
|
|
54
51
|
var TimeFilter = function (props) {
|
|
52
|
+
var _a, _b;
|
|
55
53
|
var FirstFallback_BreakpointQS = 634;
|
|
56
54
|
var FirstFallback_BreakpointNoQS = 454;
|
|
57
55
|
var handleSetTimeWindowFilter = React.useCallback(function (record) {
|
|
@@ -77,7 +75,7 @@ var TimeFilter = function (props) {
|
|
|
77
75
|
React.createElement("div", { className: startEndCol },
|
|
78
76
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: props.DateUnit, Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
79
77
|
props.ShowQuickSelects ?
|
|
80
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, AddRowContainer: false })
|
|
78
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, AddRowContainer: false, QuickSelectRange: (_a = props.QuickSelectRange) !== null && _a !== void 0 ? _a : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })
|
|
81
79
|
: null));
|
|
82
80
|
else
|
|
83
81
|
return (React.createElement(React.Fragment, null,
|
|
@@ -87,7 +85,7 @@ var TimeFilter = function (props) {
|
|
|
87
85
|
React.createElement("div", { className: startEndCol },
|
|
88
86
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: "end", Help: props.HelpMessage, Setter: handleSetTimeWindowFilter, Label: 'End', Type: props.DateUnit, Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy }))),
|
|
89
87
|
props.ShowQuickSelects ?
|
|
90
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit })
|
|
88
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: 'startEnd', Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_b = props.QuickSelectRange) !== null && _b !== void 0 ? _b : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })
|
|
91
89
|
: null));
|
|
92
90
|
};
|
|
93
91
|
exports.default = TimeFilter;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IStartEnd, IStartDuration, IEndDuration, TimeUnit } from './TimeWindowUtils';
|
|
2
|
-
import { DateUnit } from './QuickSelects';
|
|
3
2
|
import { Gemstone } from '@gpa-gemstone/application-typings';
|
|
4
3
|
export interface ITimeWindow {
|
|
5
4
|
start: string;
|
|
@@ -38,7 +37,7 @@ interface IProps {
|
|
|
38
37
|
/**
|
|
39
38
|
* Format for date/time input
|
|
40
39
|
*/
|
|
41
|
-
format?: DateUnit;
|
|
40
|
+
format?: Gemstone.TSX.Types.DateUnit;
|
|
42
41
|
/**
|
|
43
42
|
* Accuracy of the time input
|
|
44
43
|
*/
|
|
@@ -47,6 +46,10 @@ interface IProps {
|
|
|
47
46
|
* Flag to toggle usage of helper message
|
|
48
47
|
*/
|
|
49
48
|
showHelpMessage?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional choice of QuickSelect buttons
|
|
51
|
+
*/
|
|
52
|
+
quickSelectRange?: Gemstone.TSX.Types.QuickSelectRange;
|
|
50
53
|
/**
|
|
51
54
|
* Optional Flag to enable collapsing of TimeFilter
|
|
52
55
|
*/
|
|
@@ -100,11 +100,11 @@ var TimeFilter = function (props) {
|
|
|
100
100
|
React.createElement("button", { type: "button", className: "btn p-0 ml-auto", onClick: function () { return setCollapsed(function (x) { return !x; }); } }, collapsed ? React.createElement(gpa_symbols_1.ReactIcons.ArrowDropDown, null) : React.createElement(gpa_symbols_1.ReactIcons.ArrowDropUp, null)) : null)),
|
|
101
101
|
collapsed ? null :
|
|
102
102
|
props.dateTimeSetting === 'startEnd' ?
|
|
103
|
-
React.createElement(StartEndFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_c = props.format) !== null && _c !== void 0 ? _c : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage })
|
|
103
|
+
React.createElement(StartEndFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_c = props.format) !== null && _c !== void 0 ? _c : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage, QuickSelectRange: props.quickSelectRange })
|
|
104
104
|
: props.dateTimeSetting === 'startWindow' ?
|
|
105
|
-
React.createElement(WindowFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_d = props.format) !== null && _d !== void 0 ? _d : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage, Window: 'start' })
|
|
105
|
+
React.createElement(WindowFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_d = props.format) !== null && _d !== void 0 ? _d : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage, Window: 'start', QuickSelectRange: props.quickSelectRange })
|
|
106
106
|
:
|
|
107
|
-
React.createElement(WindowFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_e = props.format) !== null && _e !== void 0 ? _e : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage, Window: 'end' })));
|
|
107
|
+
React.createElement(WindowFilter_1.default, { TimeWindowFilter: filter, SetTimeWindowFilter: setFilter, Timezone: props.timeZone, ActiveQP: activeQuickSelect, SetActiveQP: setActiveQuickSelect, SetFilter: props.setFilter, Accuracy: props.accuracy, Format: format, DateUnit: (_e = props.format) !== null && _e !== void 0 ? _e : 'datetime-local', ShowQuickSelects: props.showQuickSelect, ContainerWidth: width, HelpMessage: helpMessaage, Window: 'end', QuickSelectRange: props.quickSelectRange })));
|
|
108
108
|
};
|
|
109
109
|
// Converts ITimeFilter to an ITimeWindow filter
|
|
110
110
|
function getTimeWindowFromFilter(flt, format) {
|
|
@@ -50,12 +50,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
50
50
|
var react_forms_1 = require("@gpa-gemstone/react-forms");
|
|
51
51
|
var React = __importStar(require("react"));
|
|
52
52
|
var TimeFilter_1 = require("../TimeFilter");
|
|
53
|
-
var QuickSelects_1 =
|
|
53
|
+
var QuickSelects_1 = __importStar(require("../QuickSelects"));
|
|
54
54
|
var WindowForm_1 = __importDefault(require("./WindowForm"));
|
|
55
55
|
var WINDOW_FirstFallbackBreakpoint = 898;
|
|
56
56
|
var WINDOW_SecondFallbackBreakpoint = 611;
|
|
57
57
|
var WindowFilter = function (props) {
|
|
58
|
-
var _a, _b, _c, _d;
|
|
58
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
59
59
|
var DatePickerField = props.Window;
|
|
60
60
|
var DatePickerLabel = props.Window.charAt(0).toUpperCase() + props.Window.slice(1);
|
|
61
61
|
var filterType = props.Window === 'start' ? 'startWindow' : 'endWindow';
|
|
@@ -83,29 +83,29 @@ var WindowFilter = function (props) {
|
|
|
83
83
|
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: DatePickerField, Help: props.HelpMessage, Setter: setter, Label: DatePickerLabel, Type: (_b = props.DateUnit) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy }),
|
|
84
84
|
React.createElement(WindowForm_1.default, { Filter: props.TimeWindowFilter, SetFilter: props.SetTimeWindowFilter, SetActiveQP: props.SetActiveQP, Format: props.Format, ShowQuickSelect: props.ShowQuickSelects, Window: props.Window })),
|
|
85
85
|
React.createElement("div", { className: 'col-8 pt-3' },
|
|
86
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit }))));
|
|
86
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_c = props.QuickSelectRange) !== null && _c !== void 0 ? _c : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) }))));
|
|
87
87
|
else if (props.ContainerWidth > WINDOW_SecondFallbackBreakpoint) {
|
|
88
88
|
return (React.createElement(React.Fragment, null,
|
|
89
89
|
React.createElement("div", { className: 'row m-0' },
|
|
90
90
|
React.createElement("div", { className: 'col-6' },
|
|
91
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: DatePickerField, Help: props.HelpMessage, Setter: setter, Label: DatePickerLabel, Type: (
|
|
91
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: DatePickerField, Help: props.HelpMessage, Setter: setter, Label: DatePickerLabel, Type: (_d = props.DateUnit) !== null && _d !== void 0 ? _d : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy })),
|
|
92
92
|
React.createElement("div", { className: 'col-6' },
|
|
93
93
|
React.createElement(WindowForm_1.default, { Filter: props.TimeWindowFilter, SetFilter: props.SetTimeWindowFilter, SetActiveQP: props.SetActiveQP, Format: props.Format, ShowQuickSelect: props.ShowQuickSelects, Window: props.Window }))),
|
|
94
94
|
React.createElement("div", { className: 'row m-0' },
|
|
95
95
|
React.createElement("div", { className: 'col-12' },
|
|
96
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit })))));
|
|
96
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_e = props.QuickSelectRange) !== null && _e !== void 0 ? _e : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })))));
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
99
|
return (React.createElement(React.Fragment, null,
|
|
100
100
|
React.createElement("div", { className: 'row m-0' },
|
|
101
101
|
React.createElement("div", { className: 'col-12' },
|
|
102
|
-
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: DatePickerField, Help: props.HelpMessage, Setter: setter, Label: DatePickerLabel, Type: (
|
|
102
|
+
React.createElement(react_forms_1.DatePicker, { Record: props.TimeWindowFilter, Field: DatePickerField, Help: props.HelpMessage, Setter: setter, Label: DatePickerLabel, Type: (_f = props.DateUnit) !== null && _f !== void 0 ? _f : 'datetime-local', Valid: function () { return true; }, Format: props.Format, Accuracy: props.Accuracy }))),
|
|
103
103
|
React.createElement("div", { className: 'row m-0' },
|
|
104
104
|
React.createElement("div", { className: 'col-12' },
|
|
105
105
|
React.createElement(WindowForm_1.default, { Filter: props.TimeWindowFilter, SetFilter: props.SetTimeWindowFilter, SetActiveQP: props.SetActiveQP, Format: props.Format, ShowQuickSelect: props.ShowQuickSelects, Window: props.Window }))),
|
|
106
106
|
React.createElement("div", { className: 'row m-0' },
|
|
107
107
|
React.createElement("div", { className: 'col-12' },
|
|
108
|
-
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit })))));
|
|
108
|
+
React.createElement(QuickSelects_1.default, { DateTimeSetting: filterType, Timezone: props.Timezone, ActiveQP: props.ActiveQP, SetActiveQP: props.SetActiveQP, SetFilter: props.SetFilter, Format: props.Format, DateUnit: props.DateUnit, QuickSelectRange: (_g = props.QuickSelectRange) !== null && _g !== void 0 ? _g : (0, QuickSelects_1.getQuickSelectRange)(props.DateUnit) })))));
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
exports.default = WindowFilter;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpa-gemstone/common-pages",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.163",
|
|
4
4
|
"description": "Common UI pages for GPA products",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"typescript": "5.5.3"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@gpa-gemstone/application-typings": "0.0.
|
|
49
|
+
"@gpa-gemstone/application-typings": "0.0.94",
|
|
50
50
|
"@gpa-gemstone/gpa-symbols": "0.0.58",
|
|
51
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
|
52
|
-
"@gpa-gemstone/react-forms": "1.1.
|
|
53
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
|
54
|
-
"@gpa-gemstone/react-table": "1.2.
|
|
51
|
+
"@gpa-gemstone/helper-functions": "0.0.53",
|
|
52
|
+
"@gpa-gemstone/react-forms": "1.1.109",
|
|
53
|
+
"@gpa-gemstone/react-interactive": "1.0.173",
|
|
54
|
+
"@gpa-gemstone/react-table": "1.2.96",
|
|
55
55
|
"@reduxjs/toolkit": "1.8.3",
|
|
56
56
|
"crypto-js": "^4.2.0",
|
|
57
57
|
"moment": "^2.29.4",
|