@atlassian/clientside-extensions-components 4.0.0 → 5.0.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 (47) hide show
  1. package/dist/cjs/ExtensionPointInfo.js +6 -5
  2. package/dist/cjs/ExtensionPointInfo.js.map +1 -1
  3. package/dist/cjs/handlers/ButtonHandler.js.map +1 -1
  4. package/dist/cjs/handlers/LinkHandler.js.map +1 -1
  5. package/dist/cjs/handlers/ModalHandler.js.map +1 -1
  6. package/dist/cjs/handlers/SectionHandler.js +0 -1
  7. package/dist/cjs/handlers/SectionHandler.js.map +1 -1
  8. package/dist/cjs/renderElementAsReact.js.map +1 -1
  9. package/dist/cjs/styled.js +2 -2
  10. package/dist/cjs/styled.js.map +1 -1
  11. package/dist/esm/ExtensionPointInfo.js +6 -5
  12. package/dist/esm/ExtensionPointInfo.js.map +1 -1
  13. package/dist/esm/handlers/ButtonHandler.js.map +1 -1
  14. package/dist/esm/handlers/LinkHandler.js.map +1 -1
  15. package/dist/esm/handlers/ModalHandler.js.map +1 -1
  16. package/dist/esm/handlers/SectionHandler.js +0 -1
  17. package/dist/esm/handlers/SectionHandler.js.map +1 -1
  18. package/dist/esm/renderElementAsReact.js.map +1 -1
  19. package/dist/esm/styled.js +1 -1
  20. package/dist/esm/styled.js.map +1 -1
  21. package/dist/types/ExtensionPointInfo.d.ts.map +1 -1
  22. package/dist/types/handlers/ButtonHandler.d.ts +2 -0
  23. package/dist/types/handlers/ButtonHandler.d.ts.map +1 -1
  24. package/dist/types/handlers/LinkHandler.d.ts +2 -0
  25. package/dist/types/handlers/LinkHandler.d.ts.map +1 -1
  26. package/dist/types/handlers/ModalHandler.d.ts +2 -1
  27. package/dist/types/handlers/ModalHandler.d.ts.map +1 -1
  28. package/dist/types/handlers/SectionHandler.d.ts +6 -1
  29. package/dist/types/handlers/SectionHandler.d.ts.map +1 -1
  30. package/dist/types/renderElementAsReact.d.ts +2 -1
  31. package/dist/types/renderElementAsReact.d.ts.map +1 -1
  32. package/dist/types/styled.d.ts +28 -13
  33. package/dist/types/styled.d.ts.map +1 -1
  34. package/lib/ExtensionPointInfo.tsx +15 -6
  35. package/lib/__snapshots__/ExtensionPointInfo.test.tsx.snap +11 -12
  36. package/lib/handlers/ButtonHandler.test.tsx +5 -1
  37. package/lib/handlers/ButtonHandler.tsx +3 -1
  38. package/lib/handlers/LinkHandler.test.tsx +5 -1
  39. package/lib/handlers/LinkHandler.tsx +1 -0
  40. package/lib/handlers/ModalHandler.test.tsx +9 -7
  41. package/lib/handlers/ModalHandler.tsx +4 -2
  42. package/lib/handlers/SectionHandler.test.tsx +1 -1
  43. package/lib/handlers/SectionHandler.tsx +5 -1
  44. package/lib/renderElementAsReact.test.tsx +7 -6
  45. package/lib/renderElementAsReact.tsx +5 -1
  46. package/lib/styled.ts +1 -1
  47. package/package.json +21 -21
@@ -13,7 +13,8 @@ const LinkToElement = ({ to }) => {
13
13
  // We are removing the e.g. "!" required syntax that is a suffix of the schema type
14
14
  const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');
15
15
  return (
16
- // eslint-disable-next-line jsx-a11y/anchor-is-valid
16
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment
17
+ // @ts-ignore: react-scroll types are not up to date with the latest react version
17
18
  react_1.default.createElement(react_scroll_1.Link, { to: cleanTo, href: "", containerId: "___cse_info_container", offset: -20, smooth: true }, to));
18
19
  };
19
20
  const TypeRenderer = ({ objectType }) => (react_1.default.createElement(react_1.default.Fragment, null,
@@ -35,13 +36,13 @@ const TypeRenderer = ({ objectType }) => (react_1.default.createElement(react_1.
35
36
  react_1.default.createElement(styled_1.TableCell, null, descriptor.description))))))));
36
37
  const EnumTypeRenderer = ({ enumType }) => (react_1.default.createElement(react_1.default.Fragment, null,
37
38
  react_1.default.createElement("h3", null,
38
- react_1.default.createElement(react_scroll_1.Element, { name: enumType.name }, enumType.name)),
39
+ react_1.default.createElement(react_scroll_1.Element, { id: enumType.name }, enumType.name)),
39
40
  enumType.description ? (react_1.default.createElement("p", null, enumType.description)) : (react_1.default.createElement("p", null,
40
41
  "Enum type with the following values: ",
41
42
  react_1.default.createElement("b", null, enumType.values.join(', '))))));
42
43
  const UnionTypeRenderer = ({ unionType }) => (react_1.default.createElement(react_1.default.Fragment, null,
43
44
  react_1.default.createElement("h3", null,
44
- react_1.default.createElement(react_scroll_1.Element, { name: unionType.name }, unionType.name)),
45
+ react_1.default.createElement(react_scroll_1.Element, { id: unionType.name }, unionType.name)),
45
46
  unionType.description ? (react_1.default.createElement("p", null, unionType.description)) : (react_1.default.createElement("p", null,
46
47
  "Union of the following types:",
47
48
  ' ',
@@ -50,7 +51,7 @@ const UnionTypeRenderer = ({ unionType }) => (react_1.default.createElement(reac
50
51
  react_1.default.createElement(LinkToElement, { to: _type }))))))));
51
52
  const ScalarRenderer = ({ scalar }) => (react_1.default.createElement(react_1.default.Fragment, null,
52
53
  react_1.default.createElement("h3", null,
53
- react_1.default.createElement(react_scroll_1.Element, { name: scalar.name }, scalar.name)),
54
+ react_1.default.createElement(react_scroll_1.Element, { id: scalar.name }, scalar.name)),
54
55
  react_1.default.createElement("p", null, scalar.description)));
55
56
  const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }) => {
56
57
  const { objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null }, scalars: attributeScalars, enumTypes: attributesEnumTypes, unionTypes: attributesUnionTypes, } = schema || {};
@@ -72,7 +73,7 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }) => {
72
73
  objectTypeEntries &&
73
74
  objectTypeEntries.map((objectType) => (react_1.default.createElement(react_1.default.Fragment, { key: objectType.name },
74
75
  react_1.default.createElement("h3", null,
75
- react_1.default.createElement(react_scroll_1.Element, { name: objectType.name }, objectType.name)),
76
+ react_1.default.createElement(react_scroll_1.Element, { id: objectType.name }, objectType.name)),
76
77
  react_1.default.createElement(TypeRenderer, { objectType: objectType })))),
77
78
  enumTypes && enumTypes.map((enumType) => react_1.default.createElement(EnumTypeRenderer, { key: enumType.name, enumType: enumType })),
