@valiantys/atlassian-app-frontend 2.0.0 → 3.0.0-alpha-1
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/atlassian/forge/shared/frontend-data-access-product-fetch-forge-bridge/src/lib/forge-bridge-product-fetch/index.cjs.js +1 -0
- package/atlassian/forge/shared/frontend-data-access-product-fetch-forge-bridge/src/lib/forge-bridge-product-fetch/index.es.js +28 -0
- package/atlassian/forge/shared/frontend-ui-app-flags/src/lib/app-flags-provider-forge/index.cjs.js +1 -0
- package/atlassian/forge/shared/frontend-ui-app-flags/src/lib/app-flags-provider-forge/index.es.js +31 -0
- package/atlassian/forge/shared/util-product-fetch/src/lib/product-fetch/index.cjs.js +3 -0
- package/atlassian/forge/shared/util-product-fetch/src/lib/product-fetch/index.es.js +38 -0
- package/atlassian/forge/shared/util-resolver/src/lib/common-resolver-paths/index.cjs.js +1 -0
- package/atlassian/forge/shared/util-resolver/src/lib/common-resolver-paths/index.es.js +7 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/assets-objects-service/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/assets-objects-service/index.es.js +274 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/global-icons/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/global-icons/index.es.js +9 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object/index.es.js +52 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-linked-issues/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-linked-issues/index.es.js +9 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-schema/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-schema/index.es.js +22 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-type/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-type/index.es.js +23 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-type-attribute/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-assets/src/lib/object-type-attribute/index.es.js +19 -0
- package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-issue/src/lib/jira-issue-service/index.es.js +63 -0
- package/atlassian/jira/shared/data-access-jql/src/lib/jql-precomputation-service/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-jql/src/lib/jql-precomputation-service/index.es.js +34 -0
- package/atlassian/jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.cjs.js +1 -0
- package/atlassian/jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.es.js +50 -0
- package/atlassian/jira/shared/util-assets/src/lib/asset-type/index.cjs.js +1 -0
- package/atlassian/jira/shared/util-assets/src/lib/asset-type/index.es.js +4 -0
- package/atlassian/jira/shared/util-assets/src/lib/object/index.cjs.js +1 -0
- package/atlassian/jira/shared/util-assets/src/lib/object/index.es.js +9 -0
- package/atlassian/jira/shared/util-assets/src/lib/object-type-attribute/index.cjs.js +1 -0
- package/atlassian/jira/shared/util-assets/src/lib/object-type-attribute/index.es.js +14 -0
- package/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.cjs.js +1 -0
- package/atlassian/jira/shared/util-jira-v3-api/src/lib/issue/index.es.js +4 -0
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.cjs.js +1 -0
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/atlassian-oauth-fetch/index.es.js +81 -0
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.cjs.js +1 -0
- package/atlassian/shared/data-access-atlassian-product-fetch-oauth/src/lib/route/index.es.js +45 -0
- package/atlassian/shared/data-access-resources/src/lib/atlassian-user-resource-service/index.cjs.js +1 -0
- package/atlassian/shared/data-access-resources/src/lib/atlassian-user-resource-service/index.es.js +44 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/atlassian-app/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/atlassian-app/index.es.js +41 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/custom-ui/atlassian-app-forge/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/custom-ui/atlassian-app-forge/index.es.js +58 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/standalone/atlassian-app-standalone/index.es.js +158 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/test/atlassian-app-test/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/test/atlassian-app-test/index.es.js +66 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/ui-kit/atlassian-app-forge-ui-kit/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-atlassian-app/src/lib/ui-kit/atlassian-app-forge-ui-kit/index.es.js +19 -0
- package/atlassian/shared/frontend-feature-chosen-resource-check/src/index/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-chosen-resource-check/src/index/index.es.js +5 -0
- package/atlassian/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.es.js +70 -0
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.es.js +84 -0
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/jira-workspace-provider/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/jira-workspace-provider/index.es.js +13 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/feature-oauth/index.es.js +74 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-callback/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-callback/index.es.js +28 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-redirect-login/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/ui-oauth-redirect-login/index.es.js +9 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/util/index.cjs.js +1 -0
- package/atlassian/shared/frontend-feature-oauth-login/src/lib/util/index.es.js +19 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch/index.es.js +9 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch-methods/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-dispatch-methods/index.es.js +35 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-provider-atlaskit/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-app-flags/src/lib/app-flags-provider-atlaskit/index.es.js +106 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.es.js +20 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.es.js +20 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.es.js +18 -0
- package/atlassian/shared/frontend-ui-backend-adapter/src/lib/backend-adapter/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-backend-adapter/src/lib/backend-adapter/index.es.js +28 -0
- package/atlassian/shared/frontend-ui-backend-adapter/src/lib/oauth-fetch-invoke/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-backend-adapter/src/lib/oauth-fetch-invoke/index.es.js +16 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel/index.es.js +26 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel-stateless/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/panel-stateless/index.es.js +41 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.cjs.js +45 -0
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.es.js +53 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router/index.es.js +14 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-link/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-link/index.es.js +31 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-provider/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-host-router/src/lib/host-router-provider/index.es.js +18 -0
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.es.js +41 -0
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper.module.scss/index.es.js +6 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-content/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-content/index.es.js +34 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-content-iframe/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-content-iframe/index.es.js +48 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-dialog-layout/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-dialog-layout/index.es.js +24 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-service/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-service/index.es.js +38 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-service-provider/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-service-provider/index.es.js +20 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-view-context/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-modal/src/lib/modal-view-context/index.es.js +14 -0
- package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js +19 -0
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/oauth-fetch-invoke-remote/index.es.js +20 -0
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/remote-adapter/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-remote-adapter/src/lib/remote-adapter/index.es.js +28 -0
- package/atlassian/shared/frontend-ui-view-context/src/lib/mock-view-context/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-view-context/src/lib/mock-view-context/index.es.js +27 -0
- package/atlassian/shared/frontend-ui-view-context/src/lib/view-context-provider/index.cjs.js +1 -0
- package/atlassian/shared/frontend-ui-view-context/src/lib/view-context-provider/index.es.js +18 -0
- package/atlassian/shared/util-error/src/index/index.cjs.js +1 -0
- package/atlassian/shared/util-error/src/index/index.es.js +8 -0
- package/atlassian-app/atlassian-app-frontend-atlassian-app.api.json +636 -0
- package/atlassian-app/atlassian-app-frontend.api.md +56 -0
- package/atlassian-app/index.cjs.js +1 -0
- package/atlassian-app/index.d.ts +114 -0
- package/atlassian-app/index.es.js +5 -0
- package/atlassian-app/tsdoc-metadata.json +11 -0
- package/atlassian-app-custom-ui/atlassian-app-frontend-atlassian-app-custom-ui.api.json +242 -0
- package/atlassian-app-custom-ui/atlassian-app-frontend.api.md +17 -0
- package/atlassian-app-custom-ui/index.cjs.js +1 -0
- package/atlassian-app-custom-ui/index.d.ts +26 -0
- package/atlassian-app-custom-ui/index.es.js +4 -0
- package/{tsdoc-metadata.json → atlassian-app-custom-ui/tsdoc-metadata.json} +1 -1
- package/atlassian-app-frontend.css +1 -0
- package/atlassian-app-standalone/atlassian-app-frontend-atlassian-app-standalone.api.json +527 -0
- package/atlassian-app-standalone/atlassian-app-frontend.api.md +44 -0
- package/atlassian-app-standalone/index.cjs.js +1 -0
- package/atlassian-app-standalone/index.d.ts +43 -0
- package/atlassian-app-standalone/index.es.js +4 -0
- package/atlassian-app-standalone/tsdoc-metadata.json +11 -0
- package/atlassian-app-test/atlassian-app-frontend-atlassian-app-test.api.json +514 -0
- package/atlassian-app-test/atlassian-app-frontend.api.md +45 -0
- package/atlassian-app-test/index.cjs.js +1 -0
- package/atlassian-app-test/index.d.ts +73 -0
- package/atlassian-app-test/index.es.js +5 -0
- package/atlassian-app-test/tsdoc-metadata.json +11 -0
- package/atlassian-app-ui-kit/atlassian-app-frontend-atlassian-app-ui-kit.api.json +229 -0
- package/atlassian-app-ui-kit/atlassian-app-frontend.api.md +15 -0
- package/atlassian-app-ui-kit/index.cjs.js +1 -0
- package/atlassian-app-ui-kit/index.d.ts +6 -0
- package/atlassian-app-ui-kit/index.es.js +4 -0
- package/atlassian-app-ui-kit/tsdoc-metadata.json +11 -0
- package/data-access-assets/atlassian-app-frontend-data-access-assets.api.json +2441 -0
- package/data-access-assets/atlassian-app-frontend.api.md +109 -0
- package/data-access-assets/index.cjs.js +1 -0
- package/data-access-assets/index.d.ts +316 -0
- package/data-access-assets/index.es.js +23 -0
- package/data-access-assets/tsdoc-metadata.json +11 -0
- package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend-data-access-atlassian-product-fetch-oauth.api.json +1087 -0
- package/data-access-atlassian-product-fetch-oauth/atlassian-app-frontend.api.md +73 -0
- package/data-access-atlassian-product-fetch-oauth/index.cjs.js +1 -0
- package/data-access-atlassian-product-fetch-oauth/index.d.ts +67 -0
- package/data-access-atlassian-product-fetch-oauth/index.es.js +11 -0
- package/data-access-atlassian-product-fetch-oauth/tsdoc-metadata.json +11 -0
- package/data-access-issue/atlassian-app-frontend-data-access-issue.api.json +900 -0
- package/data-access-issue/atlassian-app-frontend.api.md +40 -0
- package/data-access-issue/index.cjs.js +1 -0
- package/data-access-issue/index.d.ts +228 -0
- package/data-access-issue/index.es.js +4 -0
- package/data-access-issue/tsdoc-metadata.json +11 -0
- package/data-access-jql/atlassian-app-frontend-data-access-jql.api.json +388 -0
- package/data-access-jql/atlassian-app-frontend.api.md +25 -0
- package/data-access-jql/index.cjs.js +1 -0
- package/data-access-jql/index.d.ts +62 -0
- package/data-access-jql/index.es.js +4 -0
- package/data-access-jql/tsdoc-metadata.json +11 -0
- package/data-access-resources/atlassian-app-frontend-data-access-resources.api.json +515 -0
- package/data-access-resources/atlassian-app-frontend.api.md +45 -0
- package/data-access-resources/index.cjs.js +1 -0
- package/data-access-resources/index.d.ts +27 -0
- package/data-access-resources/index.es.js +4 -0
- package/data-access-resources/tsdoc-metadata.json +11 -0
- package/data-access-workspaces/atlassian-app-frontend-data-access-workspaces.api.json +406 -0
- package/data-access-workspaces/atlassian-app-frontend.api.md +32 -0
- package/data-access-workspaces/index.cjs.js +1 -0
- package/data-access-workspaces/index.d.ts +50 -0
- package/data-access-workspaces/index.es.js +4 -0
- package/data-access-workspaces/tsdoc-metadata.json +11 -0
- package/package.json +159 -21
- package/shared/frontend-ui-drop-target/src/lib/drop-target-box/index.cjs.js +1 -0
- package/shared/frontend-ui-drop-target/src/lib/drop-target-box/index.es.js +22 -0
- package/shared/frontend-ui-drop-target/src/lib/drop-target-box.module.scss/index.cjs.js +1 -0
- package/shared/frontend-ui-drop-target/src/lib/drop-target-box.module.scss/index.es.js +6 -0
- package/shared/frontend-ui-drop-target/src/lib/drop-utils/index.cjs.js +1 -0
- package/shared/frontend-ui-drop-target/src/lib/drop-utils/index.es.js +18 -0
- package/shared/frontend-ui-load-data-hook/src/lib/load-data-hook/index.cjs.js +1 -0
- package/shared/frontend-ui-load-data-hook/src/lib/load-data-hook/index.es.js +31 -0
- package/shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.cjs.js +1 -0
- package/shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.es.js +9 -0
- package/shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js +2 -0
- package/shared/util-fetch/src/lib/shared-util-fetch/index.es.js +57 -0
- package/ui-app-flags/atlassian-app-frontend-ui-app-flags.api.json +587 -0
- package/ui-app-flags/atlassian-app-frontend.api.md +57 -0
- package/ui-app-flags/index.cjs.js +1 -0
- package/ui-app-flags/index.d.ts +37 -0
- package/ui-app-flags/index.es.js +9 -0
- package/ui-app-flags/tsdoc-metadata.json +11 -0
- package/ui-atlassian-product-fetch/atlassian-app-frontend-ui-atlassian-product-fetch.api.json +418 -0
- package/ui-atlassian-product-fetch/atlassian-app-frontend.api.md +38 -0
- package/ui-atlassian-product-fetch/index.cjs.js +1 -0
- package/ui-atlassian-product-fetch/index.d.ts +60 -0
- package/ui-atlassian-product-fetch/index.es.js +11 -0
- package/ui-atlassian-product-fetch/tsdoc-metadata.json +11 -0
- package/ui-backend-adapter/atlassian-app-frontend-ui-backend-adapter.api.json +402 -0
- package/ui-backend-adapter/atlassian-app-frontend.api.md +34 -0
- package/ui-backend-adapter/index.cjs.js +1 -0
- package/ui-backend-adapter/index.d.ts +26 -0
- package/ui-backend-adapter/index.es.js +7 -0
- package/ui-backend-adapter/tsdoc-metadata.json +11 -0
- package/ui-chosen-resource-check/atlassian-app-frontend-ui-chosen-resource-check.api.json +388 -0
- package/ui-chosen-resource-check/atlassian-app-frontend.api.md +35 -0
- package/ui-chosen-resource-check/index.cjs.js +1 -0
- package/ui-chosen-resource-check/index.d.ts +20 -0
- package/ui-chosen-resource-check/index.es.js +4 -0
- package/ui-chosen-resource-check/tsdoc-metadata.json +11 -0
- package/ui-chosen-workspace-check/atlassian-app-frontend-ui-chosen-workspace-check.api.json +362 -0
- package/ui-chosen-workspace-check/atlassian-app-frontend.api.md +30 -0
- package/ui-chosen-workspace-check/index.cjs.js +1 -0
- package/ui-chosen-workspace-check/index.d.ts +17 -0
- package/ui-chosen-workspace-check/index.es.js +7 -0
- package/ui-chosen-workspace-check/tsdoc-metadata.json +11 -0
- package/ui-drop-target/atlassian-app-frontend-ui-drop-target.api.json +586 -0
- package/ui-drop-target/atlassian-app-frontend.api.md +47 -0
- package/ui-drop-target/index.cjs.js +1 -0
- package/ui-drop-target/index.d.ts +31 -0
- package/ui-drop-target/index.es.js +6 -0
- package/ui-drop-target/tsdoc-metadata.json +11 -0
- package/ui-expand-panel/atlassian-app-frontend-ui-expand-panel.api.json +252 -0
- package/ui-expand-panel/atlassian-app-frontend.api.md +23 -0
- package/ui-expand-panel/index.cjs.js +1 -0
- package/ui-expand-panel/index.d.ts +30 -0
- package/ui-expand-panel/index.es.js +6 -0
- package/ui-expand-panel/tsdoc-metadata.json +11 -0
- package/ui-host-router/atlassian-app-frontend-ui-host-router.api.json +813 -0
- package/ui-host-router/atlassian-app-frontend.api.md +60 -0
- package/ui-host-router/index.cjs.js +1 -0
- package/ui-host-router/index.d.ts +39 -0
- package/ui-host-router/index.es.js +9 -0
- package/ui-host-router/tsdoc-metadata.json +11 -0
- package/ui-load-data-hook/atlassian-app-frontend-ui-load-data-hook.api.json +329 -0
- package/ui-load-data-hook/atlassian-app-frontend.api.md +25 -0
- package/ui-load-data-hook/index.cjs.js +1 -0
- package/ui-load-data-hook/index.d.ts +38 -0
- package/ui-load-data-hook/index.es.js +4 -0
- package/ui-load-data-hook/tsdoc-metadata.json +11 -0
- package/ui-modal/atlassian-app-frontend-ui-modal.api.json +1377 -0
- package/ui-modal/atlassian-app-frontend.api.md +109 -0
- package/ui-modal/index.cjs.js +1 -0
- package/ui-modal/index.d.ts +121 -0
- package/ui-modal/index.es.js +16 -0
- package/ui-modal/tsdoc-metadata.json +11 -0
- package/ui-oauth-login/atlassian-app-frontend-ui-oauth-login.api.json +469 -0
- package/ui-oauth-login/atlassian-app-frontend.api.md +38 -0
- package/ui-oauth-login/index.cjs.js +1 -0
- package/ui-oauth-login/index.d.ts +24 -0
- package/ui-oauth-login/index.es.js +5 -0
- package/ui-oauth-login/tsdoc-metadata.json +11 -0
- package/ui-page-loading-view/atlassian-app-frontend-ui-page-loading-view.api.json +237 -0
- package/ui-page-loading-view/atlassian-app-frontend.api.md +19 -0
- package/ui-page-loading-view/index.cjs.js +1 -0
- package/ui-page-loading-view/index.d.ts +10 -0
- package/ui-page-loading-view/index.es.js +4 -0
- package/ui-page-loading-view/tsdoc-metadata.json +11 -0
- package/ui-remote-adapter/atlassian-app-frontend-ui-remote-adapter.api.json +486 -0
- package/ui-remote-adapter/atlassian-app-frontend.api.md +43 -0
- package/ui-remote-adapter/index.cjs.js +1 -0
- package/ui-remote-adapter/index.d.ts +32 -0
- package/ui-remote-adapter/index.es.js +7 -0
- package/ui-remote-adapter/tsdoc-metadata.json +11 -0
- package/ui-view-context/atlassian-app-frontend-ui-view-context.api.json +992 -0
- package/ui-view-context/atlassian-app-frontend.api.md +78 -0
- package/ui-view-context/index.cjs.js +1 -0
- package/ui-view-context/index.d.ts +62 -0
- package/ui-view-context/index.es.js +7 -0
- package/ui-view-context/tsdoc-metadata.json +11 -0
- package/util-assets/atlassian-app-frontend-util-assets.api.json +4726 -0
- package/util-assets/atlassian-app-frontend.api.md +418 -0
- package/util-assets/index.cjs.js +1 -0
- package/util-assets/index.d.ts +245 -0
- package/util-assets/index.es.js +9 -0
- package/util-assets/tsdoc-metadata.json +11 -0
- package/util-atlassian-product-fetch/atlassian-app-frontend-util-atlassian-product-fetch.api.json +1460 -0
- package/util-atlassian-product-fetch/atlassian-app-frontend.api.md +90 -0
- package/util-atlassian-product-fetch/index.cjs.js +1 -0
- package/util-atlassian-product-fetch/index.d.ts +53 -0
- package/util-atlassian-product-fetch/index.es.js +8 -0
- package/util-atlassian-product-fetch/tsdoc-metadata.json +11 -0
- package/util-jira-v3-api/atlassian-app-frontend-util-jira-v3-api.api.json +3664 -0
- package/util-jira-v3-api/atlassian-app-frontend.api.md +408 -0
- package/util-jira-v3-api/index.cjs.js +1 -0
- package/util-jira-v3-api/index.d.ts +271 -0
- package/util-jira-v3-api/index.es.js +4 -0
- package/util-jira-v3-api/tsdoc-metadata.json +11 -0
- package/util-resolver/atlassian-app-frontend-util-resolver.api.json +1014 -0
- package/util-resolver/atlassian-app-frontend.api.md +90 -0
- package/util-resolver/index.cjs.js +1 -0
- package/util-resolver/index.d.ts +67 -0
- package/util-resolver/index.es.js +4 -0
- package/util-resolver/tsdoc-metadata.json +11 -0
- package/atlassian-app-forge-BwFXF-6M.js +0 -3
- package/atlassian-app-forge-DG01gNAI.mjs +0 -139
- package/atlassian-app-frontend.api.json +0 -9609
- package/atlassian-app-frontend.api.md +0 -797
- package/index-BePJjrLy.js +0 -1
- package/index-ZJX0bAUh.mjs +0 -23
- package/index.d.ts +0 -702
- package/index.js +0 -2
- package/index.mjs +0 -1303
- package/style.css +0 -1
- package/valiantys-atlassian-app-frontend-2.0.0.tgz +0 -0
package/index.mjs
DELETED
|
@@ -1,1303 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { ButtonGroup as Z } from "@atlaskit/button";
|
|
3
|
-
import L, { IconButton as Be } from "@atlaskit/button/new";
|
|
4
|
-
import ee, { FormHeader as te, FormSection as re, Field as ne, FormFooter as oe } from "@atlaskit/form";
|
|
5
|
-
import { Flex as x, xcss as I, Box as S } from "@atlaskit/primitives";
|
|
6
|
-
import j from "@atlaskit/section-message";
|
|
7
|
-
import se from "@atlaskit/select";
|
|
8
|
-
import { createContext as v, useContext as g, useState as f, useCallback as w, useEffect as A, useReducer as Fe, useRef as F, lazy as D } from "react";
|
|
9
|
-
import H from "@atlaskit/heading";
|
|
10
|
-
import Te from "@atlaskit/spinner";
|
|
11
|
-
import qe from "@atlaskit/app-provider";
|
|
12
|
-
import { BrowserRouter as Le, Routes as je, Route as T, Navigate as De } from "react-router-dom";
|
|
13
|
-
import He, { FlagGroup as Me, AutoDismissFlag as _e } from "@atlaskit/flag";
|
|
14
|
-
import Je from "@atlaskit/icon/glyph/check-circle";
|
|
15
|
-
import ze from "@atlaskit/icon/glyph/error";
|
|
16
|
-
import Ne from "@atlaskit/icon/glyph/info";
|
|
17
|
-
import Ge from "@atlaskit/icon/glyph/warning";
|
|
18
|
-
import { token as P } from "@atlaskit/tokens";
|
|
19
|
-
const z = class z {
|
|
20
|
-
};
|
|
21
|
-
z.getOauthToken = "get-token";
|
|
22
|
-
let G = z;
|
|
23
|
-
class Ve {
|
|
24
|
-
constructor(t) {
|
|
25
|
-
this.message = t;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function M(e, t) {
|
|
29
|
-
const r = {
|
|
30
|
-
Authorization: e.startsWith("Bearer ") ? e : `Bearer ${e}`
|
|
31
|
-
};
|
|
32
|
-
return t ? { ...t, ...r } : r;
|
|
33
|
-
}
|
|
34
|
-
async function Ke(e, t, r) {
|
|
35
|
-
const c = M(
|
|
36
|
-
e,
|
|
37
|
-
r.headers || {}
|
|
38
|
-
);
|
|
39
|
-
return fetch(t, { ...r, headers: c });
|
|
40
|
-
}
|
|
41
|
-
async function $(e, t, r, c, o = "json", s = {}) {
|
|
42
|
-
return ce(
|
|
43
|
-
t,
|
|
44
|
-
r,
|
|
45
|
-
M(e, s),
|
|
46
|
-
c,
|
|
47
|
-
o
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
async function ce(e, t, r, c, o = "json") {
|
|
51
|
-
const s = {
|
|
52
|
-
...r || {},
|
|
53
|
-
Accept: o === "json" ? "application/json" : "text/html",
|
|
54
|
-
"Content-Type": o === "json" ? "application/json" : "text/html"
|
|
55
|
-
}, i = c ? JSON.stringify(c) : void 0, a = await fetch(e, {
|
|
56
|
-
method: t,
|
|
57
|
-
headers: s,
|
|
58
|
-
body: i
|
|
59
|
-
});
|
|
60
|
-
if (a.ok)
|
|
61
|
-
return t === "DELETE" || a.status === 204 ? void 0 : o === "text" ? await a.text() : await a.json();
|
|
62
|
-
{
|
|
63
|
-
let l = "";
|
|
64
|
-
try {
|
|
65
|
-
l = await a.text();
|
|
66
|
-
} catch {
|
|
67
|
-
}
|
|
68
|
-
const h = `${a.status} ${a.statusText} - ${t} ${e}
|
|
69
|
-
${l}`;
|
|
70
|
-
throw console.error(h), new Ve(h);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
class ie {
|
|
74
|
-
constructor(t) {
|
|
75
|
-
this.value_ = t;
|
|
76
|
-
}
|
|
77
|
-
set value(t) {
|
|
78
|
-
throw new Error("modification of a Route is not allowed");
|
|
79
|
-
}
|
|
80
|
-
get value() {
|
|
81
|
-
return this.value_;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function V(e) {
|
|
85
|
-
return e instanceof ie;
|
|
86
|
-
}
|
|
87
|
-
const Xe = ["..", ".%2e", "%2e.", "%2e%2e", ".%2E", "%2E.", "%2E%2e"], Ye = ["/", "\\"], ae = ["?", "#"];
|
|
88
|
-
function U(e, t) {
|
|
89
|
-
return e.some((r) => t.includes(r));
|
|
90
|
-
}
|
|
91
|
-
function Qe(e, t) {
|
|
92
|
-
switch (t) {
|
|
93
|
-
case "path":
|
|
94
|
-
if (V(e))
|
|
95
|
-
return e.value;
|
|
96
|
-
if (e = String(e), U(Xe, e) || U(ae, e) || U(Ye, e))
|
|
97
|
-
throw new Error(
|
|
98
|
-
"Disallowing path manipulation attempt. For more information see: https://go.atlassian.com/product-fetch-api-route"
|
|
99
|
-
);
|
|
100
|
-
return e;
|
|
101
|
-
case "query":
|
|
102
|
-
return V(e) ? encodeURIComponent(e.value) : e instanceof URLSearchParams ? e.toString() : encodeURIComponent(e);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function Ze(e, ...t) {
|
|
106
|
-
let r = "path", c = "";
|
|
107
|
-
for (let o = 0; o < e.length; o++) {
|
|
108
|
-
const s = e[o];
|
|
109
|
-
if (U(ae, s) && (r = "query"), c += s, o >= t.length)
|
|
110
|
-
break;
|
|
111
|
-
c += Qe(t[o], r);
|
|
112
|
-
}
|
|
113
|
-
return new ie(c);
|
|
114
|
-
}
|
|
115
|
-
function q(e, t) {
|
|
116
|
-
if (t) {
|
|
117
|
-
const r = e.startsWith("/") ? e.slice(1) : e;
|
|
118
|
-
return `${t}/${r}`;
|
|
119
|
-
} else
|
|
120
|
-
return e;
|
|
121
|
-
}
|
|
122
|
-
function _(e, t, r) {
|
|
123
|
-
return {
|
|
124
|
-
productType: r,
|
|
125
|
-
fetch: ({ url: c, method: o, responseType: s = "json", allowExperimental: i = !1 }, u) => $(
|
|
126
|
-
e,
|
|
127
|
-
q(c.value, t),
|
|
128
|
-
o,
|
|
129
|
-
u,
|
|
130
|
-
s,
|
|
131
|
-
{
|
|
132
|
-
"X-ExperimentalApi": i ? "opt-in" : ""
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
route: Ze,
|
|
136
|
-
rawFetch: (c, o) => Ke(
|
|
137
|
-
e,
|
|
138
|
-
q(c.value, t),
|
|
139
|
-
o
|
|
140
|
-
),
|
|
141
|
-
fullUrl: (c) => q(c, t)
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function et(e, t) {
|
|
145
|
-
return _(
|
|
146
|
-
e,
|
|
147
|
-
`https://api.atlassian.com/ex/jira/${t}`,
|
|
148
|
-
"jira"
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
function tt(e, t) {
|
|
152
|
-
return _(
|
|
153
|
-
e,
|
|
154
|
-
`https://api.atlassian.com/ex/confluence/${t}`,
|
|
155
|
-
"confluence"
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
function rt(e) {
|
|
159
|
-
return _(
|
|
160
|
-
e,
|
|
161
|
-
"https://api.bitbucket.org",
|
|
162
|
-
"bitbucket"
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
async function Qt(e) {
|
|
166
|
-
return $(
|
|
167
|
-
e,
|
|
168
|
-
"https://api.atlassian.com/me",
|
|
169
|
-
"GET"
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
async function Zt(e, t, r, c, o) {
|
|
173
|
-
return ce(
|
|
174
|
-
"https://auth.atlassian.com/oauth/token",
|
|
175
|
-
"POST",
|
|
176
|
-
void 0,
|
|
177
|
-
{
|
|
178
|
-
grant_type: e,
|
|
179
|
-
client_id: t,
|
|
180
|
-
client_secret: r,
|
|
181
|
-
code: c,
|
|
182
|
-
redirect_uri: o
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
class ue extends Error {
|
|
187
|
-
constructor(t) {
|
|
188
|
-
super(t);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
class nt {
|
|
192
|
-
constructor() {
|
|
193
|
-
this.userResourcesUrl = "https://api.atlassian.com/oauth/token/accessible-resources";
|
|
194
|
-
}
|
|
195
|
-
async getAtlassianUserResources(t) {
|
|
196
|
-
return await $(
|
|
197
|
-
t,
|
|
198
|
-
this.userResourcesUrl,
|
|
199
|
-
"GET"
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
async checkUserChosenResource(t, r) {
|
|
203
|
-
const o = (await this.getAtlassianUserResources(t)).filter(
|
|
204
|
-
(s, i, u) => u.findIndex((a) => a.id === s.id) === i
|
|
205
|
-
).map((s) => ({
|
|
206
|
-
name: s.name,
|
|
207
|
-
id: s.id
|
|
208
|
-
}));
|
|
209
|
-
if (o.length > 1) {
|
|
210
|
-
if (r) {
|
|
211
|
-
const s = o.find(
|
|
212
|
-
(i) => i.id === r
|
|
213
|
-
);
|
|
214
|
-
if (s)
|
|
215
|
-
return { hasChosen: !0, resource: s };
|
|
216
|
-
}
|
|
217
|
-
return {
|
|
218
|
-
hasChosen: !1,
|
|
219
|
-
resources: o
|
|
220
|
-
};
|
|
221
|
-
} else {
|
|
222
|
-
if (o.length === 1)
|
|
223
|
-
return { hasChosen: !0, resource: o[0] };
|
|
224
|
-
throw new ue(
|
|
225
|
-
"Provided token does not have permissions for any resources"
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
class ot {
|
|
231
|
-
constructor(t) {
|
|
232
|
-
this.fetchSvc = t, this.workspaceApiUrl = "/rest/servicedeskapi/assets/workspace";
|
|
233
|
-
}
|
|
234
|
-
async getAllUserWorkspaces() {
|
|
235
|
-
const t = [];
|
|
236
|
-
let r = !0;
|
|
237
|
-
const c = 50;
|
|
238
|
-
let o = 0;
|
|
239
|
-
for (; r; ) {
|
|
240
|
-
const s = await this.fetchSvc.fetch(
|
|
241
|
-
{
|
|
242
|
-
url: this.fetchSvc.route`/rest/servicedeskapi/assets/workspace?start=${o}&limit=${c}`,
|
|
243
|
-
method: "GET"
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
t.push(...s.values), o += c, s.isLastPage && (r = !1);
|
|
247
|
-
}
|
|
248
|
-
return t;
|
|
249
|
-
}
|
|
250
|
-
async checkUserChosenWorkspace(t) {
|
|
251
|
-
const r = await this.getAllUserWorkspaces();
|
|
252
|
-
if (r.length > 1) {
|
|
253
|
-
if (t) {
|
|
254
|
-
const c = r.find(
|
|
255
|
-
(o) => o.workspaceId === t
|
|
256
|
-
);
|
|
257
|
-
if (c)
|
|
258
|
-
return {
|
|
259
|
-
hasChosen: !0,
|
|
260
|
-
workspace: c.workspaceId
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
return {
|
|
264
|
-
hasChosen: !1,
|
|
265
|
-
workspaces: r
|
|
266
|
-
};
|
|
267
|
-
} else {
|
|
268
|
-
if (r.length === 1)
|
|
269
|
-
return { hasChosen: !0, workspace: r[0].workspaceId };
|
|
270
|
-
throw new ue(
|
|
271
|
-
"Provided token does not have permissions for any workspaces"
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
const le = v(null), er = () => {
|
|
277
|
-
const e = g(le);
|
|
278
|
-
if (!e)
|
|
279
|
-
throw new Error(
|
|
280
|
-
"useRequestBitbucket must be used within a RequestBitbucketProvider"
|
|
281
|
-
);
|
|
282
|
-
return e;
|
|
283
|
-
};
|
|
284
|
-
function de({
|
|
285
|
-
children: e,
|
|
286
|
-
requestBitbucketImplementation: t
|
|
287
|
-
}) {
|
|
288
|
-
return /* @__PURE__ */ n(le.Provider, { value: t, children: e });
|
|
289
|
-
}
|
|
290
|
-
const he = v(null), tr = () => {
|
|
291
|
-
const e = g(he);
|
|
292
|
-
if (!e)
|
|
293
|
-
throw new Error(
|
|
294
|
-
"useRequestConfluence must be used within a RequestConfluenceProvider"
|
|
295
|
-
);
|
|
296
|
-
return e;
|
|
297
|
-
};
|
|
298
|
-
function pe({
|
|
299
|
-
children: e,
|
|
300
|
-
requestConfluenceImplementation: t
|
|
301
|
-
}) {
|
|
302
|
-
return /* @__PURE__ */ n(he.Provider, { value: t, children: e });
|
|
303
|
-
}
|
|
304
|
-
const fe = v(null), st = () => {
|
|
305
|
-
const e = g(fe);
|
|
306
|
-
if (!e)
|
|
307
|
-
throw new Error("useRequestJira must be used within a RequestJiraProvider");
|
|
308
|
-
return e;
|
|
309
|
-
};
|
|
310
|
-
function me({
|
|
311
|
-
children: e,
|
|
312
|
-
requestJiraImplementation: t
|
|
313
|
-
}) {
|
|
314
|
-
return /* @__PURE__ */ n(fe.Provider, { value: t, children: e });
|
|
315
|
-
}
|
|
316
|
-
function O({
|
|
317
|
-
label: e,
|
|
318
|
-
loadingError: t,
|
|
319
|
-
labelSize: r
|
|
320
|
-
}) {
|
|
321
|
-
return /* @__PURE__ */ y(x, { direction: "column", children: [
|
|
322
|
-
/* @__PURE__ */ n(H, { size: r || "large", children: e }),
|
|
323
|
-
t ? /* @__PURE__ */ n(j, { appearance: "error", children: t }) : /* @__PURE__ */ n(Te, { interactionName: "load" })
|
|
324
|
-
] });
|
|
325
|
-
}
|
|
326
|
-
const we = v(void 0), rr = () => g(we);
|
|
327
|
-
function ve({
|
|
328
|
-
children: e,
|
|
329
|
-
workspaceId: t
|
|
330
|
-
}) {
|
|
331
|
-
return /* @__PURE__ */ n(we.Provider, { value: t, children: e });
|
|
332
|
-
}
|
|
333
|
-
const K = I({
|
|
334
|
-
maxWidth: "max-content",
|
|
335
|
-
paddingBlockStart: "space.1000"
|
|
336
|
-
});
|
|
337
|
-
function ct({
|
|
338
|
-
appName: e,
|
|
339
|
-
children: t
|
|
340
|
-
}) {
|
|
341
|
-
const [r, c] = f(!1), [o, s] = f(
|
|
342
|
-
null
|
|
343
|
-
), [i, u] = f(""), [a, l] = f(), h = st(), d = w(
|
|
344
|
-
async (p) => {
|
|
345
|
-
try {
|
|
346
|
-
u("");
|
|
347
|
-
const k = p ?? (e && localStorage.getItem(`${e}-user-workspace-id`)) ?? "", R = await new ot(
|
|
348
|
-
h
|
|
349
|
-
).checkUserChosenWorkspace(k);
|
|
350
|
-
R.hasChosen ? (e && localStorage.setItem(
|
|
351
|
-
`${e}-user-workspace-id`,
|
|
352
|
-
R.workspace
|
|
353
|
-
), c(!0), l(R.workspace)) : s(R.workspaces);
|
|
354
|
-
} catch (k) {
|
|
355
|
-
k instanceof Error ? u(`Error Occurred: ${k.message}`) : u("Uncaught error occurred!");
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
[e, h]
|
|
359
|
-
);
|
|
360
|
-
A(() => {
|
|
361
|
-
d();
|
|
362
|
-
}, [d]);
|
|
363
|
-
async function C({
|
|
364
|
-
selectedWorkspace: p
|
|
365
|
-
}) {
|
|
366
|
-
return d(p.value);
|
|
367
|
-
}
|
|
368
|
-
if (r)
|
|
369
|
-
return /* @__PURE__ */ n(ve, { workspaceId: a, children: t });
|
|
370
|
-
if (o) {
|
|
371
|
-
const p = o.map((k) => ({
|
|
372
|
-
label: k.workspaceId,
|
|
373
|
-
value: k.workspaceId
|
|
374
|
-
}));
|
|
375
|
-
return /* @__PURE__ */ n(x, { justifyContent: "center", children: /* @__PURE__ */ n(S, { xcss: K, children: /* @__PURE__ */ n(ee, { onSubmit: C, children: ({ formProps: k, submitting: R }) => /* @__PURE__ */ y("form", { ...k, children: [
|
|
376
|
-
/* @__PURE__ */ n(te, { title: "Choose Workspace", children: i ? /* @__PURE__ */ n(j, { appearance: "error", children: i }) : null }),
|
|
377
|
-
/* @__PURE__ */ n(re, { children: /* @__PURE__ */ n(
|
|
378
|
-
ne,
|
|
379
|
-
{
|
|
380
|
-
"aria-required": !0,
|
|
381
|
-
name: "selectedWorkspace",
|
|
382
|
-
label: "Workspace",
|
|
383
|
-
isRequired: !0,
|
|
384
|
-
children: ({ fieldProps: W }) => /* @__PURE__ */ n("div", { "data-testid": "workspace-select-component", children: /* @__PURE__ */ n(se, { ...W, options: p }) })
|
|
385
|
-
}
|
|
386
|
-
) }),
|
|
387
|
-
/* @__PURE__ */ n(oe, { align: "start", children: /* @__PURE__ */ n(Z, { label: "Form submit options", children: /* @__PURE__ */ n(
|
|
388
|
-
L,
|
|
389
|
-
{
|
|
390
|
-
type: "submit",
|
|
391
|
-
appearance: "primary",
|
|
392
|
-
isLoading: R,
|
|
393
|
-
children: "Submit"
|
|
394
|
-
}
|
|
395
|
-
) }) })
|
|
396
|
-
] }) }) }) });
|
|
397
|
-
} else
|
|
398
|
-
return /* @__PURE__ */ n(x, { justifyContent: "center", xcss: K, children: /* @__PURE__ */ n(O, { label: "", loadingError: i }) });
|
|
399
|
-
}
|
|
400
|
-
const ge = v(null), nr = () => {
|
|
401
|
-
const e = g(ge);
|
|
402
|
-
if (!e)
|
|
403
|
-
throw new Error(
|
|
404
|
-
"useBackendAdapter must be used within a BackendAdapterProvider"
|
|
405
|
-
);
|
|
406
|
-
return e;
|
|
407
|
-
};
|
|
408
|
-
function ke({
|
|
409
|
-
children: e,
|
|
410
|
-
invokeImplementation: t
|
|
411
|
-
}) {
|
|
412
|
-
return /* @__PURE__ */ n(
|
|
413
|
-
ge.Provider,
|
|
414
|
-
{
|
|
415
|
-
value: {
|
|
416
|
-
invoke: t
|
|
417
|
-
},
|
|
418
|
-
children: e
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
function it(e, t, r) {
|
|
423
|
-
return async (c, o) => $(
|
|
424
|
-
t,
|
|
425
|
-
e + c,
|
|
426
|
-
"POST",
|
|
427
|
-
{ ...o },
|
|
428
|
-
"json",
|
|
429
|
-
{
|
|
430
|
-
"resource-id": r
|
|
431
|
-
}
|
|
432
|
-
);
|
|
433
|
-
}
|
|
434
|
-
class at {
|
|
435
|
-
navigate(t) {
|
|
436
|
-
return window.location.href = t, Promise.resolve();
|
|
437
|
-
}
|
|
438
|
-
open(t) {
|
|
439
|
-
return window.open(t, "_blank"), Promise.resolve();
|
|
440
|
-
}
|
|
441
|
-
reload() {
|
|
442
|
-
return window.location.reload(), Promise.resolve();
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
const Ae = v(null), ut = () => {
|
|
446
|
-
const e = g(Ae);
|
|
447
|
-
if (!e)
|
|
448
|
-
throw new Error("useHostRouter must be used within a HostRouterProvider");
|
|
449
|
-
return e;
|
|
450
|
-
};
|
|
451
|
-
function xe({
|
|
452
|
-
children: e,
|
|
453
|
-
hostRouter: t
|
|
454
|
-
}) {
|
|
455
|
-
return /* @__PURE__ */ n(Ae.Provider, { value: t, children: e });
|
|
456
|
-
}
|
|
457
|
-
function or({
|
|
458
|
-
url: e,
|
|
459
|
-
action: t,
|
|
460
|
-
label: r,
|
|
461
|
-
linkStyle: c,
|
|
462
|
-
buttonIcon: o,
|
|
463
|
-
buttonAppearance: s
|
|
464
|
-
}) {
|
|
465
|
-
const i = ut(), u = w(
|
|
466
|
-
(a) => {
|
|
467
|
-
a.preventDefault(), t === "open" ? i.open(e) : i.navigate(e);
|
|
468
|
-
},
|
|
469
|
-
[t, i, e]
|
|
470
|
-
);
|
|
471
|
-
return c === "link" ? /* @__PURE__ */ n("a", { href: e, target: "_blank", rel: "noreferrer", onClick: u, children: r }) : o ? /* @__PURE__ */ n(
|
|
472
|
-
Be,
|
|
473
|
-
{
|
|
474
|
-
icon: o,
|
|
475
|
-
label: r,
|
|
476
|
-
appearance: s || "subtle",
|
|
477
|
-
onClick: u
|
|
478
|
-
}
|
|
479
|
-
) : /* @__PURE__ */ n(L, { appearance: s || "subtle", onClick: u, children: r });
|
|
480
|
-
}
|
|
481
|
-
const Re = v(null), sr = () => {
|
|
482
|
-
const e = g(Re);
|
|
483
|
-
if (!e)
|
|
484
|
-
throw new Error(
|
|
485
|
-
"useRemoteAdapter must be used within a RemoteAdapterProvider"
|
|
486
|
-
);
|
|
487
|
-
return e;
|
|
488
|
-
};
|
|
489
|
-
function ye({
|
|
490
|
-
children: e,
|
|
491
|
-
invokeRemoteImplementation: t
|
|
492
|
-
}) {
|
|
493
|
-
return /* @__PURE__ */ n(
|
|
494
|
-
Re.Provider,
|
|
495
|
-
{
|
|
496
|
-
value: {
|
|
497
|
-
invokeRemote: t
|
|
498
|
-
},
|
|
499
|
-
children: e
|
|
500
|
-
}
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
function lt(e, t) {
|
|
504
|
-
return async (r) => {
|
|
505
|
-
const c = `${e}${r.path}`, o = await fetch(c, {
|
|
506
|
-
method: r.method,
|
|
507
|
-
headers: t ? M(t, r.headers || {}) : r.headers,
|
|
508
|
-
body: r.body ? JSON.stringify(r.body) : void 0
|
|
509
|
-
}), s = {};
|
|
510
|
-
return o.headers.forEach((u, a) => {
|
|
511
|
-
s[a] = u;
|
|
512
|
-
}), {
|
|
513
|
-
body: await o.json(),
|
|
514
|
-
headers: s,
|
|
515
|
-
status: o.status
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
const Se = v(null), dt = () => {
|
|
520
|
-
const e = g(Se);
|
|
521
|
-
if (!e)
|
|
522
|
-
throw new Error("useViewContext must be used within a ViewContextProvider");
|
|
523
|
-
return e;
|
|
524
|
-
};
|
|
525
|
-
function Ce({
|
|
526
|
-
children: e,
|
|
527
|
-
viewContext: t
|
|
528
|
-
}) {
|
|
529
|
-
return /* @__PURE__ */ n(Se.Provider, { value: t, children: e });
|
|
530
|
-
}
|
|
531
|
-
class J {
|
|
532
|
-
constructor(t) {
|
|
533
|
-
this.context = t, this.theme = {
|
|
534
|
-
enable() {
|
|
535
|
-
return Promise.resolve();
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
close(t) {
|
|
540
|
-
return Promise.resolve();
|
|
541
|
-
}
|
|
542
|
-
submit(t) {
|
|
543
|
-
return Promise.resolve();
|
|
544
|
-
}
|
|
545
|
-
getContext() {
|
|
546
|
-
return Promise.resolve(this.context);
|
|
547
|
-
}
|
|
548
|
-
createHistory() {
|
|
549
|
-
throw new Error("Method not implemented.");
|
|
550
|
-
}
|
|
551
|
-
refresh() {
|
|
552
|
-
return Promise.resolve();
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
function cr({
|
|
556
|
-
mockContext: e,
|
|
557
|
-
invoke: t,
|
|
558
|
-
invokeRemote: r,
|
|
559
|
-
jiraFetchService: c,
|
|
560
|
-
confluenceFetchService: o,
|
|
561
|
-
bitbucketFetchService: s,
|
|
562
|
-
hostRouter: i,
|
|
563
|
-
children: u
|
|
564
|
-
}) {
|
|
565
|
-
let a = /* @__PURE__ */ n(ve, { workspaceId: "test-workspace", children: /* @__PURE__ */ n(ke, { invokeImplementation: t, children: /* @__PURE__ */ n(ye, { invokeRemoteImplementation: r, children: /* @__PURE__ */ n(xe, { hostRouter: i, children: /* @__PURE__ */ n(Ce, { viewContext: new J(e), children: u }) }) }) }) });
|
|
566
|
-
return c && (a = /* @__PURE__ */ n(me, { requestJiraImplementation: c, children: a })), o && (a = /* @__PURE__ */ n(
|
|
567
|
-
pe,
|
|
568
|
-
{
|
|
569
|
-
requestConfluenceImplementation: o,
|
|
570
|
-
children: a
|
|
571
|
-
}
|
|
572
|
-
)), s && (a = /* @__PURE__ */ n(
|
|
573
|
-
de,
|
|
574
|
-
{
|
|
575
|
-
requestBitbucketImplementation: s,
|
|
576
|
-
children: a
|
|
577
|
-
}
|
|
578
|
-
)), a;
|
|
579
|
-
}
|
|
580
|
-
function ir(e) {
|
|
581
|
-
return {
|
|
582
|
-
mockContext: {
|
|
583
|
-
accountId: "testAccount",
|
|
584
|
-
cloudId: "testSite",
|
|
585
|
-
workspaceId: "testWorkspace",
|
|
586
|
-
siteUrl: "https://expiumdev.atlassian.net",
|
|
587
|
-
extension: { type: "jira:globalPage" },
|
|
588
|
-
timezone: "America/Chicago",
|
|
589
|
-
locale: "en-US",
|
|
590
|
-
localId: "devId",
|
|
591
|
-
moduleKey: "TestApp",
|
|
592
|
-
environmentId: "TEST",
|
|
593
|
-
environmentType: "DEVELOPMENT"
|
|
594
|
-
},
|
|
595
|
-
invoke: e(),
|
|
596
|
-
invokeRemote: e(),
|
|
597
|
-
hostRouter: {
|
|
598
|
-
navigate: e(),
|
|
599
|
-
open: e(),
|
|
600
|
-
reload: e()
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
function ht(e) {
|
|
605
|
-
const r = new URLSearchParams(window.location.search).get("code");
|
|
606
|
-
return A(() => {
|
|
607
|
-
r && (async () => {
|
|
608
|
-
const c = await fetch(e.codeTokenExchangeUrl, {
|
|
609
|
-
method: "POST",
|
|
610
|
-
headers: {
|
|
611
|
-
Accept: "application/json",
|
|
612
|
-
"Content-Type": "application/json"
|
|
613
|
-
},
|
|
614
|
-
body: JSON.stringify({
|
|
615
|
-
code: r,
|
|
616
|
-
redirect_uri: e.redirectUri
|
|
617
|
-
})
|
|
618
|
-
});
|
|
619
|
-
if (c.ok) {
|
|
620
|
-
const o = await c.json(), s = Date.now() + o.expires_in * 1e3;
|
|
621
|
-
e.setAuth({ token: o.access_token, expiresAt: s });
|
|
622
|
-
}
|
|
623
|
-
})();
|
|
624
|
-
}), /* @__PURE__ */ n(O, { label: "Fetching auth token with provided code" });
|
|
625
|
-
}
|
|
626
|
-
function Ie(e, t, r) {
|
|
627
|
-
const c = new URLSearchParams({
|
|
628
|
-
audience: "api.atlassian.com",
|
|
629
|
-
client_id: e,
|
|
630
|
-
scope: r.join(" "),
|
|
631
|
-
redirect_uri: t,
|
|
632
|
-
state: pt(),
|
|
633
|
-
// The backend should potentially generate and validate this piece?
|
|
634
|
-
response_type: "code",
|
|
635
|
-
prompt: "consent"
|
|
636
|
-
}).toString();
|
|
637
|
-
window.location.href = `https://auth.atlassian.com/authorize?${c}`;
|
|
638
|
-
}
|
|
639
|
-
function pt() {
|
|
640
|
-
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
641
|
-
}
|
|
642
|
-
function ft(e) {
|
|
643
|
-
return Ie(e.clientId, e.redirectUri, e.oAuthScopes), /* @__PURE__ */ n(O, { label: "Redirecting to Atlassian Authentication System" });
|
|
644
|
-
}
|
|
645
|
-
const mt = I({
|
|
646
|
-
paddingBlockStart: "space.1000"
|
|
647
|
-
}), Ee = v(null), wt = () => {
|
|
648
|
-
const e = g(Ee);
|
|
649
|
-
return e || (console.warn("No OAuth provider"), { getAuthToken: () => "" });
|
|
650
|
-
};
|
|
651
|
-
function vt({
|
|
652
|
-
children: e,
|
|
653
|
-
...t
|
|
654
|
-
}) {
|
|
655
|
-
const [r, c] = f(
|
|
656
|
-
localStorage.getItem(`${t.appName}-auth-token`)
|
|
657
|
-
), o = localStorage.getItem(
|
|
658
|
-
`${t.appName}-auth-expires-at`
|
|
659
|
-
), [s, i] = f(
|
|
660
|
-
o ? Number(o) : null
|
|
661
|
-
), u = window.location.protocol + "//" + window.location.hostname + (window.location.port ? `:${window.location.port}` : ""), a = u + "/callback";
|
|
662
|
-
function l() {
|
|
663
|
-
return s && r && !X(s) ? r : (Ie(t.clientId, a, t.oAuthScopes), "");
|
|
664
|
-
}
|
|
665
|
-
function h(d) {
|
|
666
|
-
c(d.token), localStorage.setItem(`${t.appName}-auth-token`, d.token), i(d.expiresAt), localStorage.setItem(
|
|
667
|
-
`${t.appName}-auth-expires-at`,
|
|
668
|
-
d.expiresAt.toString()
|
|
669
|
-
), localStorage.removeItem(`${t.appName}-user-resource-id`), localStorage.removeItem(`${t.appName}-user-workspace-id`), window.location.href = u;
|
|
670
|
-
}
|
|
671
|
-
return !r || !s || X(s) ? /* @__PURE__ */ n(x, { justifyContent: "center", xcss: mt, children: /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(je, { children: [
|
|
672
|
-
/* @__PURE__ */ n(
|
|
673
|
-
T,
|
|
674
|
-
{
|
|
675
|
-
path: "/",
|
|
676
|
-
element: /* @__PURE__ */ n(
|
|
677
|
-
ft,
|
|
678
|
-
{
|
|
679
|
-
clientId: t.clientId,
|
|
680
|
-
redirectUri: a,
|
|
681
|
-
oAuthScopes: t.oAuthScopes
|
|
682
|
-
}
|
|
683
|
-
)
|
|
684
|
-
}
|
|
685
|
-
),
|
|
686
|
-
/* @__PURE__ */ n(
|
|
687
|
-
T,
|
|
688
|
-
{
|
|
689
|
-
path: "/callback",
|
|
690
|
-
element: /* @__PURE__ */ n(
|
|
691
|
-
ht,
|
|
692
|
-
{
|
|
693
|
-
setAuth: h,
|
|
694
|
-
redirectUri: a,
|
|
695
|
-
codeTokenExchangeUrl: t.codeTokenExchangeUrl
|
|
696
|
-
}
|
|
697
|
-
)
|
|
698
|
-
}
|
|
699
|
-
),
|
|
700
|
-
/* @__PURE__ */ n(T, { path: "/*", element: /* @__PURE__ */ n(De, { to: "/", replace: !0 }) })
|
|
701
|
-
] }) }) }) : /* @__PURE__ */ n(Ee.Provider, { value: { getAuthToken: l }, children: e });
|
|
702
|
-
}
|
|
703
|
-
function X(e) {
|
|
704
|
-
return e < Date.now();
|
|
705
|
-
}
|
|
706
|
-
const be = v(void 0);
|
|
707
|
-
function gt() {
|
|
708
|
-
return g(be);
|
|
709
|
-
}
|
|
710
|
-
function ar() {
|
|
711
|
-
const e = gt();
|
|
712
|
-
function t(o) {
|
|
713
|
-
e({
|
|
714
|
-
type: "add",
|
|
715
|
-
id: o.id,
|
|
716
|
-
props: o
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
function r(o) {
|
|
720
|
-
e({
|
|
721
|
-
type: "remove",
|
|
722
|
-
id: o
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
function c(o, s, i, u) {
|
|
726
|
-
t({
|
|
727
|
-
id: o,
|
|
728
|
-
isAutoDismiss: !1,
|
|
729
|
-
type: "error",
|
|
730
|
-
title: s,
|
|
731
|
-
description: i instanceof Error ? i.message : typeof i == "string" ? i : "Uncaught error occurred!",
|
|
732
|
-
actions: u
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
return {
|
|
736
|
-
addFlag: t,
|
|
737
|
-
removeFlag: r,
|
|
738
|
-
addErrorFlag: c
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
function kt({
|
|
742
|
-
children: e
|
|
743
|
-
}) {
|
|
744
|
-
const [t, r] = Fe(xt, []);
|
|
745
|
-
function c(s) {
|
|
746
|
-
r({
|
|
747
|
-
type: "remove",
|
|
748
|
-
id: s
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
function o(s) {
|
|
752
|
-
switch (s) {
|
|
753
|
-
case "info":
|
|
754
|
-
return /* @__PURE__ */ n(
|
|
755
|
-
Ne,
|
|
756
|
-
{
|
|
757
|
-
label: "Info",
|
|
758
|
-
primaryColor: P("color.icon.information"),
|
|
759
|
-
size: "large"
|
|
760
|
-
}
|
|
761
|
-
);
|
|
762
|
-
case "warning":
|
|
763
|
-
return /* @__PURE__ */ n(
|
|
764
|
-
Ge,
|
|
765
|
-
{
|
|
766
|
-
label: "Warning",
|
|
767
|
-
primaryColor: P("color.icon.warning"),
|
|
768
|
-
size: "large"
|
|
769
|
-
}
|
|
770
|
-
);
|
|
771
|
-
case "error":
|
|
772
|
-
return /* @__PURE__ */ n(
|
|
773
|
-
ze,
|
|
774
|
-
{
|
|
775
|
-
label: "Error",
|
|
776
|
-
primaryColor: P("color.icon.danger"),
|
|
777
|
-
size: "large"
|
|
778
|
-
}
|
|
779
|
-
);
|
|
780
|
-
case "success":
|
|
781
|
-
return /* @__PURE__ */ n(
|
|
782
|
-
Je,
|
|
783
|
-
{
|
|
784
|
-
primaryColor: P("color.icon.success"),
|
|
785
|
-
label: "Success",
|
|
786
|
-
size: "large"
|
|
787
|
-
}
|
|
788
|
-
);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
return /* @__PURE__ */ y(be.Provider, { value: r, children: [
|
|
792
|
-
e,
|
|
793
|
-
/* @__PURE__ */ n(Me, { onDismissed: c, children: t.map((s) => s.isAutoDismiss ? /* @__PURE__ */ n(
|
|
794
|
-
_e,
|
|
795
|
-
{
|
|
796
|
-
id: s.id,
|
|
797
|
-
icon: o(s.type || "success"),
|
|
798
|
-
title: s.title
|
|
799
|
-
},
|
|
800
|
-
s.id
|
|
801
|
-
) : /* @__PURE__ */ n(
|
|
802
|
-
He,
|
|
803
|
-
{
|
|
804
|
-
appearance: s.appearance || "normal",
|
|
805
|
-
icon: o(s.type || "success"),
|
|
806
|
-
id: s.id,
|
|
807
|
-
title: s.title,
|
|
808
|
-
description: s.description,
|
|
809
|
-
actions: At(s.actions)
|
|
810
|
-
},
|
|
811
|
-
s.id
|
|
812
|
-
)) })
|
|
813
|
-
] });
|
|
814
|
-
}
|
|
815
|
-
function At(e) {
|
|
816
|
-
return e == null ? void 0 : e.map((t) => ({
|
|
817
|
-
...t,
|
|
818
|
-
content: t.text
|
|
819
|
-
}));
|
|
820
|
-
}
|
|
821
|
-
function xt(e, t) {
|
|
822
|
-
switch (t.type) {
|
|
823
|
-
case "add":
|
|
824
|
-
if (t.props) {
|
|
825
|
-
const r = e.filter((c) => c.id !== t.id);
|
|
826
|
-
return r.push(t.props), r;
|
|
827
|
-
} else
|
|
828
|
-
return console.error("invalid flag action: ", JSON.stringify(t)), e;
|
|
829
|
-
case "remove":
|
|
830
|
-
return e.filter((r) => r.id !== t.id);
|
|
831
|
-
default:
|
|
832
|
-
throw Error("Unknown action: " + t.type);
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
function Pe(e, t, r) {
|
|
836
|
-
A(() => (window.addEventListener(e, t, r), () => {
|
|
837
|
-
window.removeEventListener(e, t, r);
|
|
838
|
-
}), [e, t, r]);
|
|
839
|
-
}
|
|
840
|
-
const Ue = v({
|
|
841
|
-
close: () => {
|
|
842
|
-
}
|
|
843
|
-
});
|
|
844
|
-
function Rt() {
|
|
845
|
-
return g(
|
|
846
|
-
Ue
|
|
847
|
-
);
|
|
848
|
-
}
|
|
849
|
-
function ur({ children: e }) {
|
|
850
|
-
const [t, r] = f(), c = dt(), o = w(() => {
|
|
851
|
-
c.close();
|
|
852
|
-
}, [c]);
|
|
853
|
-
return Pe("unload", o), A(() => {
|
|
854
|
-
(async () => {
|
|
855
|
-
const s = await c.getContext();
|
|
856
|
-
r(s.extension.modal);
|
|
857
|
-
})();
|
|
858
|
-
}, [c]), /* @__PURE__ */ n(
|
|
859
|
-
Ue.Provider,
|
|
860
|
-
{
|
|
861
|
-
value: { modalContextData: t, close: c.close },
|
|
862
|
-
children: e
|
|
863
|
-
}
|
|
864
|
-
);
|
|
865
|
-
}
|
|
866
|
-
const yt = {
|
|
867
|
-
"iframe-wrapper": "_iframe-wrapper_c8hdk_1"
|
|
868
|
-
};
|
|
869
|
-
function St({
|
|
870
|
-
iframeProps: e,
|
|
871
|
-
messageCallback: t,
|
|
872
|
-
onMouseOut: r
|
|
873
|
-
}) {
|
|
874
|
-
const [c, o] = f(), s = F(!1), i = F(!1), u = F(null), a = w(
|
|
875
|
-
(l) => {
|
|
876
|
-
var h;
|
|
877
|
-
l.source === ((h = u.current) == null ? void 0 : h.contentWindow) && t && t(l.data);
|
|
878
|
-
},
|
|
879
|
-
[t]
|
|
880
|
-
);
|
|
881
|
-
return Pe("message", a), A(() => {
|
|
882
|
-
(async () => e != null && e.height && o(e.height))();
|
|
883
|
-
}, [e]), A(() => {
|
|
884
|
-
(async () => {
|
|
885
|
-
var l;
|
|
886
|
-
!i.current && ((l = u.current) != null && l.contentWindow) && (u.current.contentWindow.focus(), i.current = !0);
|
|
887
|
-
})();
|
|
888
|
-
}), /* @__PURE__ */ n("div", { className: yt["iframe-wrapper"], children: /* @__PURE__ */ n(
|
|
889
|
-
"iframe",
|
|
890
|
-
{
|
|
891
|
-
title: e == null ? void 0 : e.title,
|
|
892
|
-
ref: u,
|
|
893
|
-
width: e == null ? void 0 : e.width,
|
|
894
|
-
height: c,
|
|
895
|
-
src: e == null ? void 0 : e.link,
|
|
896
|
-
onMouseEnter: () => s.current = !0,
|
|
897
|
-
onMouseOut: () => {
|
|
898
|
-
s.current && r && r();
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
) });
|
|
902
|
-
}
|
|
903
|
-
function lr({
|
|
904
|
-
messageCallback: e,
|
|
905
|
-
closeOnMouseOut: t
|
|
906
|
-
}) {
|
|
907
|
-
const { modalContextData: r, close: c } = Rt(), [o, s] = f();
|
|
908
|
-
A(() => {
|
|
909
|
-
r && s({
|
|
910
|
-
...r.iframeProps
|
|
911
|
-
});
|
|
912
|
-
}, [r]);
|
|
913
|
-
const i = w(
|
|
914
|
-
(a) => {
|
|
915
|
-
if (e && o) {
|
|
916
|
-
const l = e(
|
|
917
|
-
a.data,
|
|
918
|
-
r == null ? void 0 : r.iframeProps
|
|
919
|
-
);
|
|
920
|
-
l.newHeight && s({ ...o, height: l.newHeight });
|
|
921
|
-
}
|
|
922
|
-
},
|
|
923
|
-
[o, e, r]
|
|
924
|
-
);
|
|
925
|
-
if (!o)
|
|
926
|
-
return /* @__PURE__ */ n("div", {});
|
|
927
|
-
const u = /* @__PURE__ */ n(
|
|
928
|
-
St,
|
|
929
|
-
{
|
|
930
|
-
messageCallback: i,
|
|
931
|
-
iframeProps: o,
|
|
932
|
-
onMouseOut: () => {
|
|
933
|
-
t && (c == null || c());
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
);
|
|
937
|
-
return r != null && r.modalHeader ? /* @__PURE__ */ y(x, { gap: "space.200", direction: "column", children: [
|
|
938
|
-
/* @__PURE__ */ n(S, { paddingInline: "space.200", children: /* @__PURE__ */ n(H, { size: "medium", children: r.modalHeader }) }),
|
|
939
|
-
u
|
|
940
|
-
] }) : u;
|
|
941
|
-
}
|
|
942
|
-
class Ct {
|
|
943
|
-
constructor(t, r = {}) {
|
|
944
|
-
this.defaultUrl = t, this.resourceMap = r;
|
|
945
|
-
}
|
|
946
|
-
open(t) {
|
|
947
|
-
const r = t.resource && this.resourceMap[t.resource] || this.defaultUrl, c = this.features(t.size || "small"), o = window.open(r, "_blank", c), s = (i) => {
|
|
948
|
-
var u, a;
|
|
949
|
-
if (i.source === o && (u = i.data) != null && u.closing) {
|
|
950
|
-
const l = i.data;
|
|
951
|
-
window.removeEventListener("message", s), (a = t.onClose) == null || a.call(t, l.payload);
|
|
952
|
-
}
|
|
953
|
-
};
|
|
954
|
-
return window.addEventListener("message", s), Promise.resolve();
|
|
955
|
-
}
|
|
956
|
-
/*
|
|
957
|
-
small - w: 400px h: 20vh minHeight: 320px
|
|
958
|
-
medium - w: 600px h: 40vh minHeight: 520px
|
|
959
|
-
large - w: 800px h: 70vh minHeight: 720px
|
|
960
|
-
xlarge - w: 968px h: 90vh
|
|
961
|
-
*/
|
|
962
|
-
features(t) {
|
|
963
|
-
switch (t) {
|
|
964
|
-
case "small":
|
|
965
|
-
return "popup,width=400,height=320";
|
|
966
|
-
case "medium":
|
|
967
|
-
return "popup,width=600,height=520";
|
|
968
|
-
case "large":
|
|
969
|
-
return "popup,width=800,height=720";
|
|
970
|
-
case "xlarge":
|
|
971
|
-
return "popup,width=968,height=900";
|
|
972
|
-
case "max":
|
|
973
|
-
return "";
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
const $e = v(null), dr = () => {
|
|
978
|
-
const e = g($e);
|
|
979
|
-
if (!e)
|
|
980
|
-
throw new Error(
|
|
981
|
-
"useModalService must be used within a ModalServiceProvider"
|
|
982
|
-
);
|
|
983
|
-
return e;
|
|
984
|
-
};
|
|
985
|
-
function It({
|
|
986
|
-
children: e,
|
|
987
|
-
modalService: t
|
|
988
|
-
}) {
|
|
989
|
-
return /* @__PURE__ */ n($e.Provider, { value: t, children: e });
|
|
990
|
-
}
|
|
991
|
-
class Et extends J {
|
|
992
|
-
constructor(t, r = "http://localhost:4200") {
|
|
993
|
-
super(t), this.context = t, this.openerOrigin = r, this.close = (c) => {
|
|
994
|
-
var s;
|
|
995
|
-
const o = { closing: !0, payload: c };
|
|
996
|
-
return (s = window.opener) == null || s.postMessage(o, this.openerOrigin), window.close(), Promise.resolve();
|
|
997
|
-
};
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
function hr({
|
|
1001
|
-
title: e,
|
|
1002
|
-
buttonGroup: t,
|
|
1003
|
-
children: r
|
|
1004
|
-
}) {
|
|
1005
|
-
return /* @__PURE__ */ y(
|
|
1006
|
-
x,
|
|
1007
|
-
{
|
|
1008
|
-
direction: "column",
|
|
1009
|
-
xcss: I({ height: "100%", padding: "space.300" }),
|
|
1010
|
-
children: [
|
|
1011
|
-
e && /* @__PURE__ */ n(S, { paddingBlockEnd: "space.200", children: /* @__PURE__ */ n(H, { size: "medium", children: e }) }),
|
|
1012
|
-
/* @__PURE__ */ n(S, { xcss: I({ flexGrow: 2 }), children: r }),
|
|
1013
|
-
t && /* @__PURE__ */ n(S, { paddingBlockStart: "space.200", children: /* @__PURE__ */ n(x, { justifyContent: "end", alignItems: "center", children: t }) })
|
|
1014
|
-
]
|
|
1015
|
-
}
|
|
1016
|
-
);
|
|
1017
|
-
}
|
|
1018
|
-
const bt = D(
|
|
1019
|
-
() => import("./index-ZJX0bAUh.mjs")
|
|
1020
|
-
);
|
|
1021
|
-
function Y({
|
|
1022
|
-
initialMockViewContext: e,
|
|
1023
|
-
backendUrl: t,
|
|
1024
|
-
remoteUrl: r,
|
|
1025
|
-
doCheckWorkspace: c,
|
|
1026
|
-
appName: o,
|
|
1027
|
-
doCheckResource: s,
|
|
1028
|
-
modalOpenerConfig: i,
|
|
1029
|
-
modalContextConfig: u,
|
|
1030
|
-
children: a
|
|
1031
|
-
}) {
|
|
1032
|
-
const [l, h] = f(), [d, C] = f(), { getAuthToken: p } = wt(), k = w(() => et(p(), l ?? ""), [p, l]), R = w(() => tt(p(), l ?? ""), [p, l]), W = w(() => rt(p()), [p]), Oe = w(
|
|
1033
|
-
async (E) => {
|
|
1034
|
-
if (t && s) {
|
|
1035
|
-
const B = E ?? localStorage.getItem(`${o}-user-resource-id`) ?? "", b = await new nt().checkUserChosenResource(
|
|
1036
|
-
p(),
|
|
1037
|
-
B
|
|
1038
|
-
);
|
|
1039
|
-
return b.hasChosen && (localStorage.setItem(
|
|
1040
|
-
`${o}-user-resource-id`,
|
|
1041
|
-
b.resource.id
|
|
1042
|
-
), h(b.resource.id)), b;
|
|
1043
|
-
} else
|
|
1044
|
-
return { hasChosen: !0 };
|
|
1045
|
-
},
|
|
1046
|
-
[t, p, o, s]
|
|
1047
|
-
);
|
|
1048
|
-
A(() => {
|
|
1049
|
-
const E = l ?? (e == null ? void 0 : e.cloudId) ?? "";
|
|
1050
|
-
if (!d || d.cloudId !== E) {
|
|
1051
|
-
const B = {
|
|
1052
|
-
...d || e,
|
|
1053
|
-
cloudId: E
|
|
1054
|
-
};
|
|
1055
|
-
C(B);
|
|
1056
|
-
}
|
|
1057
|
-
}, [e, l, d]);
|
|
1058
|
-
const We = w(
|
|
1059
|
-
() => t ? it(t, p(), l ?? "") : void 0,
|
|
1060
|
-
[l, p, t]
|
|
1061
|
-
);
|
|
1062
|
-
let m = a;
|
|
1063
|
-
c && (m = /* @__PURE__ */ n(ct, { appName: o, children: m })), i && (m = /* @__PURE__ */ n(
|
|
1064
|
-
It,
|
|
1065
|
-
{
|
|
1066
|
-
modalService: new Ct(
|
|
1067
|
-
i.defaultUrl,
|
|
1068
|
-
i.resourceMap
|
|
1069
|
-
),
|
|
1070
|
-
children: m
|
|
1071
|
-
}
|
|
1072
|
-
)), d && (m = /* @__PURE__ */ n(
|
|
1073
|
-
Ce,
|
|
1074
|
-
{
|
|
1075
|
-
viewContext: u ? new Et(d, u.openerOrigin) : new J(d),
|
|
1076
|
-
children: m
|
|
1077
|
-
}
|
|
1078
|
-
)), m = /* @__PURE__ */ n(xe, { hostRouter: new at(), children: /* @__PURE__ */ n(
|
|
1079
|
-
de,
|
|
1080
|
-
{
|
|
1081
|
-
requestBitbucketImplementation: W(),
|
|
1082
|
-
children: /* @__PURE__ */ n(
|
|
1083
|
-
pe,
|
|
1084
|
-
{
|
|
1085
|
-
requestConfluenceImplementation: R(),
|
|
1086
|
-
children: /* @__PURE__ */ n(
|
|
1087
|
-
me,
|
|
1088
|
-
{
|
|
1089
|
-
requestJiraImplementation: k(),
|
|
1090
|
-
children: m
|
|
1091
|
-
}
|
|
1092
|
-
)
|
|
1093
|
-
}
|
|
1094
|
-
)
|
|
1095
|
-
}
|
|
1096
|
-
) });
|
|
1097
|
-
const N = We();
|
|
1098
|
-
return N && (m = /* @__PURE__ */ n(ke, { invokeImplementation: N, children: m })), r && (m = /* @__PURE__ */ n(
|
|
1099
|
-
ye,
|
|
1100
|
-
{
|
|
1101
|
-
invokeRemoteImplementation: lt(r),
|
|
1102
|
-
children: m
|
|
1103
|
-
}
|
|
1104
|
-
)), s && (m = /* @__PURE__ */ n(bt, { checkResource: Oe, children: m })), /* @__PURE__ */ n(qe, { children: /* @__PURE__ */ n(kt, { children: m }) });
|
|
1105
|
-
}
|
|
1106
|
-
const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1107
|
-
__proto__: null,
|
|
1108
|
-
AtlassianAppStandalone: Y,
|
|
1109
|
-
default: Y
|
|
1110
|
-
}, Symbol.toStringTag, { value: "Module" })), Ut = D(() => import("./atlassian-app-forge-DG01gNAI.mjs")), $t = D(() => Promise.resolve().then(() => Pt)), Ot = window.self === window.top;
|
|
1111
|
-
function pr({
|
|
1112
|
-
children: e,
|
|
1113
|
-
appName: t,
|
|
1114
|
-
doCheckWorkspace: r,
|
|
1115
|
-
embeddedConfig: c,
|
|
1116
|
-
standaloneConfig: o
|
|
1117
|
-
}) {
|
|
1118
|
-
var s;
|
|
1119
|
-
if (Ot)
|
|
1120
|
-
if (o) {
|
|
1121
|
-
const i = /* @__PURE__ */ n(
|
|
1122
|
-
$t,
|
|
1123
|
-
{
|
|
1124
|
-
appName: t,
|
|
1125
|
-
backendUrl: o.backendUrl,
|
|
1126
|
-
remoteUrl: o.remoteUrl,
|
|
1127
|
-
initialMockViewContext: o.initialMockViewContext,
|
|
1128
|
-
modalOpenerConfig: o.modalOpenerConfig,
|
|
1129
|
-
modalContextConfig: o.modalContextConfig,
|
|
1130
|
-
doCheckWorkspace: o.oauthConfig && r,
|
|
1131
|
-
doCheckResource: ((s = o.oauthConfig) == null ? void 0 : s.doCheckResource) !== !1,
|
|
1132
|
-
children: e
|
|
1133
|
-
}
|
|
1134
|
-
);
|
|
1135
|
-
return o.oauthConfig ? /* @__PURE__ */ n(
|
|
1136
|
-
vt,
|
|
1137
|
-
{
|
|
1138
|
-
clientId: o.oauthConfig.clientId,
|
|
1139
|
-
codeTokenExchangeUrl: o.oauthConfig.codeTokenExchangeUrl,
|
|
1140
|
-
appName: t,
|
|
1141
|
-
oAuthScopes: o.oauthConfig.oAuthScopes,
|
|
1142
|
-
children: i
|
|
1143
|
-
}
|
|
1144
|
-
) : i;
|
|
1145
|
-
} else
|
|
1146
|
-
return /* @__PURE__ */ n("div", { children: "Not configured for standalone mode." });
|
|
1147
|
-
else
|
|
1148
|
-
return /* @__PURE__ */ n(
|
|
1149
|
-
Ut,
|
|
1150
|
-
{
|
|
1151
|
-
appName: t,
|
|
1152
|
-
doCheckWorkspace: r,
|
|
1153
|
-
invokeRemoteImpl: c == null ? void 0 : c.invokeRemoteImpl,
|
|
1154
|
-
children: e
|
|
1155
|
-
}
|
|
1156
|
-
);
|
|
1157
|
-
}
|
|
1158
|
-
const Q = I({
|
|
1159
|
-
maxWidth: "max-content",
|
|
1160
|
-
paddingBlockStart: "space.1000"
|
|
1161
|
-
});
|
|
1162
|
-
function fr({
|
|
1163
|
-
checkResource: e,
|
|
1164
|
-
children: t
|
|
1165
|
-
}) {
|
|
1166
|
-
const [r, c] = f(!1), [o, s] = f(null), [i, u] = f(""), a = w(
|
|
1167
|
-
async (h) => {
|
|
1168
|
-
try {
|
|
1169
|
-
u("");
|
|
1170
|
-
const d = await e(h);
|
|
1171
|
-
d.hasChosen ? c(!0) : s(d.resources);
|
|
1172
|
-
} catch (d) {
|
|
1173
|
-
d instanceof Error ? u(`Error Occurred: ${d.message}`) : u("Uncaught error occurred!");
|
|
1174
|
-
}
|
|
1175
|
-
},
|
|
1176
|
-
[e]
|
|
1177
|
-
);
|
|
1178
|
-
A(() => {
|
|
1179
|
-
a();
|
|
1180
|
-
}, [a]);
|
|
1181
|
-
function l({ selectedResource: h }) {
|
|
1182
|
-
return a(h.value);
|
|
1183
|
-
}
|
|
1184
|
-
if (r)
|
|
1185
|
-
return t;
|
|
1186
|
-
if (o) {
|
|
1187
|
-
const h = o.map((d) => ({
|
|
1188
|
-
label: d.name,
|
|
1189
|
-
value: d.id
|
|
1190
|
-
}));
|
|
1191
|
-
return /* @__PURE__ */ n(x, { justifyContent: "center", children: /* @__PURE__ */ n(S, { xcss: Q, children: /* @__PURE__ */ n(ee, { onSubmit: l, children: ({ formProps: d, submitting: C }) => /* @__PURE__ */ y("form", { ...d, children: [
|
|
1192
|
-
/* @__PURE__ */ n(te, { title: "Choose Resource", children: i ? /* @__PURE__ */ n(j, { appearance: "error", children: i }) : null }),
|
|
1193
|
-
/* @__PURE__ */ n(re, { children: /* @__PURE__ */ n(
|
|
1194
|
-
ne,
|
|
1195
|
-
{
|
|
1196
|
-
"aria-required": !0,
|
|
1197
|
-
name: "selectedResource",
|
|
1198
|
-
label: "Resource",
|
|
1199
|
-
isRequired: !0,
|
|
1200
|
-
children: ({ fieldProps: p }) => /* @__PURE__ */ n(se, { ...p, options: h })
|
|
1201
|
-
}
|
|
1202
|
-
) }),
|
|
1203
|
-
/* @__PURE__ */ n(oe, { align: "start", children: /* @__PURE__ */ n(Z, { label: "Form submit options", children: /* @__PURE__ */ n(
|
|
1204
|
-
L,
|
|
1205
|
-
{
|
|
1206
|
-
type: "submit",
|
|
1207
|
-
appearance: "primary",
|
|
1208
|
-
isLoading: C,
|
|
1209
|
-
children: "Submit"
|
|
1210
|
-
}
|
|
1211
|
-
) }) })
|
|
1212
|
-
] }) }) }) });
|
|
1213
|
-
} else
|
|
1214
|
-
return /* @__PURE__ */ n(x, { justifyContent: "center", xcss: Q, children: /* @__PURE__ */ n(O, { label: "", loadingError: i }) });
|
|
1215
|
-
}
|
|
1216
|
-
function Wt(e) {
|
|
1217
|
-
return console.error(e), `Error Occurred: ${e.message || e}`;
|
|
1218
|
-
}
|
|
1219
|
-
function mr(e, t = Wt) {
|
|
1220
|
-
const [r, c] = f(), [o, s] = f(!0), [i, u] = f(), a = w(async () => {
|
|
1221
|
-
s(!0);
|
|
1222
|
-
try {
|
|
1223
|
-
const l = await e();
|
|
1224
|
-
return c(l), l;
|
|
1225
|
-
} catch (l) {
|
|
1226
|
-
u(t(l));
|
|
1227
|
-
} finally {
|
|
1228
|
-
s(!1);
|
|
1229
|
-
}
|
|
1230
|
-
}, [e, t]);
|
|
1231
|
-
return A(() => {
|
|
1232
|
-
a();
|
|
1233
|
-
}, [a]), {
|
|
1234
|
-
data: r,
|
|
1235
|
-
loading: o,
|
|
1236
|
-
error: i,
|
|
1237
|
-
setData: c,
|
|
1238
|
-
setLoading: s,
|
|
1239
|
-
setError: u,
|
|
1240
|
-
manualTrigger: () => a()
|
|
1241
|
-
};
|
|
1242
|
-
}
|
|
1243
|
-
export {
|
|
1244
|
-
be as AppFlagsDispatchContext,
|
|
1245
|
-
kt as AppFlagsProviderAtlasKit,
|
|
1246
|
-
pr as AtlassianApp,
|
|
1247
|
-
Y as AtlassianAppStandalone,
|
|
1248
|
-
cr as AtlassianAppTest,
|
|
1249
|
-
nt as AtlassianUserResourceService,
|
|
1250
|
-
ot as AtlassianUserWorkspaceService,
|
|
1251
|
-
ke as BackendAdapterProvider,
|
|
1252
|
-
G as CommonResolverPaths,
|
|
1253
|
-
fr as FeatureChosenResourceCheck,
|
|
1254
|
-
ct as FeatureChosenWorkspaceCheck,
|
|
1255
|
-
Ve as FetchError,
|
|
1256
|
-
or as HostRouterLink,
|
|
1257
|
-
xe as HostRouterProvider,
|
|
1258
|
-
Ot as IS_STANDALONE,
|
|
1259
|
-
ve as JiraWorkspaceProvider,
|
|
1260
|
-
J as MockViewContext,
|
|
1261
|
-
ur as ModalContent,
|
|
1262
|
-
lr as ModalContentIframe,
|
|
1263
|
-
hr as ModalDialogLayout,
|
|
1264
|
-
It as ModalServiceProvider,
|
|
1265
|
-
Et as ModalViewContext,
|
|
1266
|
-
vt as OAuthProvider,
|
|
1267
|
-
O as PageLoadingView,
|
|
1268
|
-
ye as RemoteAdapterProvider,
|
|
1269
|
-
de as RequestBitbucketProvider,
|
|
1270
|
-
pe as RequestConfluenceProvider,
|
|
1271
|
-
me as RequestJiraProvider,
|
|
1272
|
-
Ce as ViewContextProvider,
|
|
1273
|
-
at as WindowHostRouter,
|
|
1274
|
-
Ct as WindowModalService,
|
|
1275
|
-
M as addAuthHeader,
|
|
1276
|
-
rt as atlassianOAuthBitbucketFetch,
|
|
1277
|
-
tt as atlassianOAuthConfluenceFetch,
|
|
1278
|
-
et as atlassianOAuthJiraFetch,
|
|
1279
|
-
_ as atlassianOAuthRawFetch,
|
|
1280
|
-
$ as bearerAuthFetch,
|
|
1281
|
-
Ke as bearerAuthFetchRaw,
|
|
1282
|
-
ir as defaultProps,
|
|
1283
|
-
Zt as getAtlassianOAuthToken,
|
|
1284
|
-
Qt as getAtlassianUserDetails,
|
|
1285
|
-
it as getOauthFetchInvokeImpl,
|
|
1286
|
-
ce as jsonFetch,
|
|
1287
|
-
lt as oauthFetchInvokeRemote,
|
|
1288
|
-
Ze as route,
|
|
1289
|
-
gt as useAppFlagsDispatch,
|
|
1290
|
-
ar as useAppFlagsDispatchMethods,
|
|
1291
|
-
nr as useBackendAdapter,
|
|
1292
|
-
ut as useHostRouter,
|
|
1293
|
-
mr as useLoadDataEffect,
|
|
1294
|
-
Rt as useModalContentService,
|
|
1295
|
-
dr as useModalService,
|
|
1296
|
-
wt as useOAuth,
|
|
1297
|
-
sr as useRemoteAdapter,
|
|
1298
|
-
er as useRequestBitbucket,
|
|
1299
|
-
tr as useRequestConfluence,
|
|
1300
|
-
st as useRequestJira,
|
|
1301
|
-
dt as useViewContext,
|
|
1302
|
-
rr as useWorkspaceId
|
|
1303
|
-
};
|