@onepercentio/one-ui 0.10.0 → 0.12.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.
Files changed (54) hide show
  1. package/cypress/support/component-index.html +27 -21
  2. package/dist/components/AdaptiveDialog/AdaptiveDialog.js +7 -2
  3. package/dist/components/AdaptiveDialog/AdaptiveDialog.js.map +1 -1
  4. package/dist/components/AnchoredTooltip/AnchoredTooltip.d.ts +12 -6
  5. package/dist/components/AnchoredTooltip/AnchoredTooltip.js +32 -64
  6. package/dist/components/AnchoredTooltip/AnchoredTooltip.js.map +1 -1
  7. package/dist/components/AnchoredTooltip/AnchoredTooltip.module.scss +5 -3
  8. package/dist/components/Chart/Chart.e2e.d.ts +4 -0
  9. package/dist/components/Chart/Chart.e2e.js +9 -0
  10. package/dist/components/Chart/Chart.e2e.js.map +1 -0
  11. package/dist/components/Chart/Chart.logic.d.ts +2 -0
  12. package/dist/components/Chart/Chart.logic.js +12 -0
  13. package/dist/components/Chart/Chart.logic.js.map +1 -0
  14. package/dist/components/Chart/Chart.module.scss +58 -0
  15. package/dist/components/Chart/Chart.types.d.ts +24 -0
  16. package/dist/components/Chart/Chart.types.js +3 -0
  17. package/dist/components/Chart/Chart.types.js.map +1 -0
  18. package/dist/components/Chart/Chart.view.d.ts +5 -0
  19. package/dist/components/Chart/Chart.view.js +142 -0
  20. package/dist/components/Chart/Chart.view.js.map +1 -0
  21. package/dist/components/Chart/index.d.ts +1 -0
  22. package/dist/components/Chart/index.js +9 -0
  23. package/dist/components/Chart/index.js.map +1 -0
  24. package/dist/components/EmailInput/EmailInput.d.ts +1 -1
  25. package/dist/components/FadeIn/FadeIn.d.ts +1 -0
  26. package/dist/components/FadeIn/FadeIn.js.map +1 -1
  27. package/dist/components/Skeleton/Skeleton.js +1 -1
  28. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  29. package/dist/components/Skeleton/Skeleton.module.scss +1 -0
  30. package/dist/context/OneUIProvider.d.ts +9 -0
  31. package/dist/context/OneUIProvider.js +14 -3
  32. package/dist/context/OneUIProvider.js.map +1 -1
  33. package/dist/hooks/logs/useDependencyChangeDetection.d.ts +1 -0
  34. package/dist/hooks/logs/useDependencyChangeDetection.js +23 -0
  35. package/dist/hooks/logs/useDependencyChangeDetection.js.map +1 -0
  36. package/dist/hooks/logs/useIsMounting.d.ts +1 -1
  37. package/dist/hooks/logs/useIsMounting.js +2 -2
  38. package/dist/hooks/logs/useIsMounting.js.map +1 -1
  39. package/dist/hooks/ui/useAdaptiveImage.d.ts +6 -0
  40. package/dist/hooks/ui/useAdaptiveImage.js +39 -0
  41. package/dist/hooks/ui/useAdaptiveImage.js.map +1 -0
  42. package/dist/hooks/ui/useMouseHover.d.ts +11 -0
  43. package/dist/hooks/ui/useMouseHover.js +24 -0
  44. package/dist/hooks/ui/useMouseHover.js.map +1 -0
  45. package/dist/hooks/useShortIntl.js +19 -1
  46. package/dist/hooks/useShortIntl.js.map +1 -1
  47. package/dist/hooks/utility/useQuery.d.ts +7 -0
  48. package/dist/hooks/utility/useQuery.js +14 -0
  49. package/dist/hooks/utility/useQuery.js.map +1 -0
  50. package/dist/models/DebugLogger.js +3 -1
  51. package/dist/models/DebugLogger.js.map +1 -1
  52. package/dist/models/GenericContract.d.ts +1 -1
  53. package/dist/models/GenericContract.js.map +1 -1
  54. package/package.json +2 -2
