tycho-components 0.9.1 → 0.9.3

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,5 +1,5 @@
1
- import { HelpAction } from './HelpButton';
2
- import './style.scss';
1
+ import { HelpAction } from "./HelpButton";
2
+ import "./style.scss";
3
3
  type Props = {
4
4
  onClose: () => void;
5
5
  helpActions?: HelpAction[];
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useTranslation } from 'react-i18next';
3
- import { Button } from 'tycho-storybook';
4
- import AppModal from '../../AppModal/AppModal';
5
- import Storage from '../../configs/Storage';
6
- import { useTourUtils } from '../../configs/useTourUtils';
7
- import './style.scss';
2
+ import { useTranslation } from "react-i18next";
3
+ import { Button } from "tycho-storybook";
4
+ import AppModal from "../../AppModal/AppModal";
5
+ import Storage from "../../configs/Storage";
6
+ import { useTourUtils } from "../../configs/useTourUtils";
7
+ import "./style.scss";
8
8
  export default function HelpModal({ onClose, helpActions = [] }) {
9
- const { t } = useTranslation('help');
9
+ const { t } = useTranslation("help");
10
10
  const { turnOn, turnOff, status } = useTourUtils();
11
11
  const isTourActive = status();
12
12
  const isAutoOpenEnabled = Storage.getTourAutoOpen();
13
13
  const handleTutorials = () => {
14
- window.open('https://www.tycho.iel.unicamp.br/home/tutorials', '_blank');
14
+ window.open("https://www.tycho.iel.unicamp.br/home/tutorials", "_blank");
15
15
  onClose();
16
16
  };
17
17
  const handleTourToggle = () => {
@@ -30,5 +30,5 @@ export default function HelpModal({ onClose, helpActions = [] }) {
30
30
  const handleAutoOpenToggle = (event) => {
31
31
  Storage.setTourAutoOpen(event.target.checked);
32
32
  };
33
- return (_jsxs(AppModal, { title: t('modal.title') || 'Help Center', close: onClose, hideFooter: true, className: "help-modal", children: [_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: t('title.tutorials') }), _jsx("div", { className: "desc", children: t('description.tutorials') }), _jsx(Button, { text: t('button.open', { title: t('title.tutorials') }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTutorials })] }), _jsxs("div", { className: "item d-none", children: [_jsx("div", { className: "title", children: t('title.tour') }), _jsx("div", { className: "desc", children: t('description.tour') }), _jsxs("label", { className: "help-checkbox-label", children: [_jsx("input", { type: "checkbox", checked: isAutoOpenEnabled, onChange: handleAutoOpenToggle, className: "help-checkbox" }), _jsx("span", { children: t('checkbox.autoOpen') })] }), _jsx(Button, { text: t('button.open', { title: t('title.tour') }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTourToggle })] }), helpActions.map((item, idx) => (_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: item.title }), _jsx("div", { className: "desc", children: item.desc }), _jsx(Button, { text: t('button.open', { title: item.title }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: () => handleCustomAction(item) })] }, idx)))] }));
33
+ return (_jsxs(AppModal, { title: t("modal.title") || "Help Center", close: onClose, hideFooter: true, className: "help-modal", children: [_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: t("title.tutorials") }), _jsx("div", { className: "desc", children: t("description.tutorials") }), _jsx(Button, { text: t("button.open", { title: t("title.tutorials") }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTutorials })] }), _jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: t("title.tour") }), _jsx("div", { className: "desc", children: t("description.tour") }), _jsxs("label", { className: "help-checkbox-label", children: [_jsx("input", { type: "checkbox", checked: isAutoOpenEnabled, onChange: handleAutoOpenToggle, className: "help-checkbox" }), _jsx("span", { children: t("checkbox.autoOpen") })] }), _jsx(Button, { text: t("button.open", { title: t("title.tour") }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: handleTourToggle })] }), helpActions.map((item, idx) => (_jsxs("div", { className: "item", children: [_jsx("div", { className: "title", children: item.title }), _jsx("div", { className: "desc", children: item.desc }), _jsx(Button, { text: t("button.open", { title: item.title }), size: "small", mode: "outlined", icon: "keyboard_arrow_right", onClick: () => handleCustomAction(item) })] }, idx)))] }));
34
34
  }
@@ -2,7 +2,7 @@ type App = {
2
2
  code: string;
3
3
  icon?: string;
4
4
  image?: string;
5
- visibility: 'public' | null;
5
+ visibility: "public" | null;
6
6
  admin?: boolean;
7
7
  lexicon?: boolean;
8
8
  parser?: boolean;
@@ -1,60 +1,61 @@
1
1
  export const AvailableApps = [
2
2
  {
3
- code: 'reserved',
4
- icon: 'lock',
3
+ code: "reserved",
4
+ icon: "lock",
5
5
  visibility: null,
6
+ appendCorpusUid: false,
6
7
  },
7
8
  {
8
- code: 'catalog',
9
- icon: 'auto_stories',
9
+ code: "catalog",
10
+ icon: "auto_stories",
10
11
  visibility: null,
11
12
  },
12
13
  {
13
- code: 'admin',
14
- icon: 'folder_managed',
14
+ code: "admin",
15
+ icon: "folder_managed",
15
16
  visibility: null,
16
17
  admin: true,
17
18
  },
18
19
  {
19
- code: 'parser',
20
- icon: 'settings',
20
+ code: "parser",
21
+ icon: "settings",
21
22
  visibility: null,
22
23
  parser: true,
23
24
  appendCorpusUid: false,
24
25
  },
25
26
  {
26
- code: 'io',
27
- icon: 'swap_vert',
27
+ code: "io",
28
+ icon: "swap_vert",
28
29
  visibility: null,
29
30
  },
30
31
  {
31
- code: 'lexicon',
32
- icon: 'book_3',
32
+ code: "lexicon",
33
+ icon: "book_3",
33
34
  visibility: null,
34
35
  lexicon: true,
35
36
  appendCorpusUid: false,
36
37
  },
37
38
  {
38
- code: 'search',
39
- icon: 'match_word',
40
- visibility: 'public',
39
+ code: "search",
40
+ icon: "match_word",
41
+ visibility: "public",
41
42
  },
42
43
  {
43
- code: 'viewer',
44
- icon: 'news',
45
- visibility: 'public',
44
+ code: "viewer",
45
+ icon: "news",
46
+ visibility: "public",
46
47
  appendCorpusUid: false,
47
48
  },
48
49
  {
49
- code: 'synviewer',
50
- icon: 'graph_4',
51
- visibility: 'public',
50
+ code: "synviewer",
51
+ icon: "graph_4",
52
+ visibility: "public",
52
53
  appendCorpusUid: false,
53
54
  },
54
55
  {
55
- code: 'psd-reindexer',
56
- icon: '123',
57
- visibility: 'public',
56
+ code: "psd-reindexer",
57
+ icon: "123",
58
+ visibility: "public",
58
59
  appendCorpusUid: false,
59
60
  },
60
61
  ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.9.1",
4
+ "version": "0.9.3",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {