@valiantys/atlassian-app-frontend 3.1.0-alpha-2 → 3.1.0-alpha-3
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/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.cjs.js +1 -1
- package/atlassian/shared/frontend-feature-chosen-resource-check/src/lib/feature-chosen-resource-check/index.es.js +4 -5
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.cjs.js +1 -1
- package/atlassian/shared/frontend-feature-chosen-workspace-check/src/lib/feature-chosen-workspace-check/index.es.js +12 -13
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.cjs.js +4 -4
- package/atlassian/shared/frontend-ui-expand-panel/src/lib/styled-panel/index.es.js +14 -14
- package/examples/hello-world/example-box.tsx +1 -1
- package/examples/hello-world/example-components/forge-storage-example.tsx +1 -7
- package/package.json +15 -15
- package/valiantys-atlassian-app-frontend-3.1.0-alpha-3.tgz +0 -0
- package/valiantys-atlassian-app-frontend-3.1.0-alpha-2.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@atlaskit/button"),b=require("@atlaskit/button/new"),t=require("@atlaskit/form"),n=require("@atlaskit/primitives"),S=require("@atlaskit/section-message"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@atlaskit/button"),b=require("@atlaskit/button/new"),t=require("@atlaskit/form"),n=require("@atlaskit/primitives"),S=require("@atlaskit/section-message"),F=require("@atlaskit/select"),o=require("react"),R=require("../../../../frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js"),d=n.xcss({maxWidth:"max-content",paddingBlockStart:"space.1000"});function q({checkResource:a,children:h}){const[x,m]=o.useState(!1),[l,j]=o.useState(null),[c,i]=o.useState(""),u=o.useCallback(async s=>{try{i("");const r=await a(s);r.hasChosen?m(!0):j(r.resources)}catch(r){r instanceof Error?i(`Error Occurred: ${r.message}`):i("Uncaught error occurred!")}},[a]);o.useEffect(()=>{u()},[u]);function p({selectedResource:s}){return u(s.value)}if(x)return h;if(l){const s=l.map(r=>({label:r.name,value:r.id}));return e.jsx(n.Flex,{justifyContent:"center",children:e.jsx(n.Box,{xcss:d,children:e.jsx(t,{onSubmit:p,children:({formProps:r,submitting:f})=>e.jsxs("form",{...r,children:[e.jsx(t.FormHeader,{title:"Choose Resource",children:c?e.jsx(S,{appearance:"error",children:c}):null}),e.jsx(t.FormSection,{children:e.jsx(t.Field,{name:"selectedResource",label:"Resource",isRequired:!0,children:({fieldProps:g})=>e.jsx(F,{...g,options:s})})}),e.jsx(t.FormFooter,{align:"start",children:e.jsx(C.ButtonGroup,{label:"Form submit options",children:e.jsx(b,{type:"submit",appearance:"primary",isLoading:f,children:"Submit"})})})]})})})})}else return e.jsx(n.Flex,{justifyContent:"center",xcss:d,children:e.jsx(R.PageLoadingView,{label:"",loadingError:c})})}exports.FeatureChosenResourceCheck=q;
|
|
@@ -5,8 +5,8 @@ import R, { FormHeader as S, FormSection as y, Field as B, FormFooter as E } fro
|
|
|
5
5
|
import { Flex as l, Box as j, xcss as k } from "@atlaskit/primitives";
|
|
6
6
|
import L from "@atlaskit/section-message";
|
|
7
7
|
import v from "@atlaskit/select";
|
|
8
|
-
import { useState as c, useCallback as H, useEffect as
|
|
9
|
-
import { PageLoadingView as
|
|
8
|
+
import { useState as c, useCallback as H, useEffect as w } from "react";
|
|
9
|
+
import { PageLoadingView as O } from "../../../../frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js";
|
|
10
10
|
const u = k({
|
|
11
11
|
maxWidth: "max-content",
|
|
12
12
|
paddingBlockStart: "space.1000"
|
|
@@ -27,7 +27,7 @@ function A({
|
|
|
27
27
|
},
|
|
28
28
|
[i]
|
|
29
29
|
);
|
|
30
|
-
|
|
30
|
+
w(() => {
|
|
31
31
|
n();
|
|
32
32
|
}, [n]);
|
|
33
33
|
function f({ selectedResource: o }) {
|
|
@@ -45,7 +45,6 @@ function A({
|
|
|
45
45
|
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
|
|
46
46
|
B,
|
|
47
47
|
{
|
|
48
|
-
"aria-required": !0,
|
|
49
48
|
name: "selectedResource",
|
|
50
49
|
label: "Resource",
|
|
51
50
|
isRequired: !0,
|
|
@@ -63,7 +62,7 @@ function A({
|
|
|
63
62
|
) }) })
|
|
64
63
|
] }) }) }) });
|
|
65
64
|
} else
|
|
66
|
-
return /* @__PURE__ */ e(l, { justifyContent: "center", xcss: u, children: /* @__PURE__ */ e(
|
|
65
|
+
return /* @__PURE__ */ e(l, { justifyContent: "center", xcss: u, children: /* @__PURE__ */ e(O, { label: "", loadingError: t }) });
|
|
67
66
|
}
|
|
68
67
|
export {
|
|
69
68
|
A as FeatureChosenResourceCheck
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),W=require("@atlaskit/button"),f=require("@atlaskit/button/new"),n=require("@atlaskit/form"),i=require("@atlaskit/primitives"),C=require("@atlaskit/section-message"),b=require("@atlaskit/select"),o=require("react"),F=require("../../../../../jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.cjs.js");require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.cjs.js");require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.cjs.js");const v=require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.cjs.js"),y=require("../../../../frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js"),I=require("../jira-workspace-provider/index.cjs.js"),k=i.xcss({maxWidth:"max-content",paddingBlockStart:"space.1000"});function B({appName:t,children:h}){const[x,j]=o.useState(!1),[d,m]=o.useState(null),[a,u]=o.useState(""),[q
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),W=require("@atlaskit/button"),f=require("@atlaskit/button/new"),n=require("@atlaskit/form"),i=require("@atlaskit/primitives"),C=require("@atlaskit/section-message"),b=require("@atlaskit/select"),o=require("react"),F=require("../../../../../jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.cjs.js");require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.cjs.js");require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.cjs.js");const v=require("../../../../frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.cjs.js"),y=require("../../../../frontend-ui-page-loading-view/src/lib/page-loading-view/index.cjs.js"),I=require("../jira-workspace-provider/index.cjs.js"),k=i.xcss({maxWidth:"max-content",paddingBlockStart:"space.1000"});function B({appName:t,children:h}){const[x,j]=o.useState(!1),[d,m]=o.useState(null),[a,u]=o.useState(""),[S,q]=o.useState(),p=v.useRequestJira(),l=o.useCallback(async c=>{try{u("");const r=c??(t&&localStorage.getItem(`${t}-user-workspace-id`))??"",s=await new F.AtlassianUserWorkspaceService(p).checkUserChosenWorkspace(r);s.hasChosen?(t&&localStorage.setItem(`${t}-user-workspace-id`,s.workspace),j(!0),q(s.workspace)):m(s.workspaces)}catch(r){r instanceof Error?u(`Error Occurred: ${r.message}`):u("Uncaught error occurred!")}},[t,p]);o.useEffect(()=>{l()},[l]);async function w({selectedWorkspace:c}){return l(c.value)}if(x)return e.jsx(I.JiraWorkspaceProvider,{workspaceId:S,children:h});if(d){const c=d.map(r=>({label:r.workspaceId,value:r.workspaceId}));return e.jsx(i.Flex,{justifyContent:"center",children:e.jsx(i.Box,{xcss:k,children:e.jsx(n,{onSubmit:w,children:({formProps:r,submitting:s})=>e.jsxs("form",{...r,children:[e.jsx(n.FormHeader,{title:"Choose Workspace",children:a?e.jsx(C,{appearance:"error",children:a}):null}),e.jsx(n.FormSection,{children:e.jsx(n.Field,{name:"selectedWorkspace",label:"Workspace",isRequired:!0,children:({fieldProps:g})=>e.jsx("div",{"data-testid":"workspace-select-component",children:e.jsx(b,{...g,options:c})})})}),e.jsx(n.FormFooter,{align:"start",children:e.jsx(W.ButtonGroup,{label:"Form submit options",children:e.jsx(f,{type:"submit",appearance:"primary",isLoading:s,children:"Submit"})})})]})})})})}else return e.jsx(i.Flex,{justifyContent:"center",xcss:k,children:e.jsx(y.PageLoadingView,{label:"",loadingError:a})})}exports.FeatureChosenWorkspaceCheck=B;
|
|
@@ -4,12 +4,12 @@ import F from "@atlaskit/button/new";
|
|
|
4
4
|
import b, { FormHeader as y, FormSection as v, Field as I, FormFooter as B } from "@atlaskit/form";
|
|
5
5
|
import { xcss as j, Flex as m, Box as E } from "@atlaskit/primitives";
|
|
6
6
|
import L from "@atlaskit/section-message";
|
|
7
|
-
import
|
|
8
|
-
import { useState as c, useCallback as
|
|
9
|
-
import { AtlassianUserWorkspaceService as
|
|
7
|
+
import H from "@atlaskit/select";
|
|
8
|
+
import { useState as c, useCallback as R, useEffect as U } from "react";
|
|
9
|
+
import { AtlassianUserWorkspaceService as $ } from "../../../../../jira/shared/data-access-workspaces/src/lib/user-workspace-service/index.es.js";
|
|
10
10
|
import "../../../../frontend-ui-atlassian-product-fetch/src/lib/request-bitbucket/index.es.js";
|
|
11
11
|
import "../../../../frontend-ui-atlassian-product-fetch/src/lib/request-confluence/index.es.js";
|
|
12
|
-
import { useRequestJira as
|
|
12
|
+
import { useRequestJira as q } from "../../../../frontend-ui-atlassian-product-fetch/src/lib/request-jira/index.es.js";
|
|
13
13
|
import { PageLoadingView as J } from "../../../../frontend-ui-page-loading-view/src/lib/page-loading-view/index.es.js";
|
|
14
14
|
import { JiraWorkspaceProvider as O } from "../jira-workspace-provider/index.es.js";
|
|
15
15
|
const d = j({
|
|
@@ -22,11 +22,11 @@ function N({
|
|
|
22
22
|
}) {
|
|
23
23
|
const [k, h] = c(!1), [l, f] = c(
|
|
24
24
|
null
|
|
25
|
-
), [
|
|
25
|
+
), [n, i] = c(""), [w, C] = c(), p = q(), a = R(
|
|
26
26
|
async (t) => {
|
|
27
27
|
try {
|
|
28
|
-
|
|
29
|
-
const r = t ?? (s && localStorage.getItem(`${s}-user-workspace-id`)) ?? "", o = await new
|
|
28
|
+
i("");
|
|
29
|
+
const r = t ?? (s && localStorage.getItem(`${s}-user-workspace-id`)) ?? "", o = await new $(
|
|
30
30
|
p
|
|
31
31
|
).checkUserChosenWorkspace(r);
|
|
32
32
|
o.hasChosen ? (s && localStorage.setItem(
|
|
@@ -34,12 +34,12 @@ function N({
|
|
|
34
34
|
o.workspace
|
|
35
35
|
), h(!0), C(o.workspace)) : f(o.workspaces);
|
|
36
36
|
} catch (r) {
|
|
37
|
-
r instanceof Error ?
|
|
37
|
+
r instanceof Error ? i(`Error Occurred: ${r.message}`) : i("Uncaught error occurred!");
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
[s, p]
|
|
41
41
|
);
|
|
42
|
-
|
|
42
|
+
U(() => {
|
|
43
43
|
a();
|
|
44
44
|
}, [a]);
|
|
45
45
|
async function W({
|
|
@@ -55,15 +55,14 @@ function N({
|
|
|
55
55
|
value: r.workspaceId
|
|
56
56
|
}));
|
|
57
57
|
return /* @__PURE__ */ e(m, { justifyContent: "center", children: /* @__PURE__ */ e(E, { xcss: d, children: /* @__PURE__ */ e(b, { onSubmit: W, children: ({ formProps: r, submitting: o }) => /* @__PURE__ */ S("form", { ...r, children: [
|
|
58
|
-
/* @__PURE__ */ e(y, { title: "Choose Workspace", children:
|
|
58
|
+
/* @__PURE__ */ e(y, { title: "Choose Workspace", children: n ? /* @__PURE__ */ e(L, { appearance: "error", children: n }) : null }),
|
|
59
59
|
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(
|
|
60
60
|
I,
|
|
61
61
|
{
|
|
62
|
-
"aria-required": !0,
|
|
63
62
|
name: "selectedWorkspace",
|
|
64
63
|
label: "Workspace",
|
|
65
64
|
isRequired: !0,
|
|
66
|
-
children: ({ fieldProps: g }) => /* @__PURE__ */ e("div", { "data-testid": "workspace-select-component", children: /* @__PURE__ */ e(
|
|
65
|
+
children: ({ fieldProps: g }) => /* @__PURE__ */ e("div", { "data-testid": "workspace-select-component", children: /* @__PURE__ */ e(H, { ...g, options: t }) })
|
|
67
66
|
}
|
|
68
67
|
) }),
|
|
69
68
|
/* @__PURE__ */ e(B, { align: "start", children: /* @__PURE__ */ e(x, { label: "Form submit options", children: /* @__PURE__ */ e(
|
|
@@ -77,7 +76,7 @@ function N({
|
|
|
77
76
|
) }) })
|
|
78
77
|
] }) }) }) });
|
|
79
78
|
} else
|
|
80
|
-
return /* @__PURE__ */ e(m, { justifyContent: "center", xcss: d, children: /* @__PURE__ */ e(J, { label: "", loadingError:
|
|
79
|
+
return /* @__PURE__ */ e(m, { justifyContent: "center", xcss: d, children: /* @__PURE__ */ e(J, { label: "", loadingError: n }) });
|
|
81
80
|
}
|
|
82
81
|
export {
|
|
83
82
|
N as FeatureChosenWorkspaceCheck
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@atlaskit/theme"),e=require("@atlaskit/tokens"),t=require("styled-components"),a=t.css`
|
|
2
2
|
transition: all 200ms ease-in-out;
|
|
3
|
-
`,
|
|
3
|
+
`,s=t.div`
|
|
4
4
|
margin: 0 auto 0;
|
|
5
5
|
`,n=t.div`
|
|
6
6
|
left: 0;
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
button {
|
|
13
13
|
pointer-events: none;
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`,i=t.div`
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${o=>o.isFocused&&e.token("elevation.surface.hovered",r.colors.N20)};
|
|
18
|
-
border-radius: ${e.token("
|
|
18
|
+
border-radius: ${e.token("radius.small","3px")};
|
|
19
19
|
display: flex;
|
|
20
20
|
left: ${e.token("space.negative.300","-24px")};
|
|
21
21
|
//margin-bottom: ${e.token("space.100","8px")};
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
opacity: 1;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`;exports.ButtonWrapper=n;exports.PanelHeader=
|
|
45
|
+
`;exports.ButtonWrapper=n;exports.PanelHeader=i;exports.PanelWrapper=s;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { colors as
|
|
1
|
+
import { colors as i } from "@atlaskit/theme";
|
|
2
2
|
import { token as e } from "@atlaskit/tokens";
|
|
3
|
-
import t, { css as
|
|
4
|
-
const n =
|
|
3
|
+
import t, { css as r } from "styled-components";
|
|
4
|
+
const n = r`
|
|
5
5
|
transition: all 200ms ease-in-out;
|
|
6
|
-
`,
|
|
6
|
+
`, l = t.div`
|
|
7
7
|
margin: 0 auto 0;
|
|
8
|
-
`,
|
|
8
|
+
`, a = t.div`
|
|
9
9
|
left: 0;
|
|
10
10
|
line-height: 0;
|
|
11
11
|
opacity: ${({ isHidden: o }) => o ? 0 : 1};
|
|
@@ -15,10 +15,10 @@ const n = a`
|
|
|
15
15
|
button {
|
|
16
16
|
pointer-events: none;
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`, d = t.div`
|
|
19
19
|
align-items: center;
|
|
20
|
-
background-color: ${(o) => o.isFocused && e("elevation.surface.hovered",
|
|
21
|
-
border-radius: ${e("
|
|
20
|
+
background-color: ${(o) => o.isFocused && e("elevation.surface.hovered", i.N20)};
|
|
21
|
+
border-radius: ${e("radius.small", "3px")};
|
|
22
22
|
display: flex;
|
|
23
23
|
left: ${e("space.negative.300", "-24px")};
|
|
24
24
|
//margin-bottom: ${e("space.100", "8px")};
|
|
@@ -29,7 +29,7 @@ const n = a`
|
|
|
29
29
|
${n};
|
|
30
30
|
width: 100%;
|
|
31
31
|
|
|
32
|
-
${
|
|
32
|
+
${a} {
|
|
33
33
|
opacity: ${(o) => o.isFocused && 1};
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -38,16 +38,16 @@ const n = a`
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&:hover {
|
|
41
|
-
background-color: ${e("elevation.surface.hovered",
|
|
41
|
+
background-color: ${e("elevation.surface.hovered", i.N20)};
|
|
42
42
|
cursor: pointer;
|
|
43
43
|
|
|
44
|
-
${
|
|
44
|
+
${a} {
|
|
45
45
|
opacity: 1;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
49
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
a as ButtonWrapper,
|
|
51
|
+
d as PanelHeader,
|
|
52
|
+
l as PanelWrapper
|
|
53
53
|
};
|
|
@@ -41,13 +41,7 @@ export function ForgeStorageExample() {
|
|
|
41
41
|
<Form<FormValue> onSubmit={saveForm}>
|
|
42
42
|
{({ formProps, submitting }) => (
|
|
43
43
|
<form {...formProps}>
|
|
44
|
-
<Field
|
|
45
|
-
aria-required={true}
|
|
46
|
-
name="name"
|
|
47
|
-
label="My name"
|
|
48
|
-
isRequired
|
|
49
|
-
defaultValue={myName}
|
|
50
|
-
>
|
|
44
|
+
<Field name="name" label="My name" isRequired defaultValue={myName}>
|
|
51
45
|
{({ fieldProps }) => <Textfield {...fieldProps} />}
|
|
52
46
|
</Field>
|
|
53
47
|
<ButtonGroup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiantys/atlassian-app-frontend",
|
|
3
|
-
"version": "3.1.0-alpha-
|
|
3
|
+
"version": "3.1.0-alpha-3",
|
|
4
4
|
"description": "This library provides an Atlassian Forge Custom UI wrapper component that handles all the setup necessary to support an app that can run deployed or in standalone mode",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./atlassian-app": {
|
|
@@ -185,20 +185,20 @@
|
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
187
|
"peerDependencies": {
|
|
188
|
-
"@atlaskit/banner": "^14.0.
|
|
189
|
-
"@atlaskit/button": "^23.
|
|
190
|
-
"@atlaskit/css-reset": "^7.3.
|
|
191
|
-
"@atlaskit/datetime-picker": "^17.
|
|
192
|
-
"@atlaskit/flag": "^17.
|
|
193
|
-
"@atlaskit/form": "^
|
|
194
|
-
"@atlaskit/heading": "^5.2.
|
|
195
|
-
"@atlaskit/icon": "^
|
|
196
|
-
"@atlaskit/primitives": "^
|
|
197
|
-
"@atlaskit/section-message": "^8.
|
|
198
|
-
"@atlaskit/select": "^
|
|
199
|
-
"@atlaskit/spinner": "^
|
|
200
|
-
"@atlaskit/tokens": "^
|
|
201
|
-
"@forge/bridge": "^5.
|
|
188
|
+
"@atlaskit/banner": "^14.0.22",
|
|
189
|
+
"@atlaskit/button": "^23.9.3",
|
|
190
|
+
"@atlaskit/css-reset": "^7.3.10",
|
|
191
|
+
"@atlaskit/datetime-picker": "^17.4.1",
|
|
192
|
+
"@atlaskit/flag": "^17.8.0",
|
|
193
|
+
"@atlaskit/form": "^15.3.0",
|
|
194
|
+
"@atlaskit/heading": "^5.2.18",
|
|
195
|
+
"@atlaskit/icon": "^29.4.1",
|
|
196
|
+
"@atlaskit/primitives": "^17.0.0",
|
|
197
|
+
"@atlaskit/section-message": "^8.12.0",
|
|
198
|
+
"@atlaskit/select": "^21.6.4",
|
|
199
|
+
"@atlaskit/spinner": "^19.0.8",
|
|
200
|
+
"@atlaskit/tokens": "^9.1.2",
|
|
201
|
+
"@forge/bridge": "^5.10.2",
|
|
202
202
|
"react": "^18.3.1",
|
|
203
203
|
"react-dom": "^18.3.1",
|
|
204
204
|
"react-router-dom": "^6.26.2"
|
|
Binary file
|
|
Binary file
|