@@ -1,24 +1,30 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
- <title>Components App</title>
8
- <style>
9
- html, body {
10
- padding: 0;
11
- margin: 0;
12
- }
13
- * {
14
- box-sizing: border-box;
15
- }
16
- h1 {
17
- margin: 0px;
18
- }
19
- </style>
20
- </head>
21
- <body>
22
- <div data-cy-root></div>
23
- </body>
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
+ <title>Components App</title>
9
+ <style>
10
+ html,
11
+ body {
12
+ padding: 0;
13
+ margin: 0;
14
+ }
15
+
16
+ * {
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ h1 {
21
+ margin: 0px;
22
+ }
23
+ </style>
24
+ </head>
25
+
26
+ <body>
27
+ <div data-cy-root style="width: 100vw; height: 100vh;"></div>
28
+ </body>
29
+
24
30
  </html>
@@ -31,6 +31,7 @@ const AdaptiveDialog_module_scss_1 = __importDefault(require("./AdaptiveDialog.m
31
31
  const MutableHamburgerButton_1 = __importDefault(require("../MutableHamburgerButton"));
32
32
  const ScrollAndFocusLock_1 = __importDefault(require("../utilitary/ScrollAndFocusLock"));
33
33
  const react_dom_1 = __importDefault(require("react-dom"));
34
+ const OneUIProvider_1 = require("../../context/OneUIProvider");
34
35
  /**
35
36
  * This component implements a generic drawer that displays it as a drawer on mobile and as a modal on desktop
36
37
  **/
@@ -50,8 +51,12 @@ function AdaptiveDialog({ onClose, open = false, className = "", onClickOut, chi
50
51
  rootDivRef.current.addEventListener("animationend", toggleVisbility);
51
52
  }
52
53
  }, [open]);
53
- return isVisible || open ? (react_1.default.createElement(react_1.default.Fragment, null, react_dom_1.default.createPortal(react_1.default.createElement("div", { ref: rootDivRef, className: `${AdaptiveDialog_module_scss_1.default.backdrop} ${open ? AdaptiveDialog_module_scss_1.default.open : AdaptiveDialog_module_scss_1.default.close} ${expanded ? AdaptiveDialog_module_scss_1.default.expanded : ""}`, onClick: onClickOut },
54
- react_1.default.createElement("div", { className: `${AdaptiveDialog_module_scss_1.default.container} ${className}`, onClick: (e) => e.stopPropagation() },
54
+ const globalClassName = {
55
+ backdrop: (0, OneUIProvider_1.useOneUIConfig)("component.adaptiveDialog.backdropClassName", ""),
56
+ dialog: (0, OneUIProvider_1.useOneUIConfig)("component.adaptiveDialog.dialogClassName", ""),
57
+ };
58
+ return isVisible || open ? (react_1.default.createElement(react_1.default.Fragment, null, react_dom_1.default.createPortal(react_1.default.createElement("div", { ref: rootDivRef, className: `${AdaptiveDialog_module_scss_1.default.backdrop} ${open ? AdaptiveDialog_module_scss_1.default.open : AdaptiveDialog_module_scss_1.default.close} ${expanded ? AdaptiveDialog_module_scss_1.default.expanded : ""} ${globalClassName.backdrop}`, onClick: onClickOut },
59
+ react_1.default.createElement("div", { className: `${AdaptiveDialog_module_scss_1.default.container} ${className} ${globalClassName.dialog}`, onClick: (e) => e.stopPropagation() },
55
60
  react_1.default.createElement(ScrollAndFocusLock_1.default, { open: open },
56
61
  onClose && (react_1.default.createElement("button", { className: AdaptiveDialog_module_scss_1.default.closeBtn },
57
62
  react_1.default.createElement(MutableHamburgerButton_1.default, { onClick: onClose, state: "closed", size: 24 }))),
@@ -1 +1 @@
1
- {"version":3,"file":"AdaptiveDialog.js","sourceRoot":"","sources":["../../../src/components/AdaptiveDialog/AdaptiveDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8E;AAC9E,8FAAkD;AAClD,uFAA+D;AAC/D,yFAAiE;AACjE,0DAAiC;AAEjC;;IAEI;AACJ,SAAwB,cAAc,CAAC,EACrC,OAAO,EACP,IAAI,GAAG,KAAK,EACZ,SAAS,GAAG,EAAE,EACd,UAAU,EACV,QAAQ,GAMR;IACA,MAAM,UAAU,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEhD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,IAAI,EAAE;YACR,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,eAAe,GAAG,CAAC,CAAiB,EAAE,EAAE;gBAC5C,IAAI,C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AAA,8BAAc,EAAC,0CAA0C,EAAE,EAAE,CAAC;KACvE,CAAC;IAEF,OAAO,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CACzB,8DACG,mBAAQ,CAAC,YAAY,CACpB,uCACE,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,GAAG,oCAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,oCAAM,CAAC,IAAI,CAAC,CAAC,CAAC,oCAAM,CAAC,KAAK,IAChE,QAAQ,CAAC,CAAC,CAAC,oCAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAC/B,IAAI,eAAe,CAAC,QAAQ,EAAE,EAC9B,OAAO,EAAE,UAAU;QAEnB,uCACE,SAAS,EAAE,GAAG,oCAAM,CAAC,SAAS,IAAI,SAAS,IAAI,eAAe,CAAC,MAAM,EAAE,EACvE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE;YAEnC,8BAAC,4BAAkB,IAAC,IAAI,EAAE,IAAI;gBAC3B,OAAO,IAAI,CACV,0CAAQ,SAAS,EAAE,oCAAM,CAAC,QAAQ;oBAChC,8BAAC,gCAAsB,IACrB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,QAAQ,EACd,IAAI,EAAE,EAAE,GACR,CACK,CACV;gBACD,uCACE,SAAS,EAAE,oCAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GACrC;gBACD,QAAQ,CACU,CACjB,CACF,EACN,QAAQ,CAAC,IAAI,CACd,CACA,CACJ,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAzED,iCAyEC"}
@@ -1,15 +1,21 @@
1
- import { RefObject } from "react";
1
+ import React, { RefObject } from "react";
2
2
  declare type Props = {
3
3
  children: JSX.Element;
4
4
  anchorRef: RefObject<HTMLElement>;
5
5
  open: boolean;
6
6
  className?: string;
7
+ /**
8
+ * Indicates the tooltip should be always visible on viewport
9
+ *
10
+ * @default true
11
+ */
12
+ containInViewport?: boolean;
13
+ style?: any;
7
14
  };
8
15
  export declare function updateTooltipPosition(tooltipRef: HTMLDivElement, anchorRef: HTMLElement, limitToViewport?: boolean): {
9
16
  shouldAnchorToBottom: boolean;
10
17
  };
11
- /**
12
- * This tooltip anchors itself to an element and handles positioning relative to the anchored element
13
- **/
14
- export default function AnchoredTooltip(props: Props): JSX.Element;
15
- export {};
18
+ declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<{
19
+ updatePosition: () => void;
20
+ }>>;
21
+ export default _default;
@@ -22,6 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
25
36
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
37
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
38
  };
@@ -31,27 +42,29 @@ const react_1 = __importStar(require("react"));
31
42
  const OneUIProvider_1 = require("../../context/OneUIProvider");
32
43
  const FadeIn_1 = __importDefault(require("../FadeIn"));
33
44
  const AnchoredTooltip_module_scss_1 = __importDefault(require("./AnchoredTooltip.module.scss"));
45
+ const react_dom_1 = __importDefault(require("react-dom"));
46
+ const useFreeze_1 = __importDefault(require("../../hooks/useFreeze"));
34
47
  function getPositionOnViewport(element) {
35
48
  return element.getBoundingClientRect();
36
49
  }
37
- function calculateTooltipFromAnchor(anchorRef, tooltipRef) {
50
+ function calculateTooltipFromAnchor(anchorRef, tooltipRef, containInViewport) {
38
51
  const anchorPosition = getPositionOnViewport(anchorRef);
39
52
  const shouldAnchorToBottom = tooltipRef.clientHeight > anchorPosition.top;
40
53
  let top = anchorPosition.top - tooltipRef.clientHeight;
41
54
  let left = anchorPosition.left + anchorPosition.width / 2 - tooltipRef.clientWidth / 2;
42
55
  if (shouldAnchorToBottom)
43
56
  top += tooltipRef.clientHeight + anchorRef.clientHeight;
44
- if (top < 0)
57
+ if (containInViewport && top < 0)
45
58
  top = 0;
46
59
  const offset = top + tooltipRef.clientHeight - window.innerHeight;
47
- if (offset > 0) {
60
+ if (containInViewport && offset > 0) {
48
61
  top -= offset;
49
62
  }
50
63
  const offsetLeft = left + tooltipRef.clientWidth - window.innerWidth;
51
- if (offsetLeft > 0) {
64
+ if (containInViewport && offsetLeft > 0) {
52
65
  left -= offsetLeft;
53
66
  }
54
- if (left < 0) {
67
+ if (containInViewport && left < 0) {
55
68
  left = 0;
56
69
  }
57
70
  const maxLeftOffsetIndicator = tooltipRef.clientWidth / 2 - 60;
@@ -76,8 +89,8 @@ function calculateTooltipFromAnchor(anchorRef, tooltipRef) {
76
89
  shouldAnchorToBottom,
77
90
  };
78
91
  }
79
- function updateTooltipPosition(tooltipRef, anchorRef, limitToViewport) {
80
- const { top, left, shouldAnchorToBottom, offsetIndicatorLeft } = calculateTooltipFromAnchor(anchorRef, tooltipRef);
92
+ function updateTooltipPosition(tooltipRef, anchorRef, limitToViewport = true) {
93
+ const { top, left, shouldAnchorToBottom, offsetIndicatorLeft } = calculateTooltipFromAnchor(anchorRef, tooltipRef, limitToViewport);
81
94
  if (limitToViewport) {
82
95
  const maxHeight = window.innerHeight - top;
83
96
  tooltipRef.style.maxHeight = `${maxHeight - 32}px`;
@@ -99,17 +112,23 @@ exports.updateTooltipPosition = updateTooltipPosition;
99
112
  /**
100
113
  * This tooltip anchors itself to an element and handles positioning relative to the anchored element
101
114
  **/
102
- function AnchoredTooltip(props) {
115
+ function AnchoredTooltip(_a, ref) {
116
+ var { containInViewport = true } = _a, props = __rest(_a, ["containInViewport"]);
103
117
  const { open, children, anchorRef } = props;
104
118
  const tooltipRef = (0, react_1.useRef)(null);
105
119
  const className = (0, OneUIProvider_1.useOneUIConfig)("component.tooltip.className");
120
+ (0, react_1.useImperativeHandle)(ref, () => ({
121
+ updatePosition: () => {
122
+ updateTooltipPosition(tooltipRef.current, anchorRef.current, containInViewport);
123
+ },
124
+ }), [containInViewport]);
106
125
  (0, react_1.useEffect)(() => {
107
126
  if (open) {
108
127
  if (anchorRef.current && tooltipRef.current)
109
- updateTooltipPosition(tooltipRef.current, anchorRef.current);
128
+ updateTooltipPosition(tooltipRef.current, anchorRef.current, containInViewport);
110
129
  const scrollHandler = () => {
111
130
  if (anchorRef.current && tooltipRef.current)
112
- updateTooltipPosition(tooltipRef.current, anchorRef.current);
131
+ updateTooltipPosition(tooltipRef.current, anchorRef.current, containInViewport);
113
132
  };
114
133
  window.addEventListener("scroll", scrollHandler);
115
134
  return () => {
@@ -117,59 +136,8 @@ function AnchoredTooltip(props) {
117
136
  };
118
137
  }
119
138
  }, [open, anchorRef]);
120
- return (react_1.default.createElement(react_1.default.Fragment, null,
121
- react_1.default.createElement(FadeIn_1.default, { onClick: (e) => e.stopPropagation(), ref: tooltipRef, className: `${AnchoredTooltip_module_scss_1.default.tooltipContainer} ${open ? AnchoredTooltip_module_scss_1.default.open : ""} ${props.className || ""} ${className}` }, open ? react_1.default.createElement("div", null, children) : undefined)));
122
- }
123
- exports.default = AnchoredTooltip;
124
- function DebuggingHelper(props) {
125
- const [anchorInfo, setAnchorInfo] = (0, react_1.useState)({});
126
- function update() {
127
- return getPositionOnViewport(props.anchorRef.current).toJSON();
128
- }
129
- (0, react_1.useEffect)(() => {
130
- setAnchorInfo(update());
131
- setInterval(() => {
132
- setAnchorInfo(update());
133
- }, 500);
134
- }, []);
135
- return (react_1.default.createElement("div", { style: {
136
- backgroundColor: "black",
137
- position: "fixed",
138
- color: "green",
139
- fontFamily: "monospace",
140
- padding: "1em",
141
- fontSize: "16px",
142
- lineHeight: "1.5em",
143
- opacity: 0.75,
144
- bottom: 0,
145
- right: 0,
146
- maxHeight: "50vh",
147
- overflow: "auto",
148
- pointerEvents: "none",
149
- } },
150
- "Calculated info:",
151
- react_1.default.createElement("br", null),
152
- props.anchorRef.current &&
153
- props.tooltipRef.current &&
154
- Object.entries(calculateTooltipFromAnchor(props.anchorRef.current, props.tooltipRef.current)).map(([k, v]) => {
155
- return (react_1.default.createElement("p", null,
156
- react_1.default.createElement("b", null, k),
157
- ": ",
158
- typeof v !== "boolean" ? v : v ? "true" : "false"));
159
- }),
160
- "Window info:",
161
- react_1.default.createElement("br", null),
162
- react_1.default.createElement("p", null,
163
- react_1.default.createElement("b", null, "Height:"),
164
- " ",
165
- window.innerHeight),
166
- react_1.default.createElement("br", null),
167
- "Anchor info:",
168
- Object.entries(anchorInfo).map(([name, value]) => {
169
- return (react_1.default.createElement("p", null,
170
- react_1.default.createElement("b", null, name),
171
- ": ",
172
- value));
173
- })));
139
+ const openedSomeTime = (0, useFreeze_1.default)(open);
140
+ return openedSomeTime ? (react_1.default.createElement(react_1.default.Fragment, null, react_dom_1.default.createPortal(react_1.default.createElement(FadeIn_1.default, { onClick: (e) => e.stopPropagation(), ref: tooltipRef, className: `${AnchoredTooltip_module_scss_1.default.tooltipContainer} ${open ? AnchoredTooltip_module_scss_1.default.open : ""} ${props.className || ""} ${className}`, style: props.style }, open ? react_1.default.createElement("div", null, children) : undefined), document.body))) : null;
174
141
  }
142
+ exports.default = (0, react_1.forwardRef)(AnchoredTooltip);
175
143
  //# sourceMappingURL=AnchoredTooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnchoredTooltip.js","sourceRoot":"","sources":["../../../src/components/AnchoredTooltip/AnchoredTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAMe;AACf,+DAA8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,CAAC,OAAO;YACxB,MAAM,CAAC,OAAO,CACZ,0BAA0B,CACxB,KAAK,CAAC,SAAS,CAAC,OAAO,EACvB,KAAK,CAAC,UAAU,CAAC,OAAO,CACzB,CACF,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,OAAO,CACL;oBACE,yCAAI,CAAC,CAAK;;oBAAG,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAC5D,CACL,CAAC;YACJ,CAAC,CAAC;;QAEJ,yCAAM;QACN;YACE,mDAAc;;YAAE,MAAM,CAAC,WAAW,CAChC;QACJ,yCAAM;;QAEL,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;YAChD,OAAO,CACL;gBACE,yCAAI,IAAI,CAAK;;gBAAG,KAAe,CAC7B,CACL,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"AnchoredTooltip.js","sourceRoot":"","sources":["../../../src/components/AnchoredTooltip/AnchoredTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CASe;AACf,+DAA6D;AAC7D,uDAA+B;AAC/B,gGAAmD;AACnD,0DAAiC;AACjC,sEAA8C;AAiB9C,SAAS,qBAAqB,CAAC,OAAoB;IACjD,OAAO,OAAO,CAAC,qBAAqB,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,0BAA0B,CACjC,SAAsB,EACtB,UAA0B,EAC1B,iBAA0B;IAE1B,MAAM,cAAc,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAExD,MAAM,oBAAoB,GAAG,UAAU,CAAC,YAAY,GAAG,cAAc,CAAC,GAAG,CAA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H;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAEtB,MAAM,cAAc,GAAG,IAAA,mBAAS,EAAC,IAAI,CAAC,CAAC;IAEvC,OAAO,cAAc,CAAC,CAAC,CAAC,CACtB,8DACG,mBAAQ,CAAC,YAAY,CACpB,8BAAC,gBAAM,IACL,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACnC,GAAG,EAAE,UAAU,EACf,SAAS,EAAE,GAAG,qCAAM,CAAC,gBAAgB,IAAI,IAAI,CAAC,CAAC,CAAC,qCAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAC9D,KAAK,CAAC,SAAS,IAAI,EACrB,IAAI,SAAS,EAAE,EACf,KAAK,EAAE,KAAK,CAAC,KAAK,IAEjB,IAAI,CAAC,CAAC,CAAC,2CAAM,QAAQ,CAAO,CAAC,CAAC,CAAC,SAAS,CAClC,EACT,QAAQ,CAAC,IAAI,CACd,CACA,CACJ,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,kBAAe,IAAA,kBAAU,EAAC,eAAe,CAAC,CAAC"}
@@ -1,5 +1,7 @@
1
1
  @import "../../assets/styles/index.scss";
2
2
 
3
+ $arrowDim: 1em;
4
+
3
5
  /**
4
6
  * Some notions to take into account
5
7
  */
@@ -32,10 +34,10 @@
32
34
  content: " ";
33
35
  width: 0px;
34
36
  height: 0px;
35
- border: 16px solid $tooltipBackgroudColor;
37
+ border: $arrowDim solid $tooltipBackgroudColor;
36
38
  border-top-color: transparent;
37
39
  border-right-color: transparent;
38
- transform: translateY(-16px) rotate(-45deg);
40
+ transform: translateY(-$arrowDim) rotate(-45deg);
39
41
  display: block;
40
42
  margin: auto;
41
43
  position: relative;
@@ -45,7 +47,7 @@
45
47
 
46
48
  &::before {
47
49
  display: none;
48
- transform: translateY(16px) rotate(135deg);
50
+ transform: translateY($arrowDim) rotate(135deg);
49
51
  }
50
52
  &.anchoredTop {
51
53
  transform: translateY(4px);
@@ -0,0 +1,4 @@
1
+ export declare enum ChartDataTestIds {
2
+ Y_AXIS = "y",
3
+ X_AXIS = "x"
4
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChartDataTestIds = void 0;
4
+ var ChartDataTestIds;
5
+ (function (ChartDataTestIds) {
6
+ ChartDataTestIds["Y_AXIS"] = "y";
7
+ ChartDataTestIds["X_AXIS"] = "x";
8
+ })(ChartDataTestIds = exports.ChartDataTestIds || (exports.ChartDataTestIds = {}));
9
+ //# sourceMappingURL=Chart.e2e.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.e2e.js","sourceRoot":"","sources":["../../../src/components/Chart/Chart.e2e.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,gCAAY,CAAA;IACZ,gCAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"}
@@ -0,0 +1,2 @@
1
+ import { ChartProps } from "./Chart.types";
2
+ export default function ChartLogic(props: ChartProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const Chart_view_1 = __importDefault(require("./Chart.view"));
8
+ function ChartLogic(props) {
9
+ return react_1.default.createElement(Chart_view_1.default, Object.assign({}, props));
10
+ }
11
+ exports.default = ChartLogic;
12
+ //# sourceMappingURL=Chart.logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.logic.js","sourceRoot":"","sources":["../../../src/components/Chart/Chart.logic.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAgC;AAGhC,SAAwB,UAAU,CAAC,KAAiB;IAChD,OAAO,8BAAC,oBAAI,oBAAK,KAAK,EAAI,CAAC;AAC/B,CAAC;AAFD,6BAEC"}
@@ -0,0 +1,58 @@
1
+ @import "../../assets/styles";
2
+
3
+ .tooltipContainer {
4
+ > * {
5
+ padding: 16px;
6
+ border-radius: 8px;
7
+ background-color: var(--line-color) !important;
8
+ color: var(--text-color);
9
+ }
10
+
11
+ &::after,
12
+ &::before {
13
+ border-color: var(--line-color) !important;
14
+ }
15
+ }
16
+
17
+ .chartRoot {
18
+ display: grid;
19
+ height: 100%;
20
+ width: 100%;
21
+ grid-template-columns: auto 1fr;
22
+ grid-template-rows: 1fr auto;
23
+ .chartContainer {
24
+ width: 100%;
25
+ height: 100%;
26
+ border-left: 2px solid $primaryColor;
27
+ border-bottom: 2px solid $primaryColor;
28
+ svg {
29
+ height: 100%;
30
+ width: 100%;
31
+ circle {
32
+ fill: var(--point-color);
33
+ }
34
+ polyline {
35
+ stroke: var(--line-color);
36
+ }
37
+ }
38
+ }
39
+ .yAxis,
40
+ .xAxis {
41
+ display: flex;
42
+ flex-direction: column;
43
+ justify-content: space-around;
44
+ > * {
45
+ text-align: center;
46
+ }
47
+ }
48
+ .xAxis {
49
+ border-left: 2px solid $primaryColor;
50
+ flex-direction: row;
51
+ > * {
52
+ flex: 1;
53
+ }
54
+ }
55
+ .yAxis {
56
+ border-bottom: 2px solid $primaryColor;
57
+ }
58
+ }
@@ -0,0 +1,24 @@
1
+ import { ReactElement } from "react";
2
+ export declare type ChartProps = ChartViewProps;
3
+ export declare type ChartViewProps = {
4
+ bounds: Readonly<[
5
+ horizontal: Readonly<[min: number, max: number, incrementRate: number]>,
6
+ vertical: Readonly<[min: number, max: number, incrementRate: number]>
7
+ ]>;
8
+ style?: (Partial<{
9
+ lineColor: string;
10
+ pointColor: string;
11
+ textColor: string;
12
+ }> | undefined)[];
13
+ data?: Readonly<Readonly<Readonly<[x: number, y: number]>[]>[]>;
14
+ points?: Readonly<Readonly<Readonly<[
15
+ x: number,
16
+ y: number,
17
+ label: ReactElement,
18
+ onlyOnHover?: boolean
19
+ ]>[]>[]>;
20
+ label: {
21
+ x: (val: number) => ReactElement;
22
+ y: (val: number) => ReactElement;
23
+ };
24
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Chart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.types.js","sourceRoot":"","sources":["../../../src/components/Chart/Chart.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ChartViewProps } from "./Chart.types";
2
+ /**
3
+ * Draws a simple line chart with some animation
4
+ **/
5
+ export default function ChartView({ bounds: [[startX, endX, stepsX], [startY, endY, stepsY]], data, points, label, style: groupStyle, }: ChartViewProps): JSX.Element;
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const react_1 = __importStar(require("react"));
30
+ const Chart_module_scss_1 = __importDefault(require("./Chart.module.scss"));
31
+ const Chart_e2e_1 = require("./Chart.e2e");
32
+ const AnchoredTooltip_1 = __importDefault(require("../AnchoredTooltip"));
33
+ const DEFAULT_STYLE = {
34
+ lineColor: "#000",
35
+ pointColor: "#000",
36
+ textColor: "#fff",
37
+ };
38
+ function FloatingTooltip({ children, x, y, hoverOnly, height, style, }) {
39
+ const [ope, setOpen] = (0, react_1.useState)(() => (hoverOnly ? false : true));
40
+ const ref = (0, react_1.useRef)(null);
41
+ const circleRef = (0, react_1.useRef)(null);
42
+ (0, react_1.useEffect)(() => {
43
+ const animateEl = circleRef.current.children.item(0);
44
+ let interval;
45
+ animateEl.addEventListener("beginEvent", () => {
46
+ interval = setInterval(() => ref.current.updatePosition(), 1000 / 24);
47
+ });
48
+ animateEl.addEventListener("endEvent", () => {
49
+ clearInterval(interval);
50
+ ref.current.updatePosition();
51
+ });
52
+ }, []);
53
+ const actions = (0, react_1.useMemo)(() => hoverOnly
54
+ ? {
55
+ onMouseEnter: () => setOpen(true),
56
+ onMouseOut: () => setOpen(false),
57
+ }
58
+ : {}, [hoverOnly]);
59
+ return (react_1.default.createElement(react_1.default.Fragment, null,
60
+ react_1.default.createElement("circle", Object.assign({ ref: circleRef, r: height * 0.01, cx: x, cy: y, style: {
61
+ "--point-color": style.pointColor,
62
+ } }, actions),
63
+ react_1.default.createElement("animate", { attributeName: "cy", values: `${height};${y}`, dur: "1s" })),
64
+ react_1.default.createElement(AnchoredTooltip_1.default, { ref: ref, containInViewport: false, anchorRef: circleRef, open: ope, className: Chart_module_scss_1.default.tooltipContainer, style: {
65
+ "--line-color": style.lineColor,
66
+ "--text-color": style.textColor,
67
+ } }, children)));
68
+ }
69
+ /**
70
+ * Draws a simple line chart with some animation
71
+ **/
72
+ function ChartView({ bounds: [[startX, endX, stepsX], [startY, endY, stepsY]], data = [], points = [], label, style: groupStyle = [], }) {
73
+ const [dim, setDIm] = (0, react_1.useState)();
74
+ const chartRef = (0, react_1.useRef)(null);
75
+ console.log(dim);
76
+ (0, react_1.useLayoutEffect)(() => {
77
+ setDIm({
78
+ width: chartRef.current.clientWidth,
79
+ height: chartRef.current.clientHeight,
80
+ });
81
+ }, []);
82
+ const { width, height } = dim || {};
83
+ const howMuchStepsY = (0, react_1.useMemo)(() => (endY - startY) / stepsY + 1, [endY, startY, stepsY]);
84
+ const yAxis = (0, react_1.useMemo)(() => {
85
+ return new Array(howMuchStepsY).fill(undefined).map((_, i) => {
86
+ return react_1.default.createElement("span", null, label.y(endY - i * stepsY));
87
+ });
88
+ }, [startY, endY, stepsY, howMuchStepsY]);
89
+ const howMuchStepsX = (0, react_1.useMemo)(() => (endX - startX) / stepsX + 1, [endX, startX, stepsX]);
90
+ const xAxis = (0, react_1.useMemo)(() => {
91
+ console.log(howMuchStepsX);
92
+ return new Array(howMuchStepsX).fill(undefined).map((_, i) => {
93
+ return react_1.default.createElement("span", null, label.x(startX + i * stepsX));
94
+ });
95
+ }, [startX, endX, stepsX]);
96
+ const { polylines, tooltips } = (0, react_1.useMemo)(() => {
97
+ const calculate = (end, start, overrideScale = 100) => (point) => {
98
+ const max = end - start;
99
+ const current = point - start;
100
+ return (current * overrideScale) / max;
101
+ };
102
+ const calculateX = calculate(endX, startX, width);
103
+ const calculateY = calculate(endY, startY, height);
104
+ return {
105
+ tooltips: points.map((pointsCategory, i) => {
106
+ const style = groupStyle[i] || DEFAULT_STYLE;
107
+ return pointsCategory.map(([x, y, label, onlyOnHover = false]) => {
108
+ return (react_1.default.createElement(FloatingTooltip, { x: calculateX(x), y: height - calculateY(y), height: height, style: style, hoverOnly: onlyOnHover }, label));
109
+ });
110
+ }),
111
+ polylines: data.map((lineData, i) => {
112
+ const style = groupStyle[i] || DEFAULT_STYLE;
113
+ const calculateLines = (yOverride) => {
114
+ return lineData
115
+ .map(([x, y]) => `${calculateX(x)},${yOverride === undefined ? height - calculateY(y) : yOverride}`)
116
+ .join(" ");
117
+ };
118
+ return (react_1.default.createElement("polyline", { strokeLinejoin: "round", strokeLinecap: "round", points: calculateLines(), fill: "none", strokeWidth: 5, style: {
119
+ "--line-color": style.lineColor,
120
+ } },
121
+ react_1.default.createElement("animate", { attributeName: "points", attributeType: "XML", values: [calculateLines(height), calculateLines()].join("; "), dur: "1s" })));
122
+ }),
123
+ };
124
+ }, [data, width, height]);
125
+ const paddingY = (0, react_1.useMemo)(() => {
126
+ const stepSizeY = height / (howMuchStepsY - 1);
127
+ return stepSizeY / 2;
128
+ }, [howMuchStepsY, height]);
129
+ const paddingX = (0, react_1.useMemo)(() => {
130
+ const stepSizeX = width / (howMuchStepsX - 1);
131
+ return stepSizeX / 2;
132
+ }, [howMuchStepsX, width]);
133
+ return (react_1.default.createElement("div", { className: Chart_module_scss_1.default.chartRoot },
134
+ react_1.default.createElement("div", { className: Chart_module_scss_1.default.yAxis, "data-testid": Chart_e2e_1.ChartDataTestIds.Y_AXIS }, yAxis),
135
+ react_1.default.createElement("div", { ref: chartRef, className: Chart_module_scss_1.default.chartContainer }, width && (react_1.default.createElement("svg", { className: Chart_module_scss_1.default.chart, viewBox: `${-paddingX} ${-paddingY} ${width + paddingX * 2} ${height + paddingY * 2}`, preserveAspectRatio: "none" },
136
+ polylines,
137
+ tooltips))),
138
+ "\u00A0",
139
+ react_1.default.createElement("div", { className: Chart_module_scss_1.default.xAxis, "data-testid": Chart_e2e_1.ChartDataTestIds.X_AXIS }, xAxis)));
140
+ }
141
+ exports.default = ChartView;
142
+ //# sourceMappingURL=Chart.view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chart.view.js","sourceRoot":"","sources":["../../../src/components/Chart/Chart.view.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CASe;AAEf,4EAAyC;AACzC,2CAA+C;AAC/C,yEAAiD;AAGjD,MAAM,aA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M,SAAS,GAAG,KAAM,GAAG,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;QAC/C,OAAO,SAAS,GAAG,CAAC,CAAC;IACvB,CAAC,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAE3B,OAAO,CACL,uCAAK,SAAS,EAAE,2BAAM,CAAC,SAAS;QAC9B,uCAAK,SAAS,EAAE,2BAAM,CAAC,KAAK,iBAAe,4BAAgB,CAAC,MAAM,IAC/D,KAAK,CACF;QACN,uCAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,2BAAM,CAAC,cAAc,IACjD,KAAK,IAAI,CACR,uCACE,SAAS,EAAE,2BAAM,CAAC,KAAK,EACvB,OAAO,EAAE,GAAG,CAAC,QAAQ,IAAI,CAAC,QAAQ,IAAI,KAAK,GAAG,QAAQ,GAAG,CAAC,IACxD,MAAO,GAAG,QAAQ,GAAG,CACvB,EAAE,EACF,mBAAmB,EAAC,MAAM;YAEzB,SAAS;YACT,QAAQ,CACL,CACP,CACG;;QAEN,uCAAK,SAAS,EAAE,2BAAM,CAAC,KAAK,iBAAe,4BAAgB,CAAC,MAAM,IAC/D,KAAK,CACF,CACF,CACP,CAAC;AACJ,CAAC;AA3ID,4BA2IC"}
@@ -0,0 +1 @@
1
+ export { default } from './Chart.logic';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = void 0;
7
+ var Chart_logic_1 = require("./Chart.logic");
8
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Chart_logic_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Chart/index.tsx"],"names":[],"mappings":";;;;;;AAAA,6CAAwC;AAA/B,uHAAA,OAAO,OAAA"}
@@ -19,7 +19,7 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<{
19
19
  messages: {
20
20
  invalidEmail: string;
21
21
  };
22
- }, "className" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "border" | "error" | "Icon" | "messages" | "icon" | "hideError" | "disclaimer" | "multiline" | "decoration"> & React.RefAttributes<{
22
+ }, "className" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "error" | "border" | "Icon" | "messages" | "icon" | "hideError" | "disclaimer" | "multiline" | "decoration"> & React.RefAttributes<{
23
23
  validateEmail: (email: string) => boolean;
24
24
  }>>;
25
25
  export default _default;
@@ -5,6 +5,7 @@ declare const _default: React.ForwardRefExoticComponent<{
5
5
  onClick?: ((e: React.SyntheticEvent<HTMLDivElement, Event>) => void) | undefined;
6
6
  onHidden?: (() => void) | undefined;
7
7
  "data-testid"?: string | undefined;
8
+ style?: any;
8
9
  } & {
9
10
  children?: React.ReactNode;
10
11
  } & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"FadeIn.js","sourceRoot":"","sources":["../../../src/components/FadeIn/FadeIn.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAUe;AACf,8EAA0C;AAU1C;;IAEI;AACJ,SAAS,MAAM,CACb,EAOc,EACd,MAAoC;QARpC,EACE,QAAQ,EACR,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,MAAM,EACN,OAAO,OAEK,EADT,KAAK,cANV,0DAOC,CADS;IAIV,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,IAAA,iBAAS,GAAE,CAAC;KACtB;IACD,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,IAAA,cAAM,GAAmB,CAAC;IAC/C,YAAY,CAAC,OAAO,GAAG,QAAQ,IAAI,YAAY,CAAC,OAAO,CAAC;IAExD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAI,MAAoC,CAAC,OAAQ,CAAC;QAC1D,MAAM,UAAU,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAE9D,IAAI,UAAU,EAAE;YACd,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,4BAAM,CAAC,MAAM,CAAC,CAAC;YAC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EAC7C,OAAO,EAAE,OAAO,IACZ,KAAK,GAER,YAAY,CAAC,OAAO,CACjB,CACP,CAAC;AACJ,CAAC;AAED,kBAAe,IAAA,kBAAU,EAA8B,MAAM,CAAC,CAAC"}
@@ -12,7 +12,7 @@ const Skeleton_module_scss_1 = __importDefault(require("./Skeleton.module.scss")
12
12
  * So it's width and height is translated to em units
13
13
  **/
14
14
  function Skeleton({ width, height = 1, }) {
15
- return (react_1.default.createElement("div", { className: Skeleton_module_scss_1.default.root, style: {
15
+ return (react_1.default.createElement("span", { className: Skeleton_module_scss_1.default.root, style: {
16
16
  "--biggest-unit": `${Math.max(width, height) * 2}em`,
17
17
  width: `${width}em`,
18
18
  height: `${height}em`,
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,kFAA4C;AAE5C;;;;;IAKI;AACJ,SAAwB,QAAQ,CAAC,EAC/B,KAAK,EACL,MAAM,GAAG,CAAC,GAIX;IACC,OAAO,CACL,uCACE,SAAS,EAAE,8BAAM,CAAC,IAAI,EACtB,KAAK,EACH;YACE,gBAAgB,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI;YACpD,KAAK,EAAE,GAAG,KAAK,IAAI;YACnB,MAAM,EAAE,GAAG,MAAM,IAAI;SACf,GAEV,CACH,CAAC;AACJ,CAAC;AAnBD,2BAmBC"}
1
+ {"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,kFAA4C;AAE5C;;;;;IAKI;AACJ,SAAwB,QAAQ,CAAC,EAC/B,KAAK,EACL,MAAM,GAAG,CAAC,GAIX;IACC,OAAO,CACL,wCACE,SAAS,EAAE,8BAAM,CAAC,IAAI,EACtB,KAAK,EACH;YACE,gBAAgB,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI;YACpD,KAAK,EAAE,GAAG,KAAK,IAAI;YACnB,MAAM,EAAE,GAAG,MAAM,IAAI;SACf,GAEV,CACH,CAAC;AACJ,CAAC;AAnBD,2BAmBC"}
@@ -8,6 +8,7 @@
8
8
  animation-iteration-count: infinite;
9
9
  animation-timing-function: linear;
10
10
  border-radius: 0.4em;
11
+ display: inline-block;
11
12
  }
12
13
 
13
14
  @keyframes moving {
@@ -2,6 +2,7 @@ import { Get } from "type-fest";
2
2
  import React, { ReactElement } from "react";
3
3
  import { PropsWithChildren } from "react";
4
4
  import { FieldPath } from "../type-utils";
5
+ import { ImageScales } from "@muritavo/webpack-microfrontend-scripts/bin/types/ImageScales";
5
6
  declare type DeepPartial<T> = {
6
7
  [P in keyof T]?: T[P] extends Function ? T[P] : DeepPartial<T[P]>;
7
8
  };
@@ -68,6 +69,10 @@ export declare type OneUIContextSpecs = {
68
69
  tooltip: {
69
70
  className?: string;
70
71
  };
72
+ adaptiveDialog: {
73
+ dialogClassName: string;
74
+ backdropClassName: string;
75
+ };
71
76
  };
72
77
  hook: {
73
78
  ui: {
@@ -78,6 +83,9 @@ export declare type OneUIContextSpecs = {
78
83
  };
79
84
  };
80
85
  };
86
+ state: {
87
+ imageScale: ImageScales;
88
+ };
81
89
  };
82
90
  declare type ContextConfigSpecs = DeepPartial<OneUIContextSpecs>;
83
91
  export default function OneUIProvider({ children, config, }: PropsWithChildren<{
@@ -85,4 +93,5 @@ export default function OneUIProvider({ children, config, }: PropsWithChildren<{
85
93
  }>): JSX.Element;
86
94
  export declare function useOneUIContext(): OneUIContextSpecs;
87
95
  export declare function useOneUIConfig<P extends FieldPath<OneUIContextSpecs>, T extends Get<OneUIContextSpecs, P>>(prop: P, defaultValue?: T): NonNullable<Get<OneUIContextSpecs, P>>;
96
+ export declare function useCurrentImageScale(): DeepPartial<ImageScales>;
88
97
  export {};
@@ -26,18 +26,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.useOneUIConfig = exports.useOneUIContext = void 0;
29
+ exports.useCurrentImageScale = exports.useOneUIConfig = exports.useOneUIContext = void 0;
30
30
  const get_1 = __importDefault(require("lodash/get"));
31
31
  const merge_1 = __importDefault(require("lodash/merge"));
32
32
  const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
33
33
  const react_1 = __importStar(require("react"));
34
34
  const react_2 = require("react");
35
+ const useAdaptiveImage_1 = __importDefault(require("../hooks/ui/useAdaptiveImage"));
35
36
  const Context = (0, react_2.createContext)(null);
36
37
  function OneUIProvider({ children, config, }) {
37
38
  const prevCtx = (0, react_2.useContext)(Context);
39
+ const scale = (0, useAdaptiveImage_1.default)();
38
40
  const mergedConfig = (0, react_1.useMemo)(() => {
39
- return (0, merge_1.default)((0, cloneDeep_1.default)(prevCtx), config);
40
- }, [prevCtx, config]);
41
+ return (0, merge_1.default)((0, cloneDeep_1.default)(prevCtx), config, {
42
+ state: {
43
+ imageScale: scale,
44
+ },
45
+ });
46
+ }, [prevCtx, config, scale]);
41
47
  return react_1.default.createElement(Context.Provider, { value: mergedConfig }, children);
42
48
  }
43
49
  exports.default = OneUIProvider;
@@ -99,4 +105,9 @@ function useOneUIConfig(prop, defaultValue) {
99
105
  return value || defaultValue;
100
106
  }
101
107
  exports.useOneUIConfig = useOneUIConfig;
108
+ function useCurrentImageScale() {
109
+ const context = (0, react_2.useContext)(Context);
110
+ return context.state.imageScale;
111
+ }
112
+ exports.useCurrentImageScale = useCurrentImageScale;
102
113
  //# sourceMappingURL=OneUIProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OneUIProvider.js","sourceRoot":"","sources":["../../src/context/OneUIProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA6B;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C,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACpB,OAAO,KAAK,IAAI,YAAY,CAAC;AAC/B,CAAC;AAhBD,wCAgBC;AAED,SAAgB,oBAAoB;IAClC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,OAAO,CAAC,CAAC;IAEpC,OAAO,OAAO,CAAC,KAAM,CAAC,UAAW,CAAC;AACpC,CAAC;AAJD,oDAIC"}
@@ -0,0 +1 @@
1
+ export default function useDependencyChangeDetection(tag: string, dependencyArray: any[]): void;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = require("react");
7
+ const DebugLogger_1 = __importDefault(require("../../models/DebugLogger"));
8
+ function useDependencyChangeDetection(tag, dependencyArray) {
9
+ for (let dependencyIndex in dependencyArray) {
10
+ const prevValue = (0, react_1.useRef)();
11
+ (0, react_1.useEffect)(() => {
12
+ if (!prevValue.current)
13
+ return;
14
+ if (process.env.NODE_ENV === "development")
15
+ (0, DebugLogger_1.default)(`${useDependencyChangeDetection.name}:${tag}`, `Element index ${dependencyIndex} (prev: ${JSON.stringify(prevValue.current)}) (new: ${JSON.stringify(dependencyArray[dependencyIndex])}) has changed`);
16
+ }, [dependencyArray[dependencyIndex]]);
17
+ (0, react_1.useEffect)(() => {
18
+ prevValue.current = dependencyArray[dependencyIndex];
19
+ }, [dependencyArray[dependencyIndex]]);
20
+ }
21
+ }
22
+ exports.default = useDependencyChangeDetection;
23
+ //# sourceMappingURL=useDependencyChangeDetection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDependencyChangeDetection.js","sourceRoot":"","sources":["../../../src/hooks/logs/useDependencyChangeDetection.ts"],"names":[],"mappings":";;;;;AAAA,iCAA0C;AAC1C,2EAA2C;AAE3C,SAAwB,4BAA4B,CAClD,GAAW,EACX,eAAsB;IAEtB,KAAK,IAAI,eAAe,IAAI,eAAe,EAAE;QAC3C,MAAM,SAAS,GAAG,IAAA,cAAM,GAAO,CAAC;QAChC,IAAA,iBAAS,EAAC,GAAG,EAAE;YACb,IAAI,CAAC,SAAS,CAAC,OAAO;gBAAE,OAAO;YAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;gBACxC,IAAA,qBAAG,EACD,GAAG,4BAA4B,CAAC,IAAI,IAAI,GAAG,EAAE,EAC7C,iBAAiB,eAAe,WAAW,IAAI,CAAC,SAAS,CACvD,SAAS,CAAC,OAAO,CAClB,WAAW,IAAI,CAAC,SAAS,CACxB,eAAe,CAAC,eAAe,CAAC,CACjC,eAAe,CACjB,CAAC;QACN,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QACvC,IAAA,iBAAS,EAAC,GAAG,EAAE;YACb,SAAS,CAAC,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;QACvD,CAAC,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;KACxC;AACH,CAAC;AAtBD,+CAsBC"}
@@ -1 +1 @@
1
- export default function useIsMounting(id: string): void;
1
+ export default function useIsMounting(tag: string): void;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const react_1 = require("react");
4
- function useIsMounting(id) {
4
+ function useIsMounting(tag) {
5
5
  (0, react_1.useEffect)(() => {
6
- console.log(id + " is mounting");
6
+ console.log(tag + " is mounting");
7
7
  }, []);
8
8
  }
9
9
  exports.default = useIsMounting;
@@ -1 +1 @@
1
- {"version":3,"file":"useIsMounting.js","sourceRoot":"","sources":["../../../src/hooks/logs/useIsMounting.ts"],"names":[],"mappings":";;AAAA,iCAAkC;AAElC,SAAwB,aAAa,CAAC,EAAU;IAC5C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,CAAC,CAAA;IACpC,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;AAJD,gCAIC"}
1
+ {"version":3,"file":"useIsMounting.js","sourceRoot":"","sources":["../../../src/hooks/logs/useIsMounting.ts"],"names":[],"mappings":";;AAAA,iCAAkC;AAElC,SAAwB,aAAa,CAAC,GAAW;IAC7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,cAAc,CAAC,CAAA;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;AAJD,gCAIC"}
@@ -0,0 +1,6 @@
1
+ import { ImageScales } from "@muritavo/webpack-microfrontend-scripts/bin/types/ImageScales";
2
+ /**
3
+ * This hooks is built over the implementation of this loader https://github.com/Muritavo/webpack-microfrontend-scripts#imageresolutionoptimizer
4
+ *
5
+ */
6
+ export default function useAdaptiveImage(): ImageScales;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ImageScales_1 = require("@muritavo/webpack-microfrontend-scripts/bin/types/ImageScales");
7
+ const throttle_1 = __importDefault(require("lodash/throttle"));
8
+ const react_1 = require("react");
9
+ /**
10
+ * This hooks is built over the implementation of this loader https://github.com/Muritavo/webpack-microfrontend-scripts#imageresolutionoptimizer
11
+ *
12
+ */
13
+ function useAdaptiveImage() {
14
+ function ScaleFromCurrentWidth() {
15
+ const width = window.visualViewport.width;
16
+ if (width < 480)
17
+ return ImageScales_1.ImageScales.SMALL;
18
+ if (width < 800)
19
+ return ImageScales_1.ImageScales.NORMAL;
20
+ if (width < 1280)
21
+ return ImageScales_1.ImageScales.BIG;
22
+ if (width < 1920)
23
+ return ImageScales_1.ImageScales.LARGE;
24
+ else
25
+ return ImageScales_1.ImageScales.EXTRA_LARGE;
26
+ }
27
+ const [currentScale, setCurrentScale] = (0, react_1.useState)(() => ScaleFromCurrentWidth());
28
+ (0, react_1.useEffect)(() => {
29
+ const onResizeThrottle = (0, throttle_1.default)(() => {
30
+ setCurrentScale(ScaleFromCurrentWidth());
31
+ }, 1000 / 4);
32
+ const onResize = () => onResizeThrottle();
33
+ window.addEventListener("resize", onResize);
34
+ return () => window.removeEventListener("resize", onResize);
35
+ }, []);
36
+ return currentScale;
37
+ }
38
+ exports.default = useAdaptiveImage;
39
+ //# sourceMappingURL=useAdaptiveImage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAdaptiveImage.js","sourceRoot":"","sources":["../../../src/hooks/ui/useAdaptiveImage.tsx"],"names":[],"mappings":";;;;;AAAA,+FAA4F;AAC5F,+DAAuC;AACvC,iCAA4C;AAE5C;;;GAGG;AACH,SAAwB,gBAAgB;IACtC,SAAS,qBAAqB;QAC5B,MAAM,KAAK,GAAG,MAAM,CAAC,cAAe,CAAC,KAAK,CAAC;QAC3C,IAAI,KAAK,GAAG,GAAG;YAAE,OAAO,yBAAW,CAAC,KAAK,CAAC;QAC1C,IAAI,KAAK,GAAG,GAAG;YAAE,OAAO,yBAAW,CAAC,MAAM,CAAC;QAC3C,IAAI,KAAK,GAAG,IAAI;YAAE,OAAO,yBAAW,CAAC,GAAG,CAAC;QACzC,IAAI,KAAK,GAAG,IAAI;YAAE,OAAO,yBAAW,CAAC,KAAK,CAAC;;YACtC,OAAO,yBAAW,CAAC,WAAW,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAc,GAAG,EAAE,CACjE,qBAAqB,EAAE,CACxB,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,gBAAgB,GAAG,IAAA,kBAAQ,EAAC,GAAG,EAAE;YACrC,eAAe,CAAC,qBAAqB,EAAE,CAAC,CAAC;QAC3C,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;QACb,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,gBAAgB,EAAE,CAAC;QAC1C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC5C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,YAAY,CAAC;AACtB,CAAC;AAxBD,mCAwBC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A small hook for binding the hover control over some HTML element
3
+ * @returns uiEvents: The events to spread to the html element hovering: the hover state
4
+ */
5
+ export default function useMouseHover(): {
6
+ uiEvents: {
7
+ onMouseEnter: () => void;
8
+ onMouseOut: () => void;
9
+ };
10
+ hovering: boolean;
11
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_1 = require("react");
4
+ /**
5
+ * A small hook for binding the hover control over some HTML element
6
+ * @returns uiEvents: The events to spread to the html element hovering: the hover state
7
+ */
8
+ function useMouseHover() {
9
+ const [hovering, setHovering] = (0, react_1.useState)(false);
10
+ const uiEvents = (0, react_1.useMemo)(() => ({
11
+ onMouseEnter: () => {
12
+ setHovering(true);
13
+ },
14
+ onMouseOut: () => {
15
+ setHovering(false);
16
+ },
17
+ }), []);
18
+ return {
19
+ uiEvents,
20
+ hovering,
21
+ };
22
+ }
23
+ exports.default = useMouseHover;
24
+ //# sourceMappingURL=useMouseHover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMouseHover.js","sourceRoot":"","sources":["../../../src/hooks/ui/useMouseHover.tsx"],"names":[],"mappings":";;AAAA,iCAA0C;AAE1C;;;GAGG;AACH,SAAwB,aAAa;IACnC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,IAAA,eAAO,EACtB,GAAG,EAAE,CAAC,CAAC;QACL,YAAY,EAAE,GAAG,EAAE;YACjB,WAAW,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,UAAU,EAAE,GAAG,EAAE;YACf,WAAW,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;KACF,CAAC,EACF,EAAE,CACH,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,QAAQ;KACT,CAAC;AACJ,CAAC;AAlBD,gCAkBC"}
@@ -2,11 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isolateMessages = void 0;
4
4
  const react_intl_1 = require("react-intl");
5
+ const react_1 = require("react");
5
6
  function useShortIntl() {
6
7
  const intl = (0, react_intl_1.useIntl)();
7
8
  const { formatMessage, formatNumber } = intl;
9
+ const [devMode, setDevMode] = (0, react_1.useState)(false);
10
+ (0, react_1.useEffect)(() => {
11
+ if (process.env.NODE_ENV === "development") {
12
+ const keyDownDetect = (ev) => {
13
+ if (ev.key === "i" && ev.ctrlKey) {
14
+ const keyUpDetect = (ev) => {
15
+ if (ev.key === "i") {
16
+ setDevMode(false);
17
+ }
18
+ };
19
+ setDevMode(true);
20
+ window.addEventListener("keyup", keyUpDetect);
21
+ }
22
+ };
23
+ window.addEventListener("keydown", keyDownDetect);
24
+ }
25
+ });
8
26
  return Object.assign(Object.assign({}, intl), { txt: (id, params) => {
9
- return formatMessage({ id }, params);
27
+ return devMode ? id : formatMessage({ id }, params);
10
28
  }, formatToDoubleDecimal(val, options = {}) {
11
29
  return formatNumber(val, Object.assign({ minimumFractionDigits: 2, maximumFractionDigits: 2 }, options));
12
30
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useShortIntl.js","sourceRoot":"","sources":["../../src/hooks/useShortIntl.ts"],"names":[],"mappings":";;;AAAA,2CAAgE;AAGhE,SAAwB,YAAY;IAWlC,MAAM,IAAI,GAAG,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;iBACvB,KAAK,CAAC,WAAW,CAAC;iBAClB,aAAa,CACZ,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB,KAAI,SAAS,CAAC,aAAa,EAAG,EAC5D,CAAC,CACF;iBACA,QAAQ,EAAE;iBACV,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACrB,OAAO,GAAG,OAAO,GACf,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,gBAAgB,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,EACxD,EAAE,CAAC;QACL,CAAC,IACD;AACJ,CAAC;AAvED,+BAuEC;AAUD,SAAgB,eAAe,CAC7B,OAAU,EACV,OAAU;IAEV,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACnC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,iCACV,CAAC,KACJ,CAAC,GAAG,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IACtB,EACF,EAA4C,CAC7C,CAAC;AACJ,CAAC;AAXD,0CAWC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @returns A hook to obtain the query params from a url
4
+ */
5
+ export default function useQuery<E extends {}>(): {
6
+ get: (p: keyof E) => E[keyof E];
7
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * @returns A hook to obtain the query params from a url
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const react_1 = require("react");
8
+ const react_router_dom_1 = require("react-router-dom");
9
+ function useQuery() {
10
+ const { search } = (0, react_router_dom_1.useLocation)();
11
+ return (0, react_1.useMemo)(() => new URLSearchParams(search), [search]);
12
+ }
13
+ exports.default = useQuery;
14
+ //# sourceMappingURL=useQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQuery.js","sourceRoot":"","sources":["../../../src/hooks/utility/useQuery.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,iCAAgC;AAChC,uDAA+C;AAE/C,SAAwB,QAAQ;IAC9B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,8BAAW,GAAE,CAAC;IAEjC,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAEzD,CAAC;AACJ,CAAC;AAND,2BAMC"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const rand = require("color-seed");
4
+ const win = window;
4
5
  function log(filter, obj) {
5
- console.log(`%c ${filter}`, `color: ${rand.getColor(filter)}`, obj);
6
+ if (win.DEBUG === "*" || filter.includes(win.DEBUG))
7
+ console.log(`%c ${filter}`, `color: ${rand.getColor(filter)}`, obj);
6
8
  }
7
9
  exports.default = log;
8
10
  //# sourceMappingURL=DebugLogger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DebugLogger.js","sourceRoot":"","sources":["../../src/models/DebugLogger.ts"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAEnC,SAAwB,GAAG,CAAC,MAAc,EAAE,GAAQ;IAClD,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,EAAE,EAAE,UAAU,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACtE,CAAC;AAFD,sBAEC"}
1
+ {"version":3,"file":"DebugLogger.js","sourceRoot":"","sources":["../../src/models/DebugLogger.ts"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACnC,MAAM,GAAG,GAAG,MAAa,CAAC;AAE1B,SAAwB,GAAG,CAAC,MAAc,EAAE,GAAQ;IAClD,IAAI,GAAG,CAAC,KAAK,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,MAAM,MAAM,EAAE,EAAE,UAAU,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACxE,CAAC;AAHD,sBAGC"}
@@ -7,7 +7,7 @@ declare type ExtractEvents<A extends AllABIs[number]> = A extends {
7
7
  type: "event";
8
8
  } ? A["name"] : never;
9
9
  declare type TypeOrInternalType<T> = T['internalType'] extends unknown ? T['type'] : T['internalType'];
10
- declare type MapTypeToJS<L, C> = L extends "address" | "uint256" | "uint128" | "uint8" | "string" | "bytes32" ? string : L extends "bool" ? boolean : L extends 'tuple' ? TuplifyUnion<C[number], C[number]['name']> : unknown;
10
+ declare type MapTypeToJS<L, C> = L extends "tuple[]" ? TuplifyUnion<C[number], C[number]['name']>[] : L extends "address" | "uint256" | "uint128" | "uint8" | "string" | "bytes32" ? string : L extends "uint256[]" | "string[]" ? string[] : L extends "bool" ? boolean : L extends 'tuple' ? TuplifyUnion<C[number], C[number]['name']> : unknown;
11
11
  declare type ExtractFromObj<R extends (AllABIs[number] & {
12
12
  type: "function";
13
13
  })> = {
@@ -1 +1 @@
1
- {"version":3,"file":"GenericContract.js","sourceRoot":"","sources":["../../src/models/GenericContract.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,yDAK2B;AAsG3B,MAAqB,eAGjB,SAAQ,4BAAQ;IAElB,YAAY,aAAgB,EAAE,OAAgB,EAAE,OAAyB;QACvE,KAAK,CAAC,aAAqC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAkBQ,aAAa,CACpB,KAAU,EACV,OAAa,EACb,QAAc;QAEd,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAQ,CAAC;IAC9D,CAAC;CACF;AAhCD,kCAgCC"}
1
+ {"version":3,"file":"GenericContract.js","sourceRoot":"","sources":["../../src/models/GenericContract.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,yDAK2B;AAyG3B,MAAqB,eAGjB,SAAQ,4BAAQ;IAElB,YAAY,aAAgB,EAAE,OAAgB,EAAE,OAAyB;QACvE,KAAK,CAAC,aAAqC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAkBQ,aAAa,CACpB,KAAU,EACV,OAAa,EACb,QAAc;QAEd,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAQ,CAAC;IAC9D,CAAC;CACF;AAhCD,kCAgCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onepercentio/one-ui",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "A set of reusable components created through the development of Onepercent projects",
5
5
  "repository": "git@github.com:onepercentio/one-ui.git",
6
6
  "author": "Murilo Oliveira de Araujo <muritavo@outlook.com>",
@@ -12,7 +12,7 @@
12
12
  "@firebase/rules-unit-testing": "^2.0.2",
13
13
  "@metamask/providers": "^9.1.0",
14
14
  "@muritavo/cypress-toolkit": "^0.8.0",
15
- "@muritavo/webpack-microfrontend-scripts": "^0.0.24",
15
+ "@muritavo/webpack-microfrontend-scripts": "^0.1.2",
16
16
  "@storybook/addon-actions": "^6.4.18",
17
17
  "@storybook/addon-essentials": "^6.4.18",
18
18
  "@storybook/addon-links": "^6.4.18",