78
79
  unionTypes && unionTypes.map((unionType) => react_1.default.createElement(UnionTypeRenderer, { key: unionType.name, unionType: unionType })),
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionPointInfo.js","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":";;;AACA,4DAA8C;AAC9C,oGAAsD;AACtD,oFAAsG;AACtG,+CAA6C;AAW7C,yDAAqD;AACrD,qFAAgD;AAChD,qCAAoG;AAOpG,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,EAAkB,EAAE,EAAE;IAC7C,8DAA8D;IAC9D,mFAAmF;IACnF,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAEhD,OAAO;IACH,oDAAoD;IACpD,8BAAC,mBAAI,IAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,WAAW,EAAC,uBAAuB,EAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,UAC7E,EAAE,CACA,CACV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,YAAY,GAA4D,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAC9F;IACI,yCAAI,UAAU,CAAC,WAAW,CAAK;IAC/B,8BAAC,cAAK;QACF;YACI,8BAAC,gBAAO;gBACJ,8BAAC,iBAAQ,eAAgB;gBACzB,8BAAC,iBAAQ,eAAgB;gBACzB,8BAAC,iBAAQ,mBAAoB;gBAC7B,8BAAC,iBAAQ,sBAAuB,CAC1B,CACN;QACR,6CACK,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CACxC,8BAAC,iBAAQ,IAAC,GAAG,EAAE,UAAU,CAAC,IAAI;YAC1B,8BAAC,kBAAS,IAAC,KAAK,EAAC,KAAK;;gBAAG,UAAU,CA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M,IAAC,UAAU,EAAC,SAAS,EAAC,SAAS,QAAC,OAAO,EAAE,WAAW,YAElD,CACC,CACV,CACX,CACa,CACH,CACtB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,IAAA,YAAI,EAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { memo, useState } from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';\nimport { Link, Element } from 'react-scroll';\n\nimport type {\n SerializedDocument,\n SerializedEnumType,\n SerializedObjectType,\n SerializedScalar,\n SerializedUnionType,\n // We only import types here\n // eslint-disable-next-line node/no-unpublished-import\n} from '@atlassian/clientside-extensions-schema';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport useDiscovery from './debug/useDiscovery';\nimport { Table, TableCell, TableRow, HeadRow, HeadCell, Blinker, BlinkerContainer } from './styled';\n\nexport type ExtensionPointInfoProps = {\n name: string;\n schemaDocuments: { schema: SerializedDocument; contextSchema: SerializedDocument };\n};\n\nconst LinkToElement = ({ to }: { to: string }) => {\n // TODO: is there a way to get the clean type from the schema?\n // We are removing the e.g. \"!\" required syntax that is a suffix of the schema type\n const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <Link to={cleanTo} href=\"\" containerId=\"___cse_info_container\" offset={-20} smooth>\n {to}\n </Link>\n );\n};\n\nconst TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({ objectType }) => (\n <>\n <p>{objectType.description}</p>\n <Table>\n <thead>\n <HeadRow>\n <HeadCell>Name</HeadCell>\n <HeadCell>Type</HeadCell>\n <HeadCell>Required</HeadCell>\n <HeadCell>Description</HeadCell>\n </HeadRow>\n </thead>\n <tbody>\n {objectType.descriptors.map((descriptor) => (\n <TableRow key={descriptor.name}>\n <TableCell width=\"15%\"> {descriptor.name}</TableCell>\n <TableCell width=\"15%\">\n <LinkToElement to={descriptor.type} />\n </TableCell>\n <TableCell width=\"10%\">{descriptor.required ? 'true' : 'false'}</TableCell>\n <TableCell>{descriptor.description}</TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </>\n);\n\nconst EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (\n <>\n <h3>\n <Element name={enumType.name}>{enumType.name}</Element>\n </h3>\n {enumType.description ? (\n <p>{enumType.description}</p>\n ) : (\n <p>\n Enum type with the following values: <b>{enumType.values.join(', ')}</b>\n </p>\n )}\n </>\n);\n\nconst UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (\n <>\n <h3>\n <Element name={unionType.name}>{unionType.name}</Element>\n </h3>\n {unionType.description ? (\n <p>{unionType.description}</p>\n ) : (\n <p>\n Union of the following types:{' '}\n {unionType.types.map((_type, i) => (\n <React.Fragment key={`${_type}-link`}>\n {i === 0 ? '' : ', '}\n <LinkToElement to={_type} />\n </React.Fragment>\n ))}\n </p>\n )}\n </>\n);\n\nconst ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (\n <>\n <h3>\n <Element name={scalar.name}>{scalar.name}</Element>\n </h3>\n <p>{scalar.description}</p>\n </>\n);\n\nconst SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<ExtensionPointInfoProps, 'name'>) => {\n const {\n objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null },\n scalars: attributeScalars,\n enumTypes: attributesEnumTypes,\n unionTypes: attributesUnionTypes,\n } = schema || {};\n\n const {\n objectTypes: { ContextSchema: contextDocument, ...contextObjectTypes } = { ContextSchema: null },\n scalars: contextScalars,\n enumTypes: contextEnumTypes,\n unionTypes: contextUnionTypes,\n } = contextSchema || {};\n\n const objectTypeEntries: SerializedObjectType[] = Object.values({ ...attributeObjectTypes, ...contextObjectTypes });\n const scalars: SerializedScalar[] = Object.values({ ...attributeScalars, ...contextScalars });\n const enumTypes: SerializedEnumType[] = Object.values({ ...attributesEnumTypes, ...contextEnumTypes });\n const unionTypes: SerializedUnionType[] = Object.values({ ...attributesUnionTypes, ...contextUnionTypes });\n\n return (\n <>\n <h2>Attributes</h2>\n {attributesDocument ? (\n <>\n <p>List of attributes supported by this extension point.</p>\n <TypeRenderer objectType={attributesDocument} />\n </>\n ) : (\n <p>No attributes information provided for this extension point.</p>\n )}\n\n <h2>Context</h2>\n {contextDocument ? (\n <>\n <p>List of values provided by this extension point as context.</p>\n <TypeRenderer objectType={contextDocument} />\n </>\n ) : (\n <p>No context information provided for this extension point.</p>\n )}\n\n <h2>Types reference</h2>\n {objectTypeEntries &&\n objectTypeEntries.map((objectType) => (\n <React.Fragment key={objectType.name}>\n <h3>\n <Element name={objectType.name}>{objectType.name}</Element>\n </h3>\n <TypeRenderer objectType={objectType} />\n </React.Fragment>\n ))}\n\n {enumTypes && enumTypes.map((enumType) => <EnumTypeRenderer key={enumType.name} enumType={enumType} />)}\n\n {unionTypes && unionTypes.map((unionType) => <UnionTypeRenderer key={unionType.name} unionType={unionType} />)}\n\n {scalars && scalars.map((scalar) => <ScalarRenderer key={scalar.name} scalar={scalar} />)}\n </>\n );\n};\n\nconst bodyStyles: React.CSSProperties = {\n // Styles required for the react-scroll to work when scrolling is animated\n overflowY: 'auto',\n overflowX: 'hidden',\n // The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js\n padding: gridSize() * 3,\n flex: '1 1 auto',\n};\n\nconst CustomModalBody: React.FC = ({ children }) => {\n return (\n <div id=\"___cse_info_container\" style={bodyStyles}>\n {children}\n </div>\n );\n};\n\nconst ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDocuments }) => {\n const [showExtensionPointInfo] = useDiscovery();\n const [dialogOpen, setDialogState] = useState(false);\n\n const closeDialog = () => setDialogState(false);\n return !showExtensionPointInfo ? null : (\n <BlinkerContainer>\n <Blinker type=\"button\" onClick={() => setDialogState(true)} />\n <ModalTransition>\n {dialogOpen && (\n <Modal onClose={closeDialog} width=\"x-large\">\n <ModalHeader>\n <ModalTitle>{`Extension point: ${name}`}</ModalTitle>\n </ModalHeader>\n\n <CustomModalBody>\n <SchemasRenderer schemaDocuments={schemaDocuments} />\n </CustomModalBody>\n\n <ModalFooter>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <Button appearance=\"primary\" autoFocus onClick={closeDialog}>\n Close\n </Button>\n </ModalFooter>\n </Modal>\n )}\n </ModalTransition>\n </BlinkerContainer>\n );\n};\n\nexport default memo(ExtensionPointInfo);\n"]}
1
+ {"version":3,"file":"ExtensionPointInfo.js","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":";;;AACA,4DAA8C;AAC9C,oGAAsD;AACtD,oFAAsG;AACtG,+CAA6C;AAW7C,yDAAqD;AACrD,qFAAgD;AAChD,qCAAoG;AAOpG,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,EAAkB,EAAE,EAAE;IAC7C,8DAA8D;IAC9D,mFAAmF;IACnF,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAEhD,OAAO;IACH,uFAAuF;IACvF,kFAAkF;IAClF,8BAAC,mBAAI,IAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,WAAW,EAAC,uBAAuB,EAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,UAC7E,EAAE,CACA,CACV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,YAAY,GAA4D,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAC9F;IACI,yCAAI,UAAU,CAAC,WAAW,CAAK;IAC/B,8BAAC,cAAK;QACF;YACI,8BAAC,gBAAO;gBACJ,8BAAC,iBAAQ,eAAgB;gBACzB,8BAAC,iBAAQ,eAAgB;gBACzB,8BAAC,iBAAQ,mBAAoB;gBAC7B,8BAAC,iBAAQ,sBAAuB,CAC1B,CACN;QACR,6CACK,UAA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BAAC,0BAAW;gBACR,8BAAC,yBAAU,QAAE,oBAAoB,IAAI,EAAE,CAAc,CAC3C;YAEd,8BAAC,eAAe;gBACZ,8BAAC,eAAe,IAAC,eAAe,EAAE,eAAe,GAAI,CACvC;YAElB,8BAAC,0BAAW;gBAER,8BAAC,yBAAM,IAAC,UAAU,EAAC,SAAS,EAAC,SAAS,QAAC,OAAO,EAAE,WAAW,YAElD,CACC,CACV,CACX,CACa,CACH,CACtB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,IAAA,YAAI,EAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { memo, useState } from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';\nimport { Link, Element } from 'react-scroll';\n\nimport type {\n SerializedDocument,\n SerializedEnumType,\n SerializedObjectType,\n SerializedScalar,\n SerializedUnionType,\n // We only import types here\n // eslint-disable-next-line node/no-unpublished-import\n} from '@atlassian/clientside-extensions-schema';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport useDiscovery from './debug/useDiscovery';\nimport { Table, TableCell, TableRow, HeadRow, HeadCell, Blinker, BlinkerContainer } from './styled';\n\nexport type ExtensionPointInfoProps = {\n name: string;\n schemaDocuments: { schema: SerializedDocument; contextSchema: SerializedDocument };\n};\n\nconst LinkToElement = ({ to }: { to: string }) => {\n // TODO: is there a way to get the clean type from the schema?\n // We are removing the e.g. \"!\" required syntax that is a suffix of the schema type\n const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment\n // @ts-ignore: react-scroll types are not up to date with the latest react version\n <Link to={cleanTo} href=\"\" containerId=\"___cse_info_container\" offset={-20} smooth>\n {to}\n </Link>\n );\n};\n\nconst TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({ objectType }) => (\n <>\n <p>{objectType.description}</p>\n <Table>\n <thead>\n <HeadRow>\n <HeadCell>Name</HeadCell>\n <HeadCell>Type</HeadCell>\n <HeadCell>Required</HeadCell>\n <HeadCell>Description</HeadCell>\n </HeadRow>\n </thead>\n <tbody>\n {objectType.descriptors.map((descriptor) => (\n <TableRow key={descriptor.name}>\n <TableCell width=\"15%\"> {descriptor.name}</TableCell>\n <TableCell width=\"15%\">\n <LinkToElement to={descriptor.type} />\n </TableCell>\n <TableCell width=\"10%\">{descriptor.required ? 'true' : 'false'}</TableCell>\n <TableCell>{descriptor.description}</TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </>\n);\n\nconst EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={enumType.name}>{enumType.name}</Element>\n </h3>\n {enumType.description ? (\n <p>{enumType.description}</p>\n ) : (\n <p>\n Enum type with the following values: <b>{enumType.values.join(', ')}</b>\n </p>\n )}\n </>\n);\n\nconst UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={unionType.name}>{unionType.name}</Element>\n </h3>\n {unionType.description ? (\n <p>{unionType.description}</p>\n ) : (\n <p>\n Union of the following types:{' '}\n {unionType.types.map((_type, i) => (\n <React.Fragment key={`${_type}-link`}>\n {i === 0 ? '' : ', '}\n <LinkToElement to={_type} />\n </React.Fragment>\n ))}\n </p>\n )}\n </>\n);\n\nconst ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={scalar.name}>{scalar.name}</Element>\n </h3>\n <p>{scalar.description}</p>\n </>\n);\n\nconst SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<ExtensionPointInfoProps, 'name'>) => {\n const {\n objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null },\n scalars: attributeScalars,\n enumTypes: attributesEnumTypes,\n unionTypes: attributesUnionTypes,\n } = schema || {};\n\n const {\n objectTypes: { ContextSchema: contextDocument, ...contextObjectTypes } = { ContextSchema: null },\n scalars: contextScalars,\n enumTypes: contextEnumTypes,\n unionTypes: contextUnionTypes,\n } = contextSchema || {};\n\n const objectTypeEntries: SerializedObjectType[] = Object.values({ ...attributeObjectTypes, ...contextObjectTypes });\n const scalars: SerializedScalar[] = Object.values({ ...attributeScalars, ...contextScalars });\n const enumTypes: SerializedEnumType[] = Object.values({ ...attributesEnumTypes, ...contextEnumTypes });\n const unionTypes: SerializedUnionType[] = Object.values({ ...attributesUnionTypes, ...contextUnionTypes });\n\n return (\n <>\n <h2>Attributes</h2>\n {attributesDocument ? (\n <>\n <p>List of attributes supported by this extension point.</p>\n <TypeRenderer objectType={attributesDocument} />\n </>\n ) : (\n <p>No attributes information provided for this extension point.</p>\n )}\n\n <h2>Context</h2>\n {contextDocument ? (\n <>\n <p>List of values provided by this extension point as context.</p>\n <TypeRenderer objectType={contextDocument} />\n </>\n ) : (\n <p>No context information provided for this extension point.</p>\n )}\n\n <h2>Types reference</h2>\n {objectTypeEntries &&\n objectTypeEntries.map((objectType) => (\n <React.Fragment key={objectType.name}>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={objectType.name}>{objectType.name}</Element>\n </h3>\n <TypeRenderer objectType={objectType} />\n </React.Fragment>\n ))}\n\n {enumTypes && enumTypes.map((enumType) => <EnumTypeRenderer key={enumType.name} enumType={enumType} />)}\n\n {unionTypes && unionTypes.map((unionType) => <UnionTypeRenderer key={unionType.name} unionType={unionType} />)}\n\n {scalars && scalars.map((scalar) => <ScalarRenderer key={scalar.name} scalar={scalar} />)}\n </>\n );\n};\n\nconst bodyStyles: React.CSSProperties = {\n // Styles required for the react-scroll to work when scrolling is animated\n overflowY: 'auto',\n overflowX: 'hidden',\n // The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js\n padding: gridSize() * 3,\n flex: '1 1 auto',\n};\n\nconst CustomModalBody: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n return (\n <div id=\"___cse_info_container\" style={bodyStyles}>\n {children}\n </div>\n );\n};\n\nconst ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDocuments }) => {\n const [showExtensionPointInfo] = useDiscovery();\n const [dialogOpen, setDialogState] = useState(false);\n\n const closeDialog = () => setDialogState(false);\n return !showExtensionPointInfo ? null : (\n <BlinkerContainer>\n <Blinker type=\"button\" onClick={() => setDialogState(true)} />\n <ModalTransition>\n {dialogOpen && (\n <Modal onClose={closeDialog} width=\"x-large\">\n <ModalHeader>\n <ModalTitle>{`Extension point: ${name}`}</ModalTitle>\n </ModalHeader>\n\n <CustomModalBody>\n <SchemasRenderer schemaDocuments={schemaDocuments} />\n </CustomModalBody>\n\n <ModalFooter>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <Button appearance=\"primary\" autoFocus onClick={closeDialog}>\n Close\n </Button>\n </ModalFooter>\n </Modal>\n )}\n </ModalTransition>\n </BlinkerContainer>\n );\n};\n\nexport default memo(ExtensionPointInfo);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,oGAAsD;AAM/C,MAAM,aAAa,GAA0C,CAAC,EACjE,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,8BAAC,yBAAM,IACH,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AA3BW,QAAA,aAAa,iBA2BxB","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface ButtonHandlerProps extends OnClickHandler {}\n\nexport const ButtonHandler: FunctionComponent<ButtonHandlerProps> = ({\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n type=\"button\"\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,oGAAsD;AAQ/C,MAAM,aAAa,GAA0C,CAAC,EACjE,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,8BAAC,yBAAM,IACH,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AA3BW,QAAA,aAAa,iBA2BxB","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface ButtonHandlerProps extends OnClickHandler {\n children?: React.ReactNode;\n}\n\nexport const ButtonHandler: FunctionComponent<ButtonHandlerProps> = ({\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n type=\"button\"\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,oGAAsD;AAQ/C,MAAM,WAAW,GAAwC,CAAC,EAC7D,UAAU,GAAG,MAAM,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,8BAAC,yBAAM,IACH,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AA5BW,QAAA,WAAW,eA4BtB","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface LinkHandlerProps extends Partial<OnClickHandler> {\n href: string;\n}\n\nexport const LinkHandler: FunctionComponent<LinkHandlerProps> = ({\n appearance = 'link',\n children,\n disabled,\n hidden,\n href,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n appearance={appearance}\n href={href}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
1
+ {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAC1B,oGAAsD;AAS/C,MAAM,WAAW,GAAwC,CAAC,EAC7D,UAAU,GAAG,MAAM,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,8BAAC,yBAAM,IACH,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC;AA5BW,QAAA,WAAW,eA4BtB","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface LinkHandlerProps extends Partial<OnClickHandler> {\n href: string;\n children?: React.ReactNode;\n}\n\nexport const LinkHandler: FunctionComponent<LinkHandlerProps> = ({\n appearance = 'link',\n children,\n disabled,\n hidden,\n href,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n appearance={appearance}\n href={href}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":";;;;AACA,4DAA2F;AAC3F,oFAAuH;AACvH,kGAA4D;AAC5D,4EAAkE;AAElE,mDAAgD;AAEhD,MAAM,cAAc,GAAwD,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzF,MAAM,GAAG,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAEzC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QAEzB,IAAI,IAAI,EAAE;YACN,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC;SACtC;QAED,OAAO,GAAG,EAAE;YACR,IAAI,IAAI,EAAE;gBACN,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,CAAC,CAAC;aACvC;QACL,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,uCAAK,GAAG,EAAE,GAAG,GAAI,CAAC;AAC7B,CAAC,CAAC;AAUK,MAAM,YAAY,GAAyC,CAAC,EAC/D,MAAM,EACN,MAAM,EACN,OAAO,EACP,mBAAmB,GAAG,KAAK,EAC3B,kBAAkB,GAAG,KAAK,GAC7B,EAAE,EAAE;IACD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAA+B,EAAE,CAAC,CAAC;IACzE,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC1B,MAAM,GAAG,GAAG,IAAI,sCAAc,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACxD,MAAM,CAAC,GAAG,CAAC,CAAC;QACZ,OAAO,GAAG,CAAC;IACf,CAAC,EAAE,CAAC,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AnDW,QAAA,sBAAsB,0BAmDjC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport ModalDialog, { ModalTransition, ModalBody, ModalHeader, ModalFooter, ModalTitle } from '@atlaskit/modal-dialog';\nimport LoadingButton from '@atlaskit/button/loading-button';\nimport { ModalExtension } from '@atlassian/clientside-extensions';\nimport type { OnClickHandler } from './types';\nimport { ButtonHandler } from './ButtonHandler';\n\nconst ModalInnerBody: FunctionComponent<{ modalApi: ModalExtension.Api }> = ({ modalApi }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = ref.current;\n\n if (node) {\n modalApi.getRenderCallback()(node);\n }\n\n return () => {\n if (node) {\n modalApi.getCleanupCallback()(node);\n }\n };\n }, [modalApi]);\n\n return <div ref={ref} />;\n};\n\nexport interface ModalHandlerProps {\n render: ModalExtension.ModalRenderExtension;\n isOpen: boolean;\n onClose: () => void;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalHandler: FunctionComponent<ModalHandlerProps> = ({\n render,\n isOpen,\n onClose,\n __withoutTransition = false,\n __disableFocusLock = false,\n}) => {\n const [actions, setActions] = useState<ModalExtension.ModalAction[]>([]);\n const modalApi = useMemo(() => {\n const api = new ModalExtension.Api(onClose, setActions);\n render(api);\n return api;\n }, [render, onClose]);\n\n const Wrapper = __withoutTransition ? Fragment : ModalTransition;\n\n // Here will be dragons. That's a fishy solution for programmatically disabling the focus lock of the Atlaskit Modal component.\n // When the stackIndex > 0 this will disable the focus lock of the Modal. That's quite naive implementation since we are abusing\n // the Atlaskit stacking mechanism.\n const stackIndex = __disableFocusLock ? 1 : 0;\n\n const onCloseHandler = useCallback(\n (e) => {\n const closeResult = modalApi.getOnCloseCallback()(e);\n // prevent closing of modal if \"closeRequest\" is \"false\"\n if (closeResult !== false) {\n onClose();\n }\n },\n [modalApi, onClose],\n );\n\n const actionsAsButtons: JSX.Element[] = useMemo<JSX.Element[]>(\n () =>\n actions.map(({ testId, isLoading, text, onClick, isDisabled }, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <LoadingButton key={index} isLoading={isLoading} testId={testId} isDisabled={isDisabled} onClick={onClick}>\n {text}\n </LoadingButton>\n )),\n [actions],\n );\n\n return (\n <Wrapper>\n {isOpen && (\n <ModalDialog testId=\"client-extensions-modal\" width={modalApi.getWidth()} onClose={onCloseHandler} stackIndex={stackIndex}>\n <ModalHeader>\n <ModalTitle appearance={modalApi.getAppearance()}>{modalApi.getTitle()}</ModalTitle>\n </ModalHeader>\n <ModalBody>\n <ModalInnerBody modalApi={modalApi} />\n </ModalBody>\n <ModalFooter>{actionsAsButtons}</ModalFooter>\n </ModalDialog>\n )}\n </Wrapper>\n );\n};\n\nexport interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {\n render: ModalExtension.ModalRenderExtension;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalWithActionHandler: FunctionComponent<ModalWithActionHandlerProps> = ({\n // Action Handler Properties\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n spacing,\n\n // Modal Handler Properties\n render,\n __withoutTransition,\n __disableFocusLock,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const openModal = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const closeModal = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n if (hidden) {\n return null;\n }\n\n return (\n <>\n <ButtonHandler\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n disabled={disabled}\n hidden={hidden}\n onAction={openModal}\n spacing={spacing}\n >\n {children}\n </ButtonHandler>\n <ModalHandler\n isOpen={isOpen}\n onClose={closeModal}\n render={render}\n __disableFocusLock={__disableFocusLock}\n __withoutTransition={__withoutTransition}\n />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names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e,CACnC,CACjB,CACK,CACb,CAAC;AACN,CAAC,CAAC;AA1DW,QAAA,YAAY,gBA0DvB;AASK,MAAM,sBAAsB,GAAmD,CAAC;AACnF,4BAA4B;AAC5B,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,OAAO;AAEP,2BAA2B;AAC3B,MAAM,EACN,mBAAmB,EACnB,kBAAkB,GACrB,EAAE,EAAE;IACD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC/B,SAAS,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAChC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH;QACI,8BAAC,6BAAa,IACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACG;QAChB,8BAAC,oBAAY,IACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,GAC1C,CACH,CACN,CAAC;AACN,CAAC,CAAC;AAnDW,QAAA,sBAAsB,0BAmDjC","sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\nimport React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport ModalDialog, { ModalTransition, ModalBody, ModalHeader, ModalFooter, ModalTitle } from '@atlaskit/modal-dialog';\nimport type { KeyboardOrMouseEvent } from '@atlaskit/modal-dialog';\nimport LoadingButton from '@atlaskit/button/loading-button';\nimport { ModalExtension } from '@atlassian/clientside-extensions';\nimport type { OnClickHandler } from './types';\nimport { ButtonHandler } from './ButtonHandler';\n\nconst ModalInnerBody: FunctionComponent<{ modalApi: ModalExtension.Api }> = ({ modalApi }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = ref.current;\n\n if (node) {\n modalApi.getRenderCallback()(node);\n }\n\n return () => {\n if (node) {\n modalApi.getCleanupCallback()(node);\n }\n };\n }, [modalApi]);\n\n return <div ref={ref} />;\n};\n\nexport interface ModalHandlerProps {\n render: ModalExtension.ModalRenderExtension;\n isOpen: boolean;\n onClose: () => void;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalHandler: FunctionComponent<ModalHandlerProps> = ({\n render,\n isOpen,\n onClose,\n __withoutTransition = false,\n __disableFocusLock = false,\n}) => {\n const [actions, setActions] = useState<ModalExtension.ModalAction[]>([]);\n const modalApi = useMemo(() => {\n const api = new ModalExtension.Api(onClose, setActions);\n render(api);\n return api;\n }, [render, onClose]);\n\n const Wrapper = __withoutTransition ? Fragment : ModalTransition;\n\n // Here will be dragons. That's a fishy solution for programmatically disabling the focus lock of the Atlaskit Modal component.\n // When the stackIndex > 0 this will disable the focus lock of the Modal. That's quite naive implementation since we are abusing\n // the Atlaskit stacking mechanism.\n const stackIndex = __disableFocusLock ? 1 : 0;\n\n const onCloseHandler = useCallback(\n (e: KeyboardOrMouseEvent) => {\n const closeResult = modalApi.getOnCloseCallback()(e);\n // prevent closing of modal if \"closeRequest\" is \"false\"\n if (closeResult !== false) {\n onClose();\n }\n },\n [modalApi, onClose],\n );\n\n const actionsAsButtons: JSX.Element[] = useMemo<JSX.Element[]>(\n () =>\n actions.map(({ testId, isLoading, text, onClick, isDisabled }, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <LoadingButton key={index} isLoading={isLoading} testId={testId} isDisabled={isDisabled} onClick={onClick}>\n {text}\n </LoadingButton>\n )),\n [actions],\n );\n\n return (\n <Wrapper>\n {isOpen && (\n <ModalDialog testId=\"client-extensions-modal\" width={modalApi.getWidth()} onClose={onCloseHandler} stackIndex={stackIndex}>\n <ModalHeader>\n <ModalTitle appearance={modalApi.getAppearance()}>{modalApi.getTitle()}</ModalTitle>\n </ModalHeader>\n <ModalBody>\n <ModalInnerBody modalApi={modalApi} />\n </ModalBody>\n <ModalFooter>{actionsAsButtons}</ModalFooter>\n </ModalDialog>\n )}\n </Wrapper>\n );\n};\n\nexport interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {\n children?: ReactNode;\n render: ModalExtension.ModalRenderExtension;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalWithActionHandler: FunctionComponent<ModalWithActionHandlerProps> = ({\n // Action Handler Properties\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n spacing,\n\n // Modal Handler Properties\n render,\n __withoutTransition,\n __disableFocusLock,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const openModal = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const closeModal = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n if (hidden) {\n return null;\n }\n\n return (\n <>\n <ButtonHandler\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n disabled={disabled}\n hidden={hidden}\n onAction={openModal}\n spacing={spacing}\n >\n {children}\n </ButtonHandler>\n <ModalHandler\n isOpen={isOpen}\n onClose={closeModal}\n render={render}\n __disableFocusLock={__disableFocusLock}\n __withoutTransition={__withoutTransition}\n />\n </>\n );\n};\n"]}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SectionHandler = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = (0, tslib_1.__importDefault)(require("react"));
6
- // eslint-disable-next-line import/prefer-default-export
7
6
  const SectionHandler = ({ children }) => {
8
7
  return react_1.default.createElement(react_1.default.Fragment, null, children);
9
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAG1B,wDAAwD;AACjD,MAAM,cAAc,GAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,8DAAG,QAAQ,CAAI,CAAC;AAC3B,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB","sourcesContent":["import React from 'react';\nimport type { FunctionComponent } from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const SectionHandler: FunctionComponent = ({ children }) => {\n return <>{children}</>;\n};\n"]}
1
+ {"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":";;;;AAAA,+DAA0B;AAQnB,MAAM,cAAc,GAA2C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnF,OAAO,8DAAG,QAAQ,CAAI,CAAC;AAC3B,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB","sourcesContent":["import React from 'react';\nimport type { FunctionComponent } from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\ninterface SectionHandlerProps {\n children: React.ReactNode;\n}\n\nexport const SectionHandler: FunctionComponent<SectionHandlerProps> = ({ children }) => {\n return <>{children}</>;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":";;;AAAA,uEAAiC;AAEjC,+DAA0B;AAG1B,SAAS,oBAAoB,CAAS,SAA6B,EAAE,aAAoC,EAAE,eAAwB;IAC/H,SAAS;SACJ,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACjB,wDAAwD;QACxD,mBAAQ,CAAC,MAAM,CAAC,8BAAC,aAAa,OAAM,eAA0B,GAAI,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC,CAAC;SACD,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACnB,mBAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACX,CAAC;AAED,kBAAe,oBAAoB,CAAC","sourcesContent":["import ReactDOM from 'react-dom';\nimport type { ComponentType } from 'react';\nimport React from 'react';\nimport type { MountableExtension } from '@atlassian/clientside-extensions';\n\nfunction renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: PropsT) {\n renderApi\n .onMount((element) => {\n // eslint-disable-next-line react/jsx-props-no-spreading\n ReactDOM.render(<RenderElement {...(additionalProps as PropsT)} />, element);\n })\n .onUnmount((element) => {\n ReactDOM.unmountComponentAtNode(element);\n });\n}\n\nexport default renderElementAsReact;\n"]}
1
+ {"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":";;;AAAA,uEAAiC;AAEjC,+DAA0B;AAG1B,SAAS,oBAAoB,CACzB,SAA6B,EAC7B,aAAoC,EACpC,eAAyB;IAEzB,SAAS;SACJ,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACjB,wDAAwD;QACxD,mBAAQ,CAAC,MAAM,CAAC,8BAAC,aAAa,OAAM,eAA0B,GAAI,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC,CAAC;SACD,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACnB,mBAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACX,CAAC;AAED,kBAAe,oBAAoB,CAAC","sourcesContent":["import ReactDOM from 'react-dom';\nimport type { ComponentType } from 'react';\nimport React from 'react';\nimport type { MountableExtension } from '@atlassian/clientside-extensions';\n\nfunction renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(\n renderApi: MountableExtension,\n RenderElement: ComponentType<PropsT>,\n additionalProps?: unknown,\n) {\n renderApi\n .onMount((element) => {\n // eslint-disable-next-line react/jsx-props-no-spreading\n ReactDOM.render(<RenderElement {...(additionalProps as PropsT)} />, element);\n })\n .onUnmount((element) => {\n ReactDOM.unmountComponentAtNode(element);\n });\n}\n\nexport default renderElementAsReact;\n"]}
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TableCell = exports.TableRow = exports.HeadCell = exports.HeadRow = exports.Table = exports.Blinker = exports.BlinkerContainer = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const styled_1 = (0, tslib_1.__importDefault)(require("@emotion/styled"));
6
- const core_1 = require("@emotion/core");
6
+ const react_1 = require("@emotion/react");
7
7
  const colors = (0, tslib_1.__importStar)(require("@atlaskit/theme/colors"));
8
8
  const components_1 = require("@atlaskit/theme/components");
9
9
  const constants_1 = require("@atlaskit/theme/constants");
10
10
  exports.BlinkerContainer = styled_1.default.span `
11
11
  position: relative;
12
12
  `;
13
- const blinkAnimation = (0, core_1.keyframes) `
13
+ const blinkAnimation = (0, react_1.keyframes) `
14
14
  from {
15
15
  transform: scale(1);
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";;;;AAAA,0EAAqC;AACrC,wCAA0C;AAC1C,4EAAiD;AACjD,2DAAoD;AACpD,yDAAqD;AAExC,QAAA,gBAAgB,GAAG,gBAAM,CAAC,IAAI,CAAA;;CAE1C,CAAC;AAEF,MAAM,cAAc,GAAG,IAAA,gBAAS,EAAA;;;;;;;;CAQ/B,CAAC;AAEW,QAAA,OAAO,GAAG,gBAAM,CAAC,MAAM,CAAA;;;;;iBAKnB,cAAc;;;;;;;;;;;;;;;;;CAiB9B,CAAC;AAEF,qDAAqD;AACrD,wDAAwD;AACxD,qIAAqI;AACrI,MAAM,QAAQ,GAAG;IACb,YAAY,EAAE,IAAA,mBAA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G,CAAC,MAAM,oBAAQ;;;;;;;;aAQ9B,SAAS,CAAC,SAAS;;;;;;;;6BAQH,SAAS,CAAC,YAAY;;CAElD,CAAC;AAEF,MAAM,YAAY,GAAG,KAAK,CAAC;AAEd,QAAA,QAAQ,GAAG,gBAAM,CAAC,EAAE,CAAA;+BACF,QAAQ,CAAC,WAAW;;4BAEvB,QAAQ,CAAC,eAAe;;;mBAGjC,YAAY,UAAU,QAAQ,CAAC,YAAY;2BACnC,YAAY;;CAEtC,CAAC;AAEW,QAAA,SAAS,GAAG,gBAAM,CAAC,EAAE,CAAA;;eAEnB,IAAA,oBAAQ,GAAE,GAAG,GAAG,MAAM,oBAAQ;;;;;;;;;CAS5C,CAAC","sourcesContent":["import styled from '@emotion/styled';\nimport { keyframes } from '@emotion/core';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\n\nexport const BlinkerContainer = styled.span`\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n from {\n transform: scale(1);\n }\n\n to {\n transform: scale(1.3);\n }\n`;\n\nexport const Blinker = styled.button`\n height: 22px;\n width: 22px;\n background: rgba(7, 71, 166, 0.5);\n border-radius: 50%;\n animation: ${blinkAnimation} 1s ease-in-out infinite;\n animation-direction: alternate;\n cursor: pointer;\n border: none;\n\n &:after {\n display: block;\n background: rgb(7, 71, 166, 0.8);\n position: absolute;\n height: 12px;\n width: 12px;\n content: '';\n left: 50%;\n top: 50%;\n margin: -6px 0 0 -6px;\n border-radius: 50%;\n }\n`;\n\n// AK doesn't provide a plain Table styled component.\n// Using AK theme to be compatible with their dark mode.\n// Styles copied from: https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/design-system/dynamic-table/src/styled/\nconst rowTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n highlightedBackground: themed({ light: colors.N20, dark: colors.DN50 }),\n hoverBackground: themed({ light: colors.N10, dark: colors.DN40 }),\n hoverHighlightedBackground: themed({ light: colors.N30, dark: colors.DN60 }),\n};\n\nconst headTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n textColor: themed({ light: colors.N300, dark: colors.DN300 }),\n};\n\nexport const Table = styled.table`\n border-collapse: collapse;\n width: 100%;\n`;\n\nexport const HeadRow = styled.tr`\n border-bottom: 2px solid ${headTheme.borderColor};\n`;\n\nexport const HeadCell = styled.th`\n padding: ${gridSize() / 2}px ${gridSize}px;\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n border: none;\n color: ${headTheme.textColor};\n box-sizing: border-box;\n font-size: 12px;\n font-weight: bold;\n position: relative;\n text-align: left;\n vertical-align: top;\n &:focus {\n outline: solid 2px ${headTheme.focusOutline};\n }\n`;\n\nconst outlineWidth = '2px';\n\nexport const TableRow = styled.tr`\n border-bottom: 2px solid ${rowTheme.borderColor};\n &:hover {\n background-color: ${rowTheme.hoverBackground};\n }\n &:focus {\n outline: ${outlineWidth} solid ${rowTheme.focusOutline};\n outline-offset: -${outlineWidth};\n }\n`;\n\nexport const TableCell = styled.td`\n border: none;\n padding: ${gridSize() / 1.2}px ${gridSize}px;\n text-align: left;\n\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n`;\n"]}
1
+ {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";;;;AAAA,0EAAqC;AACrC,0CAA2C;AAC3C,4EAAiD;AACjD,2DAAoD;AACpD,yDAAqD;AAExC,QAAA,gBAAgB,GAAG,gBAAM,CAAC,IAAI,CAAA;;CAE1C,CAAC;AAEF,MAAM,cAAc,GAAG,IAAA,iBAAS,EAAA;;;;;;;;CAQ/B,CAAC;AAEW,QAAA,OAAO,GAAG,gBAAM,CAAC,MAAM,CAAA;;;;;iBAKnB,cAAc;;;;;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E,CAAA;+BACD,SAAS,CAAC,WAAW;CACnD,CAAC;AAEW,QAAA,QAAQ,GAAG,gBAAM,CAAC,EAAE,CAAA;eAClB,IAAA,oBAAQ,GAAE,GAAG,CAAC,MAAM,oBAAQ;;;;;;;;aAQ9B,SAAS,CAAC,SAAS;;;;;;;;6BAQH,SAAS,CAAC,YAAY;;CAElD,CAAC;AAEF,MAAM,YAAY,GAAG,KAAK,CAAC;AAEd,QAAA,QAAQ,GAAG,gBAAM,CAAC,EAAE,CAAA;+BACF,QAAQ,CAAC,WAAW;;4BAEvB,QAAQ,CAAC,eAAe;;;mBAGjC,YAAY,UAAU,QAAQ,CAAC,YAAY;2BACnC,YAAY;;CAEtC,CAAC;AAEW,QAAA,SAAS,GAAG,gBAAM,CAAC,EAAE,CAAA;;eAEnB,IAAA,oBAAQ,GAAE,GAAG,GAAG,MAAM,oBAAQ;;;;;;;;;CAS5C,CAAC","sourcesContent":["import styled from '@emotion/styled';\nimport { keyframes } from '@emotion/react';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\n\nexport const BlinkerContainer = styled.span`\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n from {\n transform: scale(1);\n }\n\n to {\n transform: scale(1.3);\n }\n`;\n\nexport const Blinker = styled.button`\n height: 22px;\n width: 22px;\n background: rgba(7, 71, 166, 0.5);\n border-radius: 50%;\n animation: ${blinkAnimation} 1s ease-in-out infinite;\n animation-direction: alternate;\n cursor: pointer;\n border: none;\n\n &:after {\n display: block;\n background: rgb(7, 71, 166, 0.8);\n position: absolute;\n height: 12px;\n width: 12px;\n content: '';\n left: 50%;\n top: 50%;\n margin: -6px 0 0 -6px;\n border-radius: 50%;\n }\n`;\n\n// AK doesn't provide a plain Table styled component.\n// Using AK theme to be compatible with their dark mode.\n// Styles copied from: https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/design-system/dynamic-table/src/styled/\nconst rowTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n highlightedBackground: themed({ light: colors.N20, dark: colors.DN50 }),\n hoverBackground: themed({ light: colors.N10, dark: colors.DN40 }),\n hoverHighlightedBackground: themed({ light: colors.N30, dark: colors.DN60 }),\n};\n\nconst headTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n textColor: themed({ light: colors.N300, dark: colors.DN300 }),\n};\n\nexport const Table = styled.table`\n border-collapse: collapse;\n width: 100%;\n`;\n\nexport const HeadRow = styled.tr`\n border-bottom: 2px solid ${headTheme.borderColor};\n`;\n\nexport const HeadCell = styled.th`\n padding: ${gridSize() / 2}px ${gridSize}px;\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n border: none;\n color: ${headTheme.textColor};\n box-sizing: border-box;\n font-size: 12px;\n font-weight: bold;\n position: relative;\n text-align: left;\n vertical-align: top;\n &:focus {\n outline: solid 2px ${headTheme.focusOutline};\n }\n`;\n\nconst outlineWidth = '2px';\n\nexport const TableRow = styled.tr`\n border-bottom: 2px solid ${rowTheme.borderColor};\n &:hover {\n background-color: ${rowTheme.hoverBackground};\n }\n &:focus {\n outline: ${outlineWidth} solid ${rowTheme.focusOutline};\n outline-offset: -${outlineWidth};\n }\n`;\n\nexport const TableCell = styled.td`\n border: none;\n padding: ${gridSize() / 1.2}px ${gridSize}px;\n text-align: left;\n\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n`;\n"]}
@@ -10,7 +10,8 @@ const LinkToElement = ({ to }) => {
10
10
  // We are removing the e.g. "!" required syntax that is a suffix of the schema type
11
11
  const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');
12
12
  return (
13
- // eslint-disable-next-line jsx-a11y/anchor-is-valid
13
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment
14
+ // @ts-ignore: react-scroll types are not up to date with the latest react version
14
15
  React.createElement(Link, { to: cleanTo, href: "", containerId: "___cse_info_container", offset: -20, smooth: true }, to));
15
16
  };
16
17
  const TypeRenderer = ({ objectType }) => (React.createElement(React.Fragment, null,
@@ -32,13 +33,13 @@ const TypeRenderer = ({ objectType }) => (React.createElement(React.Fragment, nu
32
33
  React.createElement(TableCell, null, descriptor.description))))))));
33
34
  const EnumTypeRenderer = ({ enumType }) => (React.createElement(React.Fragment, null,
34
35
  React.createElement("h3", null,
35
- React.createElement(Element, { name: enumType.name }, enumType.name)),
36
+ React.createElement(Element, { id: enumType.name }, enumType.name)),
36
37
  enumType.description ? (React.createElement("p", null, enumType.description)) : (React.createElement("p", null,
37
38
  "Enum type with the following values: ",
38
39
  React.createElement("b", null, enumType.values.join(', '))))));
39
40
  const UnionTypeRenderer = ({ unionType }) => (React.createElement(React.Fragment, null,
40
41
  React.createElement("h3", null,
41
- React.createElement(Element, { name: unionType.name }, unionType.name)),
42
+ React.createElement(Element, { id: unionType.name }, unionType.name)),
42
43
  unionType.description ? (React.createElement("p", null, unionType.description)) : (React.createElement("p", null,
43
44
  "Union of the following types:",
44
45
  ' ',
@@ -47,7 +48,7 @@ const UnionTypeRenderer = ({ unionType }) => (React.createElement(React.Fragment
47
48
  React.createElement(LinkToElement, { to: _type }))))))));
