@elliemae/ds-popperjs 2.0.0-rc.7 → 2.0.1-rc.0

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.
@@ -41,8 +41,8 @@ const useConfigDSPopperjs = appProps => {
41
41
  var _referenceElement$con;
42
42
 
43
43
  if (!(referenceElement !== null && referenceElement !== void 0 && (_referenceElement$con = referenceElement.contains) !== null && _referenceElement$con !== void 0 && _referenceElement$con.call(referenceElement, e === null || e === void 0 ? void 0 : e.target))) {
44
- closeContextMenu();
45
44
  onClickOutside(e);
45
+ closeContextMenu();
46
46
  }
47
47
  });
48
48
  return react.useMemo(() => ({
package/cjs/propTypes.js CHANGED
@@ -77,7 +77,9 @@ const dspopperjsPropTypes = {
77
77
  * https://popper.js.org/docs/v2/modifiers/
78
78
  */
79
79
  modifiers: reactDesc.PropTypes.array.description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/').defaultValue(1),
80
- extraPopperStyles: reactDesc.PropTypes.object.description('Extra object styles to attach to the popper element').defaultValue({})
80
+ extraPopperStyles: reactDesc.PropTypes.object.description('Extra object styles to attach to the popper element').defaultValue({}),
81
+ onClickOutside: reactDesc.PropTypes.func.description('Callback triggered when clicking outside the popper').defaultValue(() => null),
82
+ children: reactDesc.PropTypes.node.description('The content of the popper').defaultValue(undefined)
81
83
  };
82
84
 
83
85
  exports.dspopperjsPropTypes = dspopperjsPropTypes;
@@ -37,8 +37,8 @@ const useConfigDSPopperjs = appProps => {
37
37
  var _referenceElement$con;
38
38
 
39
39
  if (!(referenceElement !== null && referenceElement !== void 0 && (_referenceElement$con = referenceElement.contains) !== null && _referenceElement$con !== void 0 && _referenceElement$con.call(referenceElement, e === null || e === void 0 ? void 0 : e.target))) {
40
- closeContextMenu();
41
40
  onClickOutside(e);
41
+ closeContextMenu();
42
42
  }
43
43
  });
44
44
  return useMemo(() => ({
package/esm/propTypes.js CHANGED
@@ -73,7 +73,9 @@ const dspopperjsPropTypes = {
73
73
  * https://popper.js.org/docs/v2/modifiers/
74
74
  */
75
75
  modifiers: PropTypes.array.description('modifiers array for full-custom popper-js override, https://popper.js.org/docs/v2/modifiers/').defaultValue(1),
76
- extraPopperStyles: PropTypes.object.description('Extra object styles to attach to the popper element').defaultValue({})
76
+ extraPopperStyles: PropTypes.object.description('Extra object styles to attach to the popper element').defaultValue({}),
77
+ onClickOutside: PropTypes.func.description('Callback triggered when clicking outside the popper').defaultValue(() => null),
78
+ children: PropTypes.node.description('The content of the popper').defaultValue(undefined)
77
79
  };
78
80
 
79
81
  export { dspopperjsPropTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-popperjs",
3
- "version": "2.0.0-rc.7",
3
+ "version": "2.0.1-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Popper JS Wrapper",
6
6
  "module": "./esm/index.js",
@@ -68,7 +68,8 @@
68
68
  "build": "node ../../scripts/build/build.js"
69
69
  },
70
70
  "dependencies": {
71
- "@elliemae/ds-props-helpers": "2.0.0-rc.7",
71
+ "@elliemae/ds-props-helpers": "2.0.1-rc.0",
72
+ "@elliemae/ds-system": "2.0.1-rc.0",
72
73
  "react-desc": "~4.1.3",
73
74
  "react-popper": "~2.2.5"
74
75
  },
package/types/index.d.ts CHANGED
@@ -1,23 +1,56 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  import type { DSDSPopperjsPropsT } from './index.d';
3
4
  declare const DSPopperJS: {
4
5
  (props: DSDSPopperjsPropsT): JSX.Element;
5
6
  propTypes: {
6
- referenceElement: any;
7
- showPopover: any;
8
- closeContextMenu: any;
9
- withoutPortal: any;
10
- withoutArrow: any;
11
- withoutAnimation: any;
12
- animationDuration: any;
13
- boundaryElement: any;
14
- portalDOMContainer: any;
15
- startPlacementPreference: any;
16
- placementOrderPreference: any;
17
- zIndex: any;
18
- customOffset: any;
19
- modifiers: any;
20
- extraPopperStyles: any;
7
+ referenceElement: import("react-desc").PropTypesDescValidator;
8
+ showPopover: import("react-desc").PropTypesDescValidator;
9
+ closeContextMenu: {
10
+ deprecated: import("react-desc").PropTypesDescValidator;
11
+ };
12
+ withoutPortal: {
13
+ deprecated: import("react-desc").PropTypesDescValidator;
14
+ };
15
+ withoutArrow: {
16
+ deprecated: import("react-desc").PropTypesDescValidator;
17
+ };
18
+ withoutAnimation: {
19
+ deprecated: import("react-desc").PropTypesDescValidator;
20
+ };
21
+ animationDuration: {
22
+ deprecated: import("react-desc").PropTypesDescValidator;
23
+ };
24
+ boundaryElement: {
25
+ deprecated: import("react-desc").PropTypesDescValidator;
26
+ };
27
+ portalDOMContainer: {
28
+ deprecated: import("react-desc").PropTypesDescValidator;
29
+ };
30
+ startPlacementPreference: {
31
+ deprecated: import("react-desc").PropTypesDescValidator;
32
+ };
33
+ placementOrderPreference: {
34
+ deprecated: import("react-desc").PropTypesDescValidator;
35
+ };
36
+ zIndex: {
37
+ deprecated: import("react-desc").PropTypesDescValidator;
38
+ };
39
+ customOffset: {
40
+ deprecated: import("react-desc").PropTypesDescValidator;
41
+ };
42
+ modifiers: {
43
+ deprecated: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ extraPopperStyles: {
46
+ deprecated: import("react-desc").PropTypesDescValidator;
47
+ };
48
+ onClickOutside: {
49
+ deprecated: import("react-desc").PropTypesDescValidator;
50
+ };
51
+ children: {
52
+ deprecated: import("react-desc").PropTypesDescValidator;
53
+ };
21
54
  };
22
55
  };
23
56
  declare const DSPopperJSWithSchema: any;
@@ -1,62 +1,95 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  export declare const dspopperjsPropTypes: {
2
3
  /**
3
4
  * React ref to popperjs referenceElement
4
5
  */
5
- referenceElement: any;
6
+ referenceElement: import("react-desc").PropTypesDescValidator;
6
7
  /**
7
8
  * Wheter or not to show the popper content
8
9
  */
9
- showPopover: any;
10
+ showPopover: import("react-desc").PropTypesDescValidator;
10
11
  /**
11
12
  * Callback to close the context menu, used for "on click outside",
12
13
  * if not provided click outside will not trigger anything
13
14
  */
14
- closeContextMenu: any;
15
+ closeContextMenu: {
16
+ deprecated: import("react-desc").PropTypesDescValidator;
17
+ };
15
18
  /**
16
19
  * Wheter or not the popper content should appear in a DOM portal or not
17
20
  */
18
- withoutPortal: any;
21
+ withoutPortal: {
22
+ deprecated: import("react-desc").PropTypesDescValidator;
23
+ };
19
24
  /**
20
25
  * Wheter or not the popper context menu should print the arrow
21
26
  */
22
- withoutArrow: any;
27
+ withoutArrow: {
28
+ deprecated: import("react-desc").PropTypesDescValidator;
29
+ };
23
30
  /**
24
31
  * Whether or not the popper context menu should be animated
25
32
  */
26
- withoutAnimation: any;
33
+ withoutAnimation: {
34
+ deprecated: import("react-desc").PropTypesDescValidator;
35
+ };
27
36
  /**
28
37
  * Popper context menus Animation duration in ms
29
38
  */
30
- animationDuration: any;
39
+ animationDuration: {
40
+ deprecated: import("react-desc").PropTypesDescValidator;
41
+ };
31
42
  /**
32
43
  * Bounding element to calculate upon, defaults to it is "clippingParents",
33
44
  * which are the scrolling containers that may cause the element to be partially or fully cut off.
34
45
  */
35
- boundaryElement: any;
46
+ boundaryElement: {
47
+ deprecated: import("react-desc").PropTypesDescValidator;
48
+ };
36
49
  /**
37
50
  * When using portal, the container in which to append the DOM content, defaults to document body
38
51
  */
39
- portalDOMContainer: any;
52
+ portalDOMContainer: {
53
+ deprecated: import("react-desc").PropTypesDescValidator;
54
+ };
40
55
  /**
41
56
  * start placement preferences, as per popperjs placement option
42
57
  */
43
- startPlacementPreference: any;
58
+ startPlacementPreference: {
59
+ deprecated: import("react-desc").PropTypesDescValidator;
60
+ };
44
61
  /**
45
62
  * Array of placement preferences, as per popperjs "flip" placement option
46
63
  */
47
- placementOrderPreference: any;
64
+ placementOrderPreference: {
65
+ deprecated: import("react-desc").PropTypesDescValidator;
66
+ };
48
67
  /**
49
68
  * popperjs content z-index
50
69
  */
51
- zIndex: any;
70
+ zIndex: {
71
+ deprecated: import("react-desc").PropTypesDescValidator;
72
+ };
52
73
  /**
53
74
  * placement offset array
54
75
  */
55
- customOffset: any;
76
+ customOffset: {
77
+ deprecated: import("react-desc").PropTypesDescValidator;
78
+ };
56
79
  /**
57
80
  * modifiers array for full-custom popper-js override
58
81
  * https://popper.js.org/docs/v2/modifiers/
59
82
  */
60
- modifiers: any;
61
- extraPopperStyles: any;
83
+ modifiers: {
84
+ deprecated: import("react-desc").PropTypesDescValidator;
85
+ };
86
+ extraPopperStyles: {
87
+ deprecated: import("react-desc").PropTypesDescValidator;
88
+ };
89
+ onClickOutside: {
90
+ deprecated: import("react-desc").PropTypesDescValidator;
91
+ };
92
+ children: {
93
+ deprecated: import("react-desc").PropTypesDescValidator;
94
+ };
62
95
  };