@weavix/cli 0.5.0 → 0.6.0

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.
Files changed (44) hide show
  1. package/README.md +2 -1
  2. package/build/index.js +2404 -1050
  3. package/build/templates/_external/npmrc.template +1 -0
  4. package/build/templates/_external/src/styles.scss +14 -15
  5. package/build/templates/_internal/npmrc.template +3 -0
  6. package/build/templates/_internal/src/styles.scss +32 -12
  7. package/build/templates/_shared/AGENTS.md +53 -0
  8. package/build/templates/_shared/manifest.schema.json +72 -2
  9. package/build/templates/_shared/package.json +4 -5
  10. package/build/templates/_shared/proxy.ts +111 -0
  11. package/build/templates/_shared/src/main.tsx +1 -1
  12. package/build/templates/_shared/vite.config.ts +3 -1
  13. package/build/templates/attachment.viewer.action/src/App.tsx +1 -5
  14. package/build/templates/board.tab/src/App.tsx +1 -1
  15. package/build/templates/default/src/App.tsx +1 -1
  16. package/build/templates/goal.action/src/App.tsx +2 -2
  17. package/build/templates/goal.block/src/App.tsx +2 -2
  18. package/build/templates/goal.editor.action/index.html +14 -0
  19. package/build/templates/goal.editor.action/src/App.tsx +56 -0
  20. package/build/templates/goal.tab/src/App.tsx +2 -2
  21. package/build/templates/issue.action/src/App.tsx +4 -2
  22. package/build/templates/issue.block/src/App.tsx +2 -2
  23. package/build/templates/issue.comment.action/src/App.tsx +3 -3
  24. package/build/templates/issue.editor.action/index.html +14 -0
  25. package/build/templates/issue.editor.action/src/App.tsx +56 -0
  26. package/build/templates/issue.tab/src/App.tsx +4 -2
  27. package/build/templates/navigation/src/App.tsx +2 -7
  28. package/build/templates/portfolio.action/src/App.tsx +2 -2
  29. package/build/templates/portfolio.block/src/App.tsx +2 -2
  30. package/build/templates/portfolio.editor.action/index.html +14 -0
  31. package/build/templates/portfolio.editor.action/src/App.tsx +56 -0
  32. package/build/templates/portfolio.tab/src/App.tsx +2 -2
  33. package/build/templates/project.action/src/App.tsx +2 -2
  34. package/build/templates/project.block/src/App.tsx +2 -2
  35. package/build/templates/project.editor.action/index.html +14 -0
  36. package/build/templates/project.editor.action/src/App.tsx +56 -0
  37. package/build/templates/project.tab/src/App.tsx +2 -2
  38. package/build/templates/queue.action/index.html +14 -0
  39. package/build/templates/queue.action/src/App.tsx +29 -0
  40. package/build/templates/queue.tab/index.html +14 -0
  41. package/build/templates/queue.tab/src/App.tsx +29 -0
  42. package/build/templates/trigger.action/src/App.tsx +15 -21
  43. package/package.json +2 -1
  44. package/build/templates/_shared/npmrc.template +0 -2
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'issue.action'>();
@@ -16,7 +16,9 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="Ключ">{slotContext.key}</DefinitionList.Item>
19
+ <DefinitionList.Item name="Ключ">
20
+ {slotContext.entityId}
21
+ </DefinitionList.Item>
20
22
  </DefinitionList>
21
23
  </Card>
