@gpa-gemstone/common-pages 0.0.135 → 0.0.136
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.
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { IStartEnd, IStartDuration, IEndDuration, TimeUnit } from './TimeWindowUtils';
|
3
3
|
import { DateUnit } from './QuickSelects';
|
4
|
+
import { Gemstone } from '@gpa-gemstone/application-typings';
|
4
5
|
interface ITimeWindow {
|
5
6
|
start: string;
|
6
7
|
end: string;
|
@@ -21,6 +22,7 @@ interface IProps {
|
|
21
22
|
timeZone: string;
|
22
23
|
isHorizontal: boolean;
|
23
24
|
format?: DateUnit;
|
25
|
+
accuracy?: Gemstone.TSX.Types.Accuracy;
|
24
26
|
showHelpMessage?: boolean;
|
25
27
|
}
|
26
28
|
declare const TimeFilter: (props: IProps) => React.JSX.Element;
|
@@ -84,13 +84,13 @@ var TimeFilter = function (props) {
|
|
84
84
|
props.dateTimeSetting === 'startWindow' || props.dateTimeSetting === 'startEnd' ?
|
85
85
|
React.createElement(Row, { addRow: !props.isHorizontal, class: 'm-0' },
|
86
86
|
React.createElement("div", { className: props.isHorizontal ? (props.showQuickSelect ? props.dateTimeSetting === 'startEnd' ? 'col-2' : 'col-4' : 'col-6') : 'col-12 p-0' },
|
87
|
-
React.createElement(react_forms_1.DatePicker, { Record: filter, Field: "start", Help: ((_a = props.showHelpMessage) !== null && _a !== void 0 ? _a : true) ? "All times are in system time
|
87
|
+
React.createElement(react_forms_1.DatePicker, { Record: filter, Field: "start", Help: ((_a = props.showHelpMessage) !== null && _a !== void 0 ? _a : true) ? "All times shown are in system time (".concat(props.timeZone, ").") : undefined, Setter: function (r) {
|
88
88
|
var flt = props.dateTimeSetting === 'startWindow' ?
|
89
89
|
getTimeWindowFromFilter({ start: r.start, duration: r.duration, unit: r.unit }, format) :
|
90
90
|
getTimeWindowFromFilter({ start: r.start, end: r.end }, format);
|
91
91
|
setFilter(flt);
|
92
92
|
setActiveQP(-1);
|
93
|
-
}, Label: 'Start', Type: (_b = props.format) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: format }),
|
93
|
+
}, Label: 'Start', Type: (_b = props.format) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: format, Accuracy: props.accuracy }),
|
94
94
|
props.showQuickSelect && props.dateTimeSetting === 'startWindow' ?
|
95
95
|
React.createElement(StartWindowForm, { IsHorizontal: props.isHorizontal, Filter: filter, SetFilter: setFilter, SetActiveQP: setActiveQP, Format: format, ShowQuickSelect: props.showQuickSelect })
|
96
96
|
: null))
|
@@ -98,13 +98,13 @@ var TimeFilter = function (props) {
|
|
98
98
|
props.dateTimeSetting === 'endWindow' || props.dateTimeSetting === 'startEnd' ?
|
99
99
|
React.createElement(Row, { addRow: !props.isHorizontal, class: 'm-0' },
|
100
100
|
React.createElement("div", { className: props.isHorizontal ? (props.showQuickSelect ? props.dateTimeSetting === 'startEnd' ? 'col-2' : 'col-4' : 'col-6') : 'col-12 p-0' },
|
101
|
-
React.createElement(react_forms_1.DatePicker, { Record: filter, Field: "end", Help: ((_c = props.showHelpMessage) !== null && _c !== void 0 ? _c : true) ? "All times are in system time
|
101
|
+
React.createElement(react_forms_1.DatePicker, { Record: filter, Field: "end", Help: ((_c = props.showHelpMessage) !== null && _c !== void 0 ? _c : true) ? "All times shown are in system time (".concat(props.timeZone, ").") : undefined, Setter: function (r) {
|
102
102
|
var flt = props.dateTimeSetting === 'endWindow' ?
|
103
103
|
getTimeWindowFromFilter({ end: r.end, duration: r.duration, unit: r.unit }, format) :
|
104
104
|
getTimeWindowFromFilter({ start: r.start, end: r.end }, format);
|
105
105
|
setFilter(flt);
|
106
106
|
setActiveQP(-1);
|
107
|
-
}, Label: 'End', Type: (_d = props.format) !== null && _d !== void 0 ? _d : 'datetime-local', Valid: function () { return true; }, Format: format }),
|
107
|
+
}, Label: 'End', Type: (_d = props.format) !== null && _d !== void 0 ? _d : 'datetime-local', Valid: function () { return true; }, Format: format, Accuracy: props.accuracy }),
|
108
108
|
props.showQuickSelect && props.dateTimeSetting === 'endWindow' ?
|
109
109
|
React.createElement(EndWindowForm, { IsHorizontal: props.isHorizontal, Filter: filter, SetFilter: setFilter, SetActiveQP: setActiveQP, Format: format, ShowQuickSelect: props.showQuickSelect })
|
110
110
|
: null))
|
@@ -120,7 +120,11 @@ var TimeFilter = function (props) {
|
|
120
120
|
React.createElement(Row, { addRow: props.isHorizontal, class: "m-0 justify-content-center align-items-center" }, QuickSelects.map(function (qs, i) {
|
121
121
|
if (i % 3 !== 0)
|
122
122
|
return null;
|
123
|
-
return (React.createElement("div", { key: i, className: props.isHorizontal && props.dateTimeSetting === 'startEnd' ? 'col-2' : "col-4", style: {
|
123
|
+
return (React.createElement("div", { key: i, className: props.isHorizontal && props.dateTimeSetting === 'startEnd' ? 'col-2' : "col-4", style: {
|
124
|
+
paddingLeft: (props.isHorizontal && props.dateTimeSetting === 'startEnd' ? 0 : (i % 9 == 0 ? 15 : 0)),
|
125
|
+
paddingRight: (props.isHorizontal && props.dateTimeSetting === 'startEnd' ? 2 : ((i % 18 == 6 || i % 18 == 15) ? 15 : 2)),
|
126
|
+
marginTop: 10
|
127
|
+
} },
|
124
128
|
React.createElement("ul", { className: "list-group", key: i },
|
125
129
|
React.createElement("li", { key: i, style: { cursor: 'pointer' }, onClick: function () {
|
126
130
|
var flt = getTimeWindowFromFilter(QuickSelects[i].createFilter(props.timeZone, props.format), format);
|
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.136",
|
4
4
|
"description": "Common UI pages for GPA products",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -44,12 +44,12 @@
|
|
44
44
|
"typescript": "5.5.3"
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
|
-
"@gpa-gemstone/application-typings": "0.0.
|
47
|
+
"@gpa-gemstone/application-typings": "0.0.84",
|
48
48
|
"@gpa-gemstone/gpa-symbols": "0.0.49",
|
49
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
50
|
-
"@gpa-gemstone/react-forms": "1.1.
|
51
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
52
|
-
"@gpa-gemstone/react-table": "1.2.
|
49
|
+
"@gpa-gemstone/helper-functions": "0.0.40",
|
50
|
+
"@gpa-gemstone/react-forms": "1.1.87",
|
51
|
+
"@gpa-gemstone/react-interactive": "1.0.148",
|
52
|
+
"@gpa-gemstone/react-table": "1.2.70",
|
53
53
|
"@reduxjs/toolkit": "1.8.3",
|
54
54
|
"crypto-js": "^4.2.0",
|
55
55
|
"moment": "^2.29.4",
|