@atlassian/clientside-extensions-components 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ExtensionPoint.js +1 -1
- package/dist/cjs/ExtensionPoint.js.map +1 -1
- package/dist/cjs/ExtensionPointInfo.js +4 -4
- package/dist/cjs/ExtensionPointInfo.js.map +1 -1
- package/dist/cjs/ExtensionsObservable.js +1 -1
- package/dist/cjs/ExtensionsObservable.js.map +1 -1
- package/dist/cjs/handlers/AsyncPanelHandler.js +1 -1
- package/dist/cjs/handlers/AsyncPanelHandler.js.map +1 -1
- package/dist/cjs/handlers/ButtonHandler.js +2 -2
- package/dist/cjs/handlers/ButtonHandler.js.map +1 -1
- package/dist/cjs/handlers/LinkHandler.js +2 -2
- package/dist/cjs/handlers/LinkHandler.js.map +1 -1
- package/dist/cjs/handlers/ModalHandler.js +3 -3
- package/dist/cjs/handlers/ModalHandler.js.map +1 -1
- package/dist/cjs/handlers/PanelHandler.js +1 -1
- package/dist/cjs/handlers/PanelHandler.js.map +1 -1
- package/dist/cjs/handlers/SectionHandler.js +1 -1
- package/dist/cjs/handlers/SectionHandler.js.map +1 -1
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/renderElementAsReact.js +2 -2
- package/dist/cjs/renderElementAsReact.js.map +1 -1
- package/dist/cjs/styled.js +2 -2
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/useExtensions.js +1 -1
- package/dist/cjs/useExtensions.js.map +1 -1
- package/package.json +14 -14
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const clientside_extensions_debug_1 = require("@atlassian/clientside-extensions-debug");
|
|
5
|
-
const react_1 =
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const useExtensions_1 = require("./useExtensions");
|
|
7
7
|
const ExtensionPoint = ({ name, context = null, options, children }) => {
|
|
8
8
|
const [supportedDescriptors, unsupportedDescriptors, isLoading] = (0, useExtensions_1.useExtensionsAll)(name, context, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionPoint.js","sourceRoot":"","sources":["../../lib/ExtensionPoint.tsx"],"names":[],"mappings":";;;AACA,wFAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"ExtensionPoint.js","sourceRoot":"","sources":["../../lib/ExtensionPoint.tsx"],"names":[],"mappings":";;;AACA,wFAAiE;AACjE,uDAAoC;AACpC,mDAAmD;AAUnD,MAAM,cAAc,GAAkC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClG,MAAM,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,SAAS,CAAC,GAAG,IAAA,gCAAgB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAE3G,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QAChC,IAAA,qCAAO,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;YAClB,OAAO;gBACH,KAAK,EAAE,KAAK;gBAEZ,OAAO,EAAE,+FAA+F,IAAI,sBAAsB;gBAClI,UAAU,EAAE,gBAAgB;gBAC5B,IAAI,EAAE;oBACF,IAAI;oBACJ,OAAO;oBACP,OAAO;iBACV;aACJ,CAAC;QACN,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;KACf;IAED,OAAO,8DAAG,QAAQ,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAI,CAAC;AACpF,CAAC,CAAC;AAEF,kBAAe,IAAA,YAAI,EAAC,cAAc,CAAC,CAAC","sourcesContent":["import type { Context, ExtensionDescriptor } from '@atlassian/clientside-extensions-registry';\nimport { onDebug } from '@atlassian/clientside-extensions-debug';\nimport React, { memo } from 'react';\nimport { useExtensionsAll } from './useExtensions';\nimport type { ExtensionPointCallback, Options } from './types';\n\nexport interface ExtensionPointProps {\n name: string;\n context?: Context<{}> | null;\n options: Options;\n children: ExtensionPointCallback<ExtensionDescriptor>;\n}\n\nconst ExtensionPoint: React.FC<ExtensionPointProps> = ({ name, context = null, options, children }) => {\n const [supportedDescriptors, unsupportedDescriptors, isLoading] = useExtensionsAll(name, context, options);\n\n if (typeof children !== 'function') {\n onDebug(({ error }) => {\n return {\n level: error,\n\n message: `ExtensionPoint expects a render-child.\\nThe \"children\"-property passed for extension point \"${name}\" is not a function.`,\n components: 'ExtensionPoint',\n meta: {\n name,\n context,\n options,\n },\n };\n });\n return null;\n }\n\n return <>{children(supportedDescriptors, unsupportedDescriptors, isLoading)}</>;\n};\n\nexport default memo(ExtensionPoint);\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_1 =
|
|
5
|
-
const standard_button_1 =
|
|
6
|
-
const modal_dialog_1 =
|
|
4
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
const standard_button_1 = tslib_1.__importDefault(require("@atlaskit/button/standard-button"));
|
|
6
|
+
const modal_dialog_1 = tslib_1.__importStar(require("@atlaskit/modal-dialog"));
|
|
7
7
|
const react_scroll_1 = require("react-scroll");
|
|
8
8
|
const constants_1 = require("@atlaskit/theme/constants");
|
|
9
|
-
const useDiscovery_1 =
|
|
9
|
+
const useDiscovery_1 = tslib_1.__importDefault(require("./debug/useDiscovery"));
|
|
10
10
|
const styled_1 = require("./styled");
|
|
11
11
|
const LinkToElement = ({ to }) => {
|
|
12
12
|
// TODO: is there a way to get the clean type from the schema?
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionPointInfo.js","sourceRoot":"","sources":["../../lib/ExtensionPointInfo.tsx"],"names":[],"mappings":";;;AAC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AM,eAAe,GAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/C,OAAO,CACH,uCAAK,EAAE,EAAC,uBAAuB,EAAC,KAAK,EAAE,UAAU,IAC5C,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAsC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE;IACxF,MAAM,CAAC,sBAAsB,CAAC,GAAG,IAAA,sBAAY,GAAE,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAErD,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpC,8BAAC,yBAAgB;QACb,8BAAC,gBAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,GAAI;QAC9D,8BAAC,8BAAe,QACX,UAAU,IAAI,CACX,8BAAC,sBAAK,IAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,SAAS;YACxC,8BAAC,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\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,uDAA8C;AAC9C,+FAAsD;AACtD,+EAAsG;AACtG,+CAA6C;AAW7C,yDAAqD;AACrD,gFAAgD;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,CAAC,IAAI,CAAa;YACrD,8BAAC,kBAAS,IAAC,KAAK,EAAC,KAAK;gBAClB,8BAAC,aAAa,IAAC,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,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"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getValidatedExtensions = exports.getExtensionPointSubscription = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const clientside_extensions_registry_1 =
|
|
5
|
+
const clientside_extensions_registry_1 = tslib_1.__importDefault(require("@atlassian/clientside-extensions-registry"));
|
|
6
6
|
const clientside_extensions_debug_1 = require("@atlassian/clientside-extensions-debug");
|
|
7
7
|
const clientside_extensions_base_1 = require("@atlassian/clientside-extensions-base");
|
|
8
8
|
const types_1 = require("./types");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionsObservable.js","sourceRoot":"","sources":["../../lib/ExtensionsObservable.ts"],"names":[],"mappings":";;;;AAUA,4HAAiE;AACjE,wFAAiE;AAEjE,sFAAsE;AAKtE,mCAA+C;AAE/C,MAAM,eAAe,GAAG,CAAC,MAAgB,EAAE,aAAqB,EAAE,QAAgB,EAAY,EAAE;IAC5F,OAAO,CAAC,GAAG,IAAe,EAAE,EAAE;QAC1B,IAAI;YACA,OAAO,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;SAC1B;QAAC,OAAO,CAAC,EAAE;YACR,IAAA,qCAAO,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpB,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,sDAAsD,aAAa,mBAAmB,QAAQ;aAC1G,CAAC,EAAE;gBACA,IAAI,EAAE;oBACF,SAAS,EAAE,aAAa;o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C3D,IAAI,iBAAiB,KAAK,SAAS,EAAE;gBACjC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;aACxF;YAED,iBAAiB,GAAG,QAAQ,CAAC;YAC7B,0BAA0B,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC/C,OAAO;gBACH,WAAW,EAAE,GAAG,EAAE;oBACd,0BAA0B,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;oBAC1D,YAAY,CAAC,WAAW,EAAE,CAAC;gBAC/B,CAAC;aACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC,CAAC;AAvDW,QAAA,sBAAsB,0BAuDjC","sourcesContent":["import type {\n Context,\n ExtensionAPI,\n ExtensionAttributes,\n ExtensionAttributesProvider,\n ExtensionCleanupCallback,\n ExtensionDescriptor,\n MaybeOnAction,\n OnAction,\n} from '@atlassian/clientside-extensions-registry';\nimport registry from '@atlassian/clientside-extensions-registry';\nimport { onDebug } from '@atlassian/clientside-extensions-debug';\nimport type { Observable, Observer } from '@atlassian/clientside-extensions-base';\nimport { ReplaySubject } from '@atlassian/clientside-extensions-base';\n// We only import types here\n// eslint-disable-next-line node/no-unpublished-import\nimport type { Validator, ValidationError, ValidationWarning } from '@atlassian/clientside-extensions-schema';\nimport type { ExtensionPointUpdate, ExtensionState, Options } from './types';\nimport { isNotNullOrUndefined } from './types';\n\nconst safeguardAction = (action: OnAction, descriptorKey: string, location: string): OnAction => {\n return (...args: unknown[]) => {\n try {\n return action(...args);\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Failed to execute onAction callback for extension \"${descriptorKey}\" at extension: ${location}.\n Error: ${e}`,\n meta: {\n extension: descriptorKey,\n location,\n },\n }));\n return undefined;\n }\n };\n};\n\nconst actionsCache = new Map<OnAction, OnAction>();\nconst cachedSafeguardAction = (maybeAction: MaybeOnAction, descriptorKey: string, location: string): OnAction | undefined => {\n if (!maybeAction) {\n return undefined;\n }\n\n const action = maybeAction as OnAction;\n\n if (actionsCache.has(action)) {\n return actionsCache.get(action);\n }\n\n const guardedAction = safeguardAction(action, descriptorKey, location);\n\n actionsCache.set(action, guardedAction);\n\n return guardedAction;\n};\n\nconst mergeAttributes = (\n base: ExtensionAttributes,\n provided: ExtensionAttributes,\n onAction?: ExtensionAttributes['onAction'],\n): ExtensionAttributes => {\n if (!onAction) {\n return {\n ...base,\n ...provided,\n };\n }\n\n return {\n ...base,\n ...provided,\n onAction,\n };\n};\n\nconst getExtensionApi = (\n key: string,\n extensionPoint: string,\n attributeMap: Map<string, ExtensionAttributes>,\n queueUpdate: ReturnType<typeof createAnimationFrameQueue>,\n cleanupCallbackQueue: ReturnType<typeof createCleanupCallbackQueue>['queue'],\n) => {\n const extensionAPI: ExtensionAPI = {\n updateAttributes(fnOrAttributes) {\n const currentAttributes = (attributeMap.has(key) && attributeMap.get(key)) || {};\n\n try {\n const updatedAttributes = typeof fnOrAttributes === 'function' ? fnOrAttributes(currentAttributes) : fnOrAttributes;\n const attributes = { ...currentAttributes, ...updatedAttributes };\n attributeMap.set(key, attributes);\n queueUpdate(key);\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Updating attributes for extension ${key} failed:\n${e}`,\n meta: {\n extension: key,\n location: extensionPoint,\n },\n }));\n }\n },\n onCleanup(cleanupCallback) {\n cleanupCallbackQueue.push([key, cleanupCallback]);\n },\n };\n return extensionAPI;\n};\n\nconst getExtensionAttributes = (\n key: string,\n extensionPoint: string,\n attributesProvider: ExtensionAttributesProvider | undefined,\n baseAttributes: ExtensionDescriptor['attributes'],\n extensionAPI: ExtensionAPI,\n context: Context<{}> | null,\n): ExtensionAttributes | undefined => {\n if (!attributesProvider) {\n return baseAttributes;\n }\n\n // Try to get the attributes from the provider\n let providedAttributes: ExtensionAttributes = {};\n\n try {\n const rawProvidedAttributes = attributesProvider(extensionAPI, context);\n\n if (!rawProvidedAttributes || Object.getPrototypeOf(rawProvidedAttributes) !== Object.prototype) {\n throw new TypeError('The attributes provider functions should return attributes object');\n }\n\n providedAttributes = rawProvidedAttributes;\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Calling the attributes provider for extension ${key} failed:\n ${e}`,\n meta: {\n extension: key,\n location: extensionPoint,\n },\n }));\n\n return undefined;\n }\n\n // Cache the onAction if present\n const onAction = providedAttributes.onAction && cachedSafeguardAction(providedAttributes.onAction, key, extensionPoint);\n\n return mergeAttributes(baseAttributes, providedAttributes, onAction);\n};\n\nconst sortDescriptorsByWeight = <T extends ExtensionAttributes>(extensionDescriptors: ExtensionDescriptor<T>[]) => {\n return extensionDescriptors.sort((a: ExtensionDescriptor<T>, b: ExtensionDescriptor<T>) => {\n const aWeight = a?.attributes?.weight ?? Infinity;\n const bWeight = b?.attributes?.weight ?? Infinity;\n\n return aWeight - bWeight;\n });\n};\n\ntype DescriptorUpdateBatch<T extends ExtensionAttributes> = {\n descriptors: ExtensionDescriptor<T>[];\n updatedDescriptors: ExtensionDescriptor<T>[];\n};\nconst inlineUpdateAttributes = <T extends ExtensionAttributes>(\n keys: Set<string>,\n attributeMap: Map<string, ExtensionAttributes>,\n descriptors: ExtensionDescriptor<T>[],\n): DescriptorUpdateBatch<T> => {\n const updated: ExtensionDescriptor<T>[] = [];\n descriptors\n .filter((descriptor) => keys.has(descriptor.key))\n .forEach((descriptor) => {\n descriptor.attributes = {\n ...descriptor.attributes,\n ...attributeMap.get(descriptor.key),\n };\n updated.push(descriptor);\n });\n\n return {\n descriptors: sortDescriptorsByWeight<T>(descriptors),\n updatedDescriptors: updated,\n };\n};\n\nconst createAnimationFrameQueue = (callback: (params: Set<string>) => void) => {\n let queue = new Set<string>();\n let requestIsQueued = false;\n const flushUpdate = () => {\n requestIsQueued = false;\n callback(queue);\n queue = new Set();\n };\n\n return (key: string) => {\n queue.add(key);\n\n if (!requestIsQueued) {\n requestIsQueued = true;\n requestAnimationFrame(flushUpdate);\n }\n };\n};\n\nconst createCleanupCallbackQueue = () => {\n const queue: [string, ExtensionCleanupCallback][] = [];\n const cleanUp = () => {\n while (queue.length) {\n const result = queue.shift();\n\n if (!result) {\n break;\n }\n\n const [descriptorKey, callback] = result;\n\n try {\n callback();\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Failed to execute cleanup callback registered for \"${descriptorKey}\".\nSee passed callback for reference: ${callback}`,\n meta: {\n extension: descriptorKey,\n callback,\n },\n }));\n }\n }\n };\n\n return {\n queue,\n cleanUp,\n };\n};\n\nconst EMPTY_PAYLOAD: ExtensionPointUpdate = { state: { descriptors: [], loadingState: true }, update: [] };\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getExtensionPointSubscription = <ContextT extends Context<{}> | null, AttributesT extends ExtensionAttributes>(\n extensionPoint: string,\n context: ContextT,\n): Observable<ExtensionPointUpdate<AttributesT>> => {\n let singletonObserver: Observer<ExtensionPointUpdate<AttributesT>>;\n let currentState: ExtensionDescriptor<AttributesT>[] = [];\n let currentLoadingState: boolean = true;\n\n const updateSubject = new ReplaySubject<ExtensionPointUpdate<AttributesT>>(1);\n const cleanupCallbackQueue = createCleanupCallbackQueue();\n const descriptorAttributeMap = new Map<string, ExtensionAttributes>();\n\n const animationFrameQueue = createAnimationFrameQueue((updatedKeys) => {\n const { descriptors, updatedDescriptors } = inlineUpdateAttributes(updatedKeys, descriptorAttributeMap, currentState);\n currentState = descriptors;\n updateSubject.notify({ state: { descriptors: currentState, loadingState: currentLoadingState }, update: updatedDescriptors });\n });\n\n const subscription = registry.getLocation(extensionPoint).subscribe(({ descriptors, loadingState }) => {\n // no need to validate while we are still loading.\n if (loadingState) {\n // @ts-expect-error Some issues with generics\n updateSubject.notify(EMPTY_PAYLOAD);\n return;\n }\n\n /*\n * TODO\n * - do we need to remove descriptors from the `descriptorMap` if they are no longer within the listed descriptors?\n * - do we need to override descriptors everytime they get \"re-registered\" or is that a `dev-mode` only feature?\n */\n const extensionDescriptors = descriptors\n .map((rawDescriptor): ExtensionDescriptor<AttributesT> | undefined => {\n const { attributesProvider, attributes: baseAttributes, key, ...descriptor } = rawDescriptor;\n\n const extensionAPI = getExtensionApi(\n key,\n extensionPoint,\n descriptorAttributeMap,\n animationFrameQueue,\n cleanupCallbackQueue.queue,\n );\n\n const maybeAttributes = getExtensionAttributes(\n key,\n extensionPoint,\n attributesProvider,\n baseAttributes,\n extensionAPI,\n context,\n );\n\n if (maybeAttributes === undefined) {\n return undefined;\n }\n\n const attributes: ExtensionAttributes = maybeAttributes;\n\n descriptorAttributeMap.set(key, attributes);\n\n const fullDescriptor: ExtensionDescriptor<AttributesT> = {\n ...descriptor,\n key,\n attributes: attributes as AttributesT,\n };\n\n return fullDescriptor;\n })\n .filter(isNotNullOrUndefined);\n\n currentState = sortDescriptorsByWeight<AttributesT>(extensionDescriptors);\n currentLoadingState = loadingState;\n\n updateSubject.notify({ state: { descriptors: currentState, loadingState }, update: currentState });\n });\n\n return {\n subscribe: (observer: Observer<ExtensionPointUpdate<AttributesT>>) => {\n if (singletonObserver !== undefined) {\n throw new Error('Only one observer is allowed to be registered on this Observable.');\n }\n\n singletonObserver = observer;\n updateSubject.subscribe(observer);\n return {\n unsubscribe: () => {\n updateSubject.unsubscribe(singletonObserver);\n subscription.unsubscribe();\n cleanupCallbackQueue.cleanUp();\n },\n };\n },\n };\n};\n\nconst componentDebugName = 'Schema Validation';\n\nconst gerErrorMessages = (errors: ValidationError[]): string[] => errors.map(({ error }) => error);\nconst getWarningMessages = (errors: ValidationWarning[]): string[] => errors.map(({ warning }) => warning);\n\n/**\n * Validates the attributes against the schema. Returns true if the attributes are valid.\n */\nconst runValidation = (validator: Validator, payload: unknown, extensionPoint: string, extensionKey: string): boolean => {\n if (!validator) {\n throw new Error(`No validator specified to validate extension point \"${extensionPoint}\"`);\n }\n\n const { errors, warnings } = validator(payload);\n\n if (errors.length !== 0) {\n const errorMessages = gerErrorMessages(errors);\n\n onDebug(({ error }) => ({\n level: error,\n message: `Schema validation for extension \"${extensionKey}\" returned errors.`,\n components: componentDebugName,\n meta: {\n location: extensionPoint,\n extension: extensionKey,\n errors: errorMessages,\n },\n }));\n }\n\n if (warnings.length !== 0) {\n const warningMessages = getWarningMessages(warnings);\n\n onDebug(({ warn }) => ({\n level: warn,\n message: `Schema validator for extension \"${extensionKey}\" returned warnings.`,\n components: componentDebugName,\n meta: {\n location: extensionPoint,\n extension: extensionKey,\n warnings: warningMessages,\n },\n }));\n }\n\n return errors.length === 0;\n};\n\n/**\n * Validates the context against the context schema. Returns true if the context is valid.\n */\nconst runContextValidation = (extensionPoint: string, validator: Validator | undefined, context: Context<{}> | null): boolean => {\n // This is a feedback for product developers and should not run in production\n if (process.env.NODE_ENV === 'production') {\n return true;\n }\n\n let errors: ValidationError[] = [];\n let warnings: ValidationWarning[] = [];\n\n if (context) {\n if (!validator) {\n throw new Error(`No context validator specified for extension point \"${extensionPoint}\"`);\n }\n\n ({ errors, warnings } = validator(context));\n\n if (errors.length) {\n const errorMessages = gerErrorMessages(errors);\n\n onDebug(({ error }) => ({\n level: error,\n message: `The context validation for extension-location \"${extensionPoint}\" returned errors.`,\n components: componentDebugName,\n meta: {\n extensionPoint,\n context,\n errors: errorMessages,\n },\n }));\n }\n if (warnings.length) {\n const warningMessages = getWarningMessages(warnings);\n\n onDebug(({ warn }) => ({\n level: warn,\n message: `The context validation for extension-location \"${extensionPoint}\" returned warnings.`,\n components: componentDebugName,\n meta: {\n extensionPoint,\n context,\n warnings: warningMessages,\n },\n }));\n }\n }\n\n return errors.length === 0;\n};\n\ntype DescriptorMap<T extends ExtensionAttributes = ExtensionAttributes> = Map<string, ExtensionDescriptor<T>>;\n\nconst transferDescriptorBetweenMaps = <T extends ExtensionAttributes>(\n descriptor: ExtensionDescriptor<T>,\n addToMap: DescriptorMap<T>,\n removeFromMap: DescriptorMap<T>,\n) => {\n if (removeFromMap.has(descriptor.key)) {\n removeFromMap.delete(descriptor.key);\n }\n addToMap.set(descriptor.key, descriptor);\n};\n\nexport const getValidatedExtensions = <ContextT extends Context<{}> | null, AttributesU extends ExtensionAttributes>(\n extensionPointName: string,\n context: ContextT,\n options: Options,\n): Observable<ExtensionState<AttributesU>> => {\n const { contextValidator, attributeValidator } = options;\n\n const isContextValid = runContextValidation(extensionPointName, contextValidator, context);\n\n if (!isContextValid) {\n throw new Error(`The context provided for extension-location \"${extensionPointName}\" does not match the schema`);\n }\n\n const validatedExtensionsSubject = new ReplaySubject<ExtensionState<AttributesU>>(1);\n let singletonObserver: Observer<ExtensionState<AttributesU>>;\n const supportedDescriptors: DescriptorMap<AttributesU> = new Map<string, ExtensionDescriptor<AttributesU>>();\n const unsupportedDescriptors: DescriptorMap<AttributesU> = new Map<string, ExtensionDescriptor<AttributesU>>();\n\n const subscription = getExtensionPointSubscription<ContextT, AttributesU>(extensionPointName, context).subscribe(\n ({ state, update }) => {\n const { loadingState } = state;\n\n // only reevaluate the updated descriptors\n update.forEach((descriptor) => {\n if (!runValidation(attributeValidator, descriptor.attributes, extensionPointName, descriptor.key)) {\n transferDescriptorBetweenMaps<AttributesU>(descriptor, unsupportedDescriptors, supportedDescriptors);\n } else {\n transferDescriptorBetweenMaps<AttributesU>(descriptor, supportedDescriptors, unsupportedDescriptors);\n }\n });\n\n validatedExtensionsSubject.notify([\n Array.from(supportedDescriptors.values()),\n Array.from(unsupportedDescriptors.values()),\n loadingState,\n ]);\n },\n );\n\n return {\n subscribe: (observer: Observer<ExtensionState<AttributesU>>) => {\n if (singletonObserver !== undefined) {\n throw new Error('Only one observer is allowed to be registered on this Observable.');\n }\n\n singletonObserver = observer;\n validatedExtensionsSubject.subscribe(observer);\n return {\n unsubscribe: () => {\n validatedExtensionsSubject.unsubscribe(singletonObserver);\n subscription.unsubscribe();\n },\n };\n },\n };\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ExtensionsObservable.js","sourceRoot":"","sources":["../../lib/ExtensionsObservable.ts"],"names":[],"mappings":";;;;AAUA,uHAAiE;AACjE,wFAAiE;AAEjE,sFAAsE;AAKtE,mCAA+C;AAE/C,MAAM,eAAe,GAAG,CAAC,MA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AC,CAAC;aACxG;iBAAM;gBACH,6BAA6B,CAAc,UAAU,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;aACxG;QACL,CAAC,CAAC,CAAC;QAEH,0BAA0B,CAAC,MAAM,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAC;YAC3C,YAAY;SACf,CAAC,CAAC;IACP,CAAC,CACJ,CAAC;IAEF,OAAO;QACH,SAAS,EAAE,CAAC,QAA+C,EAAE,EAAE;YAC3D,IAAI,iBAAiB,KAAK,SAAS,EAAE;gBACjC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;aACxF;YAED,iBAAiB,GAAG,QAAQ,CAAC;YAC7B,0BAA0B,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC/C,OAAO;gBACH,WAAW,EAAE,GAAG,EAAE;oBACd,0BAA0B,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;oBAC1D,YAAY,CAAC,WAAW,EAAE,CAAC;gBAC/B,CAAC;aACJ,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC,CAAC;AAvDW,QAAA,sBAAsB,0BAuDjC","sourcesContent":["import type {\n Context,\n ExtensionAPI,\n ExtensionAttributes,\n ExtensionAttributesProvider,\n ExtensionCleanupCallback,\n ExtensionDescriptor,\n MaybeOnAction,\n OnAction,\n} from '@atlassian/clientside-extensions-registry';\nimport registry from '@atlassian/clientside-extensions-registry';\nimport { onDebug } from '@atlassian/clientside-extensions-debug';\nimport type { Observable, Observer } from '@atlassian/clientside-extensions-base';\nimport { ReplaySubject } from '@atlassian/clientside-extensions-base';\n// We only import types here\n// eslint-disable-next-line node/no-unpublished-import\nimport type { Validator, ValidationError, ValidationWarning } from '@atlassian/clientside-extensions-schema';\nimport type { ExtensionPointUpdate, ExtensionState, Options } from './types';\nimport { isNotNullOrUndefined } from './types';\n\nconst safeguardAction = (action: OnAction, descriptorKey: string, location: string): OnAction => {\n return (...args: unknown[]) => {\n try {\n return action(...args);\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Failed to execute onAction callback for extension \"${descriptorKey}\" at extension: ${location}.\n Error: ${e}`,\n meta: {\n extension: descriptorKey,\n location,\n },\n }));\n return undefined;\n }\n };\n};\n\nconst actionsCache = new Map<OnAction, OnAction>();\nconst cachedSafeguardAction = (maybeAction: MaybeOnAction, descriptorKey: string, location: string): OnAction | undefined => {\n if (!maybeAction) {\n return undefined;\n }\n\n const action = maybeAction as OnAction;\n\n if (actionsCache.has(action)) {\n return actionsCache.get(action);\n }\n\n const guardedAction = safeguardAction(action, descriptorKey, location);\n\n actionsCache.set(action, guardedAction);\n\n return guardedAction;\n};\n\nconst mergeAttributes = (\n base: ExtensionAttributes,\n provided: ExtensionAttributes,\n onAction?: ExtensionAttributes['onAction'],\n): ExtensionAttributes => {\n if (!onAction) {\n return {\n ...base,\n ...provided,\n };\n }\n\n return {\n ...base,\n ...provided,\n onAction,\n };\n};\n\nconst getExtensionApi = (\n key: string,\n extensionPoint: string,\n attributeMap: Map<string, ExtensionAttributes>,\n queueUpdate: ReturnType<typeof createAnimationFrameQueue>,\n cleanupCallbackQueue: ReturnType<typeof createCleanupCallbackQueue>['queue'],\n) => {\n const extensionAPI: ExtensionAPI = {\n updateAttributes(fnOrAttributes) {\n const currentAttributes = (attributeMap.has(key) && attributeMap.get(key)) || {};\n\n try {\n const updatedAttributes = typeof fnOrAttributes === 'function' ? fnOrAttributes(currentAttributes) : fnOrAttributes;\n const attributes = { ...currentAttributes, ...updatedAttributes };\n attributeMap.set(key, attributes);\n queueUpdate(key);\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Updating attributes for extension ${key} failed:\n${e}`,\n meta: {\n extension: key,\n location: extensionPoint,\n },\n }));\n }\n },\n onCleanup(cleanupCallback) {\n cleanupCallbackQueue.push([key, cleanupCallback]);\n },\n };\n return extensionAPI;\n};\n\nconst getExtensionAttributes = (\n key: string,\n extensionPoint: string,\n attributesProvider: ExtensionAttributesProvider | undefined,\n baseAttributes: ExtensionDescriptor['attributes'],\n extensionAPI: ExtensionAPI,\n context: Context<{}> | null,\n): ExtensionAttributes | undefined => {\n if (!attributesProvider) {\n return baseAttributes;\n }\n\n // Try to get the attributes from the provider\n let providedAttributes: ExtensionAttributes = {};\n\n try {\n const rawProvidedAttributes = attributesProvider(extensionAPI, context);\n\n if (!rawProvidedAttributes || Object.getPrototypeOf(rawProvidedAttributes) !== Object.prototype) {\n throw new TypeError('The attributes provider functions should return attributes object');\n }\n\n providedAttributes = rawProvidedAttributes;\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Calling the attributes provider for extension ${key} failed:\n ${e}`,\n meta: {\n extension: key,\n location: extensionPoint,\n },\n }));\n\n return undefined;\n }\n\n // Cache the onAction if present\n const onAction = providedAttributes.onAction && cachedSafeguardAction(providedAttributes.onAction, key, extensionPoint);\n\n return mergeAttributes(baseAttributes, providedAttributes, onAction);\n};\n\nconst sortDescriptorsByWeight = <T extends ExtensionAttributes>(extensionDescriptors: ExtensionDescriptor<T>[]) => {\n return extensionDescriptors.sort((a: ExtensionDescriptor<T>, b: ExtensionDescriptor<T>) => {\n const aWeight = a?.attributes?.weight ?? Infinity;\n const bWeight = b?.attributes?.weight ?? Infinity;\n\n return aWeight - bWeight;\n });\n};\n\ntype DescriptorUpdateBatch<T extends ExtensionAttributes> = {\n descriptors: ExtensionDescriptor<T>[];\n updatedDescriptors: ExtensionDescriptor<T>[];\n};\nconst inlineUpdateAttributes = <T extends ExtensionAttributes>(\n keys: Set<string>,\n attributeMap: Map<string, ExtensionAttributes>,\n descriptors: ExtensionDescriptor<T>[],\n): DescriptorUpdateBatch<T> => {\n const updated: ExtensionDescriptor<T>[] = [];\n descriptors\n .filter((descriptor) => keys.has(descriptor.key))\n .forEach((descriptor) => {\n descriptor.attributes = {\n ...descriptor.attributes,\n ...attributeMap.get(descriptor.key),\n };\n updated.push(descriptor);\n });\n\n return {\n descriptors: sortDescriptorsByWeight<T>(descriptors),\n updatedDescriptors: updated,\n };\n};\n\nconst createAnimationFrameQueue = (callback: (params: Set<string>) => void) => {\n let queue = new Set<string>();\n let requestIsQueued = false;\n const flushUpdate = () => {\n requestIsQueued = false;\n callback(queue);\n queue = new Set();\n };\n\n return (key: string) => {\n queue.add(key);\n\n if (!requestIsQueued) {\n requestIsQueued = true;\n requestAnimationFrame(flushUpdate);\n }\n };\n};\n\nconst createCleanupCallbackQueue = () => {\n const queue: [string, ExtensionCleanupCallback][] = [];\n const cleanUp = () => {\n while (queue.length) {\n const result = queue.shift();\n\n if (!result) {\n break;\n }\n\n const [descriptorKey, callback] = result;\n\n try {\n callback();\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n message: `Failed to execute cleanup callback registered for \"${descriptorKey}\".\nSee passed callback for reference: ${callback}`,\n meta: {\n extension: descriptorKey,\n callback,\n },\n }));\n }\n }\n };\n\n return {\n queue,\n cleanUp,\n };\n};\n\nconst EMPTY_PAYLOAD: ExtensionPointUpdate = { state: { descriptors: [], loadingState: true }, update: [] };\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getExtensionPointSubscription = <ContextT extends Context<{}> | null, AttributesT extends ExtensionAttributes>(\n extensionPoint: string,\n context: ContextT,\n): Observable<ExtensionPointUpdate<AttributesT>> => {\n let singletonObserver: Observer<ExtensionPointUpdate<AttributesT>>;\n let currentState: ExtensionDescriptor<AttributesT>[] = [];\n let currentLoadingState: boolean = true;\n\n const updateSubject = new ReplaySubject<ExtensionPointUpdate<AttributesT>>(1);\n const cleanupCallbackQueue = createCleanupCallbackQueue();\n const descriptorAttributeMap = new Map<string, ExtensionAttributes>();\n\n const animationFrameQueue = createAnimationFrameQueue((updatedKeys) => {\n const { descriptors, updatedDescriptors } = inlineUpdateAttributes(updatedKeys, descriptorAttributeMap, currentState);\n currentState = descriptors;\n updateSubject.notify({ state: { descriptors: currentState, loadingState: currentLoadingState }, update: updatedDescriptors });\n });\n\n const subscription = registry.getLocation(extensionPoint).subscribe(({ descriptors, loadingState }) => {\n // no need to validate while we are still loading.\n if (loadingState) {\n // @ts-expect-error Some issues with generics\n updateSubject.notify(EMPTY_PAYLOAD);\n return;\n }\n\n /*\n * TODO\n * - do we need to remove descriptors from the `descriptorMap` if they are no longer within the listed descriptors?\n * - do we need to override descriptors everytime they get \"re-registered\" or is that a `dev-mode` only feature?\n */\n const extensionDescriptors = descriptors\n .map((rawDescriptor): ExtensionDescriptor<AttributesT> | undefined => {\n const { attributesProvider, attributes: baseAttributes, key, ...descriptor } = rawDescriptor;\n\n const extensionAPI = getExtensionApi(\n key,\n extensionPoint,\n descriptorAttributeMap,\n animationFrameQueue,\n cleanupCallbackQueue.queue,\n );\n\n const maybeAttributes = getExtensionAttributes(\n key,\n extensionPoint,\n attributesProvider,\n baseAttributes,\n extensionAPI,\n context,\n );\n\n if (maybeAttributes === undefined) {\n return undefined;\n }\n\n const attributes: ExtensionAttributes = maybeAttributes;\n\n descriptorAttributeMap.set(key, attributes);\n\n const fullDescriptor: ExtensionDescriptor<AttributesT> = {\n ...descriptor,\n key,\n attributes: attributes as AttributesT,\n };\n\n return fullDescriptor;\n })\n .filter(isNotNullOrUndefined);\n\n currentState = sortDescriptorsByWeight<AttributesT>(extensionDescriptors);\n currentLoadingState = loadingState;\n\n updateSubject.notify({ state: { descriptors: currentState, loadingState }, update: currentState });\n });\n\n return {\n subscribe: (observer: Observer<ExtensionPointUpdate<AttributesT>>) => {\n if (singletonObserver !== undefined) {\n throw new Error('Only one observer is allowed to be registered on this Observable.');\n }\n\n singletonObserver = observer;\n updateSubject.subscribe(observer);\n return {\n unsubscribe: () => {\n updateSubject.unsubscribe(singletonObserver);\n subscription.unsubscribe();\n cleanupCallbackQueue.cleanUp();\n },\n };\n },\n };\n};\n\nconst componentDebugName = 'Schema Validation';\n\nconst gerErrorMessages = (errors: ValidationError[]): string[] => errors.map(({ error }) => error);\nconst getWarningMessages = (errors: ValidationWarning[]): string[] => errors.map(({ warning }) => warning);\n\n/**\n * Validates the attributes against the schema. Returns true if the attributes are valid.\n */\nconst runValidation = (validator: Validator, payload: unknown, extensionPoint: string, extensionKey: string): boolean => {\n if (!validator) {\n throw new Error(`No validator specified to validate extension point \"${extensionPoint}\"`);\n }\n\n const { errors, warnings } = validator(payload);\n\n if (errors.length !== 0) {\n const errorMessages = gerErrorMessages(errors);\n\n onDebug(({ error }) => ({\n level: error,\n message: `Schema validation for extension \"${extensionKey}\" returned errors.`,\n components: componentDebugName,\n meta: {\n location: extensionPoint,\n extension: extensionKey,\n errors: errorMessages,\n },\n }));\n }\n\n if (warnings.length !== 0) {\n const warningMessages = getWarningMessages(warnings);\n\n onDebug(({ warn }) => ({\n level: warn,\n message: `Schema validator for extension \"${extensionKey}\" returned warnings.`,\n components: componentDebugName,\n meta: {\n location: extensionPoint,\n extension: extensionKey,\n warnings: warningMessages,\n },\n }));\n }\n\n return errors.length === 0;\n};\n\n/**\n * Validates the context against the context schema. Returns true if the context is valid.\n */\nconst runContextValidation = (extensionPoint: string, validator: Validator | undefined, context: Context<{}> | null): boolean => {\n // This is a feedback for product developers and should not run in production\n if (process.env.NODE_ENV === 'production') {\n return true;\n }\n\n let errors: ValidationError[] = [];\n let warnings: ValidationWarning[] = [];\n\n if (context) {\n if (!validator) {\n throw new Error(`No context validator specified for extension point \"${extensionPoint}\"`);\n }\n\n ({ errors, warnings } = validator(context));\n\n if (errors.length) {\n const errorMessages = gerErrorMessages(errors);\n\n onDebug(({ error }) => ({\n level: error,\n message: `The context validation for extension-location \"${extensionPoint}\" returned errors.`,\n components: componentDebugName,\n meta: {\n extensionPoint,\n context,\n errors: errorMessages,\n },\n }));\n }\n if (warnings.length) {\n const warningMessages = getWarningMessages(warnings);\n\n onDebug(({ warn }) => ({\n level: warn,\n message: `The context validation for extension-location \"${extensionPoint}\" returned warnings.`,\n components: componentDebugName,\n meta: {\n extensionPoint,\n context,\n warnings: warningMessages,\n },\n }));\n }\n }\n\n return errors.length === 0;\n};\n\ntype DescriptorMap<T extends ExtensionAttributes = ExtensionAttributes> = Map<string, ExtensionDescriptor<T>>;\n\nconst transferDescriptorBetweenMaps = <T extends ExtensionAttributes>(\n descriptor: ExtensionDescriptor<T>,\n addToMap: DescriptorMap<T>,\n removeFromMap: DescriptorMap<T>,\n) => {\n if (removeFromMap.has(descriptor.key)) {\n removeFromMap.delete(descriptor.key);\n }\n addToMap.set(descriptor.key, descriptor);\n};\n\nexport const getValidatedExtensions = <ContextT extends Context<{}> | null, AttributesU extends ExtensionAttributes>(\n extensionPointName: string,\n context: ContextT,\n options: Options,\n): Observable<ExtensionState<AttributesU>> => {\n const { contextValidator, attributeValidator } = options;\n\n const isContextValid = runContextValidation(extensionPointName, contextValidator, context);\n\n if (!isContextValid) {\n throw new Error(`The context provided for extension-location \"${extensionPointName}\" does not match the schema`);\n }\n\n const validatedExtensionsSubject = new ReplaySubject<ExtensionState<AttributesU>>(1);\n let singletonObserver: Observer<ExtensionState<AttributesU>>;\n const supportedDescriptors: DescriptorMap<AttributesU> = new Map<string, ExtensionDescriptor<AttributesU>>();\n const unsupportedDescriptors: DescriptorMap<AttributesU> = new Map<string, ExtensionDescriptor<AttributesU>>();\n\n const subscription = getExtensionPointSubscription<ContextT, AttributesU>(extensionPointName, context).subscribe(\n ({ state, update }) => {\n const { loadingState } = state;\n\n // only reevaluate the updated descriptors\n update.forEach((descriptor) => {\n if (!runValidation(attributeValidator, descriptor.attributes, extensionPointName, descriptor.key)) {\n transferDescriptorBetweenMaps<AttributesU>(descriptor, unsupportedDescriptors, supportedDescriptors);\n } else {\n transferDescriptorBetweenMaps<AttributesU>(descriptor, supportedDescriptors, unsupportedDescriptors);\n }\n });\n\n validatedExtensionsSubject.notify([\n Array.from(supportedDescriptors.values()),\n Array.from(unsupportedDescriptors.values()),\n loadingState,\n ]);\n },\n );\n\n return {\n subscribe: (observer: Observer<ExtensionState<AttributesU>>) => {\n if (singletonObserver !== undefined) {\n throw new Error('Only one observer is allowed to be registered on this Observable.');\n }\n\n singletonObserver = observer;\n validatedExtensionsSubject.subscribe(observer);\n return {\n unsubscribe: () => {\n validatedExtensionsSubject.unsubscribe(singletonObserver);\n subscription.unsubscribe();\n },\n };\n },\n };\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncPanelHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const clientside_extensions_debug_1 = require("@atlassian/clientside-extensions-debug");
|
|
7
7
|
const PanelHandler_1 = require("./PanelHandler");
|
|
8
8
|
const noop = () => { };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncPanelHandler.js","sourceRoot":"","sources":["../../../lib/handlers/AsyncPanelHandler.tsx"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"AsyncPanelHandler.js","sourceRoot":"","sources":["../../../lib/handlers/AsyncPanelHandler.tsx"],"names":[],"mappings":";;;;AACA,uDAAoE;AAEpE,wFAAiE;AAGjE,iDAA8C;AAc9C,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAEtB,MAAM,UAAU,GAAG,KAAK,EACpB,cAA8G,EAC9G,YAAoB,EACpB,QAAgB,EACsC,EAAE;IACxD,IAAI;QACA,MAAM,cAAc,GAAG,MAAM,cAAc,EAAE,CAAC;QAC9C,gDAAgD;QAChD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,IAAI,OAAO,cAAc,CAAC,OAAO,KAAK,UAAU,EAAE;YAC/F,IAAA,qCAAO,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;gBACpB,KAAK,EAAE,KAAK;gBAEZ,OAAO,EAAE,6CAA6C,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, useMemo } from 'react';\nimport type { AsyncPanelExtension } from '@atlassian/clientside-extensions';\nimport { onDebug } from '@atlassian/clientside-extensions-debug';\nimport type { Context } from '@atlassian/clientside-extensions-registry';\nimport type { PanelHandlerProps } from './PanelHandler';\nimport { PanelHandler } from './PanelHandler';\n\nexport type AsyncPanelRenderExtension = () => Promise<{ default: AsyncPanelExtension.AsyncPanelRenderExtension; __esModule: boolean }>;\n\nexport interface AsyncPanelHandlerProps {\n fallback?: JSX.Element | string;\n location: string;\n pluginKey: string;\n extensionKey?: string;\n renderProvider: AsyncPanelRenderExtension;\n contextProvider?: () => Context<{}>;\n RootType?: PanelHandlerProps['RootType'];\n}\n\nconst noop = () => {};\n\nconst loadModule = async (\n moduleProvider: () => Promise<{ default: AsyncPanelExtension.AsyncPanelRenderExtension; __esModule: boolean }>,\n extensionKey: string,\n location: string,\n): Promise<AsyncPanelExtension.AsyncPanelRenderExtension> => {\n try {\n const resolvedModule = await moduleProvider();\n // eslint-disable-next-line no-underscore-dangle\n if (!resolvedModule || !resolvedModule.__esModule || typeof resolvedModule.default !== 'function') {\n onDebug(({ error }) => ({\n level: error,\n\n message: `The provided dynamic import of extension \"${extensionKey}\" at location \"${location}\" does not look like a module that can be asynchronously loaded.`,\n components: ['AsyncPanelHandler'],\n meta: {\n location,\n extension: extensionKey,\n },\n }));\n\n return noop;\n }\n\n return resolvedModule.default;\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n\n message: `Failed trying to execute the dynamic import from extension \"${extensionKey}\" for the async panel at location \"${location}\"`,\n components: ['AsyncPanelHandler'],\n meta: {\n location,\n extension: extensionKey,\n error: e,\n },\n }));\n\n return noop;\n }\n};\n\nexport const AsyncPanelHandler: FunctionComponent<AsyncPanelHandlerProps> = ({\n contextProvider,\n fallback,\n location,\n pluginKey,\n extensionKey = pluginKey,\n renderProvider,\n RootType,\n}) => {\n const rendererRef = useRef<AsyncPanelExtension.AsyncPanelRenderExtension>();\n const [isModuleLoaded, setIsModuleLoaded] = useState(false);\n\n const context = useMemo<Context<{}>>(() => {\n let contextValue: Context<{}> = {};\n\n if (typeof contextProvider === 'function') {\n try {\n contextValue = contextProvider();\n } catch (e) {\n onDebug(({ error }) => ({\n level: error,\n\n message: `Failed to invoke \"contextProvider\" function for extension \"${extensionKey}\" at location \"${location}\".\\nError: ${e}`,\n components: ['AsyncPanelHandler'],\n meta: {\n location,\n extension: extensionKey,\n },\n }));\n }\n }\n\n return contextValue;\n }, [contextProvider, location, extensionKey]);\n\n useEffect(\n function asyncLoadRendererModule() {\n let didCancel = false;\n\n async function loadRendererModule() {\n setIsModuleLoaded(false);\n rendererRef.current = undefined;\n\n const resolvedRenderer = await loadModule(renderProvider, extensionKey, location);\n\n if (didCancel) {\n return;\n }\n\n rendererRef.current = resolvedRenderer;\n setIsModuleLoaded(true);\n }\n\n loadRendererModule();\n\n return () => {\n didCancel = true;\n };\n },\n [renderProvider, extensionKey, location],\n );\n\n if (!isModuleLoaded || !rendererRef.current) {\n return fallback ? <>{fallback}</> : null;\n }\n\n return <PanelHandler render={rendererRef.current} RootType={RootType} context={context} />;\n};\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ButtonHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
6
|
-
const standard_button_1 =
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const standard_button_1 = tslib_1.__importDefault(require("@atlaskit/button/standard-button"));
|
|
7
7
|
const ButtonHandler = ({ appearance, children, disabled, hidden, iconAfter, iconBefore, onAction, spacing, }) => {
|
|
8
8
|
if (hidden) {
|
|
9
9
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"ButtonHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ButtonHandler.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,+FAAsD;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"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinkHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
6
|
-
const standard_button_1 =
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const standard_button_1 = tslib_1.__importDefault(require("@atlaskit/button/standard-button"));
|
|
7
7
|
const LinkHandler = ({ appearance = 'link', children, disabled, hidden, href, iconAfter, iconBefore, onAction, spacing, }) => {
|
|
8
8
|
if (hidden) {
|
|
9
9
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"LinkHandler.js","sourceRoot":"","sources":["../../../lib/handlers/LinkHandler.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,+FAAsD;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"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModalWithActionHandler = exports.ModalHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
6
|
-
const modal_dialog_1 =
|
|
7
|
-
const loading_button_1 =
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const modal_dialog_1 = tslib_1.__importStar(require("@atlaskit/modal-dialog"));
|
|
7
|
+
const loading_button_1 = tslib_1.__importDefault(require("@atlaskit/button/loading-button"));
|
|
8
8
|
const clientside_extensions_1 = require("@atlassian/clientside-extensions");
|
|
9
9
|
const ButtonHandler_1 = require("./ButtonHandler");
|
|
10
10
|
const ModalInnerBody = ({ modalApi }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../lib/handlers/ModalHandler.tsx"],"names":[],"mappings":";;;;AACA,uDAA2F;AAC3F,+EAAuH;AACvH,6FAA4D;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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,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 } 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"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PanelHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const clientside_extensions_1 = require("@atlassian/clientside-extensions");
|
|
7
7
|
const isDiv = (RooType) => RooType === 'div';
|
|
8
8
|
const PanelHandler = ({ render, RootType = 'div', context }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelHandler.js","sourceRoot":"","sources":["../../../lib/handlers/PanelHandler.tsx"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"PanelHandler.js","sourceRoot":"","sources":["../../../lib/handlers/PanelHandler.tsx"],"names":[],"mappings":";;;;AACA,uDAA0D;AAE1D,4EAAkE;AAelE,MAAM,KAAK,GAAG,CAAC,OAAe,EAAoB,EAAE,CAAC,OAAO,KAAK,KAAK,CAAC;AAEhE,MAAM,YAAY,GAAyC,CAAC,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACxG,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAI,sCAAc,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,IAAA,cAAM,EAAmC,IAAI,CAAC,CAAC;IAE3D,IAAA,iBAAS,EACL,SAAS,qCAAqC;QAC1C,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC;QAEzB,IAAI,MAAM,EAAE;YACR,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAC7B;QAED,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,EACD,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAC9B,CAAC;IAEF,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE;QACjB,OAAO,8BAAC,QAAQ,IAAC,GAAG,EAAE,GAAuC,GAAI,CAAC;KACrE;IAED,OAAO,8BAAC,QAAQ,IAAC,GAAG,EAAE,GAAwC,GAAI,CAAC;AACvE,CAAC,CAAC;AA9BW,QAAA,YAAY,gBA8BvB","sourcesContent":["import type { FunctionComponent, MutableRefObject } from 'react';\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport type { Context } from '@atlassian/clientside-extensions-registry';\nimport { PanelExtension } from '@atlassian/clientside-extensions';\n\nexport interface PanelHandlerProps {\n render: PanelExtension.PanelRenderExtension;\n RootType?: 'div' | 'span';\n /*\n Hello dear reader of inline comments. You might rightfully ask: what the hell is \"context\" doing here.\n Well turns out you are not the first.\n The reason is, that async-panel is reusing the panel handler under the hood. And the only way to let the panel have\n access to the context is by passing it through via a \"contextProvider\" (check the AsyncPanelExtension).\n So yeah, that is why we are here. And that is why \"context\" has to stay.\n */\n context?: Context<{}>;\n}\n\nconst isDiv = (RooType: string): RooType is 'div' => RooType === 'div';\n\nexport const PanelHandler: FunctionComponent<PanelHandlerProps> = ({ render, RootType = 'div', context }) => {\n const panelApi = useMemo(() => new PanelExtension.Api(), []);\n const ref = useRef<HTMLDivElement | HTMLSpanElement>(null);\n\n useEffect(\n function callMountAndUnmountLifecycleCallbacks() {\n const node = ref.current;\n\n if (render) {\n render(panelApi, context);\n }\n\n if (node) {\n panelApi.getRenderCallback()(node);\n }\n\n return () => {\n if (node) {\n panelApi.getCleanupCallback()(node);\n }\n };\n },\n [panelApi, render, context],\n );\n\n if (isDiv(RootType)) {\n return <RootType ref={ref as MutableRefObject<HTMLDivElement>} />;\n }\n\n return <RootType ref={ref as MutableRefObject<HTMLSpanElement>} />;\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SectionHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 =
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
// eslint-disable-next-line import/prefer-default-export
|
|
7
7
|
const SectionHandler = ({ children }) => {
|
|
8
8
|
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"SectionHandler.js","sourceRoot":"","sources":["../../../lib/handlers/SectionHandler.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;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"]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -3,23 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useDiscovery = exports.useValidation = exports.useLogging = exports.useDebug = exports.useWebPanelRenderer = exports.getValidatedExtensions = exports.renderElementAsReact = exports.ExtensionPointInfo = exports.ExtensionPoint = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var ExtensionPoint_1 = require("./ExtensionPoint");
|
|
6
|
-
Object.defineProperty(exports, "ExtensionPoint", { enumerable: true, get: function () { return
|
|
6
|
+
Object.defineProperty(exports, "ExtensionPoint", { enumerable: true, get: function () { return tslib_1.__importDefault(ExtensionPoint_1).default; } });
|
|
7
7
|
var ExtensionPointInfo_1 = require("./ExtensionPointInfo");
|
|
8
|
-
Object.defineProperty(exports, "ExtensionPointInfo", { enumerable: true, get: function () { return
|
|
8
|
+
Object.defineProperty(exports, "ExtensionPointInfo", { enumerable: true, get: function () { return tslib_1.__importDefault(ExtensionPointInfo_1).default; } });
|
|
9
9
|
var renderElementAsReact_1 = require("./renderElementAsReact");
|
|
10
|
-
Object.defineProperty(exports, "renderElementAsReact", { enumerable: true, get: function () { return
|
|
10
|
+
Object.defineProperty(exports, "renderElementAsReact", { enumerable: true, get: function () { return tslib_1.__importDefault(renderElementAsReact_1).default; } });
|
|
11
11
|
var ExtensionsObservable_1 = require("./ExtensionsObservable");
|
|
12
12
|
Object.defineProperty(exports, "getValidatedExtensions", { enumerable: true, get: function () { return ExtensionsObservable_1.getValidatedExtensions; } });
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
tslib_1.__exportStar(require("./useExtensions"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./handlers"), exports);
|
|
15
15
|
var useWebPanelRenderer_1 = require("./useWebPanelRenderer");
|
|
16
|
-
Object.defineProperty(exports, "useWebPanelRenderer", { enumerable: true, get: function () { return
|
|
16
|
+
Object.defineProperty(exports, "useWebPanelRenderer", { enumerable: true, get: function () { return tslib_1.__importDefault(useWebPanelRenderer_1).default; } });
|
|
17
17
|
var useDebug_1 = require("./debug/useDebug");
|
|
18
|
-
Object.defineProperty(exports, "useDebug", { enumerable: true, get: function () { return
|
|
18
|
+
Object.defineProperty(exports, "useDebug", { enumerable: true, get: function () { return tslib_1.__importDefault(useDebug_1).default; } });
|
|
19
19
|
var useLogging_1 = require("./debug/useLogging");
|
|
20
|
-
Object.defineProperty(exports, "useLogging", { enumerable: true, get: function () { return
|
|
20
|
+
Object.defineProperty(exports, "useLogging", { enumerable: true, get: function () { return tslib_1.__importDefault(useLogging_1).default; } });
|
|
21
21
|
var useValidation_1 = require("./debug/useValidation");
|
|
22
|
-
Object.defineProperty(exports, "useValidation", { enumerable: true, get: function () { return
|
|
22
|
+
Object.defineProperty(exports, "useValidation", { enumerable: true, get: function () { return tslib_1.__importDefault(useValidation_1).default; } });
|
|
23
23
|
var useDiscovery_1 = require("./debug/useDiscovery");
|
|
24
|
-
Object.defineProperty(exports, "useDiscovery", { enumerable: true, get: function () { return
|
|
24
|
+
Object.defineProperty(exports, "useDiscovery", { enumerable: true, get: function () { return tslib_1.__importDefault(useDiscovery_1).default; } });
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;AAAA,mDAAkF;AAAzE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;AAAA,mDAAkF;AAAzE,yIAAA,OAAO,OAAkB;AAClC,2DAAqE;AAA5D,iJAAA,OAAO,OAAsB;AACtC,+DAAyE;AAAhE,qJAAA,OAAO,OAAwB;AACxC,+DAAgE;AAAvD,8HAAA,sBAAsB,OAAA;AAE/B,0DAAgC;AAChC,qDAA2B;AAE3B,6DAAuE;AAA9D,mJAAA,OAAO,OAAuB;AAIvC,6CAAuD;AAA9C,6HAAA,OAAO,OAAY;AAC5B,iDAA2D;AAAlD,iIAAA,OAAO,OAAc;AAC9B,uDAAiE;AAAxD,uIAAA,OAAO,OAAiB;AACjC,qDAA+D;AAAtD,qIAAA,OAAO,OAAgB","sourcesContent":["export { default as ExtensionPoint, ExtensionPointProps } from './ExtensionPoint';\nexport { default as ExtensionPointInfo } from './ExtensionPointInfo';\nexport { default as renderElementAsReact } from './renderElementAsReact';\nexport { getValidatedExtensions } from './ExtensionsObservable';\n\nexport * from './useExtensions';\nexport * from './handlers';\n\nexport { default as useWebPanelRenderer } from './useWebPanelRenderer';\n\nexport type { Options, ExtensionState } from './types';\n\nexport { default as useDebug } from './debug/useDebug';\nexport { default as useLogging } from './debug/useLogging';\nexport { default as useValidation } from './debug/useValidation';\nexport { default as useDiscovery } from './debug/useDiscovery';\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const react_dom_1 =
|
|
5
|
-
const react_1 =
|
|
4
|
+
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
function renderElementAsReact(renderApi, RenderElement, additionalProps) {
|
|
7
7
|
renderApi
|
|
8
8
|
.onMount((element) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"renderElementAsReact.js","sourceRoot":"","sources":["../../lib/renderElementAsReact.tsx"],"names":[],"mappings":";;;AAAA,kEAAiC;AAEjC,0DAA0B;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"]}
|
package/dist/cjs/styled.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
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
|
-
const styled_1 =
|
|
5
|
+
const styled_1 = tslib_1.__importDefault(require("@emotion/styled"));
|
|
6
6
|
const core_1 = require("@emotion/core");
|
|
7
|
-
const colors =
|
|
7
|
+
const colors = 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 `
|
package/dist/cjs/styled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../lib/styled.ts"],"names":[],"mappings":";;;;AAAA,qEAAqC;AACrC,wCAA0C;AAC1C,uEAAiD;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,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC/D,WAAW,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC7D,qBAAqB,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACvE,eAAe,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACjE,0BAA0B,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;CAC/E,CAAC;AAEF,MAAM,SAAS,GAAG;IACd,YAAY,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC/D,WAAW,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC7D,SAAS,EAAE,IAAA,mBAAM,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;CAChE,CAAC;AAEW,QAAA,KAAK,GAAG,gBAAM,CAAC,KAAK,CAAA;;;CAGhC,CAAC;AAEW,QAAA,OAAO,GAAG,gBAAM,CAAC,EAAE,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/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"]}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useExtensionsLoadingState = exports.useExtensionsUnsupported = exports.useExtensions = exports.useExtensionsAll = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const lodash_isequal_1 =
|
|
6
|
+
const lodash_isequal_1 = tslib_1.__importDefault(require("lodash.isequal"));
|
|
7
7
|
const clientside_extensions_debug_1 = require("@atlassian/clientside-extensions-debug");
|
|
8
8
|
const ExtensionsObservable_1 = require("./ExtensionsObservable");
|
|
9
9
|
const useDeepCompareMemoize = (value) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExtensions.js","sourceRoot":"","sources":["../../lib/useExtensions.ts"],"names":[],"mappings":";;;;AAAA,iCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"useExtensions.js","sourceRoot":"","sources":["../../lib/useExtensions.ts"],"names":[],"mappings":";;;;AAAA,iCAAoD;AACpD,4EAAqC;AAErC,wFAAiE;AACjE,iEAAgE;AAGhE,MAAM,qBAAqB,GAAG,CAAI,KAAQ,EAAK,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAA,cAAM,EAAI,EAAO,CAAC,CAAC;IAE/B,IAAI,CAAC,IAAA,wBAAO,EAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE;QAC9B,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;KACvB;IAED,OAAO,GAAG,CAAC,OAAO,CAAC;AAC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AC;AAChC,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEK,MAAM,wBAAwB,GAAG,CAIpC,IAAY,EACZ,OAAiB,EACjB,OAAgB,EAClB,EAAE;IACA,MAAM,iBAAiB,GAAG,IAAA,wBAAgB,EAAwB,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1F,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC,CAAC;AAVW,QAAA,wBAAwB,4BAUnC;AAEK,MAAM,yBAAyB,GAAG,CAIrC,IAAY,EACZ,OAAiB,EACjB,OAAgB,EAClB,EAAE;IACA,MAAM,iBAAiB,GAAG,IAAA,wBAAgB,EAAwB,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1F,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC,CAAC;AAVW,QAAA,yBAAyB,6BAUpC","sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport isEqual from 'lodash.isequal';\nimport type { ExtensionAttributes, Context } from '@atlassian/clientside-extensions-registry';\nimport { onDebug } from '@atlassian/clientside-extensions-debug';\nimport { getValidatedExtensions } from './ExtensionsObservable';\nimport type { ExtensionState, Options } from './types';\n\nconst useDeepCompareMemoize = <T>(value: T): T => {\n const ref = useRef<T>({} as T);\n\n if (!isEqual(value, ref.current)) {\n ref.current = value;\n }\n\n return ref.current;\n};\n\nexport const useExtensionsAll = <ContextT extends Context<{}> | null = null, AttributesT extends ExtensionAttributes = ExtensionAttributes>(\n extensionPoint: string,\n context: ContextT,\n options: Options,\n): ExtensionState<AttributesT> => {\n const [descriptorsState, setDescriptorsState] = useState<ExtensionState<AttributesT>>([[], [], true]);\n const cachedContext = useDeepCompareMemoize(context);\n const cachedOptions = useDeepCompareMemoize(options);\n\n useEffect(() => {\n const subscription = getValidatedExtensions<ContextT, AttributesT>(extensionPoint, cachedContext, cachedOptions).subscribe(\n (update) => {\n onDebug(({ debug }) => ({\n level: debug,\n message: `useExtensionsAll React hook received a new state`,\n components: 'useExtensionsAll',\n meta: {\n extensionPoint,\n context: cachedContext,\n update,\n },\n }));\n\n setDescriptorsState(update);\n },\n );\n\n return () => subscription.unsubscribe();\n }, [extensionPoint, cachedContext, cachedOptions]);\n\n return descriptorsState;\n};\n\nexport const useExtensions = <ContextT extends Context<{}> | null = null, AttributesT extends ExtensionAttributes = ExtensionAttributes>(\n extensionPoint: string,\n context: ContextT,\n options: Options,\n) => {\n const extensionsPayload = useExtensionsAll<ContextT, AttributesT>(extensionPoint, context, options);\n return extensionsPayload[0];\n};\n\nexport const useExtensionsUnsupported = <\n ContextT extends Context<{}> | null = null,\n AttributesU extends ExtensionAttributes = ExtensionAttributes,\n>(\n name: string,\n context: ContextT,\n options: Options,\n) => {\n const extensionsPayload = useExtensionsAll<ContextT, AttributesU>(name, context, options);\n return extensionsPayload[1];\n};\n\nexport const useExtensionsLoadingState = <\n ContextT extends Context<{}> | null = null,\n AttributesU extends ExtensionAttributes = ExtensionAttributes,\n>(\n name: string,\n context: ContextT,\n options: Options,\n) => {\n const extensionsPayload = useExtensionsAll<ContextT, AttributesU>(name, context, options);\n return extensionsPayload[2];\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/clientside-extensions-components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
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,14 +66,14 @@
|
|
|
66
66
|
"test:watch": "jest --watch"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@atlaskit/button": "17.
|
|
69
|
+
"@atlaskit/button": "17.23.0",
|
|
70
70
|
"@atlaskit/modal-dialog": "12.10.11",
|
|
71
|
-
"@atlaskit/theme": "12.
|
|
72
|
-
"@atlassian/clientside-extensions": "3.1.
|
|
73
|
-
"@atlassian/clientside-extensions-base": "3.1.
|
|
74
|
-
"@atlassian/clientside-extensions-debug": "3.1.
|
|
75
|
-
"@atlassian/clientside-extensions-registry": "3.1.
|
|
76
|
-
"@atlassian/clientside-extensions-schema": "3.1.
|
|
71
|
+
"@atlaskit/theme": "12.12.0",
|
|
72
|
+
"@atlassian/clientside-extensions": "3.1.6",
|
|
73
|
+
"@atlassian/clientside-extensions-base": "3.1.6",
|
|
74
|
+
"@atlassian/clientside-extensions-debug": "3.1.6",
|
|
75
|
+
"@atlassian/clientside-extensions-registry": "3.1.6",
|
|
76
|
+
"@atlassian/clientside-extensions-schema": "3.1.6",
|
|
77
77
|
"@emotion/core": "^10.1.1",
|
|
78
78
|
"@emotion/styled": "^10.0.27",
|
|
79
79
|
"lodash.isequal": "^4.5.0",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
"react-dom": "^16.9"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@testing-library/dom": "8.
|
|
89
|
-
"@testing-library/jest-dom": "5.
|
|
88
|
+
"@testing-library/dom": "8.20.1",
|
|
89
|
+
"@testing-library/jest-dom": "5.17.0",
|
|
90
90
|
"@testing-library/react": "12.1.5",
|
|
91
91
|
"@testing-library/react-hooks": "7.0.2",
|
|
92
|
-
"@types/lodash.isequal": "4.5.
|
|
93
|
-
"@types/react": "16.14.
|
|
94
|
-
"@types/react-scroll": "1.8.
|
|
92
|
+
"@types/lodash.isequal": "4.5.8",
|
|
93
|
+
"@types/react": "16.14.70",
|
|
94
|
+
"@types/react-scroll": "1.8.10",
|
|
95
95
|
"jest": "27.3.1",
|
|
96
96
|
"react": "16.14.0",
|
|
97
97
|
"react-dom": "16.14.0",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"engines": {
|
|
101
101
|
"node": ">=20.16.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "7464f1708f70e66537c5f15b8b9106fc8d60801a"
|
|
104
104
|
}
|