@gpa-gemstone/common-pages 0.0.118 → 0.0.119

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,7 @@ interface IProps {
21
21
  timeZone: string;
22
22
  isHorizontal: boolean;
23
23
  format?: DateUnit;
24
+ showHelpMessage?: boolean;
24
25
  }
25
26
  declare const TimeFilter: (props: IProps) => React.JSX.Element;
26
27
  export declare function getTimeWindowFromFilter(flt: ITimeFilter, format?: string): ITimeWindow;
@@ -57,11 +57,11 @@ var moment_1 = __importDefault(require("moment"));
57
57
  var QuickSelects_1 = require("./QuickSelects");
58
58
  var lodash_1 = __importDefault(require("lodash"));
59
59
  var TimeFilter = function (props) {
60
- var _a, _b;
60
+ var _a, _b, _c, _d;
61
61
  var format = (0, QuickSelects_1.getFormat)(props.format);
62
62
  var QuickSelects = React.useMemo(function () { return QuickSelects_1.AvailableQuickSelects.filter(function (qs) { return !qs.hideQuickPick(props.format); }); }, [props.format]);
63
- var _c = React.useState(-1), activeQP = _c[0], setActiveQP = _c[1];
64
- var _d = React.useState(getTimeWindowFromFilter(props.filter, format)), filter = _d[0], setFilter = _d[1];
63
+ var _e = React.useState(-1), activeQP = _e[0], setActiveQP = _e[1];
64
+ var _f = React.useState(getTimeWindowFromFilter(props.filter, format)), filter = _f[0], setFilter = _f[1];
65
65
  // Checks typing of ITimeFilter and then compares to ITimeWindow
66
66
  function isEqual(timeWindow, timeFilter) {
67
67
  var flt = getTimeWindowFromFilter(timeFilter, format);
@@ -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: "All times are in system time. System time is currently set to ".concat(props.timeZone, ". "), Setter: function (r) {
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. System time is currently set to ".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 of Time Window:', Type: (_a = props.format) !== null && _a !== void 0 ? _a : 'datetime-local', Valid: function () { return true; }, Format: format }),
93
+ }, Label: 'Start of Time Window:', Type: (_b = props.format) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: format }),
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: "All times are in system time. System time is currently set to ".concat(props.timeZone, ". "), Setter: function (r) {
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. System time is currently set to ".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 of Time Window :', Type: (_b = props.format) !== null && _b !== void 0 ? _b : 'datetime-local', Valid: function () { return true; }, Format: format }),
107
+ }, Label: 'End of Time Window :', Type: (_d = props.format) !== null && _d !== void 0 ? _d : 'datetime-local', Valid: function () { return true; }, Format: format }),
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))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/common-pages",
3
- "version": "0.0.118",
3
+ "version": "0.0.119",
4
4
  "description": "Common UI pages for GPA products",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -45,11 +45,11 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@gpa-gemstone/application-typings": "0.0.77",
48
- "@gpa-gemstone/gpa-symbols": "0.0.41",
48
+ "@gpa-gemstone/gpa-symbols": "0.0.42",
49
49
  "@gpa-gemstone/helper-functions": "0.0.35",
50
- "@gpa-gemstone/react-forms": "1.1.72",
51
- "@gpa-gemstone/react-interactive": "1.0.132",
52
- "@gpa-gemstone/react-table": "1.2.54",
50
+ "@gpa-gemstone/react-forms": "1.1.73",
51
+ "@gpa-gemstone/react-interactive": "1.0.133",
52
+ "@gpa-gemstone/react-table": "1.2.55",
53
53
  "@reduxjs/toolkit": "1.8.3",
54
54
  "crypto-js": "^4.2.0",
55
55
  "moment": "^2.29.4",