@servicetitan/confirm 31.2.0 → 31.3.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.
- package/dist/confirm.js +10 -2
- package/dist/confirm.js.map +1 -1
- package/dist/confirmation-messages/default-confirmation.js +13 -1
- package/dist/confirmation-messages/default-confirmation.js.map +1 -1
- package/dist/confirmation-messages/yes-no-confirmation.js +28 -1
- package/dist/confirmation-messages/yes-no-confirmation.js.map +1 -1
- package/dist/confirmation-messages/yes-no-confirmation.module.css.d.ts +4 -0
- package/dist/demo/basic.js +10 -3
- package/dist/demo/basic.js.map +1 -1
- package/dist/demo/configurable.js +13 -3
- package/dist/demo/configurable.js.map +1 -1
- package/dist/demo/custom.js +55 -5
- package/dist/demo/custom.js.map +1 -1
- package/dist/demo/hook.js +12 -3
- package/dist/demo/hook.js.map +1 -1
- package/dist/demo/index.js +1 -0
- package/dist/demo/index.js.map +1 -1
- package/dist/demo/toggleable.js +23 -4
- package/dist/demo/toggleable.js.map +1 -1
- package/dist/demo/yes-no.js +14 -4
- package/dist/demo/yes-no.js.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/use-confirm.js +35 -24
- package/dist/use-confirm.js.map +1 -1
- package/package.json +4 -4
- package/dist/confirm.stories.js +0 -17
- package/dist/confirm.stories.js.map +0 -1
package/dist/confirm.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
import { useConfirm } from './use-confirm';
|
|
4
|
-
export const Confirm = ({ onConfirm, onDecline, children, ...props })
|
|
4
|
+
export const Confirm = ({ onConfirm, onDecline, children, ...props })=>{
|
|
5
5
|
const [Confirm, handler] = useConfirm(onConfirm, onDecline);
|
|
6
|
-
return
|
|
6
|
+
return /*#__PURE__*/ _jsxs(Fragment, {
|
|
7
|
+
children: [
|
|
8
|
+
children(handler),
|
|
9
|
+
/*#__PURE__*/ _jsx(Confirm, {
|
|
10
|
+
...props
|
|
11
|
+
})
|
|
12
|
+
]
|
|
13
|
+
});
|
|
7
14
|
};
|
|
15
|
+
|
|
8
16
|
//# sourceMappingURL=confirm.js.map
|
package/dist/confirm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/confirm.tsx"],"sourcesContent":["import { Fragment } from 'react';\n\nimport { useConfirm, ConfirmProps as InnerConfirmProps, ConfirmationProps } from './use-confirm';\nimport { DefaultConfirmationProps } from './confirmation-messages/default-confirmation';\n\ntype ConfirmProps<T extends (...args: any[]) => any, P extends ConfirmationProps> = {\n onConfirm: T;\n onDecline?: T;\n children(handler: T): JSX.Element;\n} & InnerConfirmProps<P>;\n\nexport const Confirm = <\n T extends (...args: any[]) => any,\n P extends ConfirmationProps = DefaultConfirmationProps,\n>({\n onConfirm,\n onDecline,\n children,\n ...props\n}: ConfirmProps<T, P>) => {\n const [Confirm, handler] = useConfirm(onConfirm, onDecline);\n\n return (\n <Fragment>\n {children(handler)}\n\n <Confirm {...(props as unknown as InnerConfirmProps<P>)} />\n </Fragment>\n );\n};\n"],"names":["Fragment","useConfirm","Confirm","onConfirm","onDecline","children","props","handler"],"mappings":";AAAA,SAASA,QAAQ,QAAQ,QAAQ;AAEjC,SAASC,UAAU,QAA8D,gBAAgB;AASjG,OAAO,MAAMC,UAAU,CAGrB,EACEC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACR,GAAGC,OACc;IACjB,MAAM,CAACJ,SAASK,QAAQ,GAAGN,WAAWE,WAAWC;IAEjD,qBACI,MAACJ;;YACIK,SAASE;0BAEV,KAACL;gBAAS,GAAII,KAAK;;;;AAG/B,EAAE"}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog } from '@servicetitan/design-system';
|
|
3
|
-
export const DefaultConfirmation = ({ negative = true, title = 'Are you sure?', message = '', onConfirm, onCancel, ...props })
|
|
3
|
+
export const DefaultConfirmation = ({ negative = true, title = 'Are you sure?', message = '', onConfirm, onCancel, ...props })=>/*#__PURE__*/ _jsx(Dialog, {
|
|
4
|
+
open: true,
|
|
5
|
+
negative: negative,
|
|
6
|
+
onClose: onCancel,
|
|
7
|
+
title: title,
|
|
8
|
+
onPrimaryActionClick: onConfirm,
|
|
9
|
+
primaryActionName: "Confirm",
|
|
10
|
+
onSecondaryActionClick: onCancel,
|
|
11
|
+
secondaryActionName: "Cancel",
|
|
12
|
+
...props,
|
|
13
|
+
children: message
|
|
14
|
+
});
|
|
15
|
+
|
|
4
16
|
//# sourceMappingURL=default-confirmation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/confirmation-messages/default-confirmation.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Dialog, DialogProps } from '@servicetitan/design-system';\n\nimport { ConfirmationProps } from '../use-confirm';\n\nexport type DefaultConfirmationProps = ConfirmationProps &\n Partial<\n Omit<\n DialogProps,\n | 'closable'\n | 'onClose'\n | 'onPrimaryActionClick'\n | 'onSecondaryActionClick'\n | 'open'\n | 'title'\n >\n >;\n\nexport const DefaultConfirmation: FC<DefaultConfirmationProps> = ({\n negative = true,\n title = 'Are you sure?',\n message = '',\n onConfirm,\n onCancel,\n ...props\n}) => (\n <Dialog\n open\n negative={negative}\n onClose={onCancel}\n title={title}\n onPrimaryActionClick={onConfirm}\n primaryActionName=\"Confirm\"\n onSecondaryActionClick={onCancel}\n secondaryActionName=\"Cancel\"\n {...props}\n >\n {message}\n </Dialog>\n);\n"],"names":["Dialog","DefaultConfirmation","negative","title","message","onConfirm","onCancel","props","open","onClose","onPrimaryActionClick","primaryActionName","onSecondaryActionClick","secondaryActionName"],"mappings":";AAEA,SAASA,MAAM,QAAqB,8BAA8B;AAiBlE,OAAO,MAAMC,sBAAoD,CAAC,EAC9DC,WAAW,IAAI,EACfC,QAAQ,eAAe,EACvBC,UAAU,EAAE,EACZC,SAAS,EACTC,QAAQ,EACR,GAAGC,OACN,iBACG,KAACP;QACGQ,IAAI;QACJN,UAAUA;QACVO,SAASH;QACTH,OAAOA;QACPO,sBAAsBL;QACtBM,mBAAkB;QAClBC,wBAAwBN;QACxBO,qBAAoB;QACnB,GAAGN,KAAK;kBAERH;OAEP"}
|
|
@@ -3,5 +3,32 @@ import { Modal, ButtonGroup, Button } from '@servicetitan/design-system';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import * as Styles from './yes-no-confirmation.module.css';
|
|
5
5
|
// TODO: think about suitable default title
|
|
6
|
-
export const YesNoConfirmation = ({ title = '', message = '', onConfirm, onDecline, onCancel
|
|
6
|
+
export const YesNoConfirmation = ({ title = '', message = '', onConfirm, onDecline, onCancel })=>/*#__PURE__*/ _jsx(Modal, {
|
|
7
|
+
open: true,
|
|
8
|
+
closable: true,
|
|
9
|
+
onClose: onCancel,
|
|
10
|
+
size: Modal.Sizes.S,
|
|
11
|
+
title: title,
|
|
12
|
+
footer: /*#__PURE__*/ _jsxs(ButtonGroup, {
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
15
|
+
onClick: onCancel,
|
|
16
|
+
children: "Cancel"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
19
|
+
negative: true,
|
|
20
|
+
onClick: onDecline,
|
|
21
|
+
children: "No"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
24
|
+
primary: true,
|
|
25
|
+
onClick: onConfirm,
|
|
26
|
+
children: "Yes"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
className: classNames(Styles.yesNoConfirmation, !message && Styles.withoutMessage),
|
|
31
|
+
children: message
|
|
32
|
+
});
|
|
33
|
+
|
|
7
34
|
//# sourceMappingURL=yes-no-confirmation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/confirmation-messages/yes-no-confirmation.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Modal, ButtonGroup, Button } from '@servicetitan/design-system';\n\nimport { ConfirmationProps } from '../use-confirm';\n\nimport classNames from 'classnames';\nimport * as Styles from './yes-no-confirmation.module.css';\n\n// TODO: think about suitable default title\nexport const YesNoConfirmation: FC<ConfirmationProps> = ({\n title = '',\n message = '',\n onConfirm,\n onDecline,\n onCancel,\n}) => (\n <Modal\n open\n closable\n onClose={onCancel}\n size={Modal.Sizes.S}\n title={title}\n footer={\n <ButtonGroup>\n <Button onClick={onCancel}>Cancel</Button>\n <Button negative onClick={onDecline}>\n No\n </Button>\n <Button primary onClick={onConfirm}>\n Yes\n </Button>\n </ButtonGroup>\n }\n className={classNames(Styles.yesNoConfirmation, !message && Styles.withoutMessage)}\n >\n {message}\n </Modal>\n);\n"],"names":["Modal","ButtonGroup","Button","classNames","Styles","YesNoConfirmation","title","message","onConfirm","onDecline","onCancel","open","closable","onClose","size","Sizes","S","footer","onClick","negative","primary","className","yesNoConfirmation","withoutMessage"],"mappings":";AAEA,SAASA,KAAK,EAAEC,WAAW,EAAEC,MAAM,QAAQ,8BAA8B;AAIzE,OAAOC,gBAAgB,aAAa;AACpC,YAAYC,YAAY,mCAAmC;AAE3D,2CAA2C;AAC3C,OAAO,MAAMC,oBAA2C,CAAC,EACrDC,QAAQ,EAAE,EACVC,UAAU,EAAE,EACZC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACX,iBACG,KAACV;QACGW,IAAI;QACJC,QAAQ;QACRC,SAASH;QACTI,MAAMd,MAAMe,KAAK,CAACC,CAAC;QACnBV,OAAOA;QACPW,sBACI,MAAChB;;8BACG,KAACC;oBAAOgB,SAASR;8BAAU;;8BAC3B,KAACR;oBAAOiB,QAAQ;oBAACD,SAAST;8BAAW;;8BAGrC,KAACP;oBAAOkB,OAAO;oBAACF,SAASV;8BAAW;;;;QAK5Ca,WAAWlB,WAAWC,OAAOkB,iBAAiB,EAAE,CAACf,WAAWH,OAAOmB,cAAc;kBAEhFhB;OAEP"}
|
package/dist/demo/basic.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@servicetitan/design-system';
|
|
3
3
|
import { Confirm } from '..';
|
|
4
|
-
export const BasicExample = ()
|
|
5
|
-
const handleConfirm = ()
|
|
6
|
-
return
|
|
4
|
+
export const BasicExample = ()=>{
|
|
5
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
6
|
+
return /*#__PURE__*/ _jsx(Confirm, {
|
|
7
|
+
onConfirm: handleConfirm,
|
|
8
|
+
children: (onClick)=>/*#__PURE__*/ _jsx(Button, {
|
|
9
|
+
onClick: onClick,
|
|
10
|
+
children: "Do Something"
|
|
11
|
+
})
|
|
12
|
+
});
|
|
7
13
|
};
|
|
14
|
+
|
|
8
15
|
//# sourceMappingURL=basic.js.map
|
package/dist/demo/basic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/basic.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Button } from '@servicetitan/design-system';\n\nimport { Confirm } from '..';\n\nexport const BasicExample: FC = () => {\n const handleConfirm = () => alert('Confirmed');\n\n return (\n <Confirm onConfirm={handleConfirm}>\n {onClick => <Button onClick={onClick}>Do Something</Button>}\n </Confirm>\n );\n};\n"],"names":["Button","Confirm","BasicExample","handleConfirm","alert","onConfirm","onClick"],"mappings":";AAEA,SAASA,MAAM,QAAQ,8BAA8B;AAErD,SAASC,OAAO,QAAQ,KAAK;AAE7B,OAAO,MAAMC,eAAmB;IAC5B,MAAMC,gBAAgB,IAAMC,MAAM;IAElC,qBACI,KAACH;QAAQI,WAAWF;kBACfG,CAAAA,wBAAW,KAACN;gBAAOM,SAASA;0BAAS;;;AAGlD,EAAE"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@servicetitan/design-system';
|
|
3
3
|
import { Confirm } from '..';
|
|
4
|
-
export const ConfigurableExample = ()
|
|
5
|
-
const handleConfirm = ()
|
|
6
|
-
return
|
|
4
|
+
export const ConfigurableExample = ()=>{
|
|
5
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
6
|
+
return /*#__PURE__*/ _jsx(Confirm, {
|
|
7
|
+
negative: false,
|
|
8
|
+
title: "You have unsaved changes",
|
|
9
|
+
message: "Leave anyways?",
|
|
10
|
+
onConfirm: handleConfirm,
|
|
11
|
+
children: (onClick)=>/*#__PURE__*/ _jsx(Button, {
|
|
12
|
+
onClick: onClick,
|
|
13
|
+
children: "Do Something"
|
|
14
|
+
})
|
|
15
|
+
});
|
|
7
16
|
};
|
|
17
|
+
|
|
8
18
|
//# sourceMappingURL=configurable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/configurable.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Button } from '@servicetitan/design-system';\n\nimport { Confirm } from '..';\n\nexport const ConfigurableExample: FC = () => {\n const handleConfirm = () => alert('Confirmed');\n\n return (\n <Confirm\n negative={false}\n title=\"You have unsaved changes\"\n message=\"Leave anyways?\"\n onConfirm={handleConfirm}\n >\n {onClick => <Button onClick={onClick}>Do Something</Button>}\n </Confirm>\n );\n};\n"],"names":["Button","Confirm","ConfigurableExample","handleConfirm","alert","negative","title","message","onConfirm","onClick"],"mappings":";AAEA,SAASA,MAAM,QAAQ,8BAA8B;AAErD,SAASC,OAAO,QAAQ,KAAK;AAE7B,OAAO,MAAMC,sBAA0B;IACnC,MAAMC,gBAAgB,IAAMC,MAAM;IAElC,qBACI,KAACH;QACGI,UAAU;QACVC,OAAM;QACNC,SAAQ;QACRC,WAAWL;kBAEVM,CAAAA,wBAAW,KAACT;gBAAOS,SAASA;0BAAS;;;AAGlD,EAAE"}
|
package/dist/demo/custom.js
CHANGED
|
@@ -1,10 +1,60 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Modal, ButtonGroup, Button, Text } from '@servicetitan/design-system';
|
|
3
3
|
import { Confirm } from '..';
|
|
4
|
-
export const CustomExample = ()
|
|
5
|
-
const handleConfirm = ()
|
|
6
|
-
const handleDecline = ()
|
|
7
|
-
return
|
|
4
|
+
export const CustomExample = ()=>{
|
|
5
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
6
|
+
const handleDecline = ()=>alert('Declined');
|
|
7
|
+
return /*#__PURE__*/ _jsx(Confirm, {
|
|
8
|
+
title: "Builder will be closed",
|
|
9
|
+
message: "Do you want to save your changes?",
|
|
10
|
+
details: "(Your progress will be removed permanently)",
|
|
11
|
+
onConfirm: handleConfirm,
|
|
12
|
+
onDecline: handleDecline,
|
|
13
|
+
confirmation: CustomConfirmation,
|
|
14
|
+
children: (onClick)=>/*#__PURE__*/ _jsx(Button, {
|
|
15
|
+
onClick: onClick,
|
|
16
|
+
children: "Do Something"
|
|
17
|
+
})
|
|
18
|
+
});
|
|
8
19
|
};
|
|
9
|
-
const CustomConfirmation = ({ title, message, details, onConfirm, onDecline, onCancel
|
|
20
|
+
const CustomConfirmation = ({ title, message, details, onConfirm, onDecline, onCancel })=>/*#__PURE__*/ _jsxs(Modal, {
|
|
21
|
+
open: true,
|
|
22
|
+
closable: true,
|
|
23
|
+
onClose: onCancel,
|
|
24
|
+
size: Modal.Sizes.S,
|
|
25
|
+
title: title,
|
|
26
|
+
footer: /*#__PURE__*/ _jsxs(ButtonGroup, {
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
29
|
+
outline: true,
|
|
30
|
+
onClick: onCancel,
|
|
31
|
+
children: "Continue working"
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
34
|
+
outline: true,
|
|
35
|
+
negative: true,
|
|
36
|
+
onClick: onDecline,
|
|
37
|
+
children: "No, thanks"
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
40
|
+
outline: true,
|
|
41
|
+
primary: true,
|
|
42
|
+
onClick: onConfirm,
|
|
43
|
+
children: "Sure, let's do it"
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}),
|
|
47
|
+
children: [
|
|
48
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
49
|
+
size: 3,
|
|
50
|
+
children: message
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
53
|
+
size: 2,
|
|
54
|
+
subdued: true,
|
|
55
|
+
children: details
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
});
|
|
59
|
+
|
|
10
60
|
//# sourceMappingURL=custom.js.map
|
package/dist/demo/custom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/custom.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Modal, ButtonGroup, Button, Text } from '@servicetitan/design-system';\n\nimport { Confirm, ConfirmationProps } from '..';\n\nexport const CustomExample: FC = () => {\n const handleConfirm = () => alert('Confirmed');\n const handleDecline = () => alert('Declined');\n\n return (\n <Confirm\n title=\"Builder will be closed\"\n message=\"Do you want to save your changes?\"\n details=\"(Your progress will be removed permanently)\"\n onConfirm={handleConfirm}\n onDecline={handleDecline}\n confirmation={CustomConfirmation}\n >\n {onClick => <Button onClick={onClick}>Do Something</Button>}\n </Confirm>\n );\n};\n\ninterface CustomConfirmationProps extends ConfirmationProps {\n details?: string;\n}\n\nconst CustomConfirmation: FC<CustomConfirmationProps> = ({\n title,\n message,\n details,\n onConfirm,\n onDecline,\n onCancel,\n}) => (\n <Modal\n open\n closable\n onClose={onCancel}\n size={Modal.Sizes.S}\n title={title}\n footer={\n <ButtonGroup>\n <Button outline onClick={onCancel}>\n Continue working\n </Button>\n\n <Button outline negative onClick={onDecline}>\n No, thanks\n </Button>\n\n <Button outline primary onClick={onConfirm}>\n Sure, let's do it\n </Button>\n </ButtonGroup>\n }\n >\n <Text size={3}>{message}</Text>\n <Text size={2} subdued>\n {details}\n </Text>\n </Modal>\n);\n"],"names":["Modal","ButtonGroup","Button","Text","Confirm","CustomExample","handleConfirm","alert","handleDecline","title","message","details","onConfirm","onDecline","confirmation","CustomConfirmation","onClick","onCancel","open","closable","onClose","size","Sizes","S","footer","outline","negative","primary","subdued"],"mappings":";AAEA,SAASA,KAAK,EAAEC,WAAW,EAAEC,MAAM,EAAEC,IAAI,QAAQ,8BAA8B;AAE/E,SAASC,OAAO,QAA2B,KAAK;AAEhD,OAAO,MAAMC,gBAAoB;IAC7B,MAAMC,gBAAgB,IAAMC,MAAM;IAClC,MAAMC,gBAAgB,IAAMD,MAAM;IAElC,qBACI,KAACH;QACGK,OAAM;QACNC,SAAQ;QACRC,SAAQ;QACRC,WAAWN;QACXO,WAAWL;QACXM,cAAcC;kBAEbC,CAAAA,wBAAW,KAACd;gBAAOc,SAASA;0BAAS;;;AAGlD,EAAE;AAMF,MAAMD,qBAAkD,CAAC,EACrDN,KAAK,EACLC,OAAO,EACPC,OAAO,EACPC,SAAS,EACTC,SAAS,EACTI,QAAQ,EACX,iBACG,MAACjB;QACGkB,IAAI;QACJC,QAAQ;QACRC,SAASH;QACTI,MAAMrB,MAAMsB,KAAK,CAACC,CAAC;QACnBd,OAAOA;QACPe,sBACI,MAACvB;;8BACG,KAACC;oBAAOuB,OAAO;oBAACT,SAASC;8BAAU;;8BAInC,KAACf;oBAAOuB,OAAO;oBAACC,QAAQ;oBAACV,SAASH;8BAAW;;8BAI7C,KAACX;oBAAOuB,OAAO;oBAACE,OAAO;oBAACX,SAASJ;8BAAW;;;;;0BAMpD,KAACT;gBAAKkB,MAAM;0BAAIX;;0BAChB,KAACP;gBAAKkB,MAAM;gBAAGO,OAAO;0BACjBjB"}
|
package/dist/demo/hook.js
CHANGED
|
@@ -2,9 +2,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
import { Button } from '@servicetitan/design-system';
|
|
4
4
|
import { useConfirm } from '..';
|
|
5
|
-
export const HookExample = ()
|
|
6
|
-
const handleConfirm = ()
|
|
5
|
+
export const HookExample = ()=>{
|
|
6
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
7
7
|
const [HookConfirm, hookHandler] = useConfirm(handleConfirm);
|
|
8
|
-
return
|
|
8
|
+
return /*#__PURE__*/ _jsxs(Fragment, {
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
11
|
+
onClick: hookHandler,
|
|
12
|
+
children: "Do Something"
|
|
13
|
+
}),
|
|
14
|
+
/*#__PURE__*/ _jsx(HookConfirm, {})
|
|
15
|
+
]
|
|
16
|
+
});
|
|
9
17
|
};
|
|
18
|
+
|
|
10
19
|
//# sourceMappingURL=hook.js.map
|
package/dist/demo/hook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/hook.tsx"],"sourcesContent":["import { Fragment, FC } from 'react';\n\nimport { Button } from '@servicetitan/design-system';\n\nimport { useConfirm } from '..';\n\nexport const HookExample: FC = () => {\n const handleConfirm = () => alert('Confirmed');\n\n const [HookConfirm, hookHandler] = useConfirm(handleConfirm);\n\n return (\n <Fragment>\n <Button onClick={hookHandler}>Do Something</Button>\n <HookConfirm />\n </Fragment>\n );\n};\n"],"names":["Fragment","Button","useConfirm","HookExample","handleConfirm","alert","HookConfirm","hookHandler","onClick"],"mappings":";AAAA,SAASA,QAAQ,QAAY,QAAQ;AAErC,SAASC,MAAM,QAAQ,8BAA8B;AAErD,SAASC,UAAU,QAAQ,KAAK;AAEhC,OAAO,MAAMC,cAAkB;IAC3B,MAAMC,gBAAgB,IAAMC,MAAM;IAElC,MAAM,CAACC,aAAaC,YAAY,GAAGL,WAAWE;IAE9C,qBACI,MAACJ;;0BACG,KAACC;gBAAOO,SAASD;0BAAa;;0BAC9B,KAACD;;;AAGb,EAAE"}
|
package/dist/demo/index.js
CHANGED
package/dist/demo/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/index.ts"],"sourcesContent":["export * from './basic';\nexport * from './configurable';\nexport * from './custom';\nexport * from './hook';\nexport * from './toggleable';\nexport * from './yes-no';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,WAAW"}
|
package/dist/demo/toggleable.js
CHANGED
|
@@ -2,12 +2,31 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Stack, Button, Checkbox } from '@servicetitan/design-system';
|
|
4
4
|
import { Confirm } from '..';
|
|
5
|
-
export const ToggleableExample = ()
|
|
5
|
+
export const ToggleableExample = ()=>{
|
|
6
6
|
const [confirmEnabled, setConfirmEnabled] = useState(true);
|
|
7
|
-
const handleConfirm = ()
|
|
8
|
-
const handleChangeConfirmEnabled = (_0, checked)
|
|
7
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
8
|
+
const handleChangeConfirmEnabled = (_0, checked)=>{
|
|
9
9
|
setConfirmEnabled(checked);
|
|
10
10
|
};
|
|
11
|
-
return
|
|
11
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ _jsx(Confirm, {
|
|
15
|
+
when: confirmEnabled,
|
|
16
|
+
onConfirm: handleConfirm,
|
|
17
|
+
children: (onClick)=>/*#__PURE__*/ _jsx(Button, {
|
|
18
|
+
onClick: onClick,
|
|
19
|
+
children: "Do Something"
|
|
20
|
+
})
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx(Checkbox, {
|
|
23
|
+
label: "Enable confirmation?",
|
|
24
|
+
checked: confirmEnabled,
|
|
25
|
+
onChange: handleChangeConfirmEnabled,
|
|
26
|
+
className: "m-l-4"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
12
30
|
};
|
|
31
|
+
|
|
13
32
|
//# sourceMappingURL=toggleable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/toggleable.tsx"],"sourcesContent":["import { useState, FC } from 'react';\n\nimport { Stack, Button, Checkbox } from '@servicetitan/design-system';\n\nimport { Confirm } from '..';\n\nexport const ToggleableExample: FC = () => {\n const [confirmEnabled, setConfirmEnabled] = useState(true);\n\n const handleConfirm = () => alert('Confirmed');\n\n const handleChangeConfirmEnabled = (_0: never, checked: boolean) => {\n setConfirmEnabled(checked);\n };\n\n return (\n <Stack alignItems=\"center\">\n <Confirm when={confirmEnabled} onConfirm={handleConfirm}>\n {onClick => <Button onClick={onClick}>Do Something</Button>}\n </Confirm>\n\n <Checkbox\n label=\"Enable confirmation?\"\n checked={confirmEnabled}\n onChange={handleChangeConfirmEnabled}\n className=\"m-l-4\"\n />\n </Stack>\n );\n};\n"],"names":["useState","Stack","Button","Checkbox","Confirm","ToggleableExample","confirmEnabled","setConfirmEnabled","handleConfirm","alert","handleChangeConfirmEnabled","_0","checked","alignItems","when","onConfirm","onClick","label","onChange","className"],"mappings":";AAAA,SAASA,QAAQ,QAAY,QAAQ;AAErC,SAASC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,8BAA8B;AAEtE,SAASC,OAAO,QAAQ,KAAK;AAE7B,OAAO,MAAMC,oBAAwB;IACjC,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGP,SAAS;IAErD,MAAMQ,gBAAgB,IAAMC,MAAM;IAElC,MAAMC,6BAA6B,CAACC,IAAWC;QAC3CL,kBAAkBK;IACtB;IAEA,qBACI,MAACX;QAAMY,YAAW;;0BACd,KAACT;gBAAQU,MAAMR;gBAAgBS,WAAWP;0BACrCQ,CAAAA,wBAAW,KAACd;wBAAOc,SAASA;kCAAS;;;0BAG1C,KAACb;gBACGc,OAAM;gBACNL,SAASN;gBACTY,UAAUR;gBACVS,WAAU;;;;AAI1B,EAAE"}
|
package/dist/demo/yes-no.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@servicetitan/design-system';
|
|
3
3
|
import { Confirm, YesNoConfirmation } from '..';
|
|
4
|
-
export const YesNoExample = ()
|
|
5
|
-
const handleConfirm = ()
|
|
6
|
-
const handleDecline = ()
|
|
7
|
-
return
|
|
4
|
+
export const YesNoExample = ()=>{
|
|
5
|
+
const handleConfirm = ()=>alert('Confirmed');
|
|
6
|
+
const handleDecline = ()=>alert('Declined');
|
|
7
|
+
return /*#__PURE__*/ _jsx(Confirm, {
|
|
8
|
+
title: "Save current progress?",
|
|
9
|
+
onConfirm: handleConfirm,
|
|
10
|
+
onDecline: handleDecline,
|
|
11
|
+
confirmation: YesNoConfirmation,
|
|
12
|
+
children: (onClick)=>/*#__PURE__*/ _jsx(Button, {
|
|
13
|
+
onClick: onClick,
|
|
14
|
+
children: "Do Something"
|
|
15
|
+
})
|
|
16
|
+
});
|
|
8
17
|
};
|
|
18
|
+
|
|
9
19
|
//# sourceMappingURL=yes-no.js.map
|
package/dist/demo/yes-no.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../src/demo/yes-no.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { Button } from '@servicetitan/design-system';\n\nimport { Confirm, YesNoConfirmation } from '..';\n\nexport const YesNoExample: FC = () => {\n const handleConfirm = () => alert('Confirmed');\n const handleDecline = () => alert('Declined');\n\n return (\n <Confirm\n title=\"Save current progress?\"\n onConfirm={handleConfirm}\n onDecline={handleDecline}\n confirmation={YesNoConfirmation}\n >\n {onClick => <Button onClick={onClick}>Do Something</Button>}\n </Confirm>\n );\n};\n"],"names":["Button","Confirm","YesNoConfirmation","YesNoExample","handleConfirm","alert","handleDecline","title","onConfirm","onDecline","confirmation","onClick"],"mappings":";AAEA,SAASA,MAAM,QAAQ,8BAA8B;AAErD,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,KAAK;AAEhD,OAAO,MAAMC,eAAmB;IAC5B,MAAMC,gBAAgB,IAAMC,MAAM;IAClC,MAAMC,gBAAgB,IAAMD,MAAM;IAElC,qBACI,KAACJ;QACGM,OAAM;QACNC,WAAWJ;QACXK,WAAWH;QACXI,cAAcR;kBAEbS,CAAAA,wBAAW,KAACX;gBAAOW,SAASA;0BAAS;;;AAGlD,EAAE"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { useConfirm } from './use-confirm';
|
|
1
|
+
export { useConfirm, ConfirmationProps } from './use-confirm';
|
|
2
2
|
export { Confirm } from './confirm';
|
|
3
3
|
export { YesNoConfirmation } from './confirmation-messages/yes-no-confirmation';
|
|
4
|
+
export { DefaultConfirmationProps } from './confirmation-messages/default-confirmation';
|
|
5
|
+
|
|
4
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { useConfirm, ConfirmationProps } from './use-confirm';\nexport { Confirm } from './confirm';\nexport { YesNoConfirmation } from './confirmation-messages/yes-no-confirmation';\nexport { DefaultConfirmationProps } from './confirmation-messages/default-confirmation';\n"],"names":["useConfirm","ConfirmationProps","Confirm","YesNoConfirmation","DefaultConfirmationProps"],"mappings":"AAAA,SAASA,UAAU,EAAEC,iBAAiB,QAAQ,gBAAgB;AAC9D,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,wBAAwB,QAAQ,+CAA+C"}
|
package/dist/use-confirm.js
CHANGED
|
@@ -1,42 +1,53 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useCallback, useMemo } from 'react';
|
|
3
|
-
import { DefaultConfirmation
|
|
3
|
+
import { DefaultConfirmation } from './confirmation-messages/default-confirmation';
|
|
4
4
|
export function useConfirm(onConfirm, onDecline) {
|
|
5
5
|
const [defer, setDefer] = useState(undefined);
|
|
6
|
-
const handler = useCallback(async (...args)
|
|
6
|
+
const handler = useCallback(async (...args)=>{
|
|
7
7
|
let isConfirmed;
|
|
8
8
|
try {
|
|
9
|
-
isConfirmed = await new Promise((resolve, reject)
|
|
9
|
+
isConfirmed = await new Promise((resolve, reject)=>{
|
|
10
10
|
setDefer({
|
|
11
|
-
confirm: ()
|
|
12
|
-
decline: ()
|
|
13
|
-
cancel: reject
|
|
11
|
+
confirm: ()=>resolve(true),
|
|
12
|
+
decline: ()=>resolve(false),
|
|
13
|
+
cancel: reject
|
|
14
14
|
});
|
|
15
15
|
});
|
|
16
|
-
}
|
|
17
|
-
catch (_a) {
|
|
16
|
+
} catch (e) {
|
|
18
17
|
return;
|
|
19
|
-
}
|
|
20
|
-
finally {
|
|
18
|
+
} finally{
|
|
21
19
|
setDefer(undefined);
|
|
22
20
|
}
|
|
23
21
|
if (isConfirmed) {
|
|
24
22
|
onConfirm(...args);
|
|
25
|
-
}
|
|
26
|
-
else if (onDecline) {
|
|
23
|
+
} else if (onDecline) {
|
|
27
24
|
onDecline(...args);
|
|
28
25
|
}
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
}, [
|
|
27
|
+
onConfirm,
|
|
28
|
+
onDecline
|
|
29
|
+
]);
|
|
30
|
+
const Confirm = useMemo(()=>({ when = true, confirmation: Confirmation = DefaultConfirmation, ...props })=>{
|
|
31
|
+
if (!defer) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
if (!when) {
|
|
35
|
+
defer.confirm();
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/ _jsx(Confirmation, {
|
|
39
|
+
...props,
|
|
40
|
+
onConfirm: defer.confirm,
|
|
41
|
+
onDecline: defer.decline,
|
|
42
|
+
onCancel: defer.cancel
|
|
43
|
+
});
|
|
44
|
+
}, [
|
|
45
|
+
defer
|
|
46
|
+
]);
|
|
47
|
+
return [
|
|
48
|
+
Confirm,
|
|
49
|
+
handler
|
|
50
|
+
];
|
|
41
51
|
}
|
|
52
|
+
|
|
42
53
|
//# sourceMappingURL=use-confirm.js.map
|
package/dist/use-confirm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../src/use-confirm.tsx"],"sourcesContent":["import { useState, useCallback, useMemo, ComponentType } from 'react';\n\nimport {\n DefaultConfirmation,\n DefaultConfirmationProps,\n} from './confirmation-messages/default-confirmation';\n\ninterface Defer {\n confirm(): void;\n decline(): void;\n cancel(): void;\n}\n\nexport interface ConfirmationProps {\n title?: string;\n message?: string;\n onConfirm(): void;\n onDecline(): void;\n onCancel(): void;\n}\n\nexport type ConfirmProps<P extends ConfirmationProps> = {\n when?: boolean;\n confirmation?: ComponentType<P>;\n} & Omit<P, 'onConfirm' | 'onDecline' | 'onCancel' | 'children'>;\n\nexport function useConfirm<T extends (...args: any[]) => any>(onConfirm: T, onDecline?: T) {\n const [defer, setDefer] = useState<Defer | undefined>(undefined);\n\n const handler = useCallback(\n async (...args: any[]) => {\n let isConfirmed: boolean;\n\n try {\n isConfirmed = await new Promise((resolve, reject) => {\n setDefer({\n confirm: () => resolve(true),\n decline: () => resolve(false),\n cancel: reject,\n });\n });\n } catch {\n return;\n } finally {\n setDefer(undefined);\n }\n\n if (isConfirmed) {\n onConfirm(...args);\n } else if (onDecline) {\n onDecline(...args);\n }\n },\n [onConfirm, onDecline]\n );\n\n const Confirm = useMemo(\n () =>\n <P extends ConfirmationProps = DefaultConfirmationProps>({\n when = true,\n confirmation: Confirmation = DefaultConfirmation as ComponentType<P>,\n ...props\n }: ConfirmProps<P>) => {\n if (!defer) {\n return null;\n }\n\n if (!when) {\n defer.confirm();\n return null;\n }\n\n return (\n <Confirmation\n {...(props as P)}\n onConfirm={defer.confirm}\n onDecline={defer.decline}\n onCancel={defer.cancel}\n />\n );\n },\n [defer]\n );\n\n return [Confirm, handler] as [typeof Confirm, T];\n}\n"],"names":["useState","useCallback","useMemo","DefaultConfirmation","useConfirm","onConfirm","onDecline","defer","setDefer","undefined","handler","args","isConfirmed","Promise","resolve","reject","confirm","decline","cancel","Confirm","when","confirmation","Confirmation","props","onCancel"],"mappings":";AAAA,SAASA,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAuB,QAAQ;AAEtE,SACIC,mBAAmB,QAEhB,+CAA+C;AAqBtD,OAAO,SAASC,WAA8CC,SAAY,EAAEC,SAAa;IACrF,MAAM,CAACC,OAAOC,SAAS,GAAGR,SAA4BS;IAEtD,MAAMC,UAAUT,YACZ,OAAO,GAAGU;QACN,IAAIC;QAEJ,IAAI;YACAA,cAAc,MAAM,IAAIC,QAAQ,CAACC,SAASC;gBACtCP,SAAS;oBACLQ,SAAS,IAAMF,QAAQ;oBACvBG,SAAS,IAAMH,QAAQ;oBACvBI,QAAQH;gBACZ;YACJ;QACJ,EAAE,UAAM;YACJ;QACJ,SAAU;YACNP,SAASC;QACb;QAEA,IAAIG,aAAa;YACbP,aAAaM;QACjB,OAAO,IAAIL,WAAW;YAClBA,aAAaK;QACjB;IACJ,GACA;QAACN;QAAWC;KAAU;IAG1B,MAAMa,UAAUjB,QACZ,IACI,CAAyD,EACrDkB,OAAO,IAAI,EACXC,cAAcC,eAAenB,mBAAuC,EACpE,GAAGoB,OACW;YACd,IAAI,CAAChB,OAAO;gBACR,OAAO;YACX;YAEA,IAAI,CAACa,MAAM;gBACPb,MAAMS,OAAO;gBACb,OAAO;YACX;YAEA,qBACI,KAACM;gBACI,GAAIC,KAAK;gBACVlB,WAAWE,MAAMS,OAAO;gBACxBV,WAAWC,MAAMU,OAAO;gBACxBO,UAAUjB,MAAMW,MAAM;;QAGlC,GACJ;QAACX;KAAM;IAGX,OAAO;QAACY;QAAST;KAAQ;AAC7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/confirm",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/confirm",
|
|
6
6
|
"repository": {
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@servicetitan/design-system": "~14.5.1",
|
|
20
20
|
"@types/react": "~18.2.55",
|
|
21
|
-
"react": "
|
|
21
|
+
"react": "^18.2.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@servicetitan/design-system": ">=13.2.1",
|
|
25
25
|
"react": ">=17.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"classnames": "
|
|
28
|
+
"classnames": "^2.3.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"cli": {
|
|
34
34
|
"webpack": false
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "7fc7b9cbf766fe23879ae81831f28bdd96559bce"
|
|
37
37
|
}
|
package/dist/confirm.stories.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import { Text } from '@servicetitan/design-system';
|
|
4
|
-
import { BasicExample, HookExample, ConfigurableExample, ToggleableExample, YesNoExample, CustomExample, } from './demo';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Confirm/Demos',
|
|
7
|
-
};
|
|
8
|
-
export const Basic = wrap('Default confirmation', BasicExample);
|
|
9
|
-
export const Hook = wrap('Hook usage', HookExample);
|
|
10
|
-
export const Configurable = wrap('Configurable default dialog', ConfigurableExample);
|
|
11
|
-
export const Toggleable = wrap('Toggleable confirmation', ToggleableExample);
|
|
12
|
-
export const YesNo = wrap('(Yes / No / Cancel) confrimation', YesNoExample);
|
|
13
|
-
export const Custom = wrap('Custom confirmation component', CustomExample);
|
|
14
|
-
function wrap(name, Component) {
|
|
15
|
-
return () => (_jsxs(Fragment, { children: [_jsx(Text, { size: 4, className: "m-b-half", children: name }), _jsx(Component, {})] }));
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=confirm.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirm.stories.js","sourceRoot":"","sources":["../src/confirm.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAM,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,OAAO,EACH,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GAChB,MAAM,QAAQ,CAAC;AAEhB,eAAe;IACX,KAAK,EAAE,eAAe;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,sBAAsB,EAAE,YAAY,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,kCAAkC,EAAE,YAAY,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,+BAA+B,EAAE,aAAa,CAAC,CAAC;AAE3E,SAAS,IAAI,CAAC,IAAY,EAAE,SAAa;IACrC,OAAO,GAAG,EAAE,CAAC,CACT,MAAC,QAAQ,eACL,KAAC,IAAI,IAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAC,UAAU,YAC9B,IAAI,GACF,EAEP,KAAC,SAAS,KAAG,IACN,CACd,CAAC;AACN,CAAC"}
|