@gpa-gemstone/react-forms 1.1.103 → 1.1.105

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,5 +1,5 @@
1
1
  import { Gemstone } from '@gpa-gemstone/application-typings';
2
- interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
2
+ interface IExtendedProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
3
3
  /**
4
4
  * Field representing the start date in the record
5
5
  * @type {keyof T}
@@ -40,9 +40,11 @@ interface IProps<T> extends Gemstone.TSX.Interfaces.IBaseFormProps<T> {
40
40
  */
41
41
  Type?: ('datetime-local' | 'date');
42
42
  }
43
+ type IProps<T> = Omit<IExtendedProps<T>, "Field">;
43
44
  /**
44
45
  * DateRangePicker Component.
45
46
  * Allows users to select a date range either by choosing predefined durations or by specifying custom dates.
47
+ * @deprecated Use TimeFilter in common-pages instead
46
48
  */
47
49
  export default function DateRangePicker<T>(props: IProps<T>): JSX.Element;
48
50
  export {};
@@ -39,6 +39,7 @@ var moment = require("moment");
39
39
  /**
40
40
  * DateRangePicker Component.
41
41
  * Allows users to select a date range either by choosing predefined durations or by specifying custom dates.
42
+ * @deprecated Use TimeFilter in common-pages instead
42
43
  */
43
44
  function DateRangePicker(props) {
44
45
  // Range box vars, need a secondary var to avoid looping react hooks
@@ -37,12 +37,12 @@ var MultiSelect = function (props) {
37
37
  var _b = React.useState(false), show = _b[0], setShow = _b[1];
38
38
  var _c = React.useState(false), showHelp = _c[0], setShowHelp = _c[1];
39
39
  var _d = React.useState(false), showItems = _d[0], setShowItems = _d[1];
40
- var _e = React.useState(""), guid = _e[0], setGuid = _e[1];
41
- var helperGuid = React.useState("")[0];
40
+ var guid = React.useState((0, helper_functions_1.CreateGuid)())[0];
41
+ var helperGuid = React.useState((0, helper_functions_1.CreateGuid)())[0];
42
42
  var showLabel = React.useMemo(function () { return props.Label !== ""; }, [props.Label]);
43
43
  var showHelpIcon = React.useMemo(function () { return props.Help !== undefined; }, [props.Help]);
44
44
  var selectedOptions = React.useMemo(function () { return props.Options.filter(function (opt) { return opt.Selected; }); }, [props.Options]);
45
- var _f = React.useState({ Top: 0, Left: 0, Width: 0, Height: 0 }), position = _f[0], setPosition = _f[1];
45
+ var _e = React.useState({ Top: 0, Left: 0, Width: 0, Height: 0 }), position = _e[0], setPosition = _e[1];
46
46
  React.useEffect(function () {
47
47
  var updatePosition = _.debounce(function () {
48
48
  if (multiSelect.current != null) {
@@ -68,10 +68,6 @@ var MultiSelect = function (props) {
68
68
  };
69
69
  }
70
70
  }, [show]);
71
- // Effect to generate a unique ID for the component.
72
- React.useEffect(function () {
73
- setGuid((0, helper_functions_1.CreateGuid)());
74
- }, []);
75
71
  // Handle showing and hiding of the dropdown.
76
72
  function HandleShow(evt) {
77
73
  if (selectTable.current != null && selectTable.current.contains(evt.target))
package/lib/ToolTip.d.ts CHANGED
@@ -1,9 +1,24 @@
1
1
  import * as React from 'react';
2
2
  interface IProps {
3
+ /**
4
+ * Flag to show or hide the tooltip.
5
+ */
3
6
  Show: boolean;
7
+ /**
8
+ * Optional position for the tooltip. If not provided, 'top' is used.
9
+ */
4
10
  Position?: Position;
11
+ /**
12
+ * If provided, the tooltip will look for an element with a matching data-tooltip attribute to position itself to.
13
+ */
5
14
  Target?: string;
15
+ /**
16
+ * Optional z-index for the tooltip. Defaults to 9999.
17
+ */
6
18
  Zindex?: number;
19
+ /**
20
+ * Optional class to style the tooltip. Uses Bootstrap alert classes if provided.
21
+ */
7
22
  Class?: 'primary' | 'secondary' | 'success' | 'danger' | 'info';
8
23
  }
9
24
  type Position = 'top' | 'bottom' | 'left' | 'right';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-forms",
3
- "version": "1.1.103",
3
+ "version": "1.1.105",
4
4
  "description": "React Form modules for gpa webapps",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -45,9 +45,9 @@
45
45
  "typescript": "5.5.3"
46
46
  },
47
47
  "dependencies": {
48
- "@gpa-gemstone/application-typings": "0.0.90",
48
+ "@gpa-gemstone/application-typings": "0.0.91",
49
49
  "@gpa-gemstone/gpa-symbols": "0.0.57",
50
- "@gpa-gemstone/helper-functions": "0.0.48",
50
+ "@gpa-gemstone/helper-functions": "0.0.50",
51
51
  "@types/react": "^17.0.14",
52
52
  "@types/styled-components": "^5.1.11",
53
53
  "lodash": "^4.17.21",