@valiantys/atlassian-app 3.2.0-alpha-18 → 3.2.0-alpha-20

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.
@@ -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"),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
+ "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 projectSearchByQuery(t){var c;const r=new URLSearchParams({query:t}),e=this.fetchSvc.route`/rest/api/3/project/search?${r}`;return(c=await this.fetchSvc.fetch({method:"GET",url:e}))==null?void 0:c.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;
@@ -44,6 +44,14 @@ const s = class s {
44
44
  url: r
45
45
  })) == null ? void 0 : e.values;
46
46
  }
47
+ async projectSearchByQuery(t) {
48
+ var c;
49
+ const r = new URLSearchParams({ query: t }), e = this.fetchSvc.route`/rest/api/3/project/search?${r}`;
50
+ return (c = await this.fetchSvc.fetch({
51
+ method: "GET",
52
+ url: e
53
+ })) == null ? void 0 : c.values;
54
+ }
47
55
  async getProjectIssueTypes(t) {
48
56
  return await this.fetchSvc.fetch({
49
57
  method: "GET",
@@ -715,6 +715,68 @@
715
715
  "isAbstract": false,
716
716
  "name": "projectSearchByKeys"
717
717
  },
718
+ {
719
+ "kind": "Method",
720
+ "canonicalReference": "@valiantys/atlassian-app!JiraProjectService#projectSearchByQuery:member(1)",
721
+ "docComment": "",
722
+ "excerptTokens": [
723
+ {
724
+ "kind": "Content",
725
+ "text": "projectSearchByQuery(query: "
726
+ },
727
+ {
728
+ "kind": "Content",
729
+ "text": "string"
730
+ },
731
+ {
732
+ "kind": "Content",
733
+ "text": "): "
734
+ },
735
+ {
736
+ "kind": "Reference",
737
+ "text": "Promise",
738
+ "canonicalReference": "!Promise:interface"
739
+ },
740
+ {
741
+ "kind": "Content",
742
+ "text": "<"
743
+ },
744
+ {
745
+ "kind": "Reference",
746
+ "text": "Project",
747
+ "canonicalReference": "@valiantys/atlassian-app!~Project:interface"
748
+ },
749
+ {
750
+ "kind": "Content",
751
+ "text": "[]>"
752
+ },
753
+ {
754
+ "kind": "Content",
755
+ "text": ";"
756
+ }
757
+ ],
758
+ "isStatic": false,
759
+ "returnTypeTokenRange": {
760
+ "startIndex": 3,
761
+ "endIndex": 7
762
+ },
763
+ "releaseTag": "Public",
764
+ "isProtected": false,
765
+ "overloadIndex": 1,
766
+ "parameters": [
767
+ {
768
+ "parameterName": "query",
769
+ "parameterTypeTokenRange": {
770
+ "startIndex": 1,
771
+ "endIndex": 2
772
+ },
773
+ "isOptional": false
774
+ }
775
+ ],
776
+ "isOptional": false,
777
+ "isAbstract": false,
778
+ "name": "projectSearchByQuery"
779
+ },
718
780
  {
719
781
  "kind": "Property",
720
782
  "canonicalReference": "@valiantys/atlassian-app!JiraProjectService.projectUrl:member",
@@ -31,6 +31,8 @@ export class JiraProjectService {
31
31
  // (undocumented)
32
32
  projectSearchByKeys(projectKeys: string[]): Promise<Project[]>;
33
33
  // (undocumented)
34
+ projectSearchByQuery(query: string): Promise<Project[]>;
35
+ // (undocumented)
34
36
  static readonly projectUrl = "/rest/api/3/project";
35
37
  // (undocumented)
36
38
  setProjectProperty<T>(projectIdOrKey: string, propertyKey: string, value: T): Promise<T>;
@@ -53,6 +53,7 @@ export declare class JiraProjectService {
53
53
  getAllProjects(): Promise<Project[]>;
54
54
  projectSearchByIds(projectIds: string[]): Promise<Project[]>;
55
55
  projectSearchByKeys(projectKeys: string[]): Promise<Project[]>;
56
+ projectSearchByQuery(query: string): Promise<Project[]>;
56
57
  getProjectIssueTypes(projectId: string): Promise<IssueTypeDetails[]>;
57
58
  getProjectStatuses(projectIdOrKey: string): Promise<unknown>;
58
59
  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",
3
- "version": "3.2.0-alpha-18",
3
+ "version": "3.2.0-alpha-20",
4
4
  "description": "This library provides Atlassian Forge components, wrappers, and utilities to support writing Forge apps that can run deployed or in standalone mode",
5
5
  "exports": {
6
6
  "./frontend-app": {
@@ -178,6 +178,11 @@
178
178
  "require": "./ui-forge-feature-flags/index.cjs.js",
179
179
  "types": "./ui-forge-feature-flags/index.d.ts"
180
180
  },
181
+ "./ui-debounce-hook": {
182
+ "import": "./ui-debounce-hook/index.es.js",
183
+ "require": "./ui-debounce-hook/index.cjs.js",
184
+ "types": "./ui-debounce-hook/index.d.ts"
185
+ },
181
186
  "./ui-drop-target": {
182
187
  "import": "./ui-drop-target/index.es.js",
183
188
  "require": "./ui-drop-target/index.cjs.js",
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("lodash/debounce"),u=require("react");function o(n,r=600){const e=u.useRef();return u.useEffect(()=>{e.current=n},[n]),u.useMemo(()=>c(()=>{var t;(t=e.current)==null||t.call(e)},r),[r])}exports.useDebounce=o;
@@ -0,0 +1,14 @@
1
+ import o from "lodash/debounce";
2
+ import { useRef as t, useEffect as c, useMemo as f } from "react";
3
+ function i(u, n = 600) {
4
+ const e = t();
5
+ return c(() => {
6
+ e.current = u;
7
+ }, [u]), f(() => o(() => {
8
+ var r;
9
+ (r = e.current) == null || r.call(e);
10
+ }, n), [n]);
11
+ }
12
+ export {
13
+ i as useDebounce
14
+ };
@@ -0,0 +1,248 @@
1
+ {
2
+ "metadata": {
3
+ "toolPackage": "@microsoft/api-extractor",
4
+ "toolVersion": "7.52.8",
5
+ "schemaVersion": 1011,
6
+ "oldestForwardsCompatibleVersion": 1001,
7
+ "tsdocConfig": {
8
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
9
+ "noStandardTags": true,
10
+ "tagDefinitions": [
11
+ {
12
+ "tagName": "@alpha",
13
+ "syntaxKind": "modifier"
14
+ },
15
+ {
16
+ "tagName": "@beta",
17
+ "syntaxKind": "modifier"
18
+ },
19
+ {
20
+ "tagName": "@defaultValue",
21
+ "syntaxKind": "block"
22
+ },
23
+ {
24
+ "tagName": "@decorator",
25
+ "syntaxKind": "block",
26
+ "allowMultiple": true
27
+ },
28
+ {
29
+ "tagName": "@deprecated",
30
+ "syntaxKind": "block"
31
+ },
32
+ {
33
+ "tagName": "@eventProperty",
34
+ "syntaxKind": "modifier"
35
+ },
36
+ {
37
+ "tagName": "@example",
38
+ "syntaxKind": "block",
39
+ "allowMultiple": true
40
+ },
41
+ {
42
+ "tagName": "@experimental",
43
+ "syntaxKind": "modifier"
44
+ },
45
+ {
46
+ "tagName": "@inheritDoc",
47
+ "syntaxKind": "inline"
48
+ },
49
+ {
50
+ "tagName": "@internal",
51
+ "syntaxKind": "modifier"
52
+ },
53
+ {
54
+ "tagName": "@label",
55
+ "syntaxKind": "inline"
56
+ },
57
+ {
58
+ "tagName": "@link",
59
+ "syntaxKind": "inline",
60
+ "allowMultiple": true
61
+ },
62
+ {
63
+ "tagName": "@override",
64
+ "syntaxKind": "modifier"
65
+ },
66
+ {
67
+ "tagName": "@packageDocumentation",
68
+ "syntaxKind": "modifier"
69
+ },
70
+ {
71
+ "tagName": "@param",
72
+ "syntaxKind": "block",
73
+ "allowMultiple": true
74
+ },
75
+ {
76
+ "tagName": "@privateRemarks",
77
+ "syntaxKind": "block"
78
+ },
79
+ {
80
+ "tagName": "@public",
81
+ "syntaxKind": "modifier"
82
+ },
83
+ {
84
+ "tagName": "@readonly",
85
+ "syntaxKind": "modifier"
86
+ },
87
+ {
88
+ "tagName": "@remarks",
89
+ "syntaxKind": "block"
90
+ },
91
+ {
92
+ "tagName": "@returns",
93
+ "syntaxKind": "block"
94
+ },
95
+ {
96
+ "tagName": "@sealed",
97
+ "syntaxKind": "modifier"
98
+ },
99
+ {
100
+ "tagName": "@see",
101
+ "syntaxKind": "block"
102
+ },
103
+ {
104
+ "tagName": "@throws",
105
+ "syntaxKind": "block",
106
+ "allowMultiple": true
107
+ },
108
+ {
109
+ "tagName": "@typeParam",
110
+ "syntaxKind": "block",
111
+ "allowMultiple": true
112
+ },
113
+ {
114
+ "tagName": "@virtual",
115
+ "syntaxKind": "modifier"
116
+ },
117
+ {
118
+ "tagName": "@betaDocumentation",
119
+ "syntaxKind": "modifier"
120
+ },
121
+ {
122
+ "tagName": "@internalRemarks",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@preapproved",
127
+ "syntaxKind": "modifier"
128
+ }
129
+ ],
130
+ "supportForTags": {
131
+ "@alpha": true,
132
+ "@beta": true,
133
+ "@defaultValue": true,
134
+ "@decorator": true,
135
+ "@deprecated": true,
136
+ "@eventProperty": true,
137
+ "@example": true,
138
+ "@experimental": true,
139
+ "@inheritDoc": true,
140
+ "@internal": true,
141
+ "@label": true,
142
+ "@link": true,
143
+ "@override": true,
144
+ "@packageDocumentation": true,
145
+ "@param": true,
146
+ "@privateRemarks": true,
147
+ "@public": true,
148
+ "@readonly": true,
149
+ "@remarks": true,
150
+ "@returns": true,
151
+ "@sealed": true,
152
+ "@see": true,
153
+ "@throws": true,
154
+ "@typeParam": true,
155
+ "@virtual": true,
156
+ "@betaDocumentation": true,
157
+ "@internalRemarks": true,
158
+ "@preapproved": true
159
+ },
160
+ "reportUnsupportedHtmlElements": false
161
+ }
162
+ },
163
+ "kind": "Package",
164
+ "canonicalReference": "@valiantys/atlassian-app!",
165
+ "docComment": "",
166
+ "name": "@valiantys/atlassian-app",
167
+ "preserveMemberOrder": false,
168
+ "members": [
169
+ {
170
+ "kind": "EntryPoint",
171
+ "canonicalReference": "@valiantys/atlassian-app!",
172
+ "name": "",
173
+ "preserveMemberOrder": false,
174
+ "members": [
175
+ {
176
+ "kind": "Function",
177
+ "canonicalReference": "@valiantys/atlassian-app!useDebounce:function(1)",
178
+ "docComment": "/**\n * Debounce calls to a function on some change.\n *\n * @param callback - The function to call after the debounce time has elapsed.\n *\n * @param wait - How many seconds to wait before invoking callback. @return A wrapped version of the callback function that will handle the details of debouncing. You may call this wrapper on every change.\n */\n",
179
+ "excerptTokens": [
180
+ {
181
+ "kind": "Content",
182
+ "text": "export declare function useDebounce(callback: "
183
+ },
184
+ {
185
+ "kind": "Content",
186
+ "text": "() => void"
187
+ },
188
+ {
189
+ "kind": "Content",
190
+ "text": ", wait?: "
191
+ },
192
+ {
193
+ "kind": "Content",
194
+ "text": "number"
195
+ },
196
+ {
197
+ "kind": "Content",
198
+ "text": "): "
199
+ },
200
+ {
201
+ "kind": "Content",
202
+ "text": "import('lodash')."
203
+ },
204
+ {
205
+ "kind": "Reference",
206
+ "text": "DebouncedFunc",
207
+ "canonicalReference": "@types/lodash!\"\\\"../index\\\"\".DebouncedFunc:interface"
208
+ },
209
+ {
210
+ "kind": "Content",
211
+ "text": "<() => void>"
212
+ },
213
+ {
214
+ "kind": "Content",
215
+ "text": ";"
216
+ }
217
+ ],
218
+ "fileUrlPath": "../../../shared/frontend-ui-debounce-hook/src/lib/shared-frontend-ui-debounce-hook.d.ts",
219
+ "returnTypeTokenRange": {
220
+ "startIndex": 5,
221
+ "endIndex": 8
222
+ },
223
+ "releaseTag": "Public",
224
+ "overloadIndex": 1,
225
+ "parameters": [
226
+ {
227
+ "parameterName": "callback",
228
+ "parameterTypeTokenRange": {
229
+ "startIndex": 1,
230
+ "endIndex": 2
231
+ },
232
+ "isOptional": false
233
+ },
234
+ {
235
+ "parameterName": "wait",
236
+ "parameterTypeTokenRange": {
237
+ "startIndex": 3,
238
+ "endIndex": 4
239
+ },
240
+ "isOptional": true
241
+ }
242
+ ],
243
+ "name": "useDebounce"
244
+ }
245
+ ]
246
+ }
247
+ ]
248
+ }
@@ -0,0 +1,14 @@
1
+ ## API Report File for "@valiantys/atlassian-app"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { DebouncedFunc } from 'lodash';
8
+
9
+ // @public
10
+ export function useDebounce(callback: () => void, wait?: number): DebouncedFunc<() => void>;
11
+
12
+ // (No @packageDocumentation comment for this package)
13
+
14
+ ```
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../shared/frontend-ui-debounce-hook/src/lib/shared-frontend-ui-debounce-hook/index.cjs.js");exports.useDebounce=e.useDebounce;
@@ -0,0 +1,16 @@
1
+ import { DebouncedFunc } from 'lodash';
2
+
3
+ /**
4
+ * This hook is taken from an example by Nadia Makarevich:
5
+ * https://www.developerway.com/posts/debouncing-in-react
6
+ */
7
+ /**
8
+ * Debounce calls to a function on some change.
9
+ * @param callback The function to call after the debounce time has elapsed.
10
+ * @param wait How many seconds to wait before invoking callback.
11
+ * @return A wrapped version of the callback function that will handle the details
12
+ * of debouncing. You may call this wrapper on every change.
13
+ */
14
+ export declare function useDebounce(callback: () => void, wait?: number): DebouncedFunc<() => void>;
15
+
16
+ export { }
@@ -0,0 +1,4 @@
1
+ import { useDebounce as r } from "../shared/frontend-ui-debounce-hook/src/lib/shared-frontend-ui-debounce-hook/index.es.js";
2
+ export {
3
+ r as useDebounce
4
+ };
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.52.8"
9
+ }
10
+ ]
11
+ }