48
49
  const ScalarRenderer = ({ scalar }) => (React.createElement(React.Fragment, null,
49
50
  React.createElement("h3", null,
50
- React.createElement(Element, { name: scalar.name }, scalar.name)),
51
+ React.createElement(Element, { id: scalar.name }, scalar.name)),
51
52
  React.createElement("p", null, scalar.description)));
52
53
  const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }) => {
53
54
  const { objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null }, scalars: attributeScalars, enumTypes: attributesEnumTypes, unionTypes: attributesUnionTypes, } = schema || {};
@@ -69,7 +70,7 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }) => {
69
70
  objectTypeEntries &&
70
71
  objectTypeEntries.map((objectType) => (React.createElement(React.Fragment, { key: objectType.name },
71
72
  React.createElement("h3", null,
72
- React.createElement(Element, { name: objectType.name }, objectType.name)),
73
+ React.createElement(Element, { id: objectType.name }, objectType.name)),
73
74
  React.createElement(TypeRenderer, { objectType: objectType })))),
74
75
  enumTypes && enumTypes.map((enumType) => React.createElement(EnumTypeRenderer, { key: enumType.name, enumType: enumType })),
75
76
  unionTypes && unionTypes.map((unionType) => React.createElement(UnionTypeRenderer, { key: unionType.name, unionType: unionType })),
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionPointInfo.js","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAW7C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOpG,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,EAAkB,EAAE,EAAE;IAC7C,8DAA8D;IAC9D,mFAAmF;IACnF,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAEhD,OAAO;IACH,oDAAoD;IACpD,oBAAC,IAAI,IAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,WAAW,EAAC,u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,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpC,oBAAC,gBAAgB;QACb,oBAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,GAAI;QAC9D,oBAAC,eAAe,QACX,UAAU,IAAI,CACX,oBAAC,KAAK,IAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,SAAS;YACxC,oBAAC,WAAW;gBACR,oBAAC,UAAU,QAAE,oBAAoB,IAAI,EAAE,CAAc,CAC3C;YAEd,oBAAC,eAAe;gBACZ,oBAAC,eAAe,IAAC,eAAe,EAAE,eAAe,GAAI,CACvC;YAElB,oBAAC,WAAW;gBAER,oBAAC,MAAM,IAAC,UAAU,EAAC,SAAS,EAAC,SAAS,QAAC,OAAO,EAAE,WAAW,YAElD,CACC,CACV,CACX,CACa,CACH,CACtB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { memo, useState } from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';\nimport { Link, Element } from 'react-scroll';\n\nimport type {\n SerializedDocument,\n SerializedEnumType,\n SerializedObjectType,\n SerializedScalar,\n SerializedUnionType,\n // We only import types here\n // eslint-disable-next-line node/no-unpublished-import\n} from '@atlassian/clientside-extensions-schema';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport useDiscovery from './debug/useDiscovery';\nimport { Table, TableCell, TableRow, HeadRow, HeadCell, Blinker, BlinkerContainer } from './styled';\n\nexport type ExtensionPointInfoProps = {\n name: string;\n schemaDocuments: { schema: SerializedDocument; contextSchema: SerializedDocument };\n};\n\nconst LinkToElement = ({ to }: { to: string }) => {\n // TODO: is there a way to get the clean type from the schema?\n // We are removing the e.g. \"!\" required syntax that is a suffix of the schema type\n const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <Link to={cleanTo} href=\"\" containerId=\"___cse_info_container\" offset={-20} smooth>\n {to}\n </Link>\n );\n};\n\nconst TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({ objectType }) => (\n <>\n <p>{objectType.description}</p>\n <Table>\n <thead>\n <HeadRow>\n <HeadCell>Name</HeadCell>\n <HeadCell>Type</HeadCell>\n <HeadCell>Required</HeadCell>\n <HeadCell>Description</HeadCell>\n </HeadRow>\n </thead>\n <tbody>\n {objectType.descriptors.map((descriptor) => (\n <TableRow key={descriptor.name}>\n <TableCell width=\"15%\"> {descriptor.name}</TableCell>\n <TableCell width=\"15%\">\n <LinkToElement to={descriptor.type} />\n </TableCell>\n <TableCell width=\"10%\">{descriptor.required ? 'true' : 'false'}</TableCell>\n <TableCell>{descriptor.description}</TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </>\n);\n\nconst EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (\n <>\n <h3>\n <Element name={enumType.name}>{enumType.name}</Element>\n </h3>\n {enumType.description ? (\n <p>{enumType.description}</p>\n ) : (\n <p>\n Enum type with the following values: <b>{enumType.values.join(', ')}</b>\n </p>\n )}\n </>\n);\n\nconst UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (\n <>\n <h3>\n <Element name={unionType.name}>{unionType.name}</Element>\n </h3>\n {unionType.description ? (\n <p>{unionType.description}</p>\n ) : (\n <p>\n Union of the following types:{' '}\n {unionType.types.map((_type, i) => (\n <React.Fragment key={`${_type}-link`}>\n {i === 0 ? '' : ', '}\n <LinkToElement to={_type} />\n </React.Fragment>\n ))}\n </p>\n )}\n </>\n);\n\nconst ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (\n <>\n <h3>\n <Element name={scalar.name}>{scalar.name}</Element>\n </h3>\n <p>{scalar.description}</p>\n </>\n);\n\nconst SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<ExtensionPointInfoProps, 'name'>) => {\n const {\n objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null },\n scalars: attributeScalars,\n enumTypes: attributesEnumTypes,\n unionTypes: attributesUnionTypes,\n } = schema || {};\n\n const {\n objectTypes: { ContextSchema: contextDocument, ...contextObjectTypes } = { ContextSchema: null },\n scalars: contextScalars,\n enumTypes: contextEnumTypes,\n unionTypes: contextUnionTypes,\n } = contextSchema || {};\n\n const objectTypeEntries: SerializedObjectType[] = Object.values({ ...attributeObjectTypes, ...contextObjectTypes });\n const scalars: SerializedScalar[] = Object.values({ ...attributeScalars, ...contextScalars });\n const enumTypes: SerializedEnumType[] = Object.values({ ...attributesEnumTypes, ...contextEnumTypes });\n const unionTypes: SerializedUnionType[] = Object.values({ ...attributesUnionTypes, ...contextUnionTypes });\n\n return (\n <>\n <h2>Attributes</h2>\n {attributesDocument ? (\n <>\n <p>List of attributes supported by this extension point.</p>\n <TypeRenderer objectType={attributesDocument} />\n </>\n ) : (\n <p>No attributes information provided for this extension point.</p>\n )}\n\n <h2>Context</h2>\n {contextDocument ? (\n <>\n <p>List of values provided by this extension point as context.</p>\n <TypeRenderer objectType={contextDocument} />\n </>\n ) : (\n <p>No context information provided for this extension point.</p>\n )}\n\n <h2>Types reference</h2>\n {objectTypeEntries &&\n objectTypeEntries.map((objectType) => (\n <React.Fragment key={objectType.name}>\n <h3>\n <Element name={objectType.name}>{objectType.name}</Element>\n </h3>\n <TypeRenderer objectType={objectType} />\n </React.Fragment>\n ))}\n\n {enumTypes && enumTypes.map((enumType) => <EnumTypeRenderer key={enumType.name} enumType={enumType} />)}\n\n {unionTypes && unionTypes.map((unionType) => <UnionTypeRenderer key={unionType.name} unionType={unionType} />)}\n\n {scalars && scalars.map((scalar) => <ScalarRenderer key={scalar.name} scalar={scalar} />)}\n </>\n );\n};\n\nconst bodyStyles: React.CSSProperties = {\n // Styles required for the react-scroll to work when scrolling is animated\n overflowY: 'auto',\n overflowX: 'hidden',\n // The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js\n padding: gridSize() * 3,\n flex: '1 1 auto',\n};\n\nconst CustomModalBody: React.FC = ({ children }) => {\n return (\n <div id=\"___cse_info_container\" style={bodyStyles}>\n {children}\n </div>\n );\n};\n\nconst ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDocuments }) => {\n const [showExtensionPointInfo] = useDiscovery();\n const [dialogOpen, setDialogState] = useState(false);\n\n const closeDialog = () => setDialogState(false);\n return !showExtensionPointInfo ? null : (\n <BlinkerContainer>\n <Blinker type=\"button\" onClick={() => setDialogState(true)} />\n <ModalTransition>\n {dialogOpen && (\n <Modal onClose={closeDialog} width=\"x-large\">\n <ModalHeader>\n <ModalTitle>{`Extension point: ${name}`}</ModalTitle>\n </ModalHeader>\n\n <CustomModalBody>\n <SchemasRenderer schemaDocuments={schemaDocuments} />\n </CustomModalBody>\n\n <ModalFooter>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <Button appearance=\"primary\" autoFocus onClick={closeDialog}>\n Close\n </Button>\n </ModalFooter>\n </Modal>\n )}\n </ModalTransition>\n </BlinkerContainer>\n );\n};\n\nexport default memo(ExtensionPointInfo);\n"]}
1
+ {"version":3,"file":"ExtensionPointInfo.js","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,MAAM,MAAM,kCAAkC,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAW7C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unctionComponent } from 'react';\nimport React, { memo, useState } from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport Modal, { ModalTransition, ModalTitle, ModalHeader, ModalFooter } from '@atlaskit/modal-dialog';\nimport { Link, Element } from 'react-scroll';\n\nimport type {\n SerializedDocument,\n SerializedEnumType,\n SerializedObjectType,\n SerializedScalar,\n SerializedUnionType,\n // We only import types here\n // eslint-disable-next-line node/no-unpublished-import\n} from '@atlassian/clientside-extensions-schema';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport useDiscovery from './debug/useDiscovery';\nimport { Table, TableCell, TableRow, HeadRow, HeadCell, Blinker, BlinkerContainer } from './styled';\n\nexport type ExtensionPointInfoProps = {\n name: string;\n schemaDocuments: { schema: SerializedDocument; contextSchema: SerializedDocument };\n};\n\nconst LinkToElement = ({ to }: { to: string }) => {\n // TODO: is there a way to get the clean type from the schema?\n // We are removing the e.g. \"!\" required syntax that is a suffix of the schema type\n const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment\n // @ts-ignore: react-scroll types are not up to date with the latest react version\n <Link to={cleanTo} href=\"\" containerId=\"___cse_info_container\" offset={-20} smooth>\n {to}\n </Link>\n );\n};\n\nconst TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({ objectType }) => (\n <>\n <p>{objectType.description}</p>\n <Table>\n <thead>\n <HeadRow>\n <HeadCell>Name</HeadCell>\n <HeadCell>Type</HeadCell>\n <HeadCell>Required</HeadCell>\n <HeadCell>Description</HeadCell>\n </HeadRow>\n </thead>\n <tbody>\n {objectType.descriptors.map((descriptor) => (\n <TableRow key={descriptor.name}>\n <TableCell width=\"15%\"> {descriptor.name}</TableCell>\n <TableCell width=\"15%\">\n <LinkToElement to={descriptor.type} />\n </TableCell>\n <TableCell width=\"10%\">{descriptor.required ? 'true' : 'false'}</TableCell>\n <TableCell>{descriptor.description}</TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </>\n);\n\nconst EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={enumType.name}>{enumType.name}</Element>\n </h3>\n {enumType.description ? (\n <p>{enumType.description}</p>\n ) : (\n <p>\n Enum type with the following values: <b>{enumType.values.join(', ')}</b>\n </p>\n )}\n </>\n);\n\nconst UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={unionType.name}>{unionType.name}</Element>\n </h3>\n {unionType.description ? (\n <p>{unionType.description}</p>\n ) : (\n <p>\n Union of the following types:{' '}\n {unionType.types.map((_type, i) => (\n <React.Fragment key={`${_type}-link`}>\n {i === 0 ? '' : ', '}\n <LinkToElement to={_type} />\n </React.Fragment>\n ))}\n </p>\n )}\n </>\n);\n\nconst ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (\n <>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={scalar.name}>{scalar.name}</Element>\n </h3>\n <p>{scalar.description}</p>\n </>\n);\n\nconst SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<ExtensionPointInfoProps, 'name'>) => {\n const {\n objectTypes: { Schema: attributesDocument, ...attributeObjectTypes } = { Schema: null },\n scalars: attributeScalars,\n enumTypes: attributesEnumTypes,\n unionTypes: attributesUnionTypes,\n } = schema || {};\n\n const {\n objectTypes: { ContextSchema: contextDocument, ...contextObjectTypes } = { ContextSchema: null },\n scalars: contextScalars,\n enumTypes: contextEnumTypes,\n unionTypes: contextUnionTypes,\n } = contextSchema || {};\n\n const objectTypeEntries: SerializedObjectType[] = Object.values({ ...attributeObjectTypes, ...contextObjectTypes });\n const scalars: SerializedScalar[] = Object.values({ ...attributeScalars, ...contextScalars });\n const enumTypes: SerializedEnumType[] = Object.values({ ...attributesEnumTypes, ...contextEnumTypes });\n const unionTypes: SerializedUnionType[] = Object.values({ ...attributesUnionTypes, ...contextUnionTypes });\n\n return (\n <>\n <h2>Attributes</h2>\n {attributesDocument ? (\n <>\n <p>List of attributes supported by this extension point.</p>\n <TypeRenderer objectType={attributesDocument} />\n </>\n ) : (\n <p>No attributes information provided for this extension point.</p>\n )}\n\n <h2>Context</h2>\n {contextDocument ? (\n <>\n <p>List of values provided by this extension point as context.</p>\n <TypeRenderer objectType={contextDocument} />\n </>\n ) : (\n <p>No context information provided for this extension point.</p>\n )}\n\n <h2>Types reference</h2>\n {objectTypeEntries &&\n objectTypeEntries.map((objectType) => (\n <React.Fragment key={objectType.name}>\n <h3>\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}\n <Element id={objectType.name}>{objectType.name}</Element>\n </h3>\n <TypeRenderer objectType={objectType} />\n </React.Fragment>\n ))}\n\n {enumTypes && enumTypes.map((enumType) => <EnumTypeRenderer key={enumType.name} enumType={enumType} />)}\n\n {unionTypes && unionTypes.map((unionType) => <UnionTypeRenderer key={unionType.name} unionType={unionType} />)}\n\n {scalars && scalars.map((scalar) => <ScalarRenderer key={scalar.name} scalar={scalar} />)}\n </>\n );\n};\n\nconst bodyStyles: React.CSSProperties = {\n // Styles required for the react-scroll to work when scrolling is animated\n overflowY: 'auto',\n overflowX: 'hidden',\n // The rest of the styles are copied from the @atlaskit/modal-dialog/dist/esm/modal-body.js\n padding: gridSize() * 3,\n flex: '1 1 auto',\n};\n\nconst CustomModalBody: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n return (\n <div id=\"___cse_info_container\" style={bodyStyles}>\n {children}\n </div>\n );\n};\n\nconst ExtensionPointInfo: React.FC<ExtensionPointInfoProps> = ({ name, schemaDocuments }) => {\n const [showExtensionPointInfo] = useDiscovery();\n const [dialogOpen, setDialogState] = useState(false);\n\n const closeDialog = () => setDialogState(false);\n return !showExtensionPointInfo ? null : (\n <BlinkerContainer>\n <Blinker type=\"button\" onClick={() => setDialogState(true)} />\n <ModalTransition>\n {dialogOpen && (\n <Modal onClose={closeDialog} width=\"x-large\">\n <ModalHeader>\n <ModalTitle>{`Extension point: ${name}`}</ModalTitle>\n </ModalHeader>\n\n <CustomModalBody>\n <SchemasRenderer schemaDocuments={schemaDocuments} />\n </CustomModalBody>\n\n <ModalFooter>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <Button appearance=\"primary\" autoFocus onClick={closeDialog}>\n Close\n </Button>\n </ModalFooter>\n </Modal>\n )}\n </ModalTransition>\n </BlinkerContainer>\n );\n};\n\nexport default memo(ExtensionPointInfo);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAMtD,MAAM,CAAC,MAAM,aAAa,GAA0C,CAAC,EACjE,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,oBAAC,MAAM,IACH,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface ButtonHandlerProps extends OnClickHandler {}\n\nexport const ButtonHandler: FunctionComponent<ButtonHandlerProps> = ({\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n type=\"button\"\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAQtD,MAAM,CAAC,MAAM,aAAa,GAA0C,CAAC,EACjE,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,oBAAC,MAAM,IACH,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface ButtonHandlerProps extends OnClickHandler {\n children?: React.ReactNode;\n}\n\nexport const ButtonHandler: FunctionComponent<ButtonHandlerProps> = ({\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n type=\"button\"\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAQtD,MAAM,CAAC,MAAM,WAAW,GAAwC,CAAC,EAC7D,UAAU,GAAG,MAAM,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,oBAAC,MAAM,IACH,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface LinkHandlerProps extends Partial<OnClickHandler> {\n href: string;\n}\n\nexport const LinkHandler: FunctionComponent<LinkHandlerProps> = ({\n appearance = 'link',\n children,\n disabled,\n hidden,\n href,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n appearance={appearance}\n href={href}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
1
+ {"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,kCAAkC,CAAC;AAStD,MAAM,CAAC,MAAM,WAAW,GAAwC,CAAC,EAC7D,UAAU,GAAG,MAAM,EACnB,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH,oBAAC,MAAM,IACH,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACJ,CACZ,CAAC;AACN,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Button from '@atlaskit/button/standard-button';\nimport type { FunctionComponent } from 'react';\nimport type { OnClickHandler } from './types';\n\nexport interface LinkHandlerProps extends Partial<OnClickHandler> {\n href: string;\n children?: React.ReactNode;\n}\n\nexport const LinkHandler: FunctionComponent<LinkHandlerProps> = ({\n appearance = 'link',\n children,\n disabled,\n hidden,\n href,\n iconAfter,\n iconBefore,\n onAction,\n spacing,\n}) => {\n if (hidden) {\n return null;\n }\n\n return (\n <Button\n appearance={appearance}\n href={href}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n isDisabled={disabled}\n onClick={onAction}\n spacing={spacing}\n >\n {children}\n </Button>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,C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,CAAc,CAC1E;QACd,oBAAC,SAAS;YACN,oBAAC,cAAc,IAAC,QAAQ,EAAE,QAAQ,GAAI,CAC9B;QACZ,oBAAC,WAAW,QAAE,gBAAgB,CAAe,CACnC,CACjB,CACK,CACb,CAAC;AACN,CAAC,CAAC;AAQF,MAAM,CAAC,MAAM,sBAAsB,GAAmD,CAAC;AACnF,4BAA4B;AAC5B,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,EACT,UAAU,EACV,OAAO;AAEP,2BAA2B;AAC3B,MAAM,EACN,mBAAmB,EACnB,kBAAkB,GACrB,EAAE,EAAE;IACD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,SAAS,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,MAAM,EAAE;QACR,OAAO,IAAI,CAAC;KACf;IAED,OAAO,CACH;QACI,oBAAC,aAAa,IACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,EACnB,OAAO,EAAE,OAAO,IAEf,QAAQ,CACG;QAChB,oBAAC,YAAY,IACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,EACtC,mBAAmB,EAAE,mBAAmB,GAC1C,CACH,CACN,CAAC;AACN,CAAC,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport ModalDialog, { ModalTransition, ModalBody, ModalHeader, ModalFooter, ModalTitle } from '@atlaskit/modal-dialog';\nimport LoadingButton from '@atlaskit/button/loading-button';\nimport { ModalExtension } from '@atlassian/clientside-extensions';\nimport type { OnClickHandler } from './types';\nimport { ButtonHandler } from './ButtonHandler';\n\nconst ModalInnerBody: FunctionComponent<{ modalApi: ModalExtension.Api }> = ({ modalApi }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = ref.current;\n\n if (node) {\n modalApi.getRenderCallback()(node);\n }\n\n return () => {\n if (node) {\n modalApi.getCleanupCallback()(node);\n }\n };\n }, [modalApi]);\n\n return <div ref={ref} />;\n};\n\nexport interface ModalHandlerProps {\n render: ModalExtension.ModalRenderExtension;\n isOpen: boolean;\n onClose: () => void;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalHandler: FunctionComponent<ModalHandlerProps> = ({\n render,\n isOpen,\n onClose,\n __withoutTransition = false,\n __disableFocusLock = false,\n}) => {\n const [actions, setActions] = useState<ModalExtension.ModalAction[]>([]);\n const modalApi = useMemo(() => {\n const api = new ModalExtension.Api(onClose, setActions);\n render(api);\n return api;\n }, [render, onClose]);\n\n const Wrapper = __withoutTransition ? Fragment : ModalTransition;\n\n // Here will be dragons. That's a fishy solution for programmatically disabling the focus lock of the Atlaskit Modal component.\n // When the stackIndex > 0 this will disable the focus lock of the Modal. That's quite naive implementation since we are abusing\n // the Atlaskit stacking mechanism.\n const stackIndex = __disableFocusLock ? 1 : 0;\n\n const onCloseHandler = useCallback(\n (e) => {\n const closeResult = modalApi.getOnCloseCallback()(e);\n // prevent closing of modal if \"closeRequest\" is \"false\"\n if (closeResult !== false) {\n onClose();\n }\n },\n [modalApi, onClose],\n );\n\n const actionsAsButtons: JSX.Element[] = useMemo<JSX.Element[]>(\n () =>\n actions.map(({ testId, isLoading, text, onClick, isDisabled }, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <LoadingButton key={index} isLoading={isLoading} testId={testId} isDisabled={isDisabled} onClick={onClick}>\n {text}\n </LoadingButton>\n )),\n [actions],\n );\n\n return (\n <Wrapper>\n {isOpen && (\n <ModalDialog testId=\"client-extensions-modal\" width={modalApi.getWidth()} onClose={onCloseHandler} stackIndex={stackIndex}>\n <ModalHeader>\n <ModalTitle appearance={modalApi.getAppearance()}>{modalApi.getTitle()}</ModalTitle>\n </ModalHeader>\n <ModalBody>\n <ModalInnerBody modalApi={modalApi} />\n </ModalBody>\n <ModalFooter>{actionsAsButtons}</ModalFooter>\n </ModalDialog>\n )}\n </Wrapper>\n );\n};\n\nexport interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {\n render: ModalExtension.ModalRenderExtension;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalWithActionHandler: FunctionComponent<ModalWithActionHandlerProps> = ({\n // Action Handler Properties\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n spacing,\n\n // Modal Handler Properties\n render,\n __withoutTransition,\n __disableFocusLock,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const openModal = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const closeModal = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n if (hidden) {\n return null;\n }\n\n return (\n <>\n <ButtonHandler\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n disabled={disabled}\n hidden={hidden}\n onAction={openModal}\n spacing={spacing}\n >\n {children}\n </ButtonHandler>\n <ModalHandler\n isOpen={isOpen}\n onClose={closeModal}\n render={render}\n __disableFocusLock={__disableFocusLock}\n __withoutTransition={__withoutTransition}\n />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM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ode } from 'react';\nimport React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport ModalDialog, { ModalTransition, ModalBody, ModalHeader, ModalFooter, ModalTitle } from '@atlaskit/modal-dialog';\nimport type { KeyboardOrMouseEvent } from '@atlaskit/modal-dialog';\nimport LoadingButton from '@atlaskit/button/loading-button';\nimport { ModalExtension } from '@atlassian/clientside-extensions';\nimport type { OnClickHandler } from './types';\nimport { ButtonHandler } from './ButtonHandler';\n\nconst ModalInnerBody: FunctionComponent<{ modalApi: ModalExtension.Api }> = ({ modalApi }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const node = ref.current;\n\n if (node) {\n modalApi.getRenderCallback()(node);\n }\n\n return () => {\n if (node) {\n modalApi.getCleanupCallback()(node);\n }\n };\n }, [modalApi]);\n\n return <div ref={ref} />;\n};\n\nexport interface ModalHandlerProps {\n render: ModalExtension.ModalRenderExtension;\n isOpen: boolean;\n onClose: () => void;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalHandler: FunctionComponent<ModalHandlerProps> = ({\n render,\n isOpen,\n onClose,\n __withoutTransition = false,\n __disableFocusLock = false,\n}) => {\n const [actions, setActions] = useState<ModalExtension.ModalAction[]>([]);\n const modalApi = useMemo(() => {\n const api = new ModalExtension.Api(onClose, setActions);\n render(api);\n return api;\n }, [render, onClose]);\n\n const Wrapper = __withoutTransition ? Fragment : ModalTransition;\n\n // Here will be dragons. That's a fishy solution for programmatically disabling the focus lock of the Atlaskit Modal component.\n // When the stackIndex > 0 this will disable the focus lock of the Modal. That's quite naive implementation since we are abusing\n // the Atlaskit stacking mechanism.\n const stackIndex = __disableFocusLock ? 1 : 0;\n\n const onCloseHandler = useCallback(\n (e: KeyboardOrMouseEvent) => {\n const closeResult = modalApi.getOnCloseCallback()(e);\n // prevent closing of modal if \"closeRequest\" is \"false\"\n if (closeResult !== false) {\n onClose();\n }\n },\n [modalApi, onClose],\n );\n\n const actionsAsButtons: JSX.Element[] = useMemo<JSX.Element[]>(\n () =>\n actions.map(({ testId, isLoading, text, onClick, isDisabled }, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <LoadingButton key={index} isLoading={isLoading} testId={testId} isDisabled={isDisabled} onClick={onClick}>\n {text}\n </LoadingButton>\n )),\n [actions],\n );\n\n return (\n <Wrapper>\n {isOpen && (\n <ModalDialog testId=\"client-extensions-modal\" width={modalApi.getWidth()} onClose={onCloseHandler} stackIndex={stackIndex}>\n <ModalHeader>\n <ModalTitle appearance={modalApi.getAppearance()}>{modalApi.getTitle()}</ModalTitle>\n </ModalHeader>\n <ModalBody>\n <ModalInnerBody modalApi={modalApi} />\n </ModalBody>\n <ModalFooter>{actionsAsButtons}</ModalFooter>\n </ModalDialog>\n )}\n </Wrapper>\n );\n};\n\nexport interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {\n children?: ReactNode;\n render: ModalExtension.ModalRenderExtension;\n __withoutTransition?: boolean;\n __disableFocusLock?: boolean;\n}\n\nexport const ModalWithActionHandler: FunctionComponent<ModalWithActionHandlerProps> = ({\n // Action Handler Properties\n appearance,\n children,\n disabled,\n hidden,\n iconAfter,\n iconBefore,\n spacing,\n\n // Modal Handler Properties\n render,\n __withoutTransition,\n __disableFocusLock,\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const openModal = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const closeModal = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n if (hidden) {\n return null;\n }\n\n return (\n <>\n <ButtonHandler\n appearance={appearance}\n iconAfter={iconAfter}\n iconBefore={iconBefore}\n disabled={disabled}\n hidden={hidden}\n onAction={openModal}\n spacing={spacing}\n >\n {children}\n </ButtonHandler>\n <ModalHandler\n isOpen={isOpen}\n onClose={closeModal}\n render={render}\n __disableFocusLock={__disableFocusLock}\n __withoutTransition={__withoutTransition}\n />\n </>\n );\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- // eslint-disable-next-line import/prefer-default-export
3
2
  export const SectionHandler = ({ children }) => {
4
3
  return React.createElement(React.Fragment, null, children);
5
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9D,OAAO,0CAAG,QAAQ,CAAI,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport type { FunctionComponent } from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const SectionHandler: FunctionComponent = ({ children }) => {\n return <>{children}</>;\n};\n"]}
1
+ {"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,MAAM,cAAc,GAA2C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnF,OAAO,0CAAG,QAAQ,CAAI,CAAC;AAC3B,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport type { FunctionComponent } from 'react';\n\n// eslint-disable-next-line import/prefer-default-export\ninterface SectionHandlerProps {\n children: React.ReactNode;\n}\n\nexport const SectionHandler: FunctionComponent<SectionHandlerProps> = ({ children }) => {\n return <>{children}</>;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,SAAS,oBAAoB,CAAS,SAA6B,EAAE,aAAoC,EAAE,eAAwB;IAC/H,SAAS;SACJ,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACjB,wDAAwD;QACxD,QAAQ,CAAC,MAAM,CAAC,oBAAC,aAAa,OAAM,eAA0B,GAAI,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC,CAAC;SACD,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACnB,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACX,CAAC;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["import ReactDOM from 'react-dom';\nimport type { ComponentType } from 'react';\nimport React from 'react';\nimport type { MountableExtension } from '@atlassian/clientside-extensions';\n\nfunction renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: PropsT) {\n renderApi\n .onMount((element) => {\n // eslint-disable-next-line react/jsx-props-no-spreading\n ReactDOM.render(<RenderElement {...(additionalProps as PropsT)} />, element);\n })\n .onUnmount((element) => {\n ReactDOM.unmountComponentAtNode(element);\n });\n}\n\nexport default renderElementAsReact;\n"]}
1
+ {"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,SAAS,oBAAoB,CACzB,SAA6B,EAC7B,aAAoC,EACpC,eAAyB;IAEzB,SAAS;SACJ,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACjB,wDAAwD;QACxD,QAAQ,CAAC,MAAM,CAAC,oBAAC,aAAa,OAAM,eAA0B,GAAI,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC,CAAC;SACD,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;QACnB,QAAQ,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACX,CAAC;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["import ReactDOM from 'react-dom';\nimport type { ComponentType } from 'react';\nimport React from 'react';\nimport type { MountableExtension } from '@atlassian/clientside-extensions';\n\nfunction renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(\n renderApi: MountableExtension,\n RenderElement: ComponentType<PropsT>,\n additionalProps?: unknown,\n) {\n renderApi\n .onMount((element) => {\n // eslint-disable-next-line react/jsx-props-no-spreading\n ReactDOM.render(<RenderElement {...(additionalProps as PropsT)} />, element);\n })\n .onUnmount((element) => {\n ReactDOM.unmountComponentAtNode(element);\n });\n}\n\nexport default renderElementAsReact;\n"]}
@@ -1,5 +1,5 @@
1
1
  import styled from '@emotion/styled';
2
- import { keyframes } from '@emotion/core';
2
+ import { keyframes } from '@emotion/react';
3
3
  import * as colors from '@atlaskit/theme/colors';
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE1C,CAAC;AAEF,MAAM,cAAc,GAAG,SAAS,CAAA;;;;;;;;CAQ/B,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;iBAKnB,cAAc;;;;;;;;;;;;;;;;;CAiB9B,CAAC;AAEF,qDAAqD;AACrD,wDAAwD;AACxD,qIAAqI;AACrI,MAAM,QAAQ,GAAG;IACb,YAAY,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC/D,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G,KAAK,CAAC;AAE3B,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;+BACF,QAAQ,CAAC,WAAW;;4BAEvB,QAAQ,CAAC,eAAe;;;mBAGjC,YAAY,UAAU,QAAQ,CAAC,YAAY;2BACnC,YAAY;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAA;;eAEnB,QAAQ,EAAE,GAAG,GAAG,MAAM,QAAQ;;;;;;;;;CAS5C,CAAC","sourcesContent":["import styled from '@emotion/styled';\nimport { keyframes } from '@emotion/core';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\n\nexport const BlinkerContainer = styled.span`\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n from {\n transform: scale(1);\n }\n\n to {\n transform: scale(1.3);\n }\n`;\n\nexport const Blinker = styled.button`\n height: 22px;\n width: 22px;\n background: rgba(7, 71, 166, 0.5);\n border-radius: 50%;\n animation: ${blinkAnimation} 1s ease-in-out infinite;\n animation-direction: alternate;\n cursor: pointer;\n border: none;\n\n &:after {\n display: block;\n background: rgb(7, 71, 166, 0.8);\n position: absolute;\n height: 12px;\n width: 12px;\n content: '';\n left: 50%;\n top: 50%;\n margin: -6px 0 0 -6px;\n border-radius: 50%;\n }\n`;\n\n// AK doesn't provide a plain Table styled component.\n// Using AK theme to be compatible with their dark mode.\n// Styles copied from: https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/design-system/dynamic-table/src/styled/\nconst rowTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n highlightedBackground: themed({ light: colors.N20, dark: colors.DN50 }),\n hoverBackground: themed({ light: colors.N10, dark: colors.DN40 }),\n hoverHighlightedBackground: themed({ light: colors.N30, dark: colors.DN60 }),\n};\n\nconst headTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n textColor: themed({ light: colors.N300, dark: colors.DN300 }),\n};\n\nexport const Table = styled.table`\n border-collapse: collapse;\n width: 100%;\n`;\n\nexport const HeadRow = styled.tr`\n border-bottom: 2px solid ${headTheme.borderColor};\n`;\n\nexport const HeadCell = styled.th`\n padding: ${gridSize() / 2}px ${gridSize}px;\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n border: none;\n color: ${headTheme.textColor};\n box-sizing: border-box;\n font-size: 12px;\n font-weight: bold;\n position: relative;\n text-align: left;\n vertical-align: top;\n &:focus {\n outline: solid 2px ${headTheme.focusOutline};\n }\n`;\n\nconst outlineWidth = '2px';\n\nexport const TableRow = styled.tr`\n border-bottom: 2px solid ${rowTheme.borderColor};\n &:hover {\n background-color: ${rowTheme.hoverBackground};\n }\n &:focus {\n outline: ${outlineWidth} solid ${rowTheme.focusOutline};\n outline-offset: -${outlineWidth};\n }\n`;\n\nexport const TableCell = styled.td`\n border: none;\n padding: ${gridSize() / 1.2}px ${gridSize}px;\n text-align: left;\n\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n`;\n"]}
1
+ {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE1C,CAAC;AAEF,MAAM,cAAc,GAAG,SAAS,CAAA;;;;;;;;CAQ/B,CAAC;AAEF,MAAM,CAAC,MAA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AAO,GAAG,MAAM,CAAC,EAAE,CAAA;+BACD,SAAS,CAAC,WAAW;CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;eAClB,QAAQ,EAAE,GAAG,CAAC,MAAM,QAAQ;;;;;;;;aAQ9B,SAAS,CAAC,SAAS;;;;;;;;6BAQH,SAAS,CAAC,YAAY;;CAElD,CAAC;AAEF,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;+BACF,QAAQ,CAAC,WAAW;;4BAEvB,QAAQ,CAAC,eAAe;;;mBAGjC,YAAY,UAAU,QAAQ,CAAC,YAAY;2BACnC,YAAY;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,EAAE,CAAA;;eAEnB,QAAQ,EAAE,GAAG,GAAG,MAAM,QAAQ;;;;;;;;;CAS5C,CAAC","sourcesContent":["import styled from '@emotion/styled';\nimport { keyframes } from '@emotion/react';\nimport * as colors from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\n\nexport const BlinkerContainer = styled.span`\n position: relative;\n`;\n\nconst blinkAnimation = keyframes`\n from {\n transform: scale(1);\n }\n\n to {\n transform: scale(1.3);\n }\n`;\n\nexport const Blinker = styled.button`\n height: 22px;\n width: 22px;\n background: rgba(7, 71, 166, 0.5);\n border-radius: 50%;\n animation: ${blinkAnimation} 1s ease-in-out infinite;\n animation-direction: alternate;\n cursor: pointer;\n border: none;\n\n &:after {\n display: block;\n background: rgb(7, 71, 166, 0.8);\n position: absolute;\n height: 12px;\n width: 12px;\n content: '';\n left: 50%;\n top: 50%;\n margin: -6px 0 0 -6px;\n border-radius: 50%;\n }\n`;\n\n// AK doesn't provide a plain Table styled component.\n// Using AK theme to be compatible with their dark mode.\n// Styles copied from: https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/design-system/dynamic-table/src/styled/\nconst rowTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n highlightedBackground: themed({ light: colors.N20, dark: colors.DN50 }),\n hoverBackground: themed({ light: colors.N10, dark: colors.DN40 }),\n hoverHighlightedBackground: themed({ light: colors.N30, dark: colors.DN60 }),\n};\n\nconst headTheme = {\n focusOutline: themed({ light: colors.B100, dark: colors.B100 }),\n borderColor: themed({ light: colors.N40, dark: colors.DN50 }),\n textColor: themed({ light: colors.N300, dark: colors.DN300 }),\n};\n\nexport const Table = styled.table`\n border-collapse: collapse;\n width: 100%;\n`;\n\nexport const HeadRow = styled.tr`\n border-bottom: 2px solid ${headTheme.borderColor};\n`;\n\nexport const HeadCell = styled.th`\n padding: ${gridSize() / 2}px ${gridSize}px;\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n border: none;\n color: ${headTheme.textColor};\n box-sizing: border-box;\n font-size: 12px;\n font-weight: bold;\n position: relative;\n text-align: left;\n vertical-align: top;\n &:focus {\n outline: solid 2px ${headTheme.focusOutline};\n }\n`;\n\nconst outlineWidth = '2px';\n\nexport const TableRow = styled.tr`\n border-bottom: 2px solid ${rowTheme.borderColor};\n &:hover {\n background-color: ${rowTheme.hoverBackground};\n }\n &:focus {\n outline: ${outlineWidth} solid ${rowTheme.focusOutline};\n outline-offset: -${outlineWidth};\n }\n`;\n\nexport const TableCell = styled.td`\n border: none;\n padding: ${gridSize() / 1.2}px ${gridSize}px;\n text-align: left;\n\n &:first-of-type {\n padding-left: 0;\n }\n &:last-of-type {\n padding-right: 0;\n }\n`;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionPointInfo.d.ts","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAK9C,OAAO,KAAK,EACR,kBAAkB,EAOrB,MAAM,yCAAyC,CAAC;AAKjD,oBAAY,uBAAuB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE;QAAE,MAAM,EAAE,kBAAkB,CAAC;QAAC,aAAa,EAAE,kBAAkB,CAAA;KAAE,CAAC;CACtF,CAAC;;AAuMF,wBAAwC"}
1
+ {"version":3,"file":"ExtensionPointInfo.d.ts","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAK9C,OAAO,KAAK,EACR,kBAAkB,EAOrB,MAAM,yCAAyC,CAAC;AAKjD,oBAAY,uBAAuB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE;QAAE,MAAM,EAAE,kBAAkB,CAAC;QAAC,aAAa,EAAE,kBAAkB,CAAA;KAAE,CAAC;CACtF,CAAC;;AAgNF,wBAAwC"}
@@ -1,6 +1,8 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
3
  import type { OnClickHandler } from './types';
3
4
  export interface ButtonHandlerProps extends OnClickHandler {
5
+ children?: React.ReactNode;
4
6
  }
5
7
  export declare const ButtonHandler: FunctionComponent<ButtonHandlerProps>;
6
8
  //# sourceMappingURL=ButtonHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CAAG;AAE7D,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA2B/D,CAAC"}
1
+ {"version":3,"file":"ButtonHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CA2B/D,CAAC"}
@@ -1,7 +1,9 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
3
  import type { OnClickHandler } from './types';
3
4
  export interface LinkHandlerProps extends Partial<OnClickHandler> {
4
5
  href: string;
6
+ children?: React.ReactNode;
5
7
  }
6
8
  export declare const LinkHandler: FunctionComponent<LinkHandlerProps>;
7
9
  //# sourceMappingURL=LinkHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA4B3D,CAAC"}
1
+ {"version":3,"file":"LinkHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA4B3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { FunctionComponent } from 'react';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
2
  import { ModalExtension } from '@atlassian/clientside-extensions';
3
3
  import type { OnClickHandler } from './types';
4
4
  export interface ModalHandlerProps {
@@ -10,6 +10,7 @@ export interface ModalHandlerProps {
10
10
  }
11
11
  export declare const ModalHandler: FunctionComponent<ModalHandlerProps>;
12
12
  export interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {
13
+ children?: ReactNode;
13
14
  render: ModalExtension.ModalRenderExtension;
14
15
  __withoutTransition?: boolean;
15
16
  __disableFocusLock?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAuB9C,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA0D7D,CAAC;AAEF,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACjF,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,2BAA2B,CAmDjF,CAAC"}
1
+ {"version":3,"file":"ModalHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAuB9C,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA0D7D,CAAC;AAEF,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACjF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC,oBAAoB,CAAC;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,CAAC,2BAA2B,CAmDjF,CAAC"}
@@ -1,3 +1,8 @@
1
+ import React from 'react';
1
2
  import type { FunctionComponent } from 'react';
2
- export declare const SectionHandler: FunctionComponent;
3
+ interface SectionHandlerProps {
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const SectionHandler: FunctionComponent<SectionHandlerProps>;
7
+ export {};
3
8
  //# sourceMappingURL=SectionHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,eAAO,MAAM,cAAc,EAAE,iBAE5B,CAAC"}
1
+ {"version":3,"file":"SectionHandler.d.ts","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,UAAU,mBAAmB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAEjE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { ComponentType } from 'react';
2
+ import React from 'react';
2
3
  import type { MountableExtension } from '@atlassian/clientside-extensions';
3
- declare function renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: PropsT): void;
4
+ declare function renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: unknown): void;
4
5
  export default renderElementAsReact;
5
6
  //# sourceMappingURL=renderElementAsReact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,iBAAS,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,QASlI;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"renderElementAsReact.d.ts","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,iBAAS,oBAAoB,CAAC,MAAM,SAAS,KAAK,CAAC,GAAG,CAAC,mBAAmB,EACtE,SAAS,EAAE,kBAAkB,EAC7B,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,EACpC,eAAe,CAAC,EAAE,OAAO,QAU5B;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,15 +1,30 @@
1
1
  /// <reference types="react" />
2
- export declare const BlinkerContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
3
- export declare const Blinker: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, object>;
4
- export declare const Table: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, Pick<import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement>, keyof import("react").TableHTMLAttributes<HTMLTableElement>>, object>;
5
- export declare const HeadRow: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
6
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
7
- }>;
8
- export declare const HeadCell: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
9
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
10
- }>;
11
- export declare const TableRow: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, Pick<import("@emotion/styled-base/types/helper").Overwrapped<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("@atlaskit/theme/dist/types/types").ThemeProps | undefined>, never>, {
12
- __ATLASKIT_THEME__: import("@atlaskit/theme/dist/types/types").Theme;
13
- }>;
14
- export declare const TableCell: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, Pick<import("react").ClassAttributes<HTMLTableDataCellElement> & import("react").TdHTMLAttributes<HTMLTableDataCellElement>, keyof import("react").TdHTMLAttributes<HTMLTableDataCellElement>>, object>;
2
+ export declare const BlinkerContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
6
+ export declare const Blinker: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
10
+ export declare const Table: import("@emotion/styled").StyledComponent<{
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
13
+ }, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
14
+ export declare const HeadRow: import("@emotion/styled").StyledComponent<{
15
+ theme?: import("@emotion/react").Theme | undefined;
16
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
18
+ export declare const HeadCell: import("@emotion/styled").StyledComponent<{
19
+ theme?: import("@emotion/react").Theme | undefined;
20
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
21
+ }, import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, {}>;
22
+ export declare const TableRow: import("@emotion/styled").StyledComponent<{
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
25
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, {}>;
26
+ export declare const TableCell: import("@emotion/styled").StyledComponent<{
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
29
+ }, import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, {}>;
15
30
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,gBAAgB,8TAE5B,CAAC;AAYF,eAAO,MAAM,OAAO,0VAsBnB,CAAC;AAmBF,eAAO,MAAM,KAAK,kVAGjB,CAAC;AAEF,eAAO,MAAM,OAAO;;EAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;EAmBpB,CAAC;AAIF,eAAO,MAAM,QAAQ;;EASpB,CAAC;AAEF,eAAO,MAAM,SAAS,iXAWrB,CAAC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,gBAAgB;;;2GAE5B,CAAC;AAYF,eAAO,MAAM,OAAO;;;qHAsBnB,CAAC;AAmBF,eAAO,MAAM,KAAK;;;kHAGjB,CAAC;AAEF,eAAO,MAAM,OAAO;;;mHAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;mIAmBpB,CAAC;AAIF,eAAO,MAAM,QAAQ;;;mHASpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;+HAWrB,CAAC"}
@@ -28,7 +28,8 @@ const LinkToElement = ({ to }: { to: string }) => {
28
28
  const cleanTo = to.replace(/[^a-zA-Z0-9]/g, '');
29
29
 
30
30
  return (
31
- // eslint-disable-next-line jsx-a11y/anchor-is-valid
31
+ // eslint-disable-next-line jsx-a11y/anchor-is-valid, @typescript-eslint/ban-ts-comment
32
+ // @ts-ignore: react-scroll types are not up to date with the latest react version
32
33
  <Link to={cleanTo} href="" containerId="___cse_info_container" offset={-20} smooth>
33
34
  {to}
34
35
  </Link>
@@ -66,7 +67,9 @@ const TypeRenderer: FunctionComponent<{ objectType: SerializedObjectType }> = ({
66
67
  const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
67
68
  <>
68
69
  <h3>
69
- <Element name={enumType.name}>{enumType.name}</Element>
70
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
71
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
72
+ <Element id={enumType.name}>{enumType.name}</Element>
70
73
  </h3>
71
74
  {enumType.description ? (
72
75
  <p>{enumType.description}</p>
@@ -81,7 +84,9 @@ const EnumTypeRenderer = ({ enumType }: { enumType: SerializedEnumType }) => (
81
84
  const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) => (
82
85
  <>
83
86
  <h3>
84
- <Element name={unionType.name}>{unionType.name}</Element>
87
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
88
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
89
+ <Element id={unionType.name}>{unionType.name}</Element>
85
90
  </h3>
86
91
  {unionType.description ? (
87
92
  <p>{unionType.description}</p>
@@ -102,7 +107,9 @@ const UnionTypeRenderer = ({ unionType }: { unionType: SerializedUnionType }) =>
102
107
  const ScalarRenderer = ({ scalar }: { scalar: SerializedScalar }) => (
103
108
  <>
104
109
  <h3>
105
- <Element name={scalar.name}>{scalar.name}</Element>
110
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
111
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
112
+ <Element id={scalar.name}>{scalar.name}</Element>
106
113
  </h3>
107
114
  <p>{scalar.description}</p>
108
115
  </>
@@ -155,7 +162,9 @@ const SchemasRenderer = ({ schemaDocuments: { schema, contextSchema } }: Omit<Ex
155
162
  objectTypeEntries.map((objectType) => (
156
163
  <React.Fragment key={objectType.name}>
157
164
  <h3>
158
- <Element name={objectType.name}>{objectType.name}</Element>
165
+ {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
166
+ {/* @ts-ignore: react-scroll types are not up to date with the latest react version*/}
167
+ <Element id={objectType.name}>{objectType.name}</Element>
159
168
  </h3>
160
169
  <TypeRenderer objectType={objectType} />
161
170
  </React.Fragment>
@@ -179,7 +188,7 @@ const bodyStyles: React.CSSProperties = {
179
188
  flex: '1 1 auto',
180
189
  };
181
190
 
182
- const CustomModalBody: React.FC = ({ children }) => {
191
+ const CustomModalBody: React.FC<{ children: React.ReactNode }> = ({ children }) => {
183
192
  return (
184
193
  <div id="___cse_info_container" style={bodyStyles}>
185
194
  {children}
@@ -292,7 +292,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
292
292
  </h2>
293
293
  <h3>
294
294
  <div
295
- name="FooInput"
295
+ id="FooInput"
296
296
  >
297
297
  FooInput
298
298
  </div>
@@ -362,7 +362,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
362
362
  </table>
363
363
  <h3>
364
364
  <div
365
- name="GlyphType"
365
+ id="GlyphType"
366
366
  >
367
367
  GlyphType
368
368
  </div>
@@ -375,7 +375,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
375
375
  </p>
376
376
  <h3>
377
377
  <div
378
- name="AvailableTypes"
378
+ id="AvailableTypes"
379
379
  >
380
380
  AvailableTypes
381
381
  </div>
@@ -383,7 +383,6 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
383
383
  <p>
384
384
  Union of the following types:
385
385
 
386
-
387
386
  <a
388
387
  href=""
389
388
  >
@@ -410,7 +409,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
410
409
  </p>
411
410
  <h3>
412
411
  <div
413
- name="ModalType"
412
+ id="ModalType"
414
413
  >
415
414
  ModalType
416
415
  </div>
@@ -420,7 +419,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
420
419
  </p>
421
420
  <h3>
422
421
  <div
423
- name="LinkType"
422
+ id="LinkType"
424
423
  >
425
424
  LinkType
426
425
  </div>
@@ -430,7 +429,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
430
429
  </p>
431
430
  <h3>
432
431
  <div
433
- name="ButtonType"
432
+ id="ButtonType"
434
433
  >
435
434
  ButtonType
436
435
  </div>
@@ -440,7 +439,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
440
439
  </p>
441
440
  <h3>
442
441
  <div
443
- name="PanelType"
442
+ id="PanelType"
444
443
  >
445
444
  PanelType
446
445
  </div>
@@ -450,7 +449,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
450
449
  </p>
451
450
  <h3>
452
451
  <div
453
- name="String"
452
+ id="String"
454
453
  >
455
454
  String
456
455
  </div>
@@ -460,7 +459,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
460
459
  </p>
461
460
  <h3>
462
461
  <div
463
- name="Boolean"
462
+ id="Boolean"
464
463
  >
465
464
  Boolean
466
465
  </div>
@@ -470,7 +469,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
470
469
  </p>
471
470
  <h3>
472
471
  <div
473
- name="Function"
472
+ id="Function"
474
473
  >
475
474
  Function
476
475
  </div>
@@ -480,7 +479,7 @@ exports[`ExtensionPointInfo should show the extension info in a modal when the i
480
479
  </p>
481
480
  <h3>
482
481
  <div
483
- name="Number"
482
+ id="Number"
484
483
  >
485
484
  Number
486
485
  </div>
@@ -6,7 +6,11 @@ import type { FunctionComponent } from 'react';
6
6
  import { ButtonHandler } from './ButtonHandler';
7
7
  import Mock = jest.Mock;
8
8
 
9
- const TestComponent: FunctionComponent<{ onAction: () => void; attributes?: object }> = ({ onAction, attributes, children }) => {
9
+ const TestComponent: FunctionComponent<{ onAction: () => void; attributes?: object; children?: React.ReactNode }> = ({
10
+ onAction,
11
+ attributes,
12
+ children,
13
+ }) => {
10
14
  return (
11
15
  // eslint-disable-next-line react/jsx-props-no-spreading
12
16
  <ButtonHandler onAction={onAction} {...attributes}>
@@ -3,7 +3,9 @@ import Button from '@atlaskit/button/standard-button';
3
3
  import type { FunctionComponent } from 'react';
4
4
  import type { OnClickHandler } from './types';
5
5
 
6
- export interface ButtonHandlerProps extends OnClickHandler {}
6
+ export interface ButtonHandlerProps extends OnClickHandler {
7
+ children?: React.ReactNode;
8
+ }
7
9
 
8
10
  export const ButtonHandler: FunctionComponent<ButtonHandlerProps> = ({
9
11
  appearance,
@@ -6,7 +6,11 @@ import type { FunctionComponent } from 'react';
6
6
 
7
7
  import { LinkHandler } from './LinkHandler';
8
8
 
9
- const TestComponent: FunctionComponent<{ url: string; attributes?: object }> = ({ url, attributes, children }) => {
9
+ const TestComponent: FunctionComponent<{ url: string; attributes?: object; children?: React.ReactNode }> = ({
10
+ url,
11
+ attributes,
12
+ children,
13
+ }) => {
10
14
  return (
11
15
  // eslint-disable-next-line react/jsx-props-no-spreading
12
16
  <LinkHandler href={url} {...attributes}>
@@ -5,6 +5,7 @@ import type { OnClickHandler } from './types';
5
5
 
6
6
  export interface LinkHandlerProps extends Partial<OnClickHandler> {
7
7
  href: string;
8
+ children?: React.ReactNode;
8
9
  }
9
10
 
10
11
  export const LinkHandler: FunctionComponent<LinkHandlerProps> = ({
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable jest/no-commented-out-tests */
2
2
  /* eslint-disable react/jsx-boolean-value */
3
3
  import * as React from 'react';
4
- import { render, fireEvent } from '@testing-library/react';
4
+ import { render, fireEvent, waitFor } from '@testing-library/react';
5
5
 
6
6
  import type { ModalExtension } from '@atlassian/clientside-extensions';
7
7
  import type { FunctionComponent } from 'react';
@@ -53,14 +53,15 @@ describe('ModalHandler', () => {
53
53
  });
54
54
 
55
55
  describe('ModalHandler', () => {
56
- it('should receive an isOpen prop to set the modal as open', () => {
56
+ it('should receive an isOpen prop to set the modal as open', async () => {
57
57
  const { rerender, queryByRole } = render(<TestComponent isOpen={false} />);
58
58
 
59
59
  expect(queryByRole('dialog')).toBeFalsy();
60
60
 
61
61
  rerender(<TestComponent isOpen={true} />);
62
-
63
- expect(queryByRole('dialog')).toBeTruthy();
62
+ await waitFor(() => {
63
+ expect(queryByRole('dialog')).toBeTruthy();
64
+ });
64
65
  });
65
66
 
66
67
  it('should provide a closeModal API method to extension that executes a provided onClose prop to close the modal', () => {
@@ -262,14 +263,15 @@ describe('ModalHandler', () => {
262
263
  expect(queryByText(modalButtonText)).toBeTruthy();
263
264
  });
264
265
 
265
- it('should receive an isOpen prop to set the modal as open', () => {
266
+ it('should receive an isOpen prop to set the modal as open', async () => {
266
267
  const { queryByRole, queryByText } = render(<TestComponentWithActionHandler>{modalButtonText}</TestComponentWithActionHandler>);
267
268
 
268
269
  expect(queryByRole('dialog')).toBeFalsy();
269
270
 
270
271
  queryByText(modalButtonText)?.click();
271
-
272
- expect(queryByRole('dialog')).toBeTruthy();
272
+ await waitFor(() => {
273
+ expect(queryByRole('dialog')).toBeTruthy();
274
+ });
273
275
  });
274
276
  });
275
277
  });
@@ -1,6 +1,7 @@
1
- import type { FunctionComponent } from 'react';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
2
  import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import ModalDialog, { ModalTransition, ModalBody, ModalHeader, ModalFooter, ModalTitle } from '@atlaskit/modal-dialog';
4
+ import type { KeyboardOrMouseEvent } from '@atlaskit/modal-dialog';
4
5
  import LoadingButton from '@atlaskit/button/loading-button';
5
6
  import { ModalExtension } from '@atlassian/clientside-extensions';
6
7
  import type { OnClickHandler } from './types';
@@ -56,7 +57,7 @@ export const ModalHandler: FunctionComponent<ModalHandlerProps> = ({
56
57
  const stackIndex = __disableFocusLock ? 1 : 0;
57
58
 
58
59
  const onCloseHandler = useCallback(
59
- (e) => {
60
+ (e: KeyboardOrMouseEvent) => {
60
61
  const closeResult = modalApi.getOnCloseCallback()(e);
61
62
  // prevent closing of modal if "closeRequest" is "false"
62
63
  if (closeResult !== false) {
@@ -95,6 +96,7 @@ export const ModalHandler: FunctionComponent<ModalHandlerProps> = ({
95
96
  };
96
97
 
97
98
  export interface ModalWithActionHandlerProps extends Omit<OnClickHandler, 'onAction'> {
99
+ children?: ReactNode;
98
100
  render: ModalExtension.ModalRenderExtension;
99
101
  __withoutTransition?: boolean;
100
102
  __disableFocusLock?: boolean;
@@ -4,7 +4,7 @@ import { render } from '@testing-library/react';
4
4
 
5
5
  import { SectionHandler } from './SectionHandler';
6
6
 
7
- const TestComponent: FunctionComponent = ({ children }) => {
7
+ const TestComponent: FunctionComponent<{ children: React.ReactNode }> = ({ children }) => {
8
8
  return <SectionHandler>{children}</SectionHandler>;
9
9
  };
10
10
 
@@ -2,6 +2,10 @@ import React from 'react';
2
2
  import type { FunctionComponent } from 'react';
3
3
 
4
4
  // eslint-disable-next-line import/prefer-default-export
5
- export const SectionHandler: FunctionComponent = ({ children }) => {
5
+ interface SectionHandlerProps {
6
+ children: React.ReactNode;
7
+ }
8
+
9
+ export const SectionHandler: FunctionComponent<SectionHandlerProps> = ({ children }) => {
6
10
  return <>{children}</>;
7
11
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { queryByTestId } from '@testing-library/dom';
2
+ import { queryByTestId, findByTestId } from '@testing-library/dom';
3
3
 
4
4
  import type { MountableExtension } from '@atlassian/clientside-extensions';
5
5
  import renderElementAsReact from './renderElementAsReact';
@@ -8,6 +8,7 @@ import renderElementAsReact from './renderElementAsReact';
8
8
  interface TestProps {
9
9
  name?: string;
10
10
  value?: number;
11
+ children?: React.ReactNode;
11
12
  }
12
13
  /* eslint-enable react/no-unused-prop-types */
13
14
 
@@ -27,7 +28,7 @@ describe('renderElementAsReact', () => {
27
28
  },
28
29
  };
29
30
 
30
- const TestComponent: React.FC<TestProps> = (props) => (
31
+ const TestComponent = (props: unknown) => (
31
32
  <div data-testid="test-component">
32
33
  <h2>A test content</h2>
33
34
  <p data-testid="test-props">{JSON.stringify(props)}</p>
@@ -39,7 +40,7 @@ describe('renderElementAsReact', () => {
39
40
  });
40
41
 
41
42
  it('should use the renderApi to mount and unmount the given react component', () => {
42
- const getTestComponent = () => queryByTestId(testContainer, 'test-component') as HTMLElement;
43
+ const getTestComponent = () => queryByTestId(testContainer, 'test-component');
43
44
 
44
45
  renderElementAsReact(testRenderAPI, TestComponent);
45
46
 
@@ -50,7 +51,7 @@ describe('renderElementAsReact', () => {
50
51
 
51
52
  // rendered using onMount
52
53
  expect(getTestComponent()).toBeTruthy();
53
- expect(getTestComponent().textContent).toMatch('A test content');
54
+ expect(getTestComponent()?.textContent).toMatch('A test content');
54
55
 
55
56
  onUnmountCallback(testContainer);
56
57
 
@@ -58,7 +59,7 @@ describe('renderElementAsReact', () => {
58
59
  expect(getTestComponent()).toBeFalsy();
59
60
  });
60
61
 
61
- it('should receive additional props to assing to the given react component', () => {
62
+ it('should receive additional props to assing to the given react component', async () => {
62
63
  const testProps: TestProps = {
63
64
  name: 'Meaning of life',
64
65
  value: 42,
@@ -67,7 +68,7 @@ describe('renderElementAsReact', () => {
67
68
  renderElementAsReact(testRenderAPI, TestComponent, testProps);
68
69
  onMountCallback(testContainer);
69
70
 
70
- const testPropsElement = queryByTestId(testContainer, 'test-props') as HTMLElement;
71
+ const testPropsElement = await findByTestId(testContainer, 'test-props');
71
72
 
72
73
  // props applied to the component when rendering
73
74
  expect(testPropsElement).toBeTruthy();
@@ -3,7 +3,11 @@ import type { ComponentType } from 'react';
3
3
  import React from 'react';
4
4
  import type { MountableExtension } from '@atlassian/clientside-extensions';
5
5
 
6
- function renderElementAsReact<PropsT>(renderApi: MountableExtension, RenderElement: ComponentType<PropsT>, additionalProps?: PropsT) {
6
+ function renderElementAsReact<PropsT extends React.JSX.IntrinsicAttributes>(
7
+ renderApi: MountableExtension,
8
+ RenderElement: ComponentType<PropsT>,
9
+ additionalProps?: unknown,
10
+ ) {
7
11
  renderApi
8
12
  .onMount((element) => {
9
13
  // eslint-disable-next-line react/jsx-props-no-spreading
package/lib/styled.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import styled from '@emotion/styled';
2
- import { keyframes } from '@emotion/core';
2
+ import { keyframes } from '@emotion/react';
3
3
  import * as colors from '@atlaskit/theme/colors';
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlassian/clientside-extensions-components",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "React components to assist in the authoring of extension points that work at product runtime.",
5
5
  "license": "BSD-3-Clause",
6
6
  "homepage": "https://bitbucket.org/atlassian/atlassian-clientside-extensions#readme",
@@ -66,39 +66,39 @@
66
66
  "test:watch": "jest --watch"
67
67
  },
68
68
  "dependencies": {
69
- "@atlaskit/button": "17.12.0",
70
- "@atlaskit/modal-dialog": "12.10.11",
71
- "@atlaskit/theme": "12.7.0",
72
- "@atlassian/clientside-extensions": "^4.0.0",
73
- "@atlassian/clientside-extensions-base": "^4.0.0",
74
- "@atlassian/clientside-extensions-debug": "^4.0.0",
75
- "@atlassian/clientside-extensions-registry": "^4.0.0",
76
- "@atlassian/clientside-extensions-schema": "^4.0.0",
77
- "@emotion/core": "^10.1.1",
78
- "@emotion/styled": "^10.0.27",
69
+ "@atlaskit/button": "20.3.1",
70
+ "@atlaskit/modal-dialog": "12.17.10",
71
+ "@atlaskit/theme": "14.0.0",
72
+ "@atlassian/clientside-extensions": "^5.0.0",
73
+ "@atlassian/clientside-extensions-base": "^5.0.0",
74
+ "@atlassian/clientside-extensions-debug": "^5.0.0",
75
+ "@atlassian/clientside-extensions-registry": "^5.0.0",
76
+ "@atlassian/clientside-extensions-schema": "^5.0.0",
77
+ "@emotion/react": "^11.13.5",
78
+ "@emotion/styled": "^11.13.5",
79
79
  "lodash.isequal": "^4.5.0",
80
- "react-scroll": "^1.8.1",
80
+ "react-scroll": "^1.8.10",
81
81
  "tslib": "^2.2.0"
82
82
  },
83
83
  "peerDependencies": {
84
- "react": "^16.9",
85
- "react-dom": "^16.9"
84
+ "react": "^18.0.0",
85
+ "react-dom": "^18.0.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@testing-library/dom": "8.11.1",
89
89
  "@testing-library/jest-dom": "5.15.1",
90
- "@testing-library/react": "12.1.2",
91
- "@testing-library/react-hooks": "7.0.2",
90
+ "@testing-library/react": "16.0.1",
91
+ "@testing-library/react-hooks": "8.0.1",
92
92
  "@types/lodash.isequal": "4.5.5",
93
- "@types/react": "16.14.21",
94
- "@types/react-scroll": "1.8.3",
93
+ "@types/react": "18.3.1",
94
+ "@types/react-scroll": "^1.8.10",
95
95
  "jest": "27.3.1",
96
- "react": "16.14.0",
97
- "react-dom": "16.14.0",
96
+ "react": "18.3.1",
97
+ "react-dom": "18.3.1",
98
98
  "ts-jest": "27.0.7"
99
99
  },
100
100
  "engines": {
101
101
  "node": ">=20.16.0"
102
102
  },
103
- "gitHead": "5d495e8aff856cb738b2a0bf0eb1d902e1fccc85"
103
+ "gitHead": "797ed863b536adc5806a0f9438ee9501d710a467"
104
104
  }