cx 25.9.0 → 25.10.1

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.
Files changed (139) hide show
  1. package/LICENSE-THIRD-PARTY.md +91 -91
  2. package/LICENSE.md +7 -7
  3. package/README.md +46 -46
  4. package/dist/charts.js +25 -11
  5. package/dist/manifest.js +493 -493
  6. package/dist/ui.js +1 -3
  7. package/package.json +1 -1
  8. package/src/charts/Bar.d.ts +27 -27
  9. package/src/charts/BarGraph.d.ts +15 -15
  10. package/src/charts/Chart.d.ts +12 -12
  11. package/src/charts/ColorMap.d.ts +21 -21
  12. package/src/charts/Column.d.ts +29 -29
  13. package/src/charts/ColumnBarBase.d.ts +64 -64
  14. package/src/charts/ColumnBarGraphBase.d.ts +73 -73
  15. package/src/charts/ColumnGraph.d.ts +18 -18
  16. package/src/charts/Gridlines.d.ts +24 -24
  17. package/src/charts/Legend.d.ts +45 -45
  18. package/src/charts/LegendEntry.d.ts +54 -54
  19. package/src/charts/LineGraph.d.ts +101 -101
  20. package/src/charts/Marker.d.ts +110 -110
  21. package/src/charts/MarkerLine.d.ts +56 -56
  22. package/src/charts/MouseTracker.d.ts +16 -16
  23. package/src/charts/PieChart.d.ts +92 -92
  24. package/src/charts/PieLabel.d.ts +26 -26
  25. package/src/charts/PieLabelsContainer.d.ts +6 -6
  26. package/src/charts/Range.d.ts +74 -74
  27. package/src/charts/RangeMarker.d.ts +35 -35
  28. package/src/charts/ScatterGraph.d.ts +64 -64
  29. package/src/charts/Swimlane.d.ts +24 -24
  30. package/src/charts/Swimlanes.d.ts +41 -41
  31. package/src/charts/axis/Axis.d.ts +113 -113
  32. package/src/charts/axis/Axis.js +8 -0
  33. package/src/charts/axis/Axis.scss +22 -22
  34. package/src/charts/axis/CategoryAxis.d.ts +30 -30
  35. package/src/charts/axis/NumericAxis.d.ts +46 -46
  36. package/src/charts/axis/Stack.d.ts +10 -10
  37. package/src/charts/axis/TimeAxis.d.ts +31 -31
  38. package/src/charts/axis/index.d.ts +3 -3
  39. package/src/charts/axis/index.scss +5 -5
  40. package/src/charts/axis/variables.scss +2 -2
  41. package/src/charts/helpers/MinMaxFinder.d.ts +22 -22
  42. package/src/charts/helpers/PointReducer.d.ts +24 -24
  43. package/src/charts/helpers/SnapPointFinder.d.ts +30 -30
  44. package/src/charts/helpers/ValueAtFinder.d.ts +16 -16
  45. package/src/charts/helpers/index.d.ts +4 -4
  46. package/src/charts/index.d.ts +27 -27
  47. package/src/charts/index.scss +22 -22
  48. package/src/charts/shapes.d.ts +22 -22
  49. package/src/global.scss +13 -13
  50. package/src/index.scss +6 -6
  51. package/src/svg/index.scss +8 -8
  52. package/src/ui/Instance.js +1 -4
  53. package/src/ui/index.scss +2 -2
  54. package/src/ui/layout/index.scss +3 -3
  55. package/src/ui/layout/variables.scss +2 -2
  56. package/src/ui/variables.scss +1 -1
  57. package/src/util/call-once.scss +6 -6
  58. package/src/util/index.scss +10 -10
  59. package/src/util/scss/divide.scss +3 -3
  60. package/src/util/scss/index.scss +9 -9
  61. package/src/variables.scss +217 -217
  62. package/src/widgets/AccessorBindings.spec.tsx +66 -66
  63. package/src/widgets/Button.d.ts +58 -58
  64. package/src/widgets/CxCredit.d.ts +12 -12
  65. package/src/widgets/DocumentTitle.d.ts +11 -11
  66. package/src/widgets/FlexBox.d.ts +69 -69
  67. package/src/widgets/Heading.d.ts +16 -16
  68. package/src/widgets/HighlightedSearchText.d.ts +9 -9
  69. package/src/widgets/HtmlElement.d.ts +30 -30
  70. package/src/widgets/Icon.d.ts +34 -34
  71. package/src/widgets/ProgressBar.d.ts +17 -17
  72. package/src/widgets/Resizer.d.ts +27 -27
  73. package/src/widgets/Sandbox.d.ts +18 -18
  74. package/src/widgets/Section.d.ts +52 -52
  75. package/src/widgets/animations.scss +10 -10
  76. package/src/widgets/autoFocus.d.ts +1 -1
  77. package/src/widgets/cx.d.ts +1 -1
  78. package/src/widgets/drag-drop/DragSource.d.ts +45 -45
  79. package/src/widgets/drag-drop/DropZone.d.ts +98 -98
  80. package/src/widgets/drag-drop/index.d.ts +4 -4
  81. package/src/widgets/drag-drop/index.scss +3 -3
  82. package/src/widgets/drag-drop/ops.d.ts +56 -56
  83. package/src/widgets/enableAllInternalDependencies.d.ts +1 -1
  84. package/src/widgets/form/Calendar.variables.scss +63 -63
  85. package/src/widgets/form/Checkbox.variables.scss +39 -39
  86. package/src/widgets/form/ColorPicker.variables.scss +22 -22
  87. package/src/widgets/form/Radio.variables.scss +45 -45
  88. package/src/widgets/form/index.scss +24 -24
  89. package/src/widgets/grid/Grid.d.ts +442 -442
  90. package/src/widgets/grid/GridCell.d.ts +38 -38
  91. package/src/widgets/grid/Pagination.d.ts +14 -14
  92. package/src/widgets/grid/TreeNode.d.ts +23 -23
  93. package/src/widgets/grid/index.d.ts +3 -3
  94. package/src/widgets/grid/index.scss +3 -3
  95. package/src/widgets/icons/arrow-down.svg +3 -3
  96. package/src/widgets/icons/arrow-right.svg +2 -2
  97. package/src/widgets/icons/base.svg +104 -104
  98. package/src/widgets/icons/calendar-old.svg +169 -169
  99. package/src/widgets/icons/calendar.svg +187 -187
  100. package/src/widgets/icons/clear.svg +74 -74
  101. package/src/widgets/icons/close.svg +74 -74
  102. package/src/widgets/icons/dropdown-arrow.svg +61 -61
  103. package/src/widgets/icons/file.svg +4 -4
  104. package/src/widgets/icons/folder-open.svg +5 -5
  105. package/src/widgets/icons/folder.svg +58 -58
  106. package/src/widgets/icons/forward.svg +67 -67
  107. package/src/widgets/icons/loading.svg +4 -4
  108. package/src/widgets/icons/search.svg +107 -107
  109. package/src/widgets/icons/sort-asc.svg +3 -3
  110. package/src/widgets/index.d.ts +55 -55
  111. package/src/widgets/index.scss +16 -16
  112. package/src/widgets/nav/Link.d.ts +26 -26
  113. package/src/widgets/nav/LinkButton.d.ts +34 -34
  114. package/src/widgets/nav/Menu.d.ts +27 -27
  115. package/src/widgets/nav/MenuItem.d.ts +31 -31
  116. package/src/widgets/nav/MenuSpacer.d.ts +5 -5
  117. package/src/widgets/nav/RedirectRoute.d.ts +9 -9
  118. package/src/widgets/nav/Route.d.ts +21 -21
  119. package/src/widgets/nav/Scroller.d.ts +17 -17
  120. package/src/widgets/nav/Submenu.d.ts +6 -6
  121. package/src/widgets/nav/Tab.d.ts +33 -33
  122. package/src/widgets/nav/Tab.variables.scss +84 -84
  123. package/src/widgets/nav/index.d.ts +10 -10
  124. package/src/widgets/nav/index.scss +5 -5
  125. package/src/widgets/overlay/ContextMenu.d.ts +10 -10
  126. package/src/widgets/overlay/Dropdown.d.ts +32 -32
  127. package/src/widgets/overlay/FlyweightTooltipTracker.d.ts +8 -8
  128. package/src/widgets/overlay/MsgBox.d.ts +16 -16
  129. package/src/widgets/overlay/Overlay.d.ts +73 -73
  130. package/src/widgets/overlay/Toast.d.ts +30 -30
  131. package/src/widgets/overlay/Tooltip.d.ts +50 -50
  132. package/src/widgets/overlay/Window.d.ts +42 -42
  133. package/src/widgets/overlay/Window.variables.scss +62 -62
  134. package/src/widgets/overlay/alerts.d.ts +7 -7
  135. package/src/widgets/overlay/captureMouse.d.ts +53 -53
  136. package/src/widgets/overlay/captureMouse.scss +13 -13
  137. package/src/widgets/overlay/createHotPromiseWindowFactory.d.ts +18 -18
  138. package/src/widgets/overlay/index.d.ts +11 -11
  139. package/src/widgets/overlay/index.scss +15 -15
