@atlassian/clientside-extensions-docs 3.1.0 → 3.1.1-docs-2
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/content/server/framework/clientside-extensions/get-help.md +1 -1
- package/content/server/framework/clientside-extensions/guides/extension-points/creating-an-extension-point.md +1 -1
- package/content/server/framework/clientside-extensions/guides/extension-points/extension-point-documentation.md +1 -1
- package/content/server/framework/clientside-extensions/guides/extension-points/index.md +1 -1
- package/content/server/framework/clientside-extensions/guides/extension-points/providing-context.md +1 -1
- package/content/server/framework/clientside-extensions/guides/extension-points/rendering-extensions.md +1 -1
- package/content/server/framework/clientside-extensions/guides/how-to/debugging-and-troubleshooting-an-extension.md +1 -1
- package/content/server/framework/clientside-extensions/guides/how-to/setup-page-bootstrapper.md +1 -1
- package/content/server/framework/clientside-extensions/guides/how-to/setup-schema-loader.md +1 -1
- package/content/server/framework/clientside-extensions/guides/how-to/setup-webpack-plugin.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/creating-a-modal.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/creating-a-page.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/creating-an-extension.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/custom-HTML-content.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/discovering-extension-points.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/index.md +1 -1
- package/content/server/framework/clientside-extensions/guides/introduction/using-extension-api.md +1 -1
- package/content/server/framework/clientside-extensions/index.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-api/async-panel-api.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-api/index.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-api/modal-api.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-api/panel-api.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-api/render-element-as-react.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/async-panel.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/button.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/index.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/link.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/modal.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/page.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-factories/panel.md +2 -2
- package/content/server/framework/clientside-extensions/reference/api/extension-points/extension-handlers.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-points/hooks-and-components.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-points/index.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-points/schemas.md +1 -1
- package/content/server/framework/clientside-extensions/reference/api/extension-points-v1-deprecated.md +1 -1
- package/content/server/framework/clientside-extensions/reference/glossary/index.md +1 -1
- package/content/server/framework/clientside-extensions/reference/webpack-plugin/annotations.md +31 -3
- package/content/server/framework/clientside-extensions/reference/webpack-plugin/webpack-plugin.md +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# AsyncPanel
|
|
@@ -94,7 +94,7 @@ Read more information about [Revealing extension points on the page](/server/fra
|
|
|
94
94
|
</tr>
|
|
95
95
|
<tr>
|
|
96
96
|
<td><code>@condition</code></td>
|
|
97
|
-
<td><code>string |
|
|
97
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
98
98
|
<td>
|
|
99
99
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
100
100
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/api/extension-factories/button.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Button
|
|
@@ -82,7 +82,7 @@ Read more information about [Revealing extension points on the page](/server/fra
|
|
|
82
82
|
</tr>
|
|
83
83
|
<tr>
|
|
84
84
|
<td><code>@condition</code></td>
|
|
85
|
-
<td><code>string |
|
|
85
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
86
86
|
<td>
|
|
87
87
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
88
88
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/api/extension-factories/link.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Link
|
|
@@ -79,7 +79,7 @@ Read more information about [Revealing extension points on the page](/server/fra
|
|
|
79
79
|
</tr>
|
|
80
80
|
<tr>
|
|
81
81
|
<td><code>@condition</code></td>
|
|
82
|
-
<td><code>string |
|
|
82
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
83
83
|
<td>
|
|
84
84
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
85
85
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/api/extension-factories/modal.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Modal
|
|
@@ -85,7 +85,7 @@ Read more information about [Revealing extension points on the page](/server/fra
|
|
|
85
85
|
</tr>
|
|
86
86
|
<tr>
|
|
87
87
|
<td><code>@condition</code></td>
|
|
88
|
-
<td><code>string |
|
|
88
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
89
89
|
<td>
|
|
90
90
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
91
91
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/api/extension-factories/page.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Page
|
|
@@ -113,7 +113,7 @@ A page extension allows the creation of custom web page and rendering a navigati
|
|
|
113
113
|
</tr>
|
|
114
114
|
<tr>
|
|
115
115
|
<td><code>@condition</code></td>
|
|
116
|
-
<td><code>string |
|
|
116
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
117
117
|
<td>
|
|
118
118
|
<p>Defines one or multiple conditions that must be satisfied for the navigation link to be displayed.</p>
|
|
119
119
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/api/extension-factories/panel.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: api
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Panel
|
|
@@ -78,7 +78,7 @@ Read more information about [Revealing extension points on the page](/server/fra
|
|
|
78
78
|
</tr>
|
|
79
79
|
<tr>
|
|
80
80
|
<td><code>@condition</code></td>
|
|
81
|
-
<td><code>string |
|
|
81
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
82
82
|
<td>
|
|
83
83
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
84
84
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
package/content/server/framework/clientside-extensions/reference/webpack-plugin/annotations.md
CHANGED
|
@@ -4,7 +4,7 @@ platform: server
|
|
|
4
4
|
product: clientside-extensions
|
|
5
5
|
category: reference
|
|
6
6
|
subcategory: webpack
|
|
7
|
-
date: '2024-09-
|
|
7
|
+
date: '2024-09-24'
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Annotations
|
|
@@ -47,7 +47,7 @@ The provided webpack plugin uses annotations in comments to gather information a
|
|
|
47
47
|
</tr>
|
|
48
48
|
<tr>
|
|
49
49
|
<td><code>@condition</code></td>
|
|
50
|
-
<td><code>string |
|
|
50
|
+
<td><code>string | Condition, UrlReadingCondition</code></td>
|
|
51
51
|
<td>
|
|
52
52
|
<p>Defines one or multiple conditions that must be satisfied for the extension to be displayed.</p>
|
|
53
53
|
<p>The conditions are evaluated on the server, and created with Java.</p>
|
|
@@ -263,7 +263,7 @@ export default PageExtension.factory((container) => {
|
|
|
263
263
|
### 5. Define a condition
|
|
264
264
|
|
|
265
265
|
The `@condition` annotation allows you to define one or multiple conditions that must be satisfied for the extension to be displayed.
|
|
266
|
-
These conditions are
|
|
266
|
+
These conditions are evaluated on the server and are implemented in Java. They are used for determining if the extension should be downloaded and rendered by the client. For compatibility reasons, the condition class needs to implement both `com.atlassian.plugin.web.Condition` and `com.atlassian.webresource.spi.condition.UrlReadingCondition` interfaces, and both implementations should yield the same result.
|
|
267
267
|
|
|
268
268
|
For more information about the condition's usage please refer to the [examples of Web items documentation](https://developer.atlassian.com/server/framework/atlassian-sdk/web-section-plugin-module/#condition-and-conditions-elements) and check the [documentation of `conditionMap` option from `atlassian-webresource-webpack-plugin`](https://www.npmjs.com/package/atlassian-webresource-webpack-plugin#conditionmap-optional).
|
|
269
269
|
|
|
@@ -278,6 +278,34 @@ import { LinkExtension } from '@atlassian/clientside-extensions';
|
|
|
278
278
|
export default LinkExtension.factory(/*...*/);
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
+
```java
|
|
282
|
+
public class RandomCondition implements Condition, UrlReadingCondition {
|
|
283
|
+
// Condition implementation
|
|
284
|
+
@Override
|
|
285
|
+
public void init(Map<String, String> map) {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@Override
|
|
289
|
+
public boolean shouldDisplay(Map<String, Object> map) {
|
|
290
|
+
// ...
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// UrlReadingCondition implementation
|
|
294
|
+
@Override
|
|
295
|
+
public void addToUrl(UrlBuilder urlBuilder) {
|
|
296
|
+
// ...
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Needs to be the same result as {@link #shouldDisplay(Map)}
|
|
301
|
+
*/
|
|
302
|
+
@Override
|
|
303
|
+
public boolean shouldDisplay(QueryParams queryParams) {
|
|
304
|
+
// ...
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
281
309
|
### 6. Define a condition with parameters
|
|
282
310
|
|
|
283
311
|
To add parameters to the conditions you can use multiple `@condition` annotations. These parameters will be passed in to the condition's `init()` method as a map of string key/value pairs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/clientside-extensions-docs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1-docs-2",
|
|
4
4
|
"description": "Holds the official documentation for Altassian Server client-side extensions API.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"homepage": "https://bitbucket.org/atlassian/atlassian-clientside-extensions#readme",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"optionalDependencies": {
|
|
81
81
|
"@atlassian/doc-scripts": "^7.1.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "9d4316afcce1a69967432de7ddf85c3440e50ea2"
|
|
84
84
|
}
|