@evergis/apps 0.1.12 → 0.1.13
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/README.md +118 -118
- package/dist/catalog/attributeFormat/Settings/styled.js +8 -8
- package/dist/catalog/attributeFormat/styled.js +171 -171
- package/dist/catalog/dialogs/EditResource/styled.js +22 -22
- package/dist/catalog/dialogs/ResourcePreview/styled.js +52 -52
- package/dist/catalog/dialogs/styled.js +87 -87
- package/dist/catalog/fields/ResourceTypeTiles/styled.js +56 -56
- package/dist/catalog/fields/styled.js +81 -81
- package/dist/catalog/geometry/GeometrySelector/styled.js +48 -48
- package/dist/catalog/selectors/AttributeSelector/styled.js +2 -2
- package/dist/catalog/selectors/DataSourceItemsList/styled.js +95 -95
- package/dist/catalog/selectors/DataSourcePicker/styled.js +11 -11
- package/dist/catalog/selectors/ResourceSelector/styled.js +11 -11
- package/dist/devmode/components/JsonTree/styled.js +84 -84
- package/dist/devmode/components/LayerCardPane/styled.js +53 -53
- package/dist/devmode/components/Markdown/MarkdownEditor/styled.js +43 -43
- package/dist/devmode/components/Markdown/MarkdownOutput/styled.js +10 -10
- package/dist/devmode/components/OutlinePanel/styled.js +40 -40
- package/dist/devmode/components/ResourceIcon/styled.js +30 -30
- package/dist/devmode/components/ResultsTable/styled.js +48 -48
- package/dist/devmode/components/RunErrorMessage/styled.js +20 -20
- package/dist/devmode/components/TreeExpand/index.js +12 -12
- package/dist/devmode/layout/DevModePanel/styled.js +20 -20
- package/dist/devmode/layout/DevModeTools/styled.js +29 -29
- package/dist/devmode/layout/NavigationSections/Header/styled.js +87 -87
- package/dist/devmode/layout/NavigationToggle/styled.js +21 -21
- package/dist/devmode/layout/PanelSwitcher/styled.js +49 -49
- package/dist/devmode/layout/StatusBar/styled.js +39 -39
- package/dist/devmode/layout/WorkspaceHeader/styled.js +37 -37
- package/dist/devmode/modules/eql/components/EqlEditor/styled.js +4 -4
- package/dist/devmode/modules/eql/components/QueryTypeSelect/styled.js +53 -53
- package/dist/devmode/modules/eql/components/modes/EqlConfigurationMode/AddConfiguration/styled.js +24 -24
- package/dist/devmode/modules/eql/dialogs/AddParameterDialog/styled.js +3 -3
- package/dist/devmode/modules/eql/styled.js +127 -127
- package/dist/devmode/modules/files/styled.js +14 -14
- package/dist/devmode/modules/layer/styled.js +10 -10
- package/dist/devmode/modules/navigation-catalog/hooks/useCatalogReveal.js +6 -14
- package/dist/devmode/modules/navigation-catalog/hooks/useCatalogReveal.js.map +1 -1
- package/dist/devmode/modules/navigation-catalog/styled.js +147 -147
- package/dist/devmode/modules/navigation-catalog/thunks/catalogFiles.d.ts +1 -2
- package/dist/devmode/modules/navigation-catalog/thunks/catalogFiles.js +1 -1
- package/dist/devmode/modules/python/components/Notebook/styled.js +203 -203
- package/dist/devmode/modules/python/components/PythonFileContent/styled.js +6 -6
- package/dist/devmode/modules/python/components/PythonRunBar/styled.js +5 -5
- package/dist/devmode/modules/python/components/PythonRunControl/styled.js +9 -9
- package/dist/devmode/modules/python/components/PythonRunLog/styled.js +11 -11
- package/dist/devmode/modules/python/components/PythonStatus/styled.js +11 -11
- package/dist/devmode/modules/python/components/SandboxesDialog/components/SandboxCard/styled.js +42 -42
- package/dist/devmode/modules/python/components/SandboxesDialog/styled.js +58 -58
- package/dist/devmode/modules/python/components/WorkerMetrics/styled.js +26 -26
- package/dist/devmode/modules/python/dialogs/ViewResponseDialog/styled.js +5 -5
- package/dist/devmode/modules/resource-json/styled.js +7 -7
- package/dist/devmode/modules/table/components/TableContent/styled.js +18 -18
- package/dist/devmode/monaco/MonacoEditor/styled.js +6 -6
- package/dist/devmode/monaco/ReadonlyMonacoEditor/styled.js +24 -24
- package/dist/devmode/navigation/CategoryTree/styled.js +65 -65
- package/dist/devmode/navigation/NodeActionsMenu/styled.js +63 -63
- package/dist/devmode/tabs/Panes/PaneHandle/styled.js +45 -45
- package/dist/devmode/tabs/Panes/styled.js +21 -21
- package/dist/devmode/tabs/ResultsDock/styled.js +35 -35
- package/dist/devmode/tabs/TabActions/styled.js +50 -50
- package/dist/devmode/tabs/TabPane/styled.js +6 -6
- package/dist/devmode/tabs/Tabs/Tab/styled.js +105 -105
- package/dist/devmode/tabs/Tabs/styled.js +61 -61
- package/dist/devmode/tabs/states/styled.js +2 -2
- package/dist/devmode/tabs/styled.js +37 -37
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
# @evergis/apps
|
|
2
|
-
|
|
3
|
-
Приложения EverGIS одним пакетом: каталог (`@evergis/apps/catalog`) и режим разработчика
|
|
4
|
-
(`@evergis/apps/devmode`). Каталог от DevMode не зависит.
|
|
5
|
-
|
|
6
|
-
DevMode EverGIS: дерево каталога, табы документов с делением панелей, док результатов,
|
|
7
|
-
outline и статус-бар — без зависимости от кода client-new. Подключается в любое React-приложение на
|
|
8
|
-
`@evergis/react`.
|
|
9
|
-
|
|
10
|
-
📖 **Документация** — `yarn docs` → http://localhost:4321 (исходники в [`documentation/`](documentation/))
|
|
11
|
-
🧩 **Storybook** — `yarn storybook` → http://localhost:6007 (истории в [`stories/`](stories/))
|
|
12
|
-
|
|
13
|
-
## Основные концепции
|
|
14
|
-
|
|
15
|
-
- **Экземпляр.** `DevModeProvider` создаёт свой RTK-стор, реестр модулей, сервисы и обработчики табов. Со стором
|
|
16
|
-
приложения DevMode не пересекается, глобальных синглтонов нет.
|
|
17
|
-
- **Ядро не знает документов.** Ядро хранит вкладки, деление, навигацию, флаги модулей и сессию. Что такое файл,
|
|
18
|
-
запрос EQL или карта как JSON — знают модули.
|
|
19
|
-
- **Модуль = манифест + ленивая реализация.** Манифест (`defineModule`) — id, флаги, типы табов, секции
|
|
20
|
-
навигации, пункты меню; регистрируется сразу. Реализация (`defineModuleImpl`) — слайсы, listener'ы, сервисы, UI;
|
|
21
|
-
грузится через `import()` по требованию.
|
|
22
|
-
- **Состояние табов — в модуле.** `createTabStateSlice` ведёт состояние по `tabId`: создаёт на открытии, удаляет на
|
|
23
|
-
закрытии, сериализует в сессию.
|
|
24
|
-
- **Несериализуемое — в сервисах.** Редакторы Monaco, соединения, песочницы — `services` модуля, `useService`,
|
|
25
|
-
`dispose` при размонтировании.
|
|
26
|
-
- **Окружение — из `@evergis/react`.** `api`, `t`, тема, диалоги, карта, проект — из контекстов приложения.
|
|
27
|
-
- **Связь с приложением без host-объекта.** Намерения (`useDevModeListener`), состояние наружу (селекторы),
|
|
28
|
-
обработчики таба (`openTab({ handlers })`), компоненты хоста (`components`).
|
|
29
|
-
- **Флаги вместо форков.** `eqlModule({ export: false, projectLayer: true })`; возможность, которой нужен диалог
|
|
30
|
-
приложения, скрыта без него.
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
const MODULES = [catalogModule(), filesModule(), resourceJsonModule(), eqlModule()];
|
|
34
|
-
|
|
35
|
-
<GlobalProvider api={api} t={i18n.t}>
|
|
36
|
-
<DialogsProvider dialogs={DIALOGS_MAP}>
|
|
37
|
-
<DevModeProvider modules={MODULES}>
|
|
38
|
-
<MonacoProvider>
|
|
39
|
-
<DevMode reservedWidth={320} />
|
|
40
|
-
</MonacoProvider>
|
|
41
|
-
</DevModeProvider>
|
|
42
|
-
<Dialogs />
|
|
43
|
-
</DialogsProvider>
|
|
44
|
-
</GlobalProvider>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Обзор репозитория
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
apps/
|
|
51
|
-
├── src/
|
|
52
|
-
│ ├── catalog/ каталог: core, поля, селекторы, геометрия, формат атрибута, диалоги ресурса
|
|
53
|
-
│ └── devmode/ режим разработчика:
|
|
54
|
-
│ ├── core/ стор, слайсы ядра, реестр модулей, сервисы, сессия, намерения, thunk'и табов
|
|
55
|
-
│ ├── react/ DevModeProvider, хуки useDevMode, useTab*, useService, useDevModeListener
|
|
56
|
-
│ ├── layout/ готовая панель DevMode и её регионы
|
|
57
|
-
│ ├── tabs/ панели табов, деление, тулбар, док результатов
|
|
58
|
-
│ ├── navigation/ CategoryTree, NodeActionsMenu
|
|
59
|
-
│ ├── monaco/ MonacoProvider, MonacoEditor, InlineMonacoEditor, темы
|
|
60
|
-
│ ├── components/ JsonTree, JsonOutline, Markdown, поля, селекторы ресурсов
|
|
61
|
-
│ ├── modules/ files · resource-json · navigation-catalog · eql · table · layer
|
|
62
|
-
│ ├── i18n/ ru.json, en.json (пространство devMode)
|
|
63
|
-
│ └── testing/ createTestDevModeStore, createFakeApi
|
|
64
|
-
├── stories/ storybook: компоненты, Monaco, готовый DevMode с демо-модулем
|
|
65
|
-
├── test/ настройки и заглушки jest
|
|
66
|
-
├── documentation/ сайт документации (Astro Starlight)
|
|
67
|
-
└── rollup.config.js входы: catalog, catalog/*, devmode, devmode/*
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
| Вход | Что внутри |
|
|
71
|
-
|---|---|
|
|
72
|
-
| `@evergis/apps/catalog` | проверки имён и вид ресурса, поля, селекторы, формат атрибута, диалоги ресурса |
|
|
73
|
-
| `@evergis/apps/catalog/<вход>` | `core` (без React), `fields`, `selectors`, `geometry` (turf, betterknown, proj4), `attributeFormat`, `dialogs` |
|
|
74
|
-
| `@evergis/apps/devmode` | ядро, React, компоновка, табы, навигация, компоненты, i18n |
|
|
75
|
-
| `@evergis/apps/devmode/core` | только ядро |
|
|
76
|
-
| `@evergis/apps/devmode/monaco` | Monaco |
|
|
77
|
-
| `@evergis/apps/devmode/modules/<id>` | встроенные модули: `files`, `resource-json`, `navigation-catalog`, `eql`, `table`, `layer`, `python` |
|
|
78
|
-
| `@evergis/apps/devmode/testing` | помощники тестов |
|
|
79
|
-
| `@evergis/apps/devmode/store-types` | только типы: расширение `DevModeLazySlices` слайсами модулей приложения |
|
|
80
|
-
|
|
81
|
-
Все модули DevMode client-new перенесены; ноутбуки Jupyter — тип таба модуля `python`.
|
|
82
|
-
|
|
83
|
-
## Команды
|
|
84
|
-
|
|
85
|
-
| Команда | Что делает |
|
|
86
|
-
|---|---|
|
|
87
|
-
| `yarn build` | сборка в `dist`: rollup (ESM) и декларации `tsc` |
|
|
88
|
-
| `yarn typecheck` | проверка типов |
|
|
89
|
-
| `yarn lint` | ESLint |
|
|
90
|
-
| `yarn test` | jest |
|
|
91
|
-
| `yarn storybook` | storybook на http://localhost:6007 |
|
|
92
|
-
| `yarn build-storybook` | статический storybook в `storybook-static` |
|
|
93
|
-
| `yarn docs` | документация на http://localhost:4321 (`yarn --cwd documentation dev`) |
|
|
94
|
-
| `yarn docs:build` | статическая документация в `documentation/dist` |
|
|
95
|
-
|
|
96
|
-
Документация — отдельный пакет со своими зависимостями. Перед первым запуском:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
yarn --cwd documentation install
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Сайт собран на Astro 5 и Starlight 0.37: они работают на Node 22.19. Новые Astro 6 и 7 требуют Node ≥ 22.22.
|
|
103
|
-
|
|
104
|
-
## Документация
|
|
105
|
-
|
|
106
|
-
| Раздел | О чём |
|
|
107
|
-
|---|---|
|
|
108
|
-
| [Начало](documentation/src/content/docs/start/) | обзор, быстрый старт, репозиторий |
|
|
109
|
-
| [Архитектура](documentation/src/content/docs/architecture/) | экземпляр, стор, модули и манифесты, слайсы, сервисы, связь с приложением, компоновка |
|
|
110
|
-
| [Модули](documentation/src/content/docs/modules/) | встроенные модули и пошаговый пример своего |
|
|
111
|
-
| [Руководства](documentation/src/content/docs/guides/) | подключение на примере devmode-example, EQL и временные слои, сервис LSP для Python |
|
|
112
|
-
| [Справочник](documentation/src/content/docs/reference/) | компоненты со ссылками на storybook, входы и экспорты |
|
|
113
|
-
|
|
114
|
-
## Локальная проверка в приложении
|
|
115
|
-
|
|
116
|
-
Собрать пакет и подключить `dist` без публикации: `file:../spcore_api/packages/apps` в `package.json`
|
|
117
|
-
приложения или копированием `dist` и `package.json` в `node_modules/@evergis/apps`. `yarn link` даёт вторую
|
|
118
|
-
копию зависимостей и лишние ошибки типов.
|
|
1
|
+
# @evergis/apps
|
|
2
|
+
|
|
3
|
+
Приложения EverGIS одним пакетом: каталог (`@evergis/apps/catalog`) и режим разработчика
|
|
4
|
+
(`@evergis/apps/devmode`). Каталог от DevMode не зависит.
|
|
5
|
+
|
|
6
|
+
DevMode EverGIS: дерево каталога, табы документов с делением панелей, док результатов,
|
|
7
|
+
outline и статус-бар — без зависимости от кода client-new. Подключается в любое React-приложение на
|
|
8
|
+
`@evergis/react`.
|
|
9
|
+
|
|
10
|
+
📖 **Документация** — `yarn docs` → http://localhost:4321 (исходники в [`documentation/`](documentation/))
|
|
11
|
+
🧩 **Storybook** — `yarn storybook` → http://localhost:6007 (истории в [`stories/`](stories/))
|
|
12
|
+
|
|
13
|
+
## Основные концепции
|
|
14
|
+
|
|
15
|
+
- **Экземпляр.** `DevModeProvider` создаёт свой RTK-стор, реестр модулей, сервисы и обработчики табов. Со стором
|
|
16
|
+
приложения DevMode не пересекается, глобальных синглтонов нет.
|
|
17
|
+
- **Ядро не знает документов.** Ядро хранит вкладки, деление, навигацию, флаги модулей и сессию. Что такое файл,
|
|
18
|
+
запрос EQL или карта как JSON — знают модули.
|
|
19
|
+
- **Модуль = манифест + ленивая реализация.** Манифест (`defineModule`) — id, флаги, типы табов, секции
|
|
20
|
+
навигации, пункты меню; регистрируется сразу. Реализация (`defineModuleImpl`) — слайсы, listener'ы, сервисы, UI;
|
|
21
|
+
грузится через `import()` по требованию.
|
|
22
|
+
- **Состояние табов — в модуле.** `createTabStateSlice` ведёт состояние по `tabId`: создаёт на открытии, удаляет на
|
|
23
|
+
закрытии, сериализует в сессию.
|
|
24
|
+
- **Несериализуемое — в сервисах.** Редакторы Monaco, соединения, песочницы — `services` модуля, `useService`,
|
|
25
|
+
`dispose` при размонтировании.
|
|
26
|
+
- **Окружение — из `@evergis/react`.** `api`, `t`, тема, диалоги, карта, проект — из контекстов приложения.
|
|
27
|
+
- **Связь с приложением без host-объекта.** Намерения (`useDevModeListener`), состояние наружу (селекторы),
|
|
28
|
+
обработчики таба (`openTab({ handlers })`), компоненты хоста (`components`).
|
|
29
|
+
- **Флаги вместо форков.** `eqlModule({ export: false, projectLayer: true })`; возможность, которой нужен диалог
|
|
30
|
+
приложения, скрыта без него.
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
const MODULES = [catalogModule(), filesModule(), resourceJsonModule(), eqlModule()];
|
|
34
|
+
|
|
35
|
+
<GlobalProvider api={api} t={i18n.t}>
|
|
36
|
+
<DialogsProvider dialogs={DIALOGS_MAP}>
|
|
37
|
+
<DevModeProvider modules={MODULES}>
|
|
38
|
+
<MonacoProvider>
|
|
39
|
+
<DevMode reservedWidth={320} />
|
|
40
|
+
</MonacoProvider>
|
|
41
|
+
</DevModeProvider>
|
|
42
|
+
<Dialogs />
|
|
43
|
+
</DialogsProvider>
|
|
44
|
+
</GlobalProvider>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Обзор репозитория
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
apps/
|
|
51
|
+
├── src/
|
|
52
|
+
│ ├── catalog/ каталог: core, поля, селекторы, геометрия, формат атрибута, диалоги ресурса
|
|
53
|
+
│ └── devmode/ режим разработчика:
|
|
54
|
+
│ ├── core/ стор, слайсы ядра, реестр модулей, сервисы, сессия, намерения, thunk'и табов
|
|
55
|
+
│ ├── react/ DevModeProvider, хуки useDevMode, useTab*, useService, useDevModeListener
|
|
56
|
+
│ ├── layout/ готовая панель DevMode и её регионы
|
|
57
|
+
│ ├── tabs/ панели табов, деление, тулбар, док результатов
|
|
58
|
+
│ ├── navigation/ CategoryTree, NodeActionsMenu
|
|
59
|
+
│ ├── monaco/ MonacoProvider, MonacoEditor, InlineMonacoEditor, темы
|
|
60
|
+
│ ├── components/ JsonTree, JsonOutline, Markdown, поля, селекторы ресурсов
|
|
61
|
+
│ ├── modules/ files · resource-json · navigation-catalog · eql · table · layer
|
|
62
|
+
│ ├── i18n/ ru.json, en.json (пространство devMode)
|
|
63
|
+
│ └── testing/ createTestDevModeStore, createFakeApi
|
|
64
|
+
├── stories/ storybook: компоненты, Monaco, готовый DevMode с демо-модулем
|
|
65
|
+
├── test/ настройки и заглушки jest
|
|
66
|
+
├── documentation/ сайт документации (Astro Starlight)
|
|
67
|
+
└── rollup.config.js входы: catalog, catalog/*, devmode, devmode/*
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Вход | Что внутри |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `@evergis/apps/catalog` | проверки имён и вид ресурса, поля, селекторы, формат атрибута, диалоги ресурса |
|
|
73
|
+
| `@evergis/apps/catalog/<вход>` | `core` (без React), `fields`, `selectors`, `geometry` (turf, betterknown, proj4), `attributeFormat`, `dialogs` |
|
|
74
|
+
| `@evergis/apps/devmode` | ядро, React, компоновка, табы, навигация, компоненты, i18n |
|
|
75
|
+
| `@evergis/apps/devmode/core` | только ядро |
|
|
76
|
+
| `@evergis/apps/devmode/monaco` | Monaco |
|
|
77
|
+
| `@evergis/apps/devmode/modules/<id>` | встроенные модули: `files`, `resource-json`, `navigation-catalog`, `eql`, `table`, `layer`, `python` |
|
|
78
|
+
| `@evergis/apps/devmode/testing` | помощники тестов |
|
|
79
|
+
| `@evergis/apps/devmode/store-types` | только типы: расширение `DevModeLazySlices` слайсами модулей приложения |
|
|
80
|
+
|
|
81
|
+
Все модули DevMode client-new перенесены; ноутбуки Jupyter — тип таба модуля `python`.
|
|
82
|
+
|
|
83
|
+
## Команды
|
|
84
|
+
|
|
85
|
+
| Команда | Что делает |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `yarn build` | сборка в `dist`: rollup (ESM) и декларации `tsc` |
|
|
88
|
+
| `yarn typecheck` | проверка типов |
|
|
89
|
+
| `yarn lint` | ESLint |
|
|
90
|
+
| `yarn test` | jest |
|
|
91
|
+
| `yarn storybook` | storybook на http://localhost:6007 |
|
|
92
|
+
| `yarn build-storybook` | статический storybook в `storybook-static` |
|
|
93
|
+
| `yarn docs` | документация на http://localhost:4321 (`yarn --cwd documentation dev`) |
|
|
94
|
+
| `yarn docs:build` | статическая документация в `documentation/dist` |
|
|
95
|
+
|
|
96
|
+
Документация — отдельный пакет со своими зависимостями. Перед первым запуском:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
yarn --cwd documentation install
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Сайт собран на Astro 5 и Starlight 0.37: они работают на Node 22.19. Новые Astro 6 и 7 требуют Node ≥ 22.22.
|
|
103
|
+
|
|
104
|
+
## Документация
|
|
105
|
+
|
|
106
|
+
| Раздел | О чём |
|
|
107
|
+
|---|---|
|
|
108
|
+
| [Начало](documentation/src/content/docs/start/) | обзор, быстрый старт, репозиторий |
|
|
109
|
+
| [Архитектура](documentation/src/content/docs/architecture/) | экземпляр, стор, модули и манифесты, слайсы, сервисы, связь с приложением, компоновка |
|
|
110
|
+
| [Модули](documentation/src/content/docs/modules/) | встроенные модули и пошаговый пример своего |
|
|
111
|
+
| [Руководства](documentation/src/content/docs/guides/) | подключение на примере devmode-example, EQL и временные слои, сервис LSP для Python |
|
|
112
|
+
| [Справочник](documentation/src/content/docs/reference/) | компоненты со ссылками на storybook, входы и экспорты |
|
|
113
|
+
|
|
114
|
+
## Локальная проверка в приложении
|
|
115
|
+
|
|
116
|
+
Собрать пакет и подключить `dist` без публикации: `file:../spcore_api/packages/apps` в `package.json`
|
|
117
|
+
приложения или копированием `dist` и `package.json` в `node_modules/@evergis/apps`. `yarn link` даёт вторую
|
|
118
|
+
копию зависимостей и лишние ошибки типов.
|
|
@@ -3,14 +3,14 @@ import { ResourceTypeTiles } from '../../fields/ResourceTypeTiles/index.js';
|
|
|
3
3
|
import { ResourceTypeContainer } from '../../fields/ResourceTypeTiles/styled.js';
|
|
4
4
|
export { Hint, ImageFormatPreviewContainer, ImagePreview, ImagePreviewIcon, Label, StringFormSettingsContainer, StringFormSettingsContentContainer } from '../styled.js';
|
|
5
5
|
|
|
6
|
-
const StringSubTypeTiles = styled(ResourceTypeTiles).withConfig({ displayName: "StringSubTypeTiles", componentId: "sc-
|
|
7
|
-
margin-bottom: 0;
|
|
8
|
-
padding: 1rem;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
|
|
11
|
-
${ResourceTypeContainer} {
|
|
12
|
-
margin-right: 0.5rem;
|
|
13
|
-
}
|
|
6
|
+
const StringSubTypeTiles = styled(ResourceTypeTiles).withConfig({ displayName: "StringSubTypeTiles", componentId: "sc-ieyitf" }) `
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
padding: 1rem;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
|
|
11
|
+
${ResourceTypeContainer} {
|
|
12
|
+
margin-right: 0.5rem;
|
|
13
|
+
}
|
|
14
14
|
`;
|
|
15
15
|
|
|
16
16
|
export { StringSubTypeTiles };
|
|
@@ -3,180 +3,180 @@ import { Blank, Link, Message, Input, textOverflowEllipsisMixin, Flex, Icon, Tex
|
|
|
3
3
|
import { hexToRgba } from '@evergis/common';
|
|
4
4
|
import { EXAMPLE_TINT_ALPHA } from './constants.js';
|
|
5
5
|
|
|
6
|
-
const SettingsRow = styled.div.withConfig({ displayName: "SettingsRow", componentId: "sc-
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
align-items: center;
|
|
11
|
-
`;
|
|
12
|
-
const FormSettingsContainer = styled(Blank).withConfig({ displayName: "FormSettingsContainer", componentId: "sc-
|
|
13
|
-
display: flex;
|
|
14
|
-
padding: 1rem;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
gap: 1rem 0;
|
|
18
|
-
max-height: ${({ height }) => height} !important;
|
|
19
|
-
|
|
20
|
-
label {
|
|
21
|
-
margin-bottom: 0 !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
6
|
+
const SettingsRow = styled.div.withConfig({ displayName: "SettingsRow", componentId: "sc-iie6d" }) `
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
`;
|
|
12
|
+
const FormSettingsContainer = styled(Blank).withConfig({ displayName: "FormSettingsContainer", componentId: "sc-1f6er1p" }) `
|
|
13
|
+
display: flex;
|
|
14
|
+
padding: 1rem;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
gap: 1rem 0;
|
|
18
|
+
max-height: ${({ height }) => height} !important;
|
|
19
|
+
|
|
20
|
+
label {
|
|
21
|
+
margin-bottom: 0 !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
24
|
${({ $flat }) => $flat &&
|
|
25
|
-
css `
|
|
26
|
-
padding: 0;
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
box-shadow: none;
|
|
29
|
-
border-radius: 0;
|
|
30
|
-
overflow-y: visible;
|
|
31
|
-
`}
|
|
32
|
-
`;
|
|
33
|
-
const Hint = styled(Message).withConfig({ displayName: "Hint", componentId: "sc-
|
|
34
|
-
border: none;
|
|
35
|
-
border-radius: ${({ theme: { borderRadius } }) => borderRadius.xSmall};
|
|
36
|
-
|
|
37
|
-
${Link} {
|
|
38
|
-
color: ${({ theme: { palette } }) => palette.primary} !important;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
cursor: default;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
const SmallHintText = styled.div.withConfig({ displayName: "SmallHintText", componentId: "sc-
|
|
44
|
-
font: ${({ theme: { fonts } }) => fonts.small};
|
|
45
|
-
opacity: 0.54;
|
|
46
|
-
margin-bottom: 0.25rem;
|
|
47
|
-
`;
|
|
48
|
-
const CustomBlank = styled.div.withConfig({ displayName: "CustomBlank", componentId: "sc-
|
|
49
|
-
pointer-events: auto;
|
|
50
|
-
max-height: ${({ maxHeight }) => (maxHeight ? "40vh" : "unset")};
|
|
51
|
-
width: 20.5rem;
|
|
52
|
-
|
|
53
|
-
@media screen and (max-width: 992px) {
|
|
54
|
-
width: 14rem;
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
const FormatInput = styled(Input).withConfig({ displayName: "FormatInput", componentId: "sc-
|
|
58
|
-
border: none;
|
|
59
|
-
font-size: 0.75rem;
|
|
60
|
-
`;
|
|
61
|
-
const FormatInputRow = styled(SettingsRow).withConfig({ displayName: "FormatInputRow", componentId: "sc-
|
|
62
|
-
margin-left: 0.5rem;
|
|
63
|
-
|
|
64
|
-
label {
|
|
65
|
-
position: relative;
|
|
66
|
-
top: 0.25rem;
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
const FormatExampleContainer = styled.div.withConfig({ displayName: "FormatExampleContainer", componentId: "sc-
|
|
70
|
-
width: 12.5rem;
|
|
71
|
-
flex-shrink: 0;
|
|
72
|
-
display: flex;
|
|
73
|
-
`;
|
|
74
|
-
const FormatExample = styled.div.withConfig({ displayName: "FormatExample", componentId: "sc-
|
|
75
|
-
margin-left: ${({ $noMargin }) => ($noMargin ? "0" : "auto")};
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
display: inline-flex;
|
|
78
|
-
padding: 5px 8px;
|
|
79
|
-
align-items: center;
|
|
80
|
-
border-radius: 0.25rem;
|
|
81
|
-
background-color: ${({ theme }) => hexToRgba(theme.palette.primary, EXAMPLE_TINT_ALPHA)};
|
|
82
|
-
color: ${({ theme }) => theme.palette.primary};
|
|
83
|
-
font-size: 0.75rem;
|
|
84
|
-
line-height: 14px;
|
|
85
|
-
|
|
86
|
-
${textOverflowEllipsisMixin}
|
|
87
|
-
`;
|
|
88
|
-
const FormatExampleTooltipList = styled(Flex).withConfig({ displayName: "FormatExampleTooltipList", componentId: "sc-
|
|
89
|
-
gap: 0.125rem;
|
|
90
|
-
text-align: left;
|
|
91
|
-
max-width: 16rem;
|
|
25
|
+
css `
|
|
26
|
+
padding: 0;
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
border-radius: 0;
|
|
30
|
+
overflow-y: visible;
|
|
31
|
+
`}
|
|
32
|
+
`;
|
|
33
|
+
const Hint = styled(Message).withConfig({ displayName: "Hint", componentId: "sc-dg3h2x" }) `
|
|
34
|
+
border: none;
|
|
35
|
+
border-radius: ${({ theme: { borderRadius } }) => borderRadius.xSmall};
|
|
36
|
+
|
|
37
|
+
${Link} {
|
|
38
|
+
color: ${({ theme: { palette } }) => palette.primary} !important;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
cursor: default;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
const SmallHintText = styled.div.withConfig({ displayName: "SmallHintText", componentId: "sc-a69twb" }) `
|
|
44
|
+
font: ${({ theme: { fonts } }) => fonts.small};
|
|
45
|
+
opacity: 0.54;
|
|
46
|
+
margin-bottom: 0.25rem;
|
|
47
|
+
`;
|
|
48
|
+
const CustomBlank = styled.div.withConfig({ displayName: "CustomBlank", componentId: "sc-ocsu46" }) `
|
|
49
|
+
pointer-events: auto;
|
|
50
|
+
max-height: ${({ maxHeight }) => (maxHeight ? "40vh" : "unset")};
|
|
51
|
+
width: 20.5rem;
|
|
52
|
+
|
|
53
|
+
@media screen and (max-width: 992px) {
|
|
54
|
+
width: 14rem;
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
57
|
+
const FormatInput = styled(Input).withConfig({ displayName: "FormatInput", componentId: "sc-rtch7y" }) `
|
|
58
|
+
border: none;
|
|
59
|
+
font-size: 0.75rem;
|
|
60
|
+
`;
|
|
61
|
+
const FormatInputRow = styled(SettingsRow).withConfig({ displayName: "FormatInputRow", componentId: "sc-1nq5bn0" }) `
|
|
62
|
+
margin-left: 0.5rem;
|
|
63
|
+
|
|
64
|
+
label {
|
|
65
|
+
position: relative;
|
|
66
|
+
top: 0.25rem;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
const FormatExampleContainer = styled.div.withConfig({ displayName: "FormatExampleContainer", componentId: "sc-1udxhfm" }) `
|
|
70
|
+
width: 12.5rem;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
display: flex;
|
|
73
|
+
`;
|
|
74
|
+
const FormatExample = styled.div.withConfig({ displayName: "FormatExample", componentId: "sc-jn38yh" }) `
|
|
75
|
+
margin-left: ${({ $noMargin }) => ($noMargin ? "0" : "auto")};
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
padding: 5px 8px;
|
|
79
|
+
align-items: center;
|
|
80
|
+
border-radius: 0.25rem;
|
|
81
|
+
background-color: ${({ theme }) => hexToRgba(theme.palette.primary, EXAMPLE_TINT_ALPHA)};
|
|
82
|
+
color: ${({ theme }) => theme.palette.primary};
|
|
83
|
+
font-size: 0.75rem;
|
|
84
|
+
line-height: 14px;
|
|
85
|
+
|
|
86
|
+
${textOverflowEllipsisMixin}
|
|
87
|
+
`;
|
|
88
|
+
const FormatExampleTooltipList = styled(Flex).withConfig({ displayName: "FormatExampleTooltipList", componentId: "sc-kmsy6g" }) `
|
|
89
|
+
gap: 0.125rem;
|
|
90
|
+
text-align: left;
|
|
91
|
+
max-width: 16rem;
|
|
92
92
|
`;
|
|
93
93
|
/** Без формата — пустое место той же ширины, чтобы строки атрибутов не съезжали. */
|
|
94
|
-
const FormatPlaceholder = styled.span.withConfig({ displayName: "FormatPlaceholder", componentId: "sc-
|
|
95
|
-
width: ${({ $withoutInput }) => ($withoutInput ? "13rem" : "14.375rem")};
|
|
96
|
-
flex-shrink: 0;
|
|
97
|
-
`;
|
|
98
|
-
const skeletonShimmer = keyframes `
|
|
99
|
-
0% {
|
|
100
|
-
background-position: 200% 0;
|
|
101
|
-
}
|
|
102
|
-
100% {
|
|
103
|
-
background-position: -200% 0;
|
|
104
|
-
}
|
|
105
|
-
`;
|
|
106
|
-
const FormatExampleSkeleton = styled.div.withConfig({ displayName: "FormatExampleSkeleton", componentId: "sc-
|
|
107
|
-
margin-left: ${({ $noMargin }) => ($noMargin ? "0" : "auto")};
|
|
108
|
-
width: 5.5rem;
|
|
109
|
-
height: 1.5rem;
|
|
110
|
-
border-radius: 0.25rem;
|
|
111
|
-
flex-shrink: 0;
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
background: linear-gradient(
|
|
114
|
-
90deg,
|
|
115
|
-
${({ theme }) => theme.palette.element} 0%,
|
|
116
|
-
${({ theme }) => theme.palette.element} 40%,
|
|
117
|
-
${({ theme }) => theme.palette.backgroundAlpha} 50%,
|
|
118
|
-
${({ theme }) => theme.palette.element} 60%,
|
|
119
|
-
${({ theme }) => theme.palette.element} 100%
|
|
120
|
-
);
|
|
121
|
-
background-size: 200% 100%;
|
|
122
|
-
animation: ${skeletonShimmer} 1.5s ease-in-out infinite;
|
|
123
|
-
|
|
124
|
-
@media (prefers-reduced-motion: reduce) {
|
|
125
|
-
animation: none;
|
|
126
|
-
}
|
|
127
|
-
`;
|
|
128
|
-
const StringFormSettingsContainer = styled(FormSettingsContainer).withConfig({ displayName: "StringFormSettingsContainer", componentId: "sc-
|
|
129
|
-
padding: 0;
|
|
130
|
-
justify-content: unset;
|
|
131
|
-
height: auto;
|
|
132
|
-
`;
|
|
133
|
-
const StringFormSettingsContentContainer = styled.div.withConfig({ displayName: "StringFormSettingsContentContainer", componentId: "sc-
|
|
134
|
-
padding: ${({ $flat }) => ($flat ? "0" : "1rem")};
|
|
135
|
-
display: flex;
|
|
136
|
-
width: 100%;
|
|
137
|
-
flex-direction: column;
|
|
138
|
-
gap: 1rem 0;
|
|
139
|
-
box-sizing: border-box;
|
|
140
|
-
`;
|
|
141
|
-
const Label = styled.div.withConfig({ displayName: "Label", componentId: "sc-
|
|
142
|
-
color: ${({ theme: { palette } }) => palette.textSecondary};
|
|
143
|
-
font-size: 12px;
|
|
144
|
-
margin-bottom: 0.25rem;
|
|
145
|
-
`;
|
|
146
|
-
const ImageFormatPreviewContainer = styled(Flex).withConfig({ displayName: "ImageFormatPreviewContainer", componentId: "sc-
|
|
147
|
-
align-items: center;
|
|
148
|
-
`;
|
|
149
|
-
const ImagePreview = styled(Flex).withConfig({ displayName: "ImagePreview", componentId: "sc-
|
|
150
|
-
align-items: center;
|
|
151
|
-
justify-content: center;
|
|
152
|
-
background-color: #f6f6f6;
|
|
153
|
-
color: #b3b3b3;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
width: 4.5rem;
|
|
156
|
-
height: 4.5rem;
|
|
157
|
-
border-radius: ${({ theme: { borderRadius } }) => borderRadius.smallest};
|
|
158
|
-
margin-right: 0.5rem;
|
|
159
|
-
`;
|
|
160
|
-
const ImagePreviewIcon = styled(Icon).withConfig({ displayName: "ImagePreviewIcon", componentId: "sc-
|
|
161
|
-
color: #b3b3b3;
|
|
162
|
-
`;
|
|
163
|
-
const AttributeDescriptionContainer = styled.div.withConfig({ displayName: "AttributeDescriptionContainer", componentId: "sc-
|
|
164
|
-
position: relative;
|
|
165
|
-
`;
|
|
166
|
-
const DescriptionTextarea = styled(Textarea).withConfig({ displayName: "DescriptionTextarea", componentId: "sc-
|
|
167
|
-
min-height: 4rem;
|
|
168
|
-
max-height: 12rem;
|
|
169
|
-
`;
|
|
170
|
-
const LinkIconContainer = styled.div.withConfig({ displayName: "LinkIconContainer", componentId: "sc-
|
|
171
|
-
position: absolute;
|
|
172
|
-
right: 0;
|
|
173
|
-
top: -6px;
|
|
174
|
-
`;
|
|
175
|
-
const ActionsContainer = styled.div.withConfig({ displayName: "ActionsContainer", componentId: "sc-
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
margin-right: auto;
|
|
179
|
-
margin-left: auto;
|
|
94
|
+
const FormatPlaceholder = styled.span.withConfig({ displayName: "FormatPlaceholder", componentId: "sc-11rgsvm" }) `
|
|
95
|
+
width: ${({ $withoutInput }) => ($withoutInput ? "13rem" : "14.375rem")};
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
`;
|
|
98
|
+
const skeletonShimmer = keyframes `
|
|
99
|
+
0% {
|
|
100
|
+
background-position: 200% 0;
|
|
101
|
+
}
|
|
102
|
+
100% {
|
|
103
|
+
background-position: -200% 0;
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
const FormatExampleSkeleton = styled.div.withConfig({ displayName: "FormatExampleSkeleton", componentId: "sc-jhx6n2" }) `
|
|
107
|
+
margin-left: ${({ $noMargin }) => ($noMargin ? "0" : "auto")};
|
|
108
|
+
width: 5.5rem;
|
|
109
|
+
height: 1.5rem;
|
|
110
|
+
border-radius: 0.25rem;
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
background: linear-gradient(
|
|
114
|
+
90deg,
|
|
115
|
+
${({ theme }) => theme.palette.element} 0%,
|
|
116
|
+
${({ theme }) => theme.palette.element} 40%,
|
|
117
|
+
${({ theme }) => theme.palette.backgroundAlpha} 50%,
|
|
118
|
+
${({ theme }) => theme.palette.element} 60%,
|
|
119
|
+
${({ theme }) => theme.palette.element} 100%
|
|
120
|
+
);
|
|
121
|
+
background-size: 200% 100%;
|
|
122
|
+
animation: ${skeletonShimmer} 1.5s ease-in-out infinite;
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
animation: none;
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
const StringFormSettingsContainer = styled(FormSettingsContainer).withConfig({ displayName: "StringFormSettingsContainer", componentId: "sc-11ln5bu" }) `
|
|
129
|
+
padding: 0;
|
|
130
|
+
justify-content: unset;
|
|
131
|
+
height: auto;
|
|
132
|
+
`;
|
|
133
|
+
const StringFormSettingsContentContainer = styled.div.withConfig({ displayName: "StringFormSettingsContentContainer", componentId: "sc-1kmfvv9" }) `
|
|
134
|
+
padding: ${({ $flat }) => ($flat ? "0" : "1rem")};
|
|
135
|
+
display: flex;
|
|
136
|
+
width: 100%;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
gap: 1rem 0;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
`;
|
|
141
|
+
const Label = styled.div.withConfig({ displayName: "Label", componentId: "sc-myklq1" }) `
|
|
142
|
+
color: ${({ theme: { palette } }) => palette.textSecondary};
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
margin-bottom: 0.25rem;
|
|
145
|
+
`;
|
|
146
|
+
const ImageFormatPreviewContainer = styled(Flex).withConfig({ displayName: "ImageFormatPreviewContainer", componentId: "sc-1t1pswc" }) `
|
|
147
|
+
align-items: center;
|
|
148
|
+
`;
|
|
149
|
+
const ImagePreview = styled(Flex).withConfig({ displayName: "ImagePreview", componentId: "sc-vdd6as" }) `
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
background-color: #f6f6f6;
|
|
153
|
+
color: #b3b3b3;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
width: 4.5rem;
|
|
156
|
+
height: 4.5rem;
|
|
157
|
+
border-radius: ${({ theme: { borderRadius } }) => borderRadius.smallest};
|
|
158
|
+
margin-right: 0.5rem;
|
|
159
|
+
`;
|
|
160
|
+
const ImagePreviewIcon = styled(Icon).withConfig({ displayName: "ImagePreviewIcon", componentId: "sc-1o29yrc" }) `
|
|
161
|
+
color: #b3b3b3;
|
|
162
|
+
`;
|
|
163
|
+
const AttributeDescriptionContainer = styled.div.withConfig({ displayName: "AttributeDescriptionContainer", componentId: "sc-pc7xpg" }) `
|
|
164
|
+
position: relative;
|
|
165
|
+
`;
|
|
166
|
+
const DescriptionTextarea = styled(Textarea).withConfig({ displayName: "DescriptionTextarea", componentId: "sc-27hucu" }) `
|
|
167
|
+
min-height: 4rem;
|
|
168
|
+
max-height: 12rem;
|
|
169
|
+
`;
|
|
170
|
+
const LinkIconContainer = styled.div.withConfig({ displayName: "LinkIconContainer", componentId: "sc-kg1h16" }) `
|
|
171
|
+
position: absolute;
|
|
172
|
+
right: 0;
|
|
173
|
+
top: -6px;
|
|
174
|
+
`;
|
|
175
|
+
const ActionsContainer = styled.div.withConfig({ displayName: "ActionsContainer", componentId: "sc-7w4qqq" }) `
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
margin-right: auto;
|
|
179
|
+
margin-left: auto;
|
|
180
180
|
`;
|
|
181
181
|
|
|
182
182
|
export { ActionsContainer, AttributeDescriptionContainer, CustomBlank, DescriptionTextarea, FormSettingsContainer, FormatExample, FormatExampleContainer, FormatExampleSkeleton, FormatExampleTooltipList, FormatInput, FormatInputRow, FormatPlaceholder, Hint, ImageFormatPreviewContainer, ImagePreview, ImagePreviewIcon, Label, LinkIconContainer, SettingsRow, SmallHintText, StringFormSettingsContainer, StringFormSettingsContentContainer };
|