@valiantys/atlassian-app-frontend 3.0.0-alpha-24 → 3.0.0-alpha-25
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/jira/shared/data-access-project/src/lib/jira-project-service/index.cjs.js +1 -1
- package/atlassian/jira/shared/data-access-project/src/lib/jira-project-service/index.es.js +18 -5
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.cjs.js +1 -1
- package/atlassian/shared/frontend-ui-iframe/src/lib/iframe-wrapper/index.es.js +15 -14
- package/data-access-project/atlassian-app-frontend-data-access-project.api.json +63 -1
- package/data-access-project/atlassian-app-frontend.api.md +3 -1
- package/data-access-project/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.cjs.js"),h=class h{constructor(t){this.fetchSvc=t}getVersions(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/versions`})}getProject(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}`})}async getAllProjects(){return await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project`})||[]}async projectSearchByIds(t){var e;if(t.length>50)throw new Error("Too many project ids, max allowed is 50.");const r=this.fetchSvc.route`/rest/api/3/project/search?${t.map(c=>"id="+c).join("&")}`;return(e=await this.fetchSvc.fetch({method:"GET",url:r}))==null?void 0:e.values}async projectSearchByKeys(t){var e;if(t.length>50)throw new Error("Too many project keys, max allowed is 50.");const r=this.fetchSvc.route`/rest/api/3/project/search?${t.map(c=>"key="+c).join("&")}`;return(e=await this.fetchSvc.fetch({method:"GET",url:r}))==null?void 0:e.values}async getProjectIssueTypes(t){return await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/issuetype/project?projectId=${t}`})||[]}getProjectStatuses(t){return this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/statuses`})}async getProjectProperty(t,r){try{return(await this.fetchSvc.fetch({method:"GET",url:this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`})).value}catch(e){if(e instanceof o.FetchError&&e.statusCode===404)return;throw e}}setProjectProperty(t,r,e){return this.fetchSvc.fetch({method:"PUT",url:this.fetchSvc.route`/rest/api/3/project/${t}/properties/${r}`},e)}};h.projectUrl="/rest/api/3/project";let s=h;exports.JiraProjectService=s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchError as o } from "../../../../../../../shared/util-fetch/src/lib/shared-util-fetch/index.es.js";
|
|
2
|
-
const
|
|
2
|
+
const s = class s {
|
|
3
3
|
constructor(t) {
|
|
4
4
|
this.fetchSvc = t;
|
|
5
5
|
}
|
|
@@ -15,6 +15,9 @@ const c = class c {
|
|
|
15
15
|
url: this.fetchSvc.route`/rest/api/3/project/${t}`
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use projectSearchByIds instead.
|
|
20
|
+
*/
|
|
18
21
|
async getAllProjects() {
|
|
19
22
|
return await this.fetchSvc.fetch({
|
|
20
23
|
method: "GET",
|
|
@@ -25,7 +28,17 @@ const c = class c {
|
|
|
25
28
|
var e;
|
|
26
29
|
if (t.length > 50)
|
|
27
30
|
throw new Error("Too many project ids, max allowed is 50.");
|
|
28
|
-
const r = this.fetchSvc.route`/rest/api/3/project/search?${t.map((
|
|
31
|
+
const r = this.fetchSvc.route`/rest/api/3/project/search?${t.map((c) => "id=" + c).join("&")}`;
|
|
32
|
+
return (e = await this.fetchSvc.fetch({
|
|
33
|
+
method: "GET",
|
|
34
|
+
url: r
|
|
35
|
+
})) == null ? void 0 : e.values;
|
|
36
|
+
}
|
|
37
|
+
async projectSearchByKeys(t) {
|
|
38
|
+
var e;
|
|
39
|
+
if (t.length > 50)
|
|
40
|
+
throw new Error("Too many project keys, max allowed is 50.");
|
|
41
|
+
const r = this.fetchSvc.route`/rest/api/3/project/search?${t.map((c) => "key=" + c).join("&")}`;
|
|
29
42
|
return (e = await this.fetchSvc.fetch({
|
|
30
43
|
method: "GET",
|
|
31
44
|
url: r
|
|
@@ -65,8 +78,8 @@ const c = class c {
|
|
|
65
78
|
);
|
|
66
79
|
}
|
|
67
80
|
};
|
|
68
|
-
|
|
69
|
-
let
|
|
81
|
+
s.projectUrl = "/rest/api/3/project";
|
|
82
|
+
let h = s;
|
|
70
83
|
export {
|
|
71
|
-
|
|
84
|
+
h as JiraProjectService
|
|
72
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),g=require("../../../../../../shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.cjs.js"),f=require("../iframe-wrapper.module.scss/index.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),g=require("../../../../../../shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.cjs.js"),f=require("../iframe-wrapper.module.scss/index.cjs.js"),l=n.forwardRef(({iframeProps:e,messageCallback:o,onMouseOut:i},h)=>{const[w,W]=n.useState(),d=n.useRef(!1),r=n.useRef(!1),u=n.useRef(null);n.useImperativeHandle(h,()=>({reloadContentWindow:()=>{var t,c;return(c=(t=u.current)==null?void 0:t.contentWindow)==null?void 0:c.location.reload()},focusContentWindow:()=>{var t,c;return(c=(t=u.current)==null?void 0:t.contentWindow)==null?void 0:c.focus()}}));const a=n.useCallback(t=>{var c;t.source===((c=u.current)==null?void 0:c.contentWindow)&&o&&o(t.data)},[o]);return g.useWindowListener("message",a),n.useEffect(()=>{(async()=>e!=null&&e.height&&(console.log("IframeWrapper: Setting height to",e.height),W(e.height)))()},[e]),n.useEffect(()=>{(async()=>{var t;!r.current&&((t=u.current)!=null&&t.contentWindow)&&(u.current.contentWindow.focus(),r.current=!0)})()}),s.jsx("div",{className:f["iframe-wrapper"],children:s.jsx("iframe",{title:e==null?void 0:e.title,ref:u,width:e==null?void 0:e.width,height:w,src:e==null?void 0:e.link,onMouseEnter:()=>d.current=!0,onMouseOut:()=>{d.current&&i&&i()}})})});l.displayName="IframeWrapper";exports.IframeWrapper=l;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as f, useState as I, useRef as o, useImperativeHandle as
|
|
3
|
-
import { useWindowListener as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useState as I, useRef as o, useImperativeHandle as y, useCallback as R, useEffect as r } from "react";
|
|
3
|
+
import { useWindowListener as a } from "../../../../../../shared/frontend-ui-window-listener-hook/src/lib/window-listener-hook/index.es.js";
|
|
4
|
+
import x from "../iframe-wrapper.module.scss/index.es.js";
|
|
5
|
+
const E = f(
|
|
6
6
|
({ iframeProps: t, messageCallback: u, onMouseOut: d }, s) => {
|
|
7
|
-
const [
|
|
8
|
-
|
|
7
|
+
const [w, W] = I(), i = o(!1), l = o(!1), c = o(null);
|
|
8
|
+
y(
|
|
9
9
|
s,
|
|
10
10
|
() => ({
|
|
11
11
|
reloadContentWindow: () => {
|
|
@@ -18,27 +18,27 @@ const v = f(
|
|
|
18
18
|
}
|
|
19
19
|
})
|
|
20
20
|
);
|
|
21
|
-
const g =
|
|
21
|
+
const g = R(
|
|
22
22
|
(n) => {
|
|
23
23
|
var e;
|
|
24
24
|
n.source === ((e = c.current) == null ? void 0 : e.contentWindow) && u && u(n.data);
|
|
25
25
|
},
|
|
26
26
|
[u]
|
|
27
27
|
);
|
|
28
|
-
return
|
|
28
|
+
return a("message", g), r(() => {
|
|
29
29
|
(async () => t != null && t.height && (console.log("IframeWrapper: Setting height to", t.height), W(t.height)))();
|
|
30
|
-
}, [t]),
|
|
30
|
+
}, [t]), r(() => {
|
|
31
31
|
(async () => {
|
|
32
32
|
var n;
|
|
33
|
-
!
|
|
33
|
+
!l.current && ((n = c.current) != null && n.contentWindow) && (c.current.contentWindow.focus(), l.current = !0);
|
|
34
34
|
})();
|
|
35
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ h("div", { className: x["iframe-wrapper"], children: /* @__PURE__ */ h(
|
|
36
36
|
"iframe",
|
|
37
37
|
{
|
|
38
38
|
title: t == null ? void 0 : t.title,
|
|
39
39
|
ref: c,
|
|
40
40
|
width: t == null ? void 0 : t.width,
|
|
41
|
-
height:
|
|
41
|
+
height: w,
|
|
42
42
|
src: t == null ? void 0 : t.link,
|
|
43
43
|
onMouseEnter: () => i.current = !0,
|
|
44
44
|
onMouseOut: () => {
|
|
@@ -48,6 +48,7 @@ const v = f(
|
|
|
48
48
|
) });
|
|
49
49
|
}
|
|
50
50
|
);
|
|
51
|
+
E.displayName = "IframeWrapper";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
+
E as IframeWrapper
|
|
53
54
|
};
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
{
|
|
229
229
|
"kind": "Method",
|
|
230
230
|
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraProjectService#getAllProjects:member(1)",
|
|
231
|
-
"docComment": "",
|
|
231
|
+
"docComment": "/**\n * @deprecated\n *\n * Use projectSearchByIds instead.\n */\n",
|
|
232
232
|
"excerptTokens": [
|
|
233
233
|
{
|
|
234
234
|
"kind": "Content",
|
|
@@ -653,6 +653,68 @@
|
|
|
653
653
|
"isAbstract": false,
|
|
654
654
|
"name": "projectSearchByIds"
|
|
655
655
|
},
|
|
656
|
+
{
|
|
657
|
+
"kind": "Method",
|
|
658
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraProjectService#projectSearchByKeys:member(1)",
|
|
659
|
+
"docComment": "",
|
|
660
|
+
"excerptTokens": [
|
|
661
|
+
{
|
|
662
|
+
"kind": "Content",
|
|
663
|
+
"text": "projectSearchByKeys(projectKeys: "
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"kind": "Content",
|
|
667
|
+
"text": "string[]"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"kind": "Content",
|
|
671
|
+
"text": "): "
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"kind": "Reference",
|
|
675
|
+
"text": "Promise",
|
|
676
|
+
"canonicalReference": "!Promise:interface"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"kind": "Content",
|
|
680
|
+
"text": "<"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"kind": "Reference",
|
|
684
|
+
"text": "Project",
|
|
685
|
+
"canonicalReference": "@valiantys/atlassian-app-frontend!~Project:interface"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"kind": "Content",
|
|
689
|
+
"text": "[]>"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"kind": "Content",
|
|
693
|
+
"text": ";"
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
"isStatic": false,
|
|
697
|
+
"returnTypeTokenRange": {
|
|
698
|
+
"startIndex": 3,
|
|
699
|
+
"endIndex": 7
|
|
700
|
+
},
|
|
701
|
+
"releaseTag": "Public",
|
|
702
|
+
"isProtected": false,
|
|
703
|
+
"overloadIndex": 1,
|
|
704
|
+
"parameters": [
|
|
705
|
+
{
|
|
706
|
+
"parameterName": "projectKeys",
|
|
707
|
+
"parameterTypeTokenRange": {
|
|
708
|
+
"startIndex": 1,
|
|
709
|
+
"endIndex": 2
|
|
710
|
+
},
|
|
711
|
+
"isOptional": false
|
|
712
|
+
}
|
|
713
|
+
],
|
|
714
|
+
"isOptional": false,
|
|
715
|
+
"isAbstract": false,
|
|
716
|
+
"name": "projectSearchByKeys"
|
|
717
|
+
},
|
|
656
718
|
{
|
|
657
719
|
"kind": "Property",
|
|
658
720
|
"canonicalReference": "@valiantys/atlassian-app-frontend!JiraProjectService.projectUrl:member",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export class JiraProjectService {
|
|
9
9
|
// Warning: (ae-forgotten-export) The symbol "AtlassianProductFetchService" needs to be exported by the entry point data-access-project.d.ts
|
|
10
10
|
constructor(fetchSvc: AtlassianProductFetchService<'jira'>);
|
|
11
|
-
// (undocumented)
|
|
11
|
+
// @deprecated (undocumented)
|
|
12
12
|
getAllProjects(): Promise<Project[]>;
|
|
13
13
|
// Warning: (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point data-access-project.d.ts
|
|
14
14
|
//
|
|
@@ -29,6 +29,8 @@ export class JiraProjectService {
|
|
|
29
29
|
// (undocumented)
|
|
30
30
|
projectSearchByIds(projectIds: string[]): Promise<Project[]>;
|
|
31
31
|
// (undocumented)
|
|
32
|
+
projectSearchByKeys(projectKeys: string[]): Promise<Project[]>;
|
|
33
|
+
// (undocumented)
|
|
32
34
|
static readonly projectUrl = "/rest/api/3/project";
|
|
33
35
|
// (undocumented)
|
|
34
36
|
setProjectProperty<T>(projectIdOrKey: string, propertyKey: string, value: T): Promise<T>;
|
|
@@ -47,8 +47,12 @@ export declare class JiraProjectService {
|
|
|
47
47
|
constructor(fetchSvc: AtlassianProductFetchService<'jira'>);
|
|
48
48
|
getVersions(projectIdOrKey: string): Promise<ProjectVersion[]>;
|
|
49
49
|
getProject(projectIdOrKey: string): Promise<Project>;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use projectSearchByIds instead.
|
|
52
|
+
*/
|
|
50
53
|
getAllProjects(): Promise<Project[]>;
|
|
51
54
|
projectSearchByIds(projectIds: string[]): Promise<Project[]>;
|
|
55
|
+
projectSearchByKeys(projectKeys: string[]): Promise<Project[]>;
|
|
52
56
|
getProjectIssueTypes(projectId: string): Promise<IssueTypeDetails[]>;
|
|
53
57
|
getProjectStatuses(projectIdOrKey: string): Promise<unknown>;
|
|
54
58
|
getProjectProperty<T>(projectIdOrKey: string, propertyKey: string): Promise<T | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiantys/atlassian-app-frontend",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-25",
|
|
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": {
|