22
24
  </div>
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'issue.block'>();
@@ -15,7 +15,7 @@ const App = () => {
15
15
  Базовый контекст (contextLevel: basic)
16
16
  </Typography>
17
17
  <DefinitionList>
18
- <DefinitionList.Item name="Ключ">{slotContext.key}</DefinitionList.Item>
18
+ <DefinitionList.Item name="Ключ">{slotContext.entityId}</DefinitionList.Item>
19
19
  </DefinitionList>
20
20
  </Card>
21
21
  </ThemeProvider>
@@ -1,8 +1,8 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
- const { theme, slotContext } = useTrackerPluginContext<'issue.comment.action'>();
5
+ const { theme, slotContext } = useTrackerPluginContext<'issue.comment.action'>('basic');
6
6
 
7
7
  if (!slotContext) {
8
8
  return null;
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Web site created using vite" />
7
+ <title>Issue Editor Action Plugin</title>
8
+ </head>
9
+ <body class="g-root g-root_theme_dark">
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.tsx"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,56 @@
1
+ import { useCallback, useState } from 'react';
2
+
3
+ import {
4
+ Button,
5
+ Card,
6
+ DefinitionList,
7
+ TextArea,
8
+ ThemeProvider,
9
+ Text as Typography,
10
+ } from '@gravity-ui/uikit';
11
+ import { hostApi, useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
12
+
13
+ const App = () => {
14
+ const { theme, slotContext } = useTrackerPluginContext<'issue.editor.action'>('basic');
15
+ const [text, setText] = useState('');
16
+
17
+ const handleInsert = useCallback(() => {
18
+ hostApi.close({ text });
19
+ }, [text]);
20
+
21
+ if (!slotContext) {
22
+ return null;
23
+ }
24
+
25
+ return (
26
+ <ThemeProvider theme={theme}>
27
+ <div style={{ padding: '16px', display: 'flex', flexDirection: 'column', gap: '16px' }}>
28
+ <Card style={{ padding: '16px' }}>
29
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
30
+ Контекст задачи
31
+ </Typography>
32
+ <DefinitionList>
33
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
34
+ </DefinitionList>
35
+ </Card>
36
+ <Card style={{ padding: '16px' }}>
37
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
38
+ Вставить текст в редактор
39
+ </Typography>
40
+ <TextArea
41
+ value={text}
42
+ onUpdate={setText}
43
+ placeholder="Введите текст для вставки в редактор..."
44
+ minRows={4}
45
+ style={{ marginBottom: '12px' }}
46
+ />
47
+ <Button view="action" onClick={handleInsert} disabled={!text}>
48
+ Вставить
49
+ </Button>
50
+ </Card>
51
+ </div>
52
+ </ThemeProvider>
53
+ );
54
+ };
55
+
56
+ export default App;
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'issue.tab'>();
@@ -16,7 +16,9 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="Ключ">{slotContext.key}</DefinitionList.Item>
19
+ <DefinitionList.Item name="Ключ">
20
+ {slotContext.entityId}
21
+ </DefinitionList.Item>
20
22
  </DefinitionList>
21
23
  </Card>
22
24
  </div>
@@ -1,15 +1,10 @@
1
1
  import { ThemeProvider } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
3
-
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
4
3
 
5
4
  const App = () => {
6
5
  const { theme } = useTrackerPluginContext<'navigation'>();
7
6
 
8
- return (
9
- <ThemeProvider theme={theme}>
10
- Yout plugin code here
11
- </ThemeProvider>
12
- );
7
+ return <ThemeProvider theme={theme}>Yout plugin code here</ThemeProvider>;
13
8
  };
14
9
 
15
10
  export default App;
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'portfolio.action'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'portfolio.block'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Web site created using vite" />
7
+ <title>Portfolio Editor Action Plugin</title>
8
+ </head>
9
+ <body class="g-root g-root_theme_dark">
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.tsx"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,56 @@
1
+ import { useCallback, useState } from 'react';
2
+
3
+ import {
4
+ Button,
5
+ Card,
6
+ DefinitionList,
7
+ TextArea,
8
+ ThemeProvider,
9
+ Text as Typography,
10
+ } from '@gravity-ui/uikit';
11
+ import { hostApi, useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
12
+
13
+ const App = () => {
14
+ const { theme, slotContext } = useTrackerPluginContext<'portfolio.editor.action'>('basic');
15
+ const [text, setText] = useState('');
16
+
17
+ const handleInsert = useCallback(() => {
18
+ hostApi.close({ text });
19
+ }, [text]);
20
+
21
+ if (!slotContext) {
22
+ return null;
23
+ }
24
+
25
+ return (
26
+ <ThemeProvider theme={theme}>
27
+ <div style={{ padding: '16px', display: 'flex', flexDirection: 'column', gap: '16px' }}>
28
+ <Card style={{ padding: '16px' }}>
29
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
30
+ Контекст портфеля
31
+ </Typography>
32
+ <DefinitionList>
33
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
34
+ </DefinitionList>
35
+ </Card>
36
+ <Card style={{ padding: '16px' }}>
37
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
38
+ Вставить текст в редактор
39
+ </Typography>
40
+ <TextArea
41
+ value={text}
42
+ onUpdate={setText}
43
+ placeholder="Введите текст для вставки в редактор..."
44
+ minRows={4}
45
+ style={{ marginBottom: '12px' }}
46
+ />
47
+ <Button view="action" onClick={handleInsert} disabled={!text}>
48
+ Вставить
49
+ </Button>
50
+ </Card>
51
+ </div>
52
+ </ThemeProvider>
53
+ );
54
+ };
55
+
56
+ export default App;
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'portfolio.tab'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'project.action'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'project.block'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Web site created using vite" />
7
+ <title>Project Editor Action Plugin</title>
8
+ </head>
9
+ <body class="g-root g-root_theme_dark">
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.tsx"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,56 @@
1
+ import { useCallback, useState } from 'react';
2
+
3
+ import {
4
+ Button,
5
+ Card,
6
+ DefinitionList,
7
+ TextArea,
8
+ ThemeProvider,
9
+ Text as Typography,
10
+ } from '@gravity-ui/uikit';
11
+ import { hostApi, useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
12
+
13
+ const App = () => {
14
+ const { theme, slotContext } = useTrackerPluginContext<'project.editor.action'>('basic');
15
+ const [text, setText] = useState('');
16
+
17
+ const handleInsert = useCallback(() => {
18
+ hostApi.close({ text });
19
+ }, [text]);
20
+
21
+ if (!slotContext) {
22
+ return null;
23
+ }
24
+
25
+ return (
26
+ <ThemeProvider theme={theme}>
27
+ <div style={{ padding: '16px', display: 'flex', flexDirection: 'column', gap: '16px' }}>
28
+ <Card style={{ padding: '16px' }}>
29
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
30
+ Контекст проекта
31
+ </Typography>
32
+ <DefinitionList>
33
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
34
+ </DefinitionList>
35
+ </Card>
36
+ <Card style={{ padding: '16px' }}>
37
+ <Typography variant="header-1" as="div" style={{ marginBottom: '12px' }}>
38
+ Вставить текст в редактор
39
+ </Typography>
40
+ <TextArea
41
+ value={text}
42
+ onUpdate={setText}
43
+ placeholder="Введите текст для вставки в редактор..."
44
+ minRows={4}
45
+ style={{ marginBottom: '12px' }}
46
+ />
47
+ <Button view="action" onClick={handleInsert} disabled={!text}>
48
+ Вставить
49
+ </Button>
50
+ </Card>
51
+ </div>
52
+ </ThemeProvider>
53
+ );
54
+ };
55
+
56
+ export default App;
@@ -1,5 +1,5 @@
1
1
  import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
- import { useTrackerPluginContext } from '@yandex-data-ui/tracker-plugin-sdk-react';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
3
 
4
4
  const App = () => {
5
5
  const { theme, slotContext } = useTrackerPluginContext<'project.tab'>();
@@ -16,7 +16,7 @@ const App = () => {
16
16
  Базовый контекст (contextLevel: basic)
17
17
  </Typography>
18
18
  <DefinitionList>
19
- <DefinitionList.Item name="ID">{slotContext.id}</DefinitionList.Item>
19
+ <DefinitionList.Item name="ID">{slotContext.entityId}</DefinitionList.Item>
20
20
  </DefinitionList>
21
21
  </Card>
22
22
  </div>
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Web site created using vite" />
7
+ <title>Queue Action Plugin</title>
8
+ </head>
9
+ <body class="g-root g-root_theme_dark">
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.tsx"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,29 @@
1
+ import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
+
4
+ const App = () => {
5
+ const { theme, slotContext } = useTrackerPluginContext<'queue.action'>();
6
+
7
+ if (!slotContext) {
8
+ return null;
9
+ }
10
+
11
+ return (
12
+ <ThemeProvider theme={theme}>
13
+ <div>
14
+ <Card style={{ padding: '20px' }}>
15
+ <Typography variant="header-1" as="div" style={{ marginBottom: '16px' }}>
16
+ Базовый контекст (contextLevel: basic)
17
+ </Typography>
18
+ <DefinitionList>
19
+ <DefinitionList.Item name="Ключ очереди">
20
+ {slotContext.entityId}
21
+ </DefinitionList.Item>
22
+ </DefinitionList>
23
+ </Card>
24
+ </div>
25
+ </ThemeProvider>
26
+ );
27
+ };
28
+
29
+ export default App;
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="description" content="Web site created using vite" />
7
+ <title>Queue Tab Plugin</title>
8
+ </head>
9
+ <body class="g-root g-root_theme_dark">
10
+ <noscript>You need to enable JavaScript to run this app.</noscript>
11
+ <div id="root"></div>
12
+ <script type="module" src="/src/main.tsx"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,29 @@
1
+ import { Card, DefinitionList, ThemeProvider, Text as Typography } from '@gravity-ui/uikit';
2
+ import { useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
3
+
4
+ const App = () => {
5
+ const { theme, slotContext } = useTrackerPluginContext<'queue.tab'>();
6
+
7
+ if (!slotContext) {
8
+ return null;
9
+ }
10
+
11
+ return (
12
+ <ThemeProvider theme={theme}>
13
+ <div style={{ padding: '50px' }}>
14
+ <Card style={{ padding: '20px' }}>
15
+ <Typography variant="header-1" as="div" style={{ marginBottom: '16px' }}>
16
+ Базовый контекст (contextLevel: basic)
17
+ </Typography>
18
+ <DefinitionList>
19
+ <DefinitionList.Item name="Ключ очереди">
20
+ {slotContext.entityId}
21
+ </DefinitionList.Item>
22
+ </DefinitionList>
23
+ </Card>
24
+ </div>
25
+ </ThemeProvider>
26
+ );
27
+ };
28
+
29
+ export default App;
@@ -1,16 +1,10 @@
1
1
  import { useEffect, useState } from 'react';
2
2
 
3
3
  import { Card, Checkbox, DefinitionList, Text, TextInput, ThemeProvider } from '@gravity-ui/uikit';
4
- import {
5
- TriggerActionData,
6
- useTrackerPluginContext,
7
- } from '@yandex-data-ui/tracker-plugin-sdk-react';
8
- import block from 'bem-cn-lite';
4
+ import { TriggerActionData, useTrackerPluginContext } from '@weavix/tracker-plugin-sdk-react';
9
5
 
10
6
  import './App.scss';
11
7
 
12
- const b = block('app');
13
-
14
8
  const WEBHOOK_SITE_BASE = 'https://webhook.site';
15
9
 
16
10
  const SLOT_LABELS: Record<string, string> = {
@@ -56,7 +50,7 @@ function parseBodyOptions(body: string | undefined): { addIssueKey: boolean; add
56
50
  const App = () => {
57
51
  const { theme, registerHandler, slot, slotContext } = useTrackerPluginContext<
58
52
  'trigger.create.action' | 'trigger.edit.action'
59
- >();
53
+ >('full');
60
54
 
61
55
  const [webhookSiteId, setWebhookSiteId] = useState<string>('');
62
56
  const [addIssueKey, setAddIssueKey] = useState<boolean>(true);
@@ -90,14 +84,14 @@ const App = () => {
90
84
 
91
85
  return (
92
86
  <ThemeProvider theme={theme}>
93
- <div className={b('container')}>
94
- <Text variant="header-1" className={b('slot-title')}>
87
+ <div className="app__container">
88
+ <Text variant="header-1" className="app__slot-title">
95
89
  {slotTitle}
96
90
  </Text>
97
91
 
98
92
  {slotContext && (
99
- <Card className={b('context-card')}>
100
- <Text variant="subheader-2" className={b('context-title')}>
93
+ <Card className="app__context-card">
94
+ <Text variant="subheader-2" className="app__context-title">
101
95
  Контекст
102
96
  </Text>
103
97
  <DefinitionList>
@@ -108,8 +102,8 @@ const App = () => {
108
102
  </Card>
109
103
  )}
110
104
 
111
- <div className={b('form-field')}>
112
- <Text variant="subheader-1" className={b('field-label')}>
105
+ <div className="app__form-field">
106
+ <Text variant="subheader-1" className="app__field-label">
113
107
  ID сайта на webhook.site
114
108
  </Text>
115
109
  <TextInput
@@ -120,11 +114,11 @@ const App = () => {
120
114
  />
121
115
  </div>
122
116
 
123
- <div className={b('form-field')}>
124
- <Text variant="subheader-1" className={b('field-label')}>
117
+ <div className="app__form-field">
118
+ <Text variant="subheader-1" className="app__field-label">
125
119
  Включить в тело запроса
126
120
  </Text>
127
- <div className={b('checkboxes')}>
121
+ <div className="app__checkboxes">
128
122
  <Checkbox checked={addIssueKey} onUpdate={setAddIssueKey} size="l">
129
123
  <Text>Добавить ключ задачи</Text>
130
124
  </Checkbox>
@@ -132,16 +126,16 @@ const App = () => {
132
126
  <Text>Добавить очередь</Text>
133
127
  </Checkbox>
134
128
  </div>
135
- <Text variant="body-2" className={b('body-preview')}>
129
+ <Text variant="body-2" className="app__body-preview">
136
130
  Шаблон: {buildBodyFromOptions(addIssueKey, addQueue)}
137
131
  </Text>
138
132
  </div>
139
133
 
140
- <div className={b('form-field')}>
141
- <Text variant="subheader-1" className={b('field-label')}>
134
+ <div className="app__form-field">
135
+ <Text variant="subheader-1" className="app__field-label">
142
136
  Текущая очередь
143
137
  </Text>
144
- <Text variant="body-2" className={b('queue-value')}>
138
+ <Text variant="body-2" className="app__queue-value">
145
139
  {String(slotContext?.queue ?? '—')}
146
140
  </Text>
147
141
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weavix/cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "CLI to work with plugins of Yandex Tracker",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -13,6 +13,7 @@
13
13
  "@aws-sdk/client-s3": "3.972.0",
14
14
  "@aws-sdk/lib-storage": "3.972.0",
15
15
  "@inquirer/prompts": "8.2.0",
16
+ "@napi-rs/keyring": "^1.3.0",
16
17
  "@types/archiver": "7.0.0",
17
18
  "ajv": "8.17.1",
18
19
  "ajv-formats": "3.0.1",
@@ -1,2 +0,0 @@
1
- registry=https://npm.yandex-team.ru
2
- @gravity-ui:registry=https://registry.npmjs.com