@atlaskit/editor-plugin-quick-insert 16.2.7 → 16.2.8
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/CHANGELOG.md +11 -0
- package/dist/cjs/ui/RegistryElementBrowser/NotFoundIllustration.js +76 -0
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowser.compiled.css +7 -2
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowser.js +61 -9
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowserCategories.compiled.css +3 -1
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowserCategories.js +12 -9
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowserFooter.js +28 -10
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.compiled.css +20 -2
- package/dist/cjs/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.js +23 -31
- package/dist/cjs/ui/RegistryElementBrowser/model.js +9 -2
- package/dist/es2019/ui/RegistryElementBrowser/NotFoundIllustration.js +69 -0
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowser.compiled.css +7 -2
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowser.js +61 -9
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowserCategories.compiled.css +3 -1
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowserCategories.js +11 -8
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowserFooter.js +28 -10
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.compiled.css +20 -2
- package/dist/es2019/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.js +24 -32
- package/dist/es2019/ui/RegistryElementBrowser/model.js +10 -2
- package/dist/esm/ui/RegistryElementBrowser/NotFoundIllustration.js +69 -0
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowser.compiled.css +7 -2
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowser.js +61 -9
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowserCategories.compiled.css +3 -1
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowserCategories.js +12 -9
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowserFooter.js +28 -10
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.compiled.css +20 -2
- package/dist/esm/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.js +24 -32
- package/dist/esm/ui/RegistryElementBrowser/model.js +9 -2
- package/dist/types/ui/RegistryElementBrowser/NotFoundIllustration.d.ts +1 -0
- package/dist/types/ui/RegistryElementBrowser/RegistryElementBrowserCategories.d.ts +1 -2
- package/dist/types/ui/RegistryElementBrowser/RegistryElementBrowserFooter.d.ts +2 -1
- package/dist/types/ui/RegistryElementBrowser/RegistryElementBrowserSearchResults.d.ts +1 -2
- package/dist/types/ui/RegistryElementBrowser/model.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-quick-insert
|
|
2
2
|
|
|
3
|
+
## 16.2.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7a5578f056f2b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7a5578f056f2b) -
|
|
8
|
+
Under `platform_editor_slash_command`, enhance the registry element browser with a responsive
|
|
9
|
+
968px modal, a clearable search field, category navigation, and responsive item grids. Unselected
|
|
10
|
+
element cards have no border, while selected cards retain their selected border. Item descriptions
|
|
11
|
+
appear below titles when registration metadata supplies one.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 16.2.7
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = NotFoundIllustration;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
/**
|
|
9
|
+
* @jsxRuntime classic
|
|
10
|
+
* @jsx jsx
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
+
|
|
14
|
+
var imageContainer = (0, _react.css)({
|
|
15
|
+
width: '120px',
|
|
16
|
+
height: '111px',
|
|
17
|
+
marginTop: "var(--ds-space-600, 48px)"
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
21
|
+
function NotFoundIllustration() {
|
|
22
|
+
return (0, _react.jsx)("div", {
|
|
23
|
+
css: imageContainer
|
|
24
|
+
}, (0, _react.jsx)("svg", {
|
|
25
|
+
width: "120",
|
|
26
|
+
height: "111",
|
|
27
|
+
fill: "none",
|
|
28
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
29
|
+
}, (0, _react.jsx)("g", {
|
|
30
|
+
clipPath: "url(#clip0)"
|
|
31
|
+
}, (0, _react.jsx)("path", {
|
|
32
|
+
fill: "#fff",
|
|
33
|
+
fillOpacity: ".01",
|
|
34
|
+
d: "M0 0h120v110.365H0z"
|
|
35
|
+
}), (0, _react.jsx)("path", {
|
|
36
|
+
opacity: ".3",
|
|
37
|
+
d: "M60.985 110.336c-.539.017-1.078.029-1.616.035a1.359 1.359 0 01-1.367-1.36 1.361 1.361 0 011.314-1.372h.041a50.876 50.876 0 0010.276-1.105 1.367 1.367 0 01.568 2.674 54.422 54.422 0 01-9.216 1.128zM52 109.877c-.075 0-.156 0-.237-.012a52.688 52.688 0 01-10.583-2.61 1.368 1.368 0 01.92-2.575c3.245 1.169 6.616 2 10.034 2.471.747.104 1.268.79 1.164 1.54A1.36 1.36 0 0152 109.877zM77.088 107.162a1.364 1.364 0 01-1.326-.895 1.366 1.366 0 01.805-1.755 50.423 50.423 0 009.274-4.575 1.358 1.358 0 011.877.43c.4.64.208 1.482-.429 1.884a53.25 53.25 0 01-9.772 4.824 1.26 1.26 0 01-.429.087zM34.9 104.32a1.359 1.359 0 01-.683-.157 53.29 53.29 0 01-9.042-6.092 1.369 1.369 0 01-.18-1.924 1.357 1.357 0 011.918-.18 50.483 50.483 0 008.578 5.778c.667.354.916 1.18.562 1.848a1.337 1.337 0 01-1.152.727zM20.732 93.23a1.372 1.372 0 01-1.06-.448 53.223 53.223 0 01-6.436-8.818 1.37 1.37 0 01.487-1.872 1.36 1.36 0 011.865.489 50.724 50.724 0 006.105 8.364 1.366 1.366 0 01-.098 1.93c-.25.226-.556.343-.863.354zM104.093 84.196a1.367 1.367 0 01-1.228-2.046 50.41 50.41 0 004.183-9.48 1.358 1.358 0 011.714-.878 1.365 1.365 0 01.875 1.72 53.17 53.17 0 01-4.414 9.993 1.34 1.34 0 01-1.13.691zM11.18 77.965a1.365 1.365 0 01-1.31-.854 52.827 52.827 0 01-3.029-10.498 1.362 1.362 0 112.682-.483 50.732 50.732 0 002.873 9.958 1.363 1.363 0 01-1.216 1.877zM110.17 67.218a1.362 1.362 0 01-1.39-1.593c.579-3.395.805-6.876.683-10.347l-.006-.116a1.36 1.36 0 011.315-1.412 1.359 1.359 0 011.408 1.32l.006.115a54.054 54.054 0 01-.724 10.905 1.36 1.36 0 01-1.292 1.128zM7.426 60.3c-.753.03-1.384-.534-1.407-1.29v-.058a53.82 53.82 0 01.712-10.846 1.368 1.368 0 011.57-1.122c.741.128 1.24.83 1.118 1.575a51.307 51.307 0 00-.678 10.288c.029.762-.562 1.425-1.315 1.453zM110.06 49.076a1.363 1.363 0 01-1.385-1.122 50.567 50.567 0 00-2.884-9.95c-.284-.698.052-1.5.747-1.785a1.365 1.365 0 011.778.75 53.085 53.085 0 013.041 10.497 1.37 1.37 0 01-1.094 1.593l-.203.017zM9.888 42.462a1.452 1.452 0 01-.47-.065 1.365 1.365 0 01-.874-1.72 53.157 53.157 0 014.402-9.998 1.362 1.362 0 011.86-.511c.655.372.88 1.209.51 1.866a50.68 50.68 0 00-4.177 9.486 1.37 1.37 0 01-1.251.941zM103.815 32.179a1.355 1.355 0 01-1.222-.674 50.958 50.958 0 00-6.117-8.359 1.366 1.366 0 01.099-1.93 1.355 1.355 0 011.923.099 53.449 53.449 0 016.447 8.806 1.37 1.37 0 01-.487 1.872 1.432 1.432 0 01-.643.186zM18.31 26.529a1.372 1.372 0 01-1.124-2.209 53.551 53.551 0 017.537-7.888 1.363 1.363 0 011.923.157 1.375 1.375 0 01-.156 1.93 51.072 51.072 0 00-7.154 7.487 1.343 1.343 0 01-1.025.523zM92.172 18.444a1.352 1.352 0 01-.915-.314 50.861 50.861 0 00-8.59-5.772 1.368 1.368 0 01-.568-1.849 1.364 1.364 0 011.842-.57 53.153 53.153 0 019.048 6.08c.58.483.66 1.343.18 1.925a1.366 1.366 0 01-.997.5zM31.64 14.433a1.368 1.368 0 01-.776-2.523 53.107 53.107 0 019.771-4.836 1.359 1.359 0 011.75.808c.26.71-.099 1.494-.805 1.755a50.203 50.203 0 00-9.269 4.587c-.208.133-.44.203-.672.209zM76.555 9.51a1.257 1.257 0 01-.504-.082A50.06 50.06 0 0066.013 6.97a1.364 1.364 0 01-1.165-1.54 1.364 1.364 0 011.535-1.168 52.623 52.623 0 0110.584 2.592 1.369 1.369 0 01-.412 2.657zM48.287 7.65a1.367 1.367 0 01-.33-2.703 54.261 54.261 0 0110.827-1.18 1.367 1.367 0 011.372 1.36 1.367 1.367 0 01-1.314 1.377H58.8A50.85 50.85 0 0048.525 7.62c-.081.018-.162.024-.238.03z",
|
|
38
|
+
fill: "#B3BAC5"
|
|
39
|
+
}), (0, _react.jsx)("path", {
|
|
40
|
+
opacity: ".3",
|
|
41
|
+
d: "M110.523 19.873a.304.304 0 01-.226-.325l.035-.262c.029-.168.064-.348.11-.534a4.423 4.423 0 01.95-1.796c.458-.53 1.118-.971 1.97-1.314l1.436-.587c.858-.343 1.385-.913 1.593-1.697a2.48 2.48 0 00.07-.878 1.998 1.998 0 00-.273-.849c-.156-.261-.37-.5-.654-.709a3.07 3.07 0 00-1.049-.477c-.451-.116-.851-.133-1.21-.052a2.56 2.56 0 00-.956.43c-.278.204-.51.465-.695.78-.191.313-.33.65-.423.999-.029.104-.052.21-.07.302a.459.459 0 01-.59.355l-2.219-.68a.464.464 0 01-.33-.483c.006-.07.017-.14.029-.21.035-.197.075-.383.121-.569.174-.668.47-1.29.887-1.866a5.14 5.14 0 011.546-1.412c.614-.366 1.31-.605 2.097-.72.788-.117 1.645-.047 2.578.197.967.256 1.778.622 2.433 1.098.66.477 1.176 1.012 1.552 1.599.377.593.614 1.22.707 1.889.093.668.058 1.32-.11 1.953-.261 1-.712 1.796-1.344 2.389a6.773 6.773 0 01-2.288 1.39l-1.211.458c-.341.11-.851.338-1.274.803-.041.046-.214.238-.388.534-.128.221-.22.436-.284.622a.303.303 0 01-.365.192l-2.155-.57zm-1.772 3.412c.145-.552.457-.97.944-1.26a1.942 1.942 0 011.552-.222c.551.146.968.465 1.257.96.29.493.359 1.017.215 1.569a1.966 1.966 0 01-.956 1.25 2.005 2.005 0 01-1.558.203 1.957 1.957 0 01-1.246-.942 1.98 1.98 0 01-.208-1.558zM10.722 12.393a.301.301 0 01-.203-.338l.053-.261c.04-.169.086-.343.15-.523a4.334 4.334 0 011.072-1.727c.492-.5 1.176-.889 2.056-1.18l1.472-.488c.874-.285 1.442-.814 1.703-1.587.092-.279.139-.57.127-.872a2.052 2.052 0 00-.214-.866 2.285 2.285 0 00-.609-.75c-.266-.226-.608-.406-1.013-.546-.44-.151-.846-.192-1.205-.134a2.518 2.518 0 00-1.726 1.099 3.583 3.583 0 00-.585 1.267.461.461 0 01-.615.314L9.02 4.976a.467.467 0 01-.295-.506c.011-.07.029-.14.046-.21a5.65 5.65 0 01.162-.557A5.505 5.505 0 019.946 1.9 5.246 5.246 0 0111.579.593a5.545 5.545 0 012.138-.576c.793-.058 1.645.064 2.554.372.945.32 1.732.739 2.358 1.262.626.523 1.106 1.087 1.442 1.703.336.616.533 1.255.58 1.93a4.97 4.97 0 01-.244 1.941c-.33.982-.828 1.744-1.506 2.29a6.844 6.844 0 01-2.375 1.233l-1.24.372a2.94 2.94 0 00-1.326.715c-.046.046-.232.226-.423.505-.145.215-.249.419-.324.599a.3.3 0 01-.377.168l-2.114-.714zm-1.998 3.284a2 2 0 011.025-1.198 1.957 1.957 0 011.564-.116c.539.18.933.529 1.188 1.04.254.512.29 1.041.11 1.582-.18.54-.528.935-1.037 1.18a2.019 2.019 0 01-1.57.098 1.96 1.96 0 01-1.182-1.029 1.99 1.99 0 01-.098-1.557zM7.177 104.849a.298.298 0 01-.37-.134c-.041-.076-.082-.157-.122-.238a8.207 8.207 0 01-.215-.5 4.405 4.405 0 01-.249-2.017c.076-.698.36-1.436.863-2.215l.84-1.308c.504-.773.614-1.546.33-2.307a2.6 2.6 0 00-.446-.762 2.019 2.019 0 00-.706-.54 2.421 2.421 0 00-.944-.204 3.05 3.05 0 00-1.13.215c-.434.163-.776.378-1.025.657-.25.273-.423.576-.533.901-.11.326-.15.674-.128 1.04.024.367.099.721.226 1.064.04.105.076.198.116.285a.466.466 0 01-.278.634l-2.201.72a.455.455 0 01-.545-.209c-.034-.064-.063-.128-.098-.192a5.595 5.595 0 01-.568-2.575 5.09 5.09 0 01.458-2.046c.29-.65.724-1.25 1.303-1.796.58-.546 1.32-.988 2.225-1.32.938-.348 1.807-.517 2.618-.505.81.012 1.54.151 2.19.413a4.62 4.62 0 011.656 1.139c.458.494.8 1.046 1.025 1.662.36.971.446 1.884.267 2.732-.18.85-.539 1.669-1.078 2.46l-.73 1.075c-.214.29-.503.767-.585 1.389-.005.064-.04.319-.011.657.023.255.07.482.127.668a.309.309 0 01-.19.372l-2.092.785zm.504 3.813a2.026 2.026 0 01.052-1.581 1.958 1.958 0 011.147-1.076 1.986 1.986 0 011.576.064c.521.239.88.628 1.077 1.163a1.947 1.947 0 01-.07 1.569 2.028 2.028 0 01-1.158 1.064 1.977 1.977 0 01-1.564-.052 1.96 1.96 0 01-1.06-1.151z",
|
|
42
|
+
fill: "#C1C7D0"
|
|
43
|
+
}), (0, _react.jsx)("path", {
|
|
44
|
+
d: "M86.519 77.651l-4.142-4.028-5.578 5.784 4.141 4.028a7.812 7.812 0 012.15 3.772 7.858 7.858 0 002.148 3.773l16.816 16.333a6.405 6.405 0 009.077-.145 6.46 6.46 0 00-.144-9.108L94.171 81.726a7.786 7.786 0 00-3.83-2.034 7.9 7.9 0 01-3.822-2.04z",
|
|
45
|
+
fill: "#CFD4DB"
|
|
46
|
+
}), (0, _react.jsx)("path", {
|
|
47
|
+
d: "M90.18 79.64a7.756 7.756 0 01-3.656-1.995l-1.262-1.226a4 4 0 00-5.671.093 4.032 4.032 0 00.092 5.69l1.263 1.227a7.853 7.853 0 012.103 3.598 33.606 33.606 0 003.858-3.435 33.629 33.629 0 003.273-3.953z",
|
|
48
|
+
fill: "#B3BAC5"
|
|
49
|
+
}), (0, _react.jsx)("path", {
|
|
50
|
+
d: "M59.056 90.677c-8.961.146-17.442-3.22-23.877-9.474-13.295-12.91-13.636-34.266-.77-47.606C40.64 27.14 49.01 23.501 57.966 23.35c8.961-.145 17.441 3.22 23.877 9.475 6.441 6.255 10.062 14.654 10.212 23.64.145 8.992-3.209 17.502-9.442 23.96-6.227 6.47-14.597 10.108-23.558 10.253zM58.1 31.388c-6.824.11-13.19 2.883-17.94 7.801-9.795 10.155-9.534 26.413.585 36.242 4.9 4.76 11.36 7.324 18.183 7.213 6.824-.11 13.19-2.883 17.94-7.8 4.744-4.918 7.299-11.399 7.189-18.246-.11-6.847-2.873-13.236-7.774-18.002-4.906-4.755-11.36-7.318-18.183-7.208z",
|
|
51
|
+
fill: "url(#paint0_linear)"
|
|
52
|
+
}), (0, _react.jsx)("path", {
|
|
53
|
+
d: "M68.886 49.535l-3.093-3.051a1.158 1.158 0 00-1.64.017l-5.67 5.796-5.776-5.691a1.158 1.158 0 00-1.64.017l-3.04 3.104c-.446.46-.44 1.192.017 1.645l5.775 5.69-5.67 5.796c-.447.46-.44 1.192.017 1.645l3.093 3.052a1.158 1.158 0 001.64-.018l5.67-5.795 5.775 5.69a1.158 1.158 0 001.64-.017l3.04-3.104c.447-.459.441-1.191-.017-1.645l-5.775-5.69 5.671-5.795c.446-.46.44-1.198-.017-1.645z",
|
|
54
|
+
fill: "#C1C7D0"
|
|
55
|
+
})), (0, _react.jsx)("defs", null, (0, _react.jsx)("linearGradient", {
|
|
56
|
+
id: "paint0_linear",
|
|
57
|
+
x1: "34.792",
|
|
58
|
+
y1: "80.822",
|
|
59
|
+
x2: "82.401",
|
|
60
|
+
y2: "33.377",
|
|
61
|
+
gradientUnits: "userSpaceOnUse"
|
|
62
|
+
}, (0, _react.jsx)("stop", {
|
|
63
|
+
offset: ".557",
|
|
64
|
+
stopColor: "#C1C7D0"
|
|
65
|
+
}), (0, _react.jsx)("stop", {
|
|
66
|
+
offset: ".966",
|
|
67
|
+
stopColor: "#E9EBEF",
|
|
68
|
+
stopOpacity: ".5"
|
|
69
|
+
})), (0, _react.jsx)("clipPath", {
|
|
70
|
+
id: "clip0"
|
|
71
|
+
}, (0, _react.jsx)("path", {
|
|
72
|
+
fill: "#fff",
|
|
73
|
+
d: "M0 0h120v110.365H0z"
|
|
74
|
+
})))));
|
|
75
|
+
}
|
|
76
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
._zulp1ejb{gap:var(--ds-space-300,24px)}
|
|
2
|
-
.
|
|
1
|
+
._zulp1ejb{gap:var(--ds-space-300,24px)}
|
|
2
|
+
._zulp1fka{gap:calc(var(--ds-space-200, 1pc) + var(--ds-space-150, 9pt))}._1bsb1osq{width:100%}
|
|
3
|
+
._1e0c11p5{display:grid}
|
|
4
|
+
._4cvr1h6o{align-items:center}
|
|
5
|
+
._yv0e1xuv{grid-template-columns:182px minmax(0,1fr)}
|
|
6
|
+
._yv0ehpfy{grid-template-columns:minmax(0,1fr) auto}
|
|
7
|
+
@media (max-width:599px){._lk4ji47z{grid-template-columns:minmax(0,1fr)}}
|
|
@@ -12,22 +12,30 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
|
+
var _button = _interopRequireDefault(require("@atlaskit/button/icon/button"));
|
|
15
16
|
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
16
17
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
17
18
|
var _typeAheadGetMenuFooterSectionKey = require("@atlaskit/editor-common/type-ahead-get-menu-footer-section-key");
|
|
18
19
|
var _typeAheadGetSectionOverflowItemKey = require("@atlaskit/editor-common/type-ahead-get-section-overflow-item-key");
|
|
20
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
19
21
|
var _modalDialog = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-dialog"));
|
|
20
22
|
var _modalBody = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-body"));
|
|
21
23
|
var _modalFooter = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-footer"));
|
|
22
24
|
var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
|
|
23
25
|
var _modalTransition = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-transition"));
|
|
26
|
+
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
24
27
|
var _model = require("./model");
|
|
25
28
|
var _RegistryElementBrowserCategories = require("./RegistryElementBrowserCategories");
|
|
26
29
|
var _RegistryElementBrowserFooter = require("./RegistryElementBrowserFooter");
|
|
27
30
|
var _RegistryElementBrowserSearchResults = require("./RegistryElementBrowserSearchResults");
|
|
28
31
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
32
|
+
var browserGridTemplateColumns = '182px minmax(0, 1fr)';
|
|
33
|
+
var categoryColumnGap = "calc(".concat("var(--ds-space-200, 16px)", " + ", "var(--ds-space-150, 12px)", ")");
|
|
29
34
|
var browserLayoutStyles = null;
|
|
35
|
+
var headerContentStyles = null;
|
|
36
|
+
var headerSearchStyles = null;
|
|
30
37
|
var resultsId = 'registry-element-browser-results';
|
|
38
|
+
var modalTestId = 'registry-element-browser-modal';
|
|
31
39
|
var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryElementBrowser(_ref) {
|
|
32
40
|
var components = _ref.components,
|
|
33
41
|
emptyStateHandler = _ref.emptyStateHandler,
|
|
@@ -69,6 +77,7 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
69
77
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
70
78
|
selectedKey = _useState6[0],
|
|
71
79
|
setSelectedKey = _useState6[1];
|
|
80
|
+
var searchInputRef = (0, _react.useRef)(null);
|
|
72
81
|
var wasOpen = (0, _react.useRef)(false);
|
|
73
82
|
var previousIsOffline = (0, _react.useRef)(isOffline);
|
|
74
83
|
(0, _react.useEffect)(function () {
|
|
@@ -87,7 +96,7 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
87
96
|
formatMessage: formatMessage,
|
|
88
97
|
model: model,
|
|
89
98
|
query: query,
|
|
90
|
-
section:
|
|
99
|
+
section: section
|
|
91
100
|
});
|
|
92
101
|
}, [formatMessage, model, query, section]);
|
|
93
102
|
(0, _react.useEffect)(function () {
|
|
@@ -99,7 +108,6 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
99
108
|
}, [isOffline, onClearSelection]);
|
|
100
109
|
var onSearchChange = (0, _react.useCallback)(function (event) {
|
|
101
110
|
setQuery(event.currentTarget.value);
|
|
102
|
-
setSection(undefined);
|
|
103
111
|
setSelectedKey(undefined);
|
|
104
112
|
onClearSelection();
|
|
105
113
|
}, [onClearSelection]);
|
|
@@ -109,10 +117,26 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
109
117
|
setSelectedKey(undefined);
|
|
110
118
|
onClearSelection();
|
|
111
119
|
}, [onClearSelection]);
|
|
120
|
+
var onClearSearch = (0, _react.useCallback)(function () {
|
|
121
|
+
var _searchInputRef$curre;
|
|
122
|
+
setQuery('');
|
|
123
|
+
setSelectedKey(undefined);
|
|
124
|
+
onClearSelection();
|
|
125
|
+
(_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 || _searchInputRef$curre.focus();
|
|
126
|
+
}, [onClearSelection]);
|
|
112
127
|
var onRegistrySelect = (0, _react.useCallback)(function (key, handler) {
|
|
113
128
|
setSelectedKey(key);
|
|
114
129
|
onSelect(handler);
|
|
115
130
|
}, [onSelect]);
|
|
131
|
+
var onModalOpenComplete = (0, _react.useCallback)(function (node) {
|
|
132
|
+
node.style.borderRadius = "var(--ds-radius-large, 8px)";
|
|
133
|
+
var footer = node.querySelector("[data-testid=\"".concat(modalTestId, "--footer\"]"));
|
|
134
|
+
footer === null || footer === void 0 || footer.style.setProperty('box-sizing', 'border-box');
|
|
135
|
+
footer === null || footer === void 0 || footer.style.setProperty('height', '64px');
|
|
136
|
+
footer === null || footer === void 0 || footer.style.setProperty('padding-block', "var(--ds-space-200, 16px)");
|
|
137
|
+
var scrollableBody = node.querySelector("[data-testid=\"".concat(modalTestId, "--scrollable\"]"));
|
|
138
|
+
scrollableBody === null || scrollableBody === void 0 || scrollableBody.style.setProperty('border-block-end', 'none');
|
|
139
|
+
}, []);
|
|
116
140
|
var onKeyDown = (0, _react.useCallback)(function (event) {
|
|
117
141
|
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
118
142
|
var _resultCollection$que;
|
|
@@ -144,18 +168,46 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
144
168
|
defaultMessage: 'Insert elements',
|
|
145
169
|
id: 'editor.quick-insert.title'
|
|
146
170
|
}),
|
|
171
|
+
height: "664px",
|
|
147
172
|
onClose: onClose,
|
|
148
173
|
onCloseComplete: onCloseComplete,
|
|
149
|
-
|
|
150
|
-
|
|
174
|
+
onOpenComplete: onModalOpenComplete,
|
|
175
|
+
testId: modalTestId,
|
|
176
|
+
width: "min(968px, calc(100vw - 32px))"
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement(_modalHeader.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: (0, _runtime.ax)(["_zulp1fka _1e0c11p5 _yv0e1xuv _1bsb1osq _lk4ji47z"])
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
151
180
|
size: "medium"
|
|
152
181
|
}, formatMessage({
|
|
153
182
|
defaultMessage: 'Insert elements',
|
|
154
183
|
id: 'editor.quick-insert.title'
|
|
155
|
-
}))
|
|
156
|
-
className: (0, _runtime.ax)(["_zulp1ejb _1e0c11p5
|
|
184
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
+
className: (0, _runtime.ax)(["_zulp1ejb _4cvr1h6o _1e0c11p5 _yv0ehpfy _1bsb1osq"])
|
|
186
|
+
}, /*#__PURE__*/_react.default.createElement(_textField.default, {
|
|
187
|
+
autoFocus: true,
|
|
188
|
+
"aria-controls": resultsId,
|
|
189
|
+
"aria-label": formatMessage({
|
|
190
|
+
defaultMessage: 'Search elements',
|
|
191
|
+
id: 'editor.quick-insert.search'
|
|
192
|
+
}),
|
|
193
|
+
isCompact: true,
|
|
194
|
+
name: "registry-element-browser-search",
|
|
195
|
+
onChange: onSearchChange,
|
|
196
|
+
onKeyDown: onKeyDown,
|
|
197
|
+
ref: searchInputRef,
|
|
198
|
+
value: query
|
|
199
|
+
}), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
200
|
+
appearance: "subtle",
|
|
201
|
+
icon: _cross.default,
|
|
202
|
+
label: formatMessage({
|
|
203
|
+
defaultMessage: 'Clear search',
|
|
204
|
+
id: 'editor.quick-insert.clear-search'
|
|
205
|
+
}),
|
|
206
|
+
onClick: onClearSearch,
|
|
207
|
+
spacing: "compact"
|
|
208
|
+
})))), /*#__PURE__*/_react.default.createElement(_modalBody.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
209
|
+
className: (0, _runtime.ax)(["_zulp1fka _1e0c11p5 _yv0e1xuv _lk4ji47z"])
|
|
157
210
|
}, /*#__PURE__*/_react.default.createElement(_RegistryElementBrowserCategories.RegistryElementBrowserCategories, {
|
|
158
|
-
query: query,
|
|
159
211
|
section: section,
|
|
160
212
|
sections: model.sections,
|
|
161
213
|
onSectionClick: onSectionClick
|
|
@@ -169,12 +221,12 @@ var RegistryElementBrowser = exports.RegistryElementBrowser = function RegistryE
|
|
|
169
221
|
section: section,
|
|
170
222
|
selectedKey: selectedKey,
|
|
171
223
|
onKeyDown: onKeyDown,
|
|
172
|
-
onSearchChange: onSearchChange,
|
|
173
224
|
onSelect: onRegistrySelect
|
|
174
225
|
}))), /*#__PURE__*/_react.default.createElement(_modalFooter.default, null, /*#__PURE__*/_react.default.createElement(_RegistryElementBrowserFooter.RegistryElementBrowserFooter, {
|
|
175
226
|
helpUrl: helpUrl,
|
|
176
227
|
isInsertEnabled: Boolean(selectedKey),
|
|
177
228
|
onClose: onClose,
|
|
178
|
-
onConfirmInsert: onConfirmInsert
|
|
229
|
+
onConfirmInsert: onConfirmInsert,
|
|
230
|
+
resultCount: items.length
|
|
179
231
|
}))));
|
|
180
232
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
._zulpu2gc{gap:var(--ds-space-100,8px)}._1e0c11p5{display:grid}
|
|
2
|
-
.
|
|
2
|
+
._ae4vv2br{align-content:start}
|
|
3
|
+
._yv0ei47z{grid-template-columns:minmax(0,1fr)}
|
|
4
|
+
@media (max-width:599px){._1w2e1ris{grid-auto-columns:max-content}._1ato1bp4{grid-auto-flow:column}._lk4jglyw{grid-template-columns:none}._1cgyi47z{grid-template-rows:minmax(0,1fr)}._1s8e1wug{overflow-x:auto}._pevy15vq{overflow-y:hidden}}
|
|
@@ -17,36 +17,39 @@ var _messages = require("@atlaskit/editor-common/quick-insert/messages");
|
|
|
17
17
|
var sectionMessages = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.BLOCK_TEMPLATES_SECTION.key, _messages.messages.categoryBlockTemplates), _keys.DATA_AND_CHARTS_SECTION.key, _messages.messages.categoryDataAndCharts), _keys.EMBED_SECTION.key, _messages.messages.categoryEmbed), _keys.MEDIA_SECTION.key, _messages.messages.categoryMedia), _keys.OTHER_SECTION.key, _messages.messages.categoryOther), _keys.ROVO_SECTION.key, _messages.messages.categoryRovo), _keys.STRUCTURE_SECTION.key, _messages.messages.categoryStructure), _keys.TEXT_FORMATTING_SECTION.key, _messages.messages.categoryTextFormatting);
|
|
18
18
|
var categoryGridStyles = null;
|
|
19
19
|
var RegistryElementBrowserCategories = exports.RegistryElementBrowserCategories = function RegistryElementBrowserCategories(_ref) {
|
|
20
|
-
var
|
|
21
|
-
section = _ref.section,
|
|
20
|
+
var section = _ref.section,
|
|
22
21
|
sections = _ref.sections,
|
|
23
22
|
onSectionClick = _ref.onSectionClick;
|
|
24
23
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
25
24
|
formatMessage = _useIntl.formatMessage;
|
|
26
|
-
var isAllSelected = section === undefined
|
|
25
|
+
var isAllSelected = section === undefined;
|
|
27
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
27
|
"aria-label": formatMessage({
|
|
29
28
|
defaultMessage: 'Element categories',
|
|
30
29
|
id: 'editor.quick-insert.categories-label'
|
|
31
30
|
}),
|
|
32
31
|
"data-testid": "registry-element-browser-categories",
|
|
33
|
-
className: (0, _runtime.ax)(["_zulpu2gc _1e0c11p5
|
|
32
|
+
className: (0, _runtime.ax)(["_zulpu2gc _ae4vv2br _1e0c11p5 _yv0ei47z _1w2e1ris _1ato1bp4 _lk4jglyw _1cgyi47z _1s8e1wug _pevy15vq"])
|
|
34
33
|
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
35
|
-
appearance:
|
|
34
|
+
appearance: 'subtle',
|
|
36
35
|
"aria-pressed": isAllSelected,
|
|
37
36
|
"data-section": "",
|
|
38
|
-
onClick: onSectionClick
|
|
37
|
+
onClick: onSectionClick,
|
|
38
|
+
isSelected: isAllSelected,
|
|
39
|
+
shouldFitContainer: true
|
|
39
40
|
}, formatMessage({
|
|
40
41
|
defaultMessage: 'All',
|
|
41
42
|
id: 'editor.quick-insert.all'
|
|
42
43
|
})), sections.map(function (entry) {
|
|
43
44
|
var _sectionMessages2;
|
|
44
45
|
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
45
|
-
appearance:
|
|
46
|
-
"aria-pressed": section === entry.key
|
|
46
|
+
appearance: 'subtle',
|
|
47
|
+
"aria-pressed": section === entry.key,
|
|
47
48
|
"data-section": entry.key,
|
|
48
49
|
key: entry.key,
|
|
49
|
-
onClick: onSectionClick
|
|
50
|
+
onClick: onSectionClick,
|
|
51
|
+
isSelected: section === entry.key,
|
|
52
|
+
shouldFitContainer: true
|
|
50
53
|
}, formatMessage((_sectionMessages2 = sectionMessages[entry.key]) !== null && _sectionMessages2 !== void 0 ? _sectionMessages2 : _messages.messages.categoryOther));
|
|
51
54
|
}));
|
|
52
55
|
};
|
|
@@ -9,32 +9,50 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
10
|
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
11
11
|
var _link = _interopRequireDefault(require("@atlaskit/button/link"));
|
|
12
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
13
|
var RegistryElementBrowserFooter = exports.RegistryElementBrowserFooter = function RegistryElementBrowserFooter(_ref) {
|
|
13
14
|
var helpUrl = _ref.helpUrl,
|
|
14
15
|
isInsertEnabled = _ref.isInsertEnabled,
|
|
15
16
|
onClose = _ref.onClose,
|
|
16
|
-
onConfirmInsert = _ref.onConfirmInsert
|
|
17
|
+
onConfirmInsert = _ref.onConfirmInsert,
|
|
18
|
+
resultCount = _ref.resultCount;
|
|
17
19
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
18
20
|
formatMessage = _useIntl.formatMessage;
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
22
|
+
alignBlock: "center",
|
|
23
|
+
grow: "fill",
|
|
24
|
+
spread: "space-between"
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
26
|
+
alignBlock: "center",
|
|
27
|
+
space: "space.100"
|
|
28
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
29
|
+
color: "color.text.subtlest"
|
|
30
|
+
}, formatMessage({
|
|
31
|
+
defaultMessage: '{count, plural, one {# result available} other {# results available}}',
|
|
32
|
+
id: 'editor.quick-insert.results-available'
|
|
33
|
+
}, {
|
|
34
|
+
count: resultCount
|
|
35
|
+
})), helpUrl && /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
20
36
|
appearance: "subtle",
|
|
21
37
|
href: helpUrl,
|
|
22
38
|
target: "_blank"
|
|
23
39
|
}, formatMessage({
|
|
24
40
|
defaultMessage: 'Help',
|
|
25
41
|
id: 'editor.quick-insert.help'
|
|
26
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, formatMessage({
|
|
30
|
-
defaultMessage: 'Close',
|
|
31
|
-
id: 'editor.quick-insert.close'
|
|
32
|
-
})), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
42
|
+
}))), /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
43
|
+
space: "space.100"
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
33
45
|
appearance: "primary",
|
|
34
46
|
isDisabled: !isInsertEnabled,
|
|
35
47
|
onClick: onConfirmInsert
|
|
36
48
|
}, formatMessage({
|
|
37
49
|
defaultMessage: 'Insert',
|
|
38
50
|
id: 'editor.quick-insert.insert'
|
|
39
|
-
}))
|
|
51
|
+
})), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
52
|
+
appearance: "subtle",
|
|
53
|
+
onClick: onClose
|
|
54
|
+
}, formatMessage({
|
|
55
|
+
defaultMessage: 'Close',
|
|
56
|
+
id: 'editor.quick-insert.close'
|
|
57
|
+
}))));
|
|
40
58
|
};
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._11c81af2{font:var(--ds-font-heading-medium,normal 653 20px/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
3
|
+
._yyhyjvu9{grid-column:1/-1}
|
|
4
|
+
._19pk1ejb{margin-top:var(--ds-space-300,24px)}
|
|
5
|
+
._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
|
|
6
|
+
._19pkutpp{margin-top:var(--ds-space-150,9pt)}
|
|
7
|
+
._1bah1h6o{justify-content:center}
|
|
8
|
+
._1bsb1osq{width:100%}
|
|
9
|
+
._1e0c11p5{display:grid}
|
|
10
|
+
._1e0c1txw{display:flex}
|
|
11
|
+
._2lx21bp4{flex-direction:column}
|
|
12
|
+
._4cvr1h6o{align-items:center}
|
|
13
|
+
._4cvrv2br{align-items:start}
|
|
14
|
+
._ae4vv2br{align-content:start}
|
|
15
|
+
._p12f1kdj{max-width:25pc}
|
|
16
|
+
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
17
|
+
._y3gn1h6o{text-align:center}
|
|
18
|
+
._yv0ei47z{grid-template-columns:minmax(0,1fr)}
|
|
19
|
+
@media (min-width:550px) and (max-width:1023px){._16409sye{grid-template-columns:repeat(2,minmax(0,1fr))}}
|
|
20
|
+
@media (min-width:1024px){._g98o1koq{grid-template-columns:repeat(3,232px)}}
|
|
@@ -14,9 +14,13 @@ var _reactIntl = require("react-intl");
|
|
|
14
14
|
var _link = _interopRequireDefault(require("@atlaskit/button/link"));
|
|
15
15
|
var _provider = require("@atlaskit/editor-common/quick-insert/provider");
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
-
var
|
|
17
|
+
var _NotFoundIllustration = _interopRequireDefault(require("./NotFoundIllustration"));
|
|
18
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
19
|
var resultsGridStyles = null;
|
|
20
|
+
var emptyStateWrapperStyles = null;
|
|
21
|
+
var emptyStateHeadingStyles = null;
|
|
22
|
+
var emptyStateSubheadingStyles = null;
|
|
23
|
+
var emptyStateLinkStyles = null;
|
|
20
24
|
var RegistryElementBrowserItem = function RegistryElementBrowserItem(_ref) {
|
|
21
25
|
var editorView = _ref.editorView,
|
|
22
26
|
isOffline = _ref.isOffline,
|
|
@@ -31,6 +35,7 @@ var RegistryElementBrowserItem = function RegistryElementBrowserItem(_ref) {
|
|
|
31
35
|
editorView: editorView,
|
|
32
36
|
isOffline: isOffline,
|
|
33
37
|
item: {
|
|
38
|
+
description: item.description,
|
|
34
39
|
id: key,
|
|
35
40
|
isSelected: isSelected
|
|
36
41
|
},
|
|
@@ -39,7 +44,7 @@ var RegistryElementBrowserItem = function RegistryElementBrowserItem(_ref) {
|
|
|
39
44
|
},
|
|
40
45
|
surface: 'element-browser'
|
|
41
46
|
};
|
|
42
|
-
}, [editorView, isOffline, isSelected, key, onSelect]);
|
|
47
|
+
}, [editorView, isOffline, isSelected, item.description, key, onSelect]);
|
|
43
48
|
if (!Component) {
|
|
44
49
|
return null;
|
|
45
50
|
}
|
|
@@ -58,31 +63,10 @@ var RegistryElementBrowserSearchResults = exports.RegistryElementBrowserSearchRe
|
|
|
58
63
|
section = _ref2.section,
|
|
59
64
|
selectedKey = _ref2.selectedKey,
|
|
60
65
|
onKeyDown = _ref2.onKeyDown,
|
|
61
|
-
onSearchChange = _ref2.onSearchChange,
|
|
62
66
|
onSelect = _ref2.onSelect;
|
|
63
67
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
64
68
|
formatMessage = _useIntl.formatMessage;
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
66
|
-
space: "space.200"
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement(_textField.default, {
|
|
68
|
-
autoFocus: true,
|
|
69
|
-
"aria-controls": resultsId,
|
|
70
|
-
"aria-label": formatMessage({
|
|
71
|
-
defaultMessage: 'Search elements',
|
|
72
|
-
id: 'editor.quick-insert.search'
|
|
73
|
-
}),
|
|
74
|
-
name: "registry-element-browser-search",
|
|
75
|
-
onChange: onSearchChange,
|
|
76
|
-
onKeyDown: onKeyDown,
|
|
77
|
-
value: query
|
|
78
|
-
}), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
79
|
-
"aria-live": "polite"
|
|
80
|
-
}, formatMessage({
|
|
81
|
-
defaultMessage: '{count} results',
|
|
82
|
-
id: 'editor.quick-insert.results'
|
|
83
|
-
}, {
|
|
84
|
-
count: items.length
|
|
85
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
86
70
|
"aria-label": formatMessage({
|
|
87
71
|
defaultMessage: 'Element results',
|
|
88
72
|
id: 'editor.quick-insert.results-label'
|
|
@@ -92,7 +76,7 @@ var RegistryElementBrowserSearchResults = exports.RegistryElementBrowserSearchRe
|
|
|
92
76
|
onKeyDown: onKeyDown,
|
|
93
77
|
tabIndex: -1,
|
|
94
78
|
role: items.length ? 'listbox' : undefined,
|
|
95
|
-
className: (0, _runtime.ax)(["_zulpu2gc _1e0c11p5
|
|
79
|
+
className: (0, _runtime.ax)(["_zulpu2gc _ae4vv2br _4cvrv2br _1e0c11p5 _yv0ei47z _16409sye _g98o1koq"])
|
|
96
80
|
}, items.length ? items.map(function (item) {
|
|
97
81
|
return /*#__PURE__*/_react.default.createElement(RegistryElementBrowserItem, {
|
|
98
82
|
editorView: editorView,
|
|
@@ -106,18 +90,26 @@ var RegistryElementBrowserSearchResults = exports.RegistryElementBrowserSearchRe
|
|
|
106
90
|
mode: 'full',
|
|
107
91
|
searchTerm: query,
|
|
108
92
|
selectedCategory: section
|
|
109
|
-
})) !== null && _emptyStateHandler !== void 0 ? _emptyStateHandler : /*#__PURE__*/_react.default.createElement(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
93
|
+
})) !== null && _emptyStateHandler !== void 0 ? _emptyStateHandler : /*#__PURE__*/_react.default.createElement("div", {
|
|
94
|
+
className: (0, _runtime.ax)(["_yyhyjvu9 _4cvr1h6o _1e0c1txw _2lx21bp4 _1bah1h6o _1bsb1osq"])
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_NotFoundIllustration.default, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
96
|
+
className: (0, _runtime.ax)(["_11c81af2 _syazi7uo _19pk1ejb"])
|
|
97
|
+
}, formatMessage({
|
|
113
98
|
defaultMessage: 'Nothing matches your search',
|
|
114
99
|
id: 'editor.quick-insert.empty'
|
|
115
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
100
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: (0, _runtime.ax)(["_19pkpxbi _p12f1kdj _y3gn1h6o"])
|
|
102
|
+
}, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, formatMessage({
|
|
103
|
+
defaultMessage: 'Try searching with a different term or discover new apps for Atlassian products.',
|
|
104
|
+
id: 'editor.quick-insert.empty-description'
|
|
105
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: (0, _runtime.ax)(["_19pkutpp"])
|
|
107
|
+
}, /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
116
108
|
appearance: "primary",
|
|
117
109
|
href: "https://marketplace.atlassian.com/search?category=Macros&hosting=cloud&product=confluence",
|
|
118
110
|
target: "_blank"
|
|
119
111
|
}, formatMessage({
|
|
120
112
|
defaultMessage: 'Explore Atlassian Marketplace',
|
|
121
113
|
id: 'editor.quick-insert.explore-marketplace'
|
|
122
|
-
})))));
|
|
114
|
+
}))))));
|
|
123
115
|
};
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getRegistryElementBrowserItems = exports.getInitialRegistryElementBrowserSection = exports.createRegistryElementBrowserModel = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
10
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
13
|
var compareRanks = function compareRanks(left, right) {
|
|
@@ -111,10 +112,16 @@ var getRegistryElementBrowserItems = exports.getRegistryElementBrowserItems = fu
|
|
|
111
112
|
var items = section ? model.items.filter(function (item) {
|
|
112
113
|
return item.sectionKeys.includes(section);
|
|
113
114
|
}) : model.items;
|
|
115
|
+
var itemsWithDescriptions = items.map(function (item) {
|
|
116
|
+
var _createQuickInsertMat;
|
|
117
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
118
|
+
description: (_createQuickInsertMat = _createQuickInsertMatcher.createQuickInsertMatcher.getDescription) === null || _createQuickInsertMat === void 0 ? void 0 : _createQuickInsertMat.call(_createQuickInsertMatcher.createQuickInsertMatcher, item.registration.match, formatMessage)
|
|
119
|
+
});
|
|
120
|
+
});
|
|
114
121
|
if (!normalizedQuery) {
|
|
115
|
-
return
|
|
122
|
+
return itemsWithDescriptions;
|
|
116
123
|
}
|
|
117
|
-
return
|
|
124
|
+
return itemsWithDescriptions.flatMap(function (item) {
|
|
118
125
|
var _item$registration$ma, _item$registration;
|
|
119
126
|
var result = (_item$registration$ma = (_item$registration = item.registration).match) === null || _item$registration$ma === void 0 ? void 0 : _item$registration$ma.call(_item$registration, {
|
|
120
127
|
formatMessage: formatMessage,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
const imageContainer = css({
|
|
8
|
+
width: '120px',
|
|
9
|
+
height: '111px',
|
|
10
|
+
marginTop: "var(--ds-space-600, 48px)"
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
14
|
+
export default function NotFoundIllustration() {
|
|
15
|
+
return jsx("div", {
|
|
16
|
+
css: imageContainer
|
|
17
|
+
}, jsx("svg", {
|
|
18
|
+
width: "120",
|
|
19
|
+
height: "111",
|
|
20
|
+
fill: "none",
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22
|
+
}, jsx("g", {
|
|
23
|
+
clipPath: "url(#clip0)"
|
|
24
|
+
}, jsx("path", {
|
|
25
|
+
fill: "#fff",
|
|
26
|
+
fillOpacity: ".01",
|
|
27
|
+
d: "M0 0h120v110.365H0z"
|
|
28
|
+
}), jsx("path", {
|
|
29
|
+
opacity: ".3",
|
|
30
|
+
d: "M60.985 110.336c-.539.017-1.078.029-1.616.035a1.359 1.359 0 01-1.367-1.36 1.361 1.361 0 011.314-1.372h.041a50.876 50.876 0 0010.276-1.105 1.367 1.367 0 01.568 2.674 54.422 54.422 0 01-9.216 1.128zM52 109.877c-.075 0-.156 0-.237-.012a52.688 52.688 0 01-10.583-2.61 1.368 1.368 0 01.92-2.575c3.245 1.169 6.616 2 10.034 2.471.747.104 1.268.79 1.164 1.54A1.36 1.36 0 0152 109.877zM77.088 107.162a1.364 1.364 0 01-1.326-.895 1.366 1.366 0 01.805-1.755 50.423 50.423 0 009.274-4.575 1.358 1.358 0 011.877.43c.4.64.208 1.482-.429 1.884a53.25 53.25 0 01-9.772 4.824 1.26 1.26 0 01-.429.087zM34.9 104.32a1.359 1.359 0 01-.683-.157 53.29 53.29 0 01-9.042-6.092 1.369 1.369 0 01-.18-1.924 1.357 1.357 0 011.918-.18 50.483 50.483 0 008.578 5.778c.667.354.916 1.18.562 1.848a1.337 1.337 0 01-1.152.727zM20.732 93.23a1.372 1.372 0 01-1.06-.448 53.223 53.223 0 01-6.436-8.818 1.37 1.37 0 01.487-1.872 1.36 1.36 0 011.865.489 50.724 50.724 0 006.105 8.364 1.366 1.366 0 01-.098 1.93c-.25.226-.556.343-.863.354zM104.093 84.196a1.367 1.367 0 01-1.228-2.046 50.41 50.41 0 004.183-9.48 1.358 1.358 0 011.714-.878 1.365 1.365 0 01.875 1.72 53.17 53.17 0 01-4.414 9.993 1.34 1.34 0 01-1.13.691zM11.18 77.965a1.365 1.365 0 01-1.31-.854 52.827 52.827 0 01-3.029-10.498 1.362 1.362 0 112.682-.483 50.732 50.732 0 002.873 9.958 1.363 1.363 0 01-1.216 1.877zM110.17 67.218a1.362 1.362 0 01-1.39-1.593c.579-3.395.805-6.876.683-10.347l-.006-.116a1.36 1.36 0 011.315-1.412 1.359 1.359 0 011.408 1.32l.006.115a54.054 54.054 0 01-.724 10.905 1.36 1.36 0 01-1.292 1.128zM7.426 60.3c-.753.03-1.384-.534-1.407-1.29v-.058a53.82 53.82 0 01.712-10.846 1.368 1.368 0 011.57-1.122c.741.128 1.24.83 1.118 1.575a51.307 51.307 0 00-.678 10.288c.029.762-.562 1.425-1.315 1.453zM110.06 49.076a1.363 1.363 0 01-1.385-1.122 50.567 50.567 0 00-2.884-9.95c-.284-.698.052-1.5.747-1.785a1.365 1.365 0 011.778.75 53.085 53.085 0 013.041 10.497 1.37 1.37 0 01-1.094 1.593l-.203.017zM9.888 42.462a1.452 1.452 0 01-.47-.065 1.365 1.365 0 01-.874-1.72 53.157 53.157 0 014.402-9.998 1.362 1.362 0 011.86-.511c.655.372.88 1.209.51 1.866a50.68 50.68 0 00-4.177 9.486 1.37 1.37 0 01-1.251.941zM103.815 32.179a1.355 1.355 0 01-1.222-.674 50.958 50.958 0 00-6.117-8.359 1.366 1.366 0 01.099-1.93 1.355 1.355 0 011.923.099 53.449 53.449 0 016.447 8.806 1.37 1.37 0 01-.487 1.872 1.432 1.432 0 01-.643.186zM18.31 26.529a1.372 1.372 0 01-1.124-2.209 53.551 53.551 0 017.537-7.888 1.363 1.363 0 011.923.157 1.375 1.375 0 01-.156 1.93 51.072 51.072 0 00-7.154 7.487 1.343 1.343 0 01-1.025.523zM92.172 18.444a1.352 1.352 0 01-.915-.314 50.861 50.861 0 00-8.59-5.772 1.368 1.368 0 01-.568-1.849 1.364 1.364 0 011.842-.57 53.153 53.153 0 019.048 6.08c.58.483.66 1.343.18 1.925a1.366 1.366 0 01-.997.5zM31.64 14.433a1.368 1.368 0 01-.776-2.523 53.107 53.107 0 019.771-4.836 1.359 1.359 0 011.75.808c.26.71-.099 1.494-.805 1.755a50.203 50.203 0 00-9.269 4.587c-.208.133-.44.203-.672.209zM76.555 9.51a1.257 1.257 0 01-.504-.082A50.06 50.06 0 0066.013 6.97a1.364 1.364 0 01-1.165-1.54 1.364 1.364 0 011.535-1.168 52.623 52.623 0 0110.584 2.592 1.369 1.369 0 01-.412 2.657zM48.287 7.65a1.367 1.367 0 01-.33-2.703 54.261 54.261 0 0110.827-1.18 1.367 1.367 0 011.372 1.36 1.367 1.367 0 01-1.314 1.377H58.8A50.85 50.85 0 0048.525 7.62c-.081.018-.162.024-.238.03z",
|
|
31
|
+
fill: "#B3BAC5"
|
|
32
|
+
}), jsx("path", {
|
|
33
|
+
opacity: ".3",
|
|
34
|
+
d: "M110.523 19.873a.304.304 0 01-.226-.325l.035-.262c.029-.168.064-.348.11-.534a4.423 4.423 0 01.95-1.796c.458-.53 1.118-.971 1.97-1.314l1.436-.587c.858-.343 1.385-.913 1.593-1.697a2.48 2.48 0 00.07-.878 1.998 1.998 0 00-.273-.849c-.156-.261-.37-.5-.654-.709a3.07 3.07 0 00-1.049-.477c-.451-.116-.851-.133-1.21-.052a2.56 2.56 0 00-.956.43c-.278.204-.51.465-.695.78-.191.313-.33.65-.423.999-.029.104-.052.21-.07.302a.459.459 0 01-.59.355l-2.219-.68a.464.464 0 01-.33-.483c.006-.07.017-.14.029-.21.035-.197.075-.383.121-.569.174-.668.47-1.29.887-1.866a5.14 5.14 0 011.546-1.412c.614-.366 1.31-.605 2.097-.72.788-.117 1.645-.047 2.578.197.967.256 1.778.622 2.433 1.098.66.477 1.176 1.012 1.552 1.599.377.593.614 1.22.707 1.889.093.668.058 1.32-.11 1.953-.261 1-.712 1.796-1.344 2.389a6.773 6.773 0 01-2.288 1.39l-1.211.458c-.341.11-.851.338-1.274.803-.041.046-.214.238-.388.534-.128.221-.22.436-.284.622a.303.303 0 01-.365.192l-2.155-.57zm-1.772 3.412c.145-.552.457-.97.944-1.26a1.942 1.942 0 011.552-.222c.551.146.968.465 1.257.96.29.493.359 1.017.215 1.569a1.966 1.966 0 01-.956 1.25 2.005 2.005 0 01-1.558.203 1.957 1.957 0 01-1.246-.942 1.98 1.98 0 01-.208-1.558zM10.722 12.393a.301.301 0 01-.203-.338l.053-.261c.04-.169.086-.343.15-.523a4.334 4.334 0 011.072-1.727c.492-.5 1.176-.889 2.056-1.18l1.472-.488c.874-.285 1.442-.814 1.703-1.587.092-.279.139-.57.127-.872a2.052 2.052 0 00-.214-.866 2.285 2.285 0 00-.609-.75c-.266-.226-.608-.406-1.013-.546-.44-.151-.846-.192-1.205-.134a2.518 2.518 0 00-1.726 1.099 3.583 3.583 0 00-.585 1.267.461.461 0 01-.615.314L9.02 4.976a.467.467 0 01-.295-.506c.011-.07.029-.14.046-.21a5.65 5.65 0 01.162-.557A5.505 5.505 0 019.946 1.9 5.246 5.246 0 0111.579.593a5.545 5.545 0 012.138-.576c.793-.058 1.645.064 2.554.372.945.32 1.732.739 2.358 1.262.626.523 1.106 1.087 1.442 1.703.336.616.533 1.255.58 1.93a4.97 4.97 0 01-.244 1.941c-.33.982-.828 1.744-1.506 2.29a6.844 6.844 0 01-2.375 1.233l-1.24.372a2.94 2.94 0 00-1.326.715c-.046.046-.232.226-.423.505-.145.215-.249.419-.324.599a.3.3 0 01-.377.168l-2.114-.714zm-1.998 3.284a2 2 0 011.025-1.198 1.957 1.957 0 011.564-.116c.539.18.933.529 1.188 1.04.254.512.29 1.041.11 1.582-.18.54-.528.935-1.037 1.18a2.019 2.019 0 01-1.57.098 1.96 1.96 0 01-1.182-1.029 1.99 1.99 0 01-.098-1.557zM7.177 104.849a.298.298 0 01-.37-.134c-.041-.076-.082-.157-.122-.238a8.207 8.207 0 01-.215-.5 4.405 4.405 0 01-.249-2.017c.076-.698.36-1.436.863-2.215l.84-1.308c.504-.773.614-1.546.33-2.307a2.6 2.6 0 00-.446-.762 2.019 2.019 0 00-.706-.54 2.421 2.421 0 00-.944-.204 3.05 3.05 0 00-1.13.215c-.434.163-.776.378-1.025.657-.25.273-.423.576-.533.901-.11.326-.15.674-.128 1.04.024.367.099.721.226 1.064.04.105.076.198.116.285a.466.466 0 01-.278.634l-2.201.72a.455.455 0 01-.545-.209c-.034-.064-.063-.128-.098-.192a5.595 5.595 0 01-.568-2.575 5.09 5.09 0 01.458-2.046c.29-.65.724-1.25 1.303-1.796.58-.546 1.32-.988 2.225-1.32.938-.348 1.807-.517 2.618-.505.81.012 1.54.151 2.19.413a4.62 4.62 0 011.656 1.139c.458.494.8 1.046 1.025 1.662.36.971.446 1.884.267 2.732-.18.85-.539 1.669-1.078 2.46l-.73 1.075c-.214.29-.503.767-.585 1.389-.005.064-.04.319-.011.657.023.255.07.482.127.668a.309.309 0 01-.19.372l-2.092.785zm.504 3.813a2.026 2.026 0 01.052-1.581 1.958 1.958 0 011.147-1.076 1.986 1.986 0 011.576.064c.521.239.88.628 1.077 1.163a1.947 1.947 0 01-.07 1.569 2.028 2.028 0 01-1.158 1.064 1.977 1.977 0 01-1.564-.052 1.96 1.96 0 01-1.06-1.151z",
|
|
35
|
+
fill: "#C1C7D0"
|
|
36
|
+
}), jsx("path", {
|
|
37
|
+
d: "M86.519 77.651l-4.142-4.028-5.578 5.784 4.141 4.028a7.812 7.812 0 012.15 3.772 7.858 7.858 0 002.148 3.773l16.816 16.333a6.405 6.405 0 009.077-.145 6.46 6.46 0 00-.144-9.108L94.171 81.726a7.786 7.786 0 00-3.83-2.034 7.9 7.9 0 01-3.822-2.04z",
|
|
38
|
+
fill: "#CFD4DB"
|
|
39
|
+
}), jsx("path", {
|
|
40
|
+
d: "M90.18 79.64a7.756 7.756 0 01-3.656-1.995l-1.262-1.226a4 4 0 00-5.671.093 4.032 4.032 0 00.092 5.69l1.263 1.227a7.853 7.853 0 012.103 3.598 33.606 33.606 0 003.858-3.435 33.629 33.629 0 003.273-3.953z",
|
|
41
|
+
fill: "#B3BAC5"
|
|
42
|
+
}), jsx("path", {
|
|
43
|
+
d: "M59.056 90.677c-8.961.146-17.442-3.22-23.877-9.474-13.295-12.91-13.636-34.266-.77-47.606C40.64 27.14 49.01 23.501 57.966 23.35c8.961-.145 17.441 3.22 23.877 9.475 6.441 6.255 10.062 14.654 10.212 23.64.145 8.992-3.209 17.502-9.442 23.96-6.227 6.47-14.597 10.108-23.558 10.253zM58.1 31.388c-6.824.11-13.19 2.883-17.94 7.801-9.795 10.155-9.534 26.413.585 36.242 4.9 4.76 11.36 7.324 18.183 7.213 6.824-.11 13.19-2.883 17.94-7.8 4.744-4.918 7.299-11.399 7.189-18.246-.11-6.847-2.873-13.236-7.774-18.002-4.906-4.755-11.36-7.318-18.183-7.208z",
|
|
44
|
+
fill: "url(#paint0_linear)"
|
|
45
|
+
}), jsx("path", {
|
|
46
|
+
d: "M68.886 49.535l-3.093-3.051a1.158 1.158 0 00-1.64.017l-5.67 5.796-5.776-5.691a1.158 1.158 0 00-1.64.017l-3.04 3.104c-.446.46-.44 1.192.017 1.645l5.775 5.69-5.67 5.796c-.447.46-.44 1.192.017 1.645l3.093 3.052a1.158 1.158 0 001.64-.018l5.67-5.795 5.775 5.69a1.158 1.158 0 001.64-.017l3.04-3.104c.447-.459.441-1.191-.017-1.645l-5.775-5.69 5.671-5.795c.446-.46.44-1.198-.017-1.645z",
|
|
47
|
+
fill: "#C1C7D0"
|
|
48
|
+
})), jsx("defs", null, jsx("linearGradient", {
|
|
49
|
+
id: "paint0_linear",
|
|
50
|
+
x1: "34.792",
|
|
51
|
+
y1: "80.822",
|
|
52
|
+
x2: "82.401",
|
|
53
|
+
y2: "33.377",
|
|
54
|
+
gradientUnits: "userSpaceOnUse"
|
|
55
|
+
}, jsx("stop", {
|
|
56
|
+
offset: ".557",
|
|
57
|
+
stopColor: "#C1C7D0"
|
|
58
|
+
}), jsx("stop", {
|
|
59
|
+
offset: ".966",
|
|
60
|
+
stopColor: "#E9EBEF",
|
|
61
|
+
stopOpacity: ".5"
|
|
62
|
+
})), jsx("clipPath", {
|
|
63
|
+
id: "clip0"
|
|
64
|
+
}, jsx("path", {
|
|
65
|
+
fill: "#fff",
|
|
66
|
+
d: "M0 0h120v110.365H0z"
|
|
67
|
+
})))));
|
|
68
|
+
}
|
|
69
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
._zulp1ejb{gap:var(--ds-space-300,24px)}
|
|
2
|
-
.
|
|
1
|
+
._zulp1ejb{gap:var(--ds-space-300,24px)}
|
|
2
|
+
._zulp1fka{gap:calc(var(--ds-space-200, 1pc) + var(--ds-space-150, 9pt))}._1bsb1osq{width:100%}
|
|
3
|
+
._1e0c11p5{display:grid}
|
|
4
|
+
._4cvr1h6o{align-items:center}
|
|
5
|
+
._yv0e1xuv{grid-template-columns:182px minmax(0,1fr)}
|
|
6
|
+
._yv0ehpfy{grid-template-columns:minmax(0,1fr) auto}
|
|
7
|
+
@media (max-width:599px){._lk4ji47z{grid-template-columns:minmax(0,1fr)}}
|