@@ -1,30 +1,30 @@
1
- import * as Cx from '../../core';
2
- import { OverlayProps } from './Overlay';
3
-
4
- interface ToastProps extends OverlayProps {
5
-
6
- /** Value of timeout in milliseconds after which the toast is automatically dismissed. */
7
- timeout?: Cx.NumberProp,
8
-
9
- message?: string,
10
-
11
- /** List of child elements. */
12
- items?: Cx.RecordsProp,
13
-
14
- /** Add default padding. Default is `true`. */
15
- pad?: boolean,
16
-
17
- /** Base CSS class. Default is `toast`. */
18
- baseClass?: string,
19
-
20
- /**
21
- * Defines where the toast will be placed.
22
- * Supported values are `top`, `right`, `bottom` and `left`. Default value is `top`.
23
- */
24
- placement?: string,
25
-
26
- styled?: boolean
27
-
28
- }
29
-
30
- export class Toast extends Cx.Widget<ToastProps> {}
1
+ import * as Cx from '../../core';
2
+ import { OverlayProps } from './Overlay';
3
+
4
+ interface ToastProps extends OverlayProps {
5
+
6
+ /** Value of timeout in milliseconds after which the toast is automatically dismissed. */
7
+ timeout?: Cx.NumberProp,
8
+
9
+ message?: string,
10
+
11
+ /** List of child elements. */
12
+ items?: Cx.RecordsProp,
13
+
14
+ /** Add default padding. Default is `true`. */
15
+ pad?: boolean,
16
+
17
+ /** Base CSS class. Default is `toast`. */
18
+ baseClass?: string,
19
+
20
+ /**
21
+ * Defines where the toast will be placed.
22
+ * Supported values are `top`, `right`, `bottom` and `left`. Default value is `top`.
23
+ */
24
+ placement?: string,
25
+
26
+ styled?: boolean
27
+
28
+ }
29
+
30
+ export class Toast extends Cx.Widget<ToastProps> {}
@@ -1,50 +1,50 @@
1
- import * as Cx from '../../core';
2
- import { DropdownProps } from './Dropdown';
3
-
4
- export interface TooltipProps extends DropdownProps {
5
-
6
- /** Text to be displayed inside the tooltip. */
7
- text?: Cx.StringProp,
8
-
9
- /** Text to be displayed in the header. */
10
- title?: Cx.StringProp,
11
-
12
- /**
13
- * Set to true to make the tooltip always visible.
14
- * This is useful e.g. in product tours, when instructions need to be shown, even if the mouse pointer is not around.
15
- */
16
- alwaysVisible?: Cx.BooleanProp,
17
-
18
- /** Base CSS class to be applied to the field. Defaults to 'tooltip'. */
19
- baseClass?: string,
20
-
21
- /**
22
- * Set to `true` to append the set `animate` state after the initial render.
23
- * Appended CSS class may be used to add show/hide animations.
24
- */
25
- animate?: boolean,
26
-
27
- /** Set to `true` to make the tooltip follow the mouse movement. */
28
- trackMouse?: boolean,
29
-
30
- trackMouseX?: boolean,
31
- trackMouseY?: boolean,
32
-
33
- /**
34
- * This property controls how tooltips behave on touch events.
35
- * Default value is `toggle` which means that the tooltip is shown on first tap and closed on the second tap.
36
- * Use `ignore` to skip showing tooltips on touch events.
37
- */
38
- touchBehavior?: string,
39
-
40
-
41
- /**
42
- * Set to true to rely on browser's window mousemove event for getting mouse coordinates
43
- * instead of using the element that tooltip is attached to.
44
- */
45
- globalMouseTracking?: boolean
46
- }
47
-
48
- export class Tooltip extends Cx.Widget<TooltipProps> {}
49
-
50
- export function enableTooltips();
1
+ import * as Cx from '../../core';
2
+ import { DropdownProps } from './Dropdown';
3
+
4
+ export interface TooltipProps extends DropdownProps {
5
+
6
+ /** Text to be displayed inside the tooltip. */
7
+ text?: Cx.StringProp,
8
+
9
+ /** Text to be displayed in the header. */
10
+ title?: Cx.StringProp,
11
+
12
+ /**
13
+ * Set to true to make the tooltip always visible.
14
+ * This is useful e.g. in product tours, when instructions need to be shown, even if the mouse pointer is not around.
15
+ */
16
+ alwaysVisible?: Cx.BooleanProp,
17
+
18
+ /** Base CSS class to be applied to the field. Defaults to 'tooltip'. */
19
+ baseClass?: string,
20
+
21
+ /**
22
+ * Set to `true` to append the set `animate` state after the initial render.
23
+ * Appended CSS class may be used to add show/hide animations.
24
+ */
25
+ animate?: boolean,
26
+
27
+ /** Set to `true` to make the tooltip follow the mouse movement. */
28
+ trackMouse?: boolean,
29
+
30
+ trackMouseX?: boolean,
31
+ trackMouseY?: boolean,
32
+
33
+ /**
34
+ * This property controls how tooltips behave on touch events.
35
+ * Default value is `toggle` which means that the tooltip is shown on first tap and closed on the second tap.
36
+ * Use `ignore` to skip showing tooltips on touch events.
37
+ */
38
+ touchBehavior?: string,
39
+
40
+
41
+ /**
42
+ * Set to true to rely on browser's window mousemove event for getting mouse coordinates
43
+ * instead of using the element that tooltip is attached to.
44
+ */
45
+ globalMouseTracking?: boolean
46
+ }
47
+
48
+ export class Tooltip extends Cx.Widget<TooltipProps> {}
49
+
50
+ export function enableTooltips();
@@ -1,42 +1,42 @@
1
- import * as Cx from "../../core";
2
- import { OverlayProps } from "./Overlay";
3
-
4
- interface WindowProps extends OverlayProps {
5
- /** Text to be displayed in the header. */
6
- title?: Cx.StringProp;
7
-
8
- /** Controls the close button visibility. Defaults to `true`. */
9
- closable?: Cx.BooleanProp;
10
-
11
- /** A custom style which will be applied to the body. */
12
- bodyStyle?: Cx.StyleProp;
13
-
14
- /** A custom style which will be applied to the header. */
15
- headerStyle?: Cx.StyleProp;
16
-
17
- /** A custom style which will be applied to the footer. */
18
- footerStyle?: Cx.StyleProp;
19
-
20
- /** Base CSS class to be applied to the field. Defaults to `window`. */
21
- baseClass?: string;
22
-
23
- /** Additional CSS class to be applied to the section body. */
24
- bodyClass?: Cx.ClassProp;
25
-
26
- /** Set to `true` to enable resizing. */
27
- resizable?: boolean;
28
-
29
- /** Set to `true` to automatically focus the field, after it renders for the first time. */
30
- autoFocus?: boolean;
31
-
32
- /** Set to `false` to prevent the window itself to be focusable. Default value is true.*/
33
- focusable?: boolean;
34
-
35
- /** Set to `true` to disable moving the window by dragging the header. */
36
- fixed?: boolean;
37
-
38
- /** Set to `true` to add default padding to the window body. */
39
- pad?: boolean;
40
- }
41
-
42
- export class Window extends Cx.Widget<WindowProps> {}
1
+ import * as Cx from "../../core";
2
+ import { OverlayProps } from "./Overlay";
3
+
4
+ interface WindowProps extends OverlayProps {
5
+ /** Text to be displayed in the header. */
6
+ title?: Cx.StringProp;
7
+
8
+ /** Controls the close button visibility. Defaults to `true`. */
9
+ closable?: Cx.BooleanProp;
10
+
11
+ /** A custom style which will be applied to the body. */
12
+ bodyStyle?: Cx.StyleProp;
13
+
14
+ /** A custom style which will be applied to the header. */
15
+ headerStyle?: Cx.StyleProp;
16
+
17
+ /** A custom style which will be applied to the footer. */
18
+ footerStyle?: Cx.StyleProp;
19
+
20
+ /** Base CSS class to be applied to the field. Defaults to `window`. */
21
+ baseClass?: string;
22
+
23
+ /** Additional CSS class to be applied to the section body. */
24
+ bodyClass?: Cx.ClassProp;
25
+
26
+ /** Set to `true` to enable resizing. */
27
+ resizable?: boolean;
28
+
29
+ /** Set to `true` to automatically focus the field, after it renders for the first time. */
30
+ autoFocus?: boolean;
31
+
32
+ /** Set to `false` to prevent the window itself to be focusable. Default value is true.*/
33
+ focusable?: boolean;
34
+
35
+ /** Set to `true` to disable moving the window by dragging the header. */
36
+ fixed?: boolean;
37
+
38
+ /** Set to `true` to add default padding to the window body. */
39
+ pad?: boolean;
40
+ }
41
+
42
+ export class Window extends Cx.Widget<WindowProps> {}
@@ -1,62 +1,62 @@
1
- $cx-default-window-background-color: transparent !default;
2
- $cx-default-window-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.29) !default;
3
- $cx-default-window-border-radius: $cx-default-border-radius !default;
4
-
5
- //header
6
- $cx-default-window-header-color: null !default;
7
- $cx-default-window-header-background-color: rgba(246, 246, 246, 0.9) !default;
8
- $cx-default-window-header-padding: 10px 15px !default;
9
- $cx-default-window-header-font-size: 16px !default;
10
-
11
- //body
12
- $cx-default-window-body-padding: $cx-default-window-header-padding !default;
13
- $cx-default-window-body-background-color: white !default;
14
-
15
- //footer
16
- $cx-default-window-footer-color: null !default;
17
- $cx-default-window-footer-background-color: rgba(246, 246, 246, 0.9) !default;
18
- $cx-default-window-footer-padding: $cx-default-window-header-padding !default;
19
- $cx-default-window-footer-font-size: 16px !default;
20
-
21
- $cx-window-state-style-map: (
22
- default: (
23
- box-shadow: $cx-default-window-box-shadow,
24
- background-color: $cx-default-window-background-color,
25
- border-radius: $cx-default-window-border-radius,
26
- ),
27
- resizable: (
28
- box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.29),
29
- ),
30
- ) !default;
31
-
32
- $cx-window-header-state-style-map: (
33
- default: (
34
- color: $cx-default-window-header-color,
35
- background: $cx-default-window-header-background-color,
36
- padding: $cx-default-window-header-padding,
37
- font-size: $cx-default-window-header-font-size,
38
- ),
39
- active: (),
40
- ) !default;
41
-
42
- $cx-window-footer-state-style-map: (
43
- default: (
44
- background: $cx-default-window-footer-background-color,
45
- padding: $cx-default-window-footer-padding,
46
- ),
47
- ) !default;
48
-
49
- $cx-window-body-state-style-map: (
50
- default: (
51
- background: $cx-default-window-body-background-color,
52
- padding: $cx-default-window-body-padding,
53
- ),
54
- ) !default;
55
-
56
- $cx-window-mods: (
57
- alert: (
58
- frame: (),
59
- body: (),
60
- footer: (),
61
- ),
62
- );
1
+ $cx-default-window-background-color: transparent !default;
2
+ $cx-default-window-box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.29) !default;
3
+ $cx-default-window-border-radius: $cx-default-border-radius !default;
4
+
5
+ //header
6
+ $cx-default-window-header-color: null !default;
7
+ $cx-default-window-header-background-color: rgba(246, 246, 246, 0.9) !default;
8
+ $cx-default-window-header-padding: 10px 15px !default;
9
+ $cx-default-window-header-font-size: 16px !default;
10
+
11
+ //body
12
+ $cx-default-window-body-padding: $cx-default-window-header-padding !default;
13
+ $cx-default-window-body-background-color: white !default;
14
+
15
+ //footer
16
+ $cx-default-window-footer-color: null !default;
17
+ $cx-default-window-footer-background-color: rgba(246, 246, 246, 0.9) !default;
18
+ $cx-default-window-footer-padding: $cx-default-window-header-padding !default;
19
+ $cx-default-window-footer-font-size: 16px !default;
20
+
21
+ $cx-window-state-style-map: (
22
+ default: (
23
+ box-shadow: $cx-default-window-box-shadow,
24
+ background-color: $cx-default-window-background-color,
25
+ border-radius: $cx-default-window-border-radius,
26
+ ),
27
+ resizable: (
28
+ box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.29),
29
+ ),
30
+ ) !default;
31
+
32
+ $cx-window-header-state-style-map: (
33
+ default: (
34
+ color: $cx-default-window-header-color,
35
+ background: $cx-default-window-header-background-color,
36
+ padding: $cx-default-window-header-padding,
37
+ font-size: $cx-default-window-header-font-size,
38
+ ),
39
+ active: (),
40
+ ) !default;
41
+
42
+ $cx-window-footer-state-style-map: (
43
+ default: (
44
+ background: $cx-default-window-footer-background-color,
45
+ padding: $cx-default-window-footer-padding,
46
+ ),
47
+ ) !default;
48
+
49
+ $cx-window-body-state-style-map: (
50
+ default: (
51
+ background: $cx-default-window-body-background-color,
52
+ padding: $cx-default-window-body-padding,
53
+ ),
54
+ ) !default;
55
+
56
+ $cx-window-mods: (
57
+ alert: (
58
+ frame: (),
59
+ body: (),
60
+ footer: (),
61
+ ),
62
+ );
@@ -1,7 +1,7 @@
1
- import * as Cx from '../../core';
2
-
3
- export function alert(options: string | Cx.Config): Promise<void>;
4
-
5
- export function yesNo(options: string | Cx.Config): Promise<string>;
6
-
7
- export function registerAlertImpl(impl: { alert: any, yesNo: any });
1
+ import * as Cx from '../../core';
2
+
3
+ export function alert(options: string | Cx.Config): Promise<void>;
4
+
5
+ export function yesNo(options: string | Cx.Config): Promise<string>;
6
+
7
+ export function registerAlertImpl(impl: { alert: any, yesNo: any });
@@ -1,54 +1,54 @@
1
- import * as Cx from '../../core';
2
- import * as React from 'react';
3
-
4
- type MouseEventHandler = (e: React.SyntheticEvent<any>, captureData: Cx.Config) => void;
5
-
6
- export interface CursorPosition {
7
- clientX: number,
8
- clientY: number
9
- }
10
-
11
- /**
12
- * Returns the object representing cursor position
13
- * @param e - Event
14
- * @returns {{ clientX: number, clientY: number }}
15
- */
16
- export function getCursorPos(e: React.SyntheticEvent<any>): CursorPosition;
17
-
18
- export function captureMouse(
19
- e: React.SyntheticEvent<any>,
20
- onMouseMove?: MouseEventHandler,
21
- onMouseUp?: (e: React.SyntheticEvent<any>) => void,
22
- captureData?: Cx.Config,
23
- cursor?: string
24
- ): void;
25
-
26
- export function captureMouse2(
27
- e: React.SyntheticEvent<any>,
28
- options: {
29
- onMouseMove?: MouseEventHandler,
30
- onMouseUp?: (e: React.SyntheticEvent<any>) => void,
31
- onDblClick?: (e: React.SyntheticEvent<any>) => void,
32
- captureData?: Cx.Config,
33
- cursor?: string
34
- }
35
- ): void;
36
-
37
- export function captureMouseOrTouch(
38
- e: React.SyntheticEvent<any>,
39
- onMouseMove?: MouseEventHandler,
40
- onMouseUp?: (e: React.SyntheticEvent<any>) => void,
41
- captureData?: Cx.Config,
42
- cursor?: string
43
- ): void;
44
-
45
- export function captureMouseOrTouch2(
46
- e: React.SyntheticEvent<any>,
47
- options: {
48
- onMouseMove?: MouseEventHandler,
49
- onMouseUp?: (e: React.SyntheticEvent<any>) => void,
50
- onDblClick?: (e: React.SyntheticEvent<any>) => void,
51
- captureData?: Cx.Config,
52
- cursor?: string
53
- }
1
+ import * as Cx from '../../core';
2
+ import * as React from 'react';
3
+
4
+ type MouseEventHandler = (e: React.SyntheticEvent<any>, captureData: Cx.Config) => void;
5
+
6
+ export interface CursorPosition {
7
+ clientX: number,
8
+ clientY: number
9
+ }
10
+
11
+ /**
12
+ * Returns the object representing cursor position
13
+ * @param e - Event
14
+ * @returns {{ clientX: number, clientY: number }}
15
+ */
16
+ export function getCursorPos(e: React.SyntheticEvent<any>): CursorPosition;
17
+
18
+ export function captureMouse(
19
+ e: React.SyntheticEvent<any>,
20
+ onMouseMove?: MouseEventHandler,
21
+ onMouseUp?: (e: React.SyntheticEvent<any>) => void,
22
+ captureData?: Cx.Config,
23
+ cursor?: string
24
+ ): void;
25
+
26
+ export function captureMouse2(
27
+ e: React.SyntheticEvent<any>,
28
+ options: {
29
+ onMouseMove?: MouseEventHandler,
30
+ onMouseUp?: (e: React.SyntheticEvent<any>) => void,
31
+ onDblClick?: (e: React.SyntheticEvent<any>) => void,
32
+ captureData?: Cx.Config,
33
+ cursor?: string
34
+ }
35
+ ): void;
36
+
37
+ export function captureMouseOrTouch(
38
+ e: React.SyntheticEvent<any>,
39
+ onMouseMove?: MouseEventHandler,
40
+ onMouseUp?: (e: React.SyntheticEvent<any>) => void,
41
+ captureData?: Cx.Config,
42
+ cursor?: string
43
+ ): void;
44
+
45
+ export function captureMouseOrTouch2(
46
+ e: React.SyntheticEvent<any>,
47
+ options: {
48
+ onMouseMove?: MouseEventHandler,
49
+ onMouseUp?: (e: React.SyntheticEvent<any>) => void,
50
+ onDblClick?: (e: React.SyntheticEvent<any>) => void,
51
+ captureData?: Cx.Config,
52
+ cursor?: string
53
+ }
54
54
  ): void;
@@ -1,13 +1,13 @@
1
-
2
- @if cx-call-once("cx/widgets/captureMouse") {
3
-
4
- .cxb-mousecapture {
5
- position: fixed;
6
- left: 0;
7
- right: 0;
8
- top: 0;
9
- bottom: 0;
10
- z-index: 1000000;
11
- }
12
-
13
- }
1
+
2
+ @if cx-call-once("cx/widgets/captureMouse") {
3
+
4
+ .cxb-mousecapture {
5
+ position: fixed;
6
+ left: 0;
7
+ right: 0;
8
+ top: 0;
9
+ bottom: 0;
10
+ z-index: 1000000;
11
+ }
12
+
13
+ }
@@ -1,18 +1,18 @@
1
- import { View } from "cx/data";
2
- import { Instance } from "cx/ui";
3
- import { Overlay } from "cx/widgets";
4
-
5
- export interface HotPromiseWindowFactoryOptions {
6
- parent?: Instance;
7
- store?: View;
8
- }
9
-
10
- export function createHotPromiseWindowFactoryWithProps<Props, R = any>(
11
- module: any,
12
- factory: (props: Props) => (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: any) => void) => Overlay,
13
- ): (props: Props, options?: HotPromiseWindowFactoryOptions) => Promise<R>;
14
-
15
- export function createHotPromiseWindowFactory<R = any>(
16
- module: any,
17
- factory: (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: any) => void) => Overlay,
18
- ): (options?: HotPromiseWindowFactoryOptions) => Promise<R>;
1
+ import { View } from "cx/data";
2
+ import { Instance } from "cx/ui";
3
+ import { Overlay } from "cx/widgets";
4
+
5
+ export interface HotPromiseWindowFactoryOptions {
6
+ parent?: Instance;
7
+ store?: View;
8
+ }
9
+
10
+ export function createHotPromiseWindowFactoryWithProps<Props, R = any>(
11
+ module: any,
12
+ factory: (props: Props) => (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: any) => void) => Overlay,
13
+ ): (props: Props, options?: HotPromiseWindowFactoryOptions) => Promise<R>;
14
+
15
+ export function createHotPromiseWindowFactory<R = any>(
16
+ module: any,
17
+ factory: (resolve: (value: R | PromiseLike<R>) => void, reject: (reason?: any) => void) => Overlay,
18
+ ): (options?: HotPromiseWindowFactoryOptions) => Promise<R>;
@@ -1,11 +1,11 @@
1
- export * from "./Overlay";
2
- export * from "./Dropdown";
3
- export * from "./tooltip-ops";
4
- export * from "./Tooltip";
5
- export * from "./Window";
6
- export * from "./MsgBox";
7
- export * from "./Toast";
8
- export * from "./captureMouse";
9
- export * from "./ContextMenu";
10
- export * from "./FlyweightTooltipTracker";
11
- export * from "./createHotPromiseWindowFactory";
1
+ export * from "./Overlay";
2
+ export * from "./Dropdown";
3
+ export * from "./tooltip-ops";
4
+ export * from "./Tooltip";
5
+ export * from "./Window";
6
+ export * from "./MsgBox";
7
+ export * from "./Toast";
8
+ export * from "./captureMouse";
9
+ export * from "./ContextMenu";
10
+ export * from "./FlyweightTooltipTracker";
11
+ export * from "./createHotPromiseWindowFactory";
@@ -1,15 +1,15 @@
1
-
2
- @import 'captureMouse';
3
- @import 'Overlay';
4
- @import 'Dropdown';
5
- @import 'Window';
6
- @import 'Tooltip';
7
- @import 'Toast';
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
1
+
2
+ @import 'captureMouse';
3
+ @import 'Overlay';
4
+ @import 'Dropdown';
5
+ @import 'Window';
6
+ @import 'Tooltip';
7
+ @import 'Toast';
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+