Skip to content

Commit 41cc54b

Browse files
chore(ui): Update all caraml ui-lib versions (caraml-dev#107)
* Update all caraml ui-lib versions * Remove react-sticky from AccordionForm
1 parent d1f1876 commit 41cc54b

File tree

5 files changed

+121
-81
lines changed

5 files changed

+121
-81
lines changed

ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@caraml-dev/ui-lib",
3-
"version": "1.7.6",
3+
"version": "1.13.0",
44
"private": true,
55
"repository": {
66
"type": "git",

ui/packages/app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "mlp-ui",
3-
"version": "1.7.6",
3+
"version": "1.13.0",
44
"private": true,
55
"license": "Apache-2.0",
66
"dependencies": {
7-
"@caraml-dev/ui-lib": "^1.7.5-build.5-59f13e1",
7+
"@caraml-dev/ui-lib": "^1.13.0-build.1-d1f1876",
88
"@elastic/datemath": "^5.0.3",
99
"@elastic/eui": "^94.5.2",
1010
"@emotion/css": "^11.11.2",

ui/packages/lib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"react-ellipsis-text": "^1.2.1",
4646
"react-fast-compare": "^3.2.2",
4747
"react-scroll": "^1.9.0",
48-
"react-sticky": "^6.0.3",
48+
"react-stickynode": "^4.1.1",
4949
"resize-observer-polyfill": "^1.5.1",
5050
"yup": "^1.4.0"
5151
},
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useRef } from "react";
22
import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from "@elastic/eui";
3-
import { Sticky, StickyContainer } from "react-sticky";
3+
import Sticky from "react-stickynode";
44
import { StepActions } from "../multi_steps_form";
55
import FormValidationContext from "../form/validation/context";
66
import { MultiSectionFormValidationContextProvider } from "../form";
@@ -23,70 +23,63 @@ export const AccordionForm = ({
2323
const { height: lastSectionHeight } = useDimension(lastSectionRef);
2424

2525
return (
26-
<StickyContainer className="container">
27-
<EuiFlexGroup direction="row" gutterSize="none" className="accordionForm">
28-
<EuiFlexItem grow={false} className="accordionForm--sideNavContainer">
29-
<Sticky>
30-
{({ style, isSticky }) => (
31-
<span style={style}>
32-
{isSticky && <EuiSpacer size="m" />}
33-
<AccordionFormSideNav name={name} sections={sections} />
34-
</span>
35-
)}
36-
</Sticky>
37-
</EuiFlexItem>
38-
<EuiFlexItem grow={true} className="accordionForm--content">
39-
<MultiSectionFormValidationContextProvider
40-
onSubmit={onSubmit}
41-
schemas={sections.map(s => s.validationSchema)}
42-
contexts={sections.map(s => s.validationContext)}>
43-
<FormValidationContext.Consumer>
44-
{({ errors, onSubmit, isSubmitting }) => (
45-
<EuiFlexGroup
46-
direction="column"
47-
gutterSize="none"
48-
alignItems="center">
49-
<AccordionFormScrollController sections={sections} />
26+
<EuiFlexGroup direction="row" gutterSize="none" className="accordionForm">
27+
<EuiFlexItem grow={false} className="accordionForm--sideNavContainer">
28+
<Sticky enabled={true}>
29+
<AccordionFormSideNav name={name} sections={sections} />
30+
</Sticky>
31+
</EuiFlexItem>
32+
<EuiFlexItem grow={true} className="accordionForm--content">
33+
<MultiSectionFormValidationContextProvider
34+
onSubmit={onSubmit}
35+
schemas={sections.map(s => s.validationSchema)}
36+
contexts={sections.map(s => s.validationContext)}>
37+
<FormValidationContext.Consumer>
38+
{({ errors, onSubmit, isSubmitting }) => (
39+
<EuiFlexGroup
40+
direction="column"
41+
gutterSize="none"
42+
alignItems="center">
43+
<AccordionFormScrollController sections={sections} />
5044

51-
{sections.map((section, idx) => (
52-
<EuiFlexItem key={idx}>
53-
<span
54-
ref={
55-
idx === sections.length - 1
56-
? lastSectionRef
57-
: undefined
58-
}>
59-
<AccordionFormSection
60-
section={section}
61-
errors={errors[idx]}
62-
renderTitle={renderTitle}
63-
/>
64-
</span>
65-
</EuiFlexItem>
66-
))}
45+
{sections.map((section, idx) => (
46+
<EuiFlexItem key={idx}>
47+
<span
48+
ref={
49+
idx === sections.length - 1
50+
? lastSectionRef
51+
: undefined
52+
}>
53+
<AccordionFormSection
54+
section={section}
55+
errors={errors[idx]}
56+
renderTitle={renderTitle}
57+
/>
58+
</span>
59+
</EuiFlexItem>
60+
))}
6761

68-
<EuiSpacer size="l" />
62+
<EuiSpacer size="l" />
6963

70-
<EuiFlexItem
71-
// set the minHeight dynamically, based on the height of the last section
72-
style={{
73-
minHeight: `calc(100vh - ${lastSectionHeight +
74-
24 +
75-
16}px)`
76-
}}>
77-
<StepActions
78-
submitLabel={submitLabel}
79-
onCancel={onCancel}
80-
onSubmit={onSubmit}
81-
isSubmitting={isSubmitting}
82-
/>
83-
</EuiFlexItem>
84-
</EuiFlexGroup>
85-
)}
86-
</FormValidationContext.Consumer>
87-
</MultiSectionFormValidationContextProvider>
88-
</EuiFlexItem>
89-
</EuiFlexGroup>
90-
</StickyContainer>
64+
<EuiFlexItem
65+
// set the minHeight dynamically, based on the height of the last section
66+
style={{
67+
minHeight: `calc(100vh - ${lastSectionHeight +
68+
24 +
69+
16}px)`
70+
}}>
71+
<StepActions
72+
submitLabel={submitLabel}
73+
onCancel={onCancel}
74+
onSubmit={onSubmit}
75+
isSubmitting={isSubmitting}
76+
/>
77+
</EuiFlexItem>
78+
</EuiFlexGroup>
79+
)}
80+
</FormValidationContext.Consumer>
81+
</MultiSectionFormValidationContextProvider>
82+
</EuiFlexItem>
83+
</EuiFlexGroup>
9184
);
9285
};

ui/yarn.lock

+61-14
Original file line numberDiff line numberDiff line change
@@ -3758,7 +3758,7 @@ cjs-module-lexer@^1.0.0:
37583758
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c"
37593759
integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==
37603760

3761-
classnames@^2.5.1:
3761+
classnames@^2.0.0, classnames@^2.5.1:
37623762
version "2.5.1"
37633763
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
37643764
integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==
@@ -3987,7 +3987,7 @@ core-js-pure@^3.23.3:
39873987
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.37.1.tgz#2b4b34281f54db06c9a9a5bd60105046900553bd"
39883988
integrity sha512-J/r5JTHSmzTxbiYYrzXg9w1VpqrYt+gexenBE9pugeyhwPZTAEJddyiReJWsLO6uNQ8xJZFbod6XC7KKwatCiA==
39893989

3990-
core-js@3, core-js@^3.19.2:
3990+
core-js@3, core-js@^3.19.2, core-js@^3.6.5:
39913991
version "3.37.1"
39923992
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.37.1.tgz#d21751ddb756518ac5a00e4d66499df981a62db9"
39933993
integrity sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==
@@ -5104,6 +5104,11 @@ etag@~1.8.1:
51045104
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
51055105
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
51065106

5107+
eventemitter3@^3.0.0:
5108+
version "3.1.2"
5109+
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
5110+
integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==
5111+
51075112
eventemitter3@^4.0.0:
51085113
version "4.0.7"
51095114
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
@@ -7396,7 +7401,7 @@ lodash.uniq@^4.5.0:
73967401
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
73977402
integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==
73987403

7399-
lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0:
7404+
lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0:
74007405
version "4.17.21"
74017406
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
74027407
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -8856,7 +8861,7 @@ prompts@^2.0.1, prompts@^2.4.2:
88568861
kleur "^3.0.3"
88578862
sisteransi "^1.0.5"
88588863

8859-
prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
8864+
prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
88608865
version "15.8.1"
88618866
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
88628867
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -8953,7 +8958,7 @@ raf-schd@^4.0.3:
89538958
resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a"
89548959
integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==
89558960

8956-
raf@^3.3.0, raf@^3.4.1:
8961+
raf@^3.0.0, raf@^3.4.1:
89578962
version "3.4.1"
89588963
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
89598964
integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==
@@ -9252,13 +9257,16 @@ react-scroll@^1.9.0:
92529257
lodash.throttle "^4.1.1"
92539258
prop-types "^15.7.2"
92549259

9255-
react-sticky@^6.0.3:
9256-
version "6.0.3"
9257-
resolved "https://registry.yarnpkg.com/react-sticky/-/react-sticky-6.0.3.tgz#7a18b643e1863da113d7f7036118d2a75d9ecde4"
9258-
integrity sha512-LNH4UJlRatOqo29/VHxDZOf6fwbgfgcHO4mkEFvrie5FuaZCSTGtug5R8NGqJ0kSnX8gHw8qZN37FcvnFBJpTQ==
9260+
react-stickynode@^4.1.1:
9261+
version "4.1.1"
9262+
resolved "https://registry.yarnpkg.com/react-stickynode/-/react-stickynode-4.1.1.tgz#ea63509a1d83195a7846d8f39be1e4e9ccbf1d3e"
9263+
integrity sha512-+Xp3xantrxbFjqNiSbpvsZwCqZYiPq0njKTA+QsIZdmEHih1H/lOV9/LpS37d+v92iSydJJTZMeRaENWeqGeIA==
92599264
dependencies:
9260-
prop-types "^15.5.8"
9261-
raf "^3.3.0"
9265+
classnames "^2.0.0"
9266+
core-js "^3.6.5"
9267+
prop-types "^15.6.0"
9268+
shallowequal "^1.0.0"
9269+
subscribe-ui-event "^2.0.6"
92629270

92639271
react-style-singleton@^2.2.1:
92649272
version "2.2.1"
@@ -9955,6 +9963,11 @@ shallow-clone@^3.0.0:
99559963
dependencies:
99569964
kind-of "^6.0.2"
99579965

9966+
shallowequal@^1.0.0:
9967+
version "1.1.0"
9968+
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
9969+
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
9970+
99589971
shebang-command@^1.2.0:
99599972
version "1.2.0"
99609973
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -10242,7 +10255,16 @@ string-natural-compare@^3.0.1:
1024210255
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
1024310256
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
1024410257

10245-
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0:
10258+
"string-width-cjs@npm:string-width@^4.2.0":
10259+
version "4.2.3"
10260+
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
10261+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
10262+
dependencies:
10263+
emoji-regex "^8.0.0"
10264+
is-fullwidth-code-point "^3.0.0"
10265+
strip-ansi "^6.0.1"
10266+
10267+
string-width@^4.1.0, string-width@^4.2.0:
1024610268
version "4.2.3"
1024710269
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
1024810270
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -10357,7 +10379,14 @@ stringify-object@^3.3.0:
1035710379
is-obj "^1.0.1"
1035810380
is-regexp "^1.0.0"
1035910381

10360-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
10382+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
10383+
version "6.0.1"
10384+
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
10385+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
10386+
dependencies:
10387+
ansi-regex "^5.0.1"
10388+
10389+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
1036110390
version "6.0.1"
1036210391
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
1036310392
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -10426,6 +10455,15 @@ [email protected]:
1042610455
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51"
1042710456
integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==
1042810457

10458+
subscribe-ui-event@^2.0.6:
10459+
version "2.0.7"
10460+
resolved "https://registry.yarnpkg.com/subscribe-ui-event/-/subscribe-ui-event-2.0.7.tgz#8d18b6339c35b25246a5335775573f0e5dc461f8"
10461+
integrity sha512-Acrtf9XXl6lpyHAWYeRD1xTPUQHDERfL4GHeNuYAtZMc4Z8Us2iDBP0Fn3xiRvkQ1FO+hx+qRLmPEwiZxp7FDQ==
10462+
dependencies:
10463+
eventemitter3 "^3.0.0"
10464+
lodash "^4.17.15"
10465+
raf "^3.0.0"
10466+
1042910467
sucrase@^3.32.0:
1043010468
version "3.35.0"
1043110469
resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263"
@@ -11642,7 +11680,16 @@ [email protected]:
1164211680
"@types/trusted-types" "^2.0.2"
1164311681
workbox-core "6.6.1"
1164411682

11645-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
11683+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
11684+
version "7.0.0"
11685+
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
11686+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
11687+
dependencies:
11688+
ansi-styles "^4.0.0"
11689+
string-width "^4.1.0"
11690+
strip-ansi "^6.0.0"
11691+
11692+
wrap-ansi@^7.0.0:
1164611693
version "7.0.0"
1164711694
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
1164811695
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

0 commit comments

Comments
 (0)