@evergis/react 4.0.129 → 4.0.131
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/dist/components/Dashboard/componentTypes.d.ts +1 -1
- package/dist/components/Dashboard/components/AddButton/styled.d.ts +15 -0
- package/dist/components/Dashboard/components/index.d.ts +1 -0
- package/dist/components/Dashboard/constants.d.ts +12 -0
- package/dist/components/Dashboard/containers/AttachmentContainer/styled.d.ts +0 -1
- package/dist/components/Dashboard/containers/StructuredDataContainer/constants.d.ts +2 -0
- package/dist/components/Dashboard/containers/StructuredDataContainer/hooks/useStructuredData.d.ts +4 -0
- package/dist/components/Dashboard/containers/StructuredDataContainer/styled.d.ts +3 -0
- package/dist/components/Dashboard/containers/StructuredDataContainer/utils/filterValue.d.ts +3 -2
- package/dist/components/Dashboard/elements/ElementTable/components/TableCell.d.ts +1 -1
- package/dist/components/Dashboard/elements/ElementTable/constants.d.ts +5 -0
- package/dist/components/Dashboard/elements/ElementTable/hooks/useCellEditing.d.ts +25 -9
- package/dist/components/Dashboard/elements/ElementTable/hooks/useHeadOverlap.d.ts +15 -0
- package/dist/components/Dashboard/elements/ElementTable/hooks/useTableView.d.ts +10 -1
- package/dist/components/Dashboard/elements/ElementTable/styled.d.ts +51 -4
- package/dist/components/Dashboard/elements/ElementTable/types.d.ts +5 -0
- package/dist/components/Dashboard/elements/ElementTable/utils/tableBox.d.ts +20 -0
- package/dist/components/Dashboard/hooks/index.d.ts +1 -0
- package/dist/components/Dashboard/hooks/useDataSourceLoading.d.ts +2 -0
- package/dist/components/Dashboard/hooks/useGlobalContext.d.ts +2 -0
- package/dist/components/Dashboard/types.d.ts +8 -6
- package/dist/components/Dashboard/utils/applyQueryFilters.d.ts +3 -1
- package/dist/components/Dashboard/utils/formatDataSourceCondition.d.ts +5 -1
- package/dist/components/Dashboard/utils/getMapViewDataSources.d.ts +7 -0
- package/dist/components/Dashboard/utils/index.d.ts +2 -0
- package/dist/components/Dashboard/utils/toConditionsArray.d.ts +2 -0
- package/dist/contexts/GlobalContext/types.d.ts +4 -0
- package/dist/index.js +445 -127
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +439 -129
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredData.d.ts +0 -28
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataDraft.d.ts +0 -25
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSave.d.ts +0 -17
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSchema.d.ts +0 -11
- package/dist/components/Dashboard/elements/ElementTable/useCellEditing.d.ts +0 -15
- package/dist/components/Dashboard/elements/ElementTable/useTableView.d.ts +0 -16
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.
|
|
2
|
+
"version": "4.0.131",
|
|
3
3
|
"name": "@evergis/react",
|
|
4
4
|
"author": "Everpoint",
|
|
5
5
|
"license": "MIT",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@evergis/api": "^5.0.46",
|
|
61
61
|
"@evergis/charts": "^4.0.45",
|
|
62
62
|
"@evergis/color": "^1.0.0-alpha.1",
|
|
63
|
-
"@evergis/uilib-gl": "^1.0.
|
|
63
|
+
"@evergis/uilib-gl": "^1.0.134",
|
|
64
64
|
"@mapbox/mapbox-gl-draw": "^1.5.1",
|
|
65
65
|
"@microsoft/signalr": "^8.0.7",
|
|
66
66
|
"@svgdotjs/svg.js": "^3.1.2",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"uuid": "^13.0.0",
|
|
90
90
|
"wkt": "^0.1.1"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "3d5af12fc45ba044bb09001f3aaf6049d68f0de3"
|
|
93
93
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { StructuredDataContainerConfig, WidgetType } from '../../types';
|
|
2
|
-
import { StructuredDataContextValue } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Оркестратор контейнера: собирает схему, черновик и запись в одно состояние экрана.
|
|
5
|
-
*
|
|
6
|
-
* Правку открывает `options.editMode`: не задан или `false` — таблица целиком на чтение, без
|
|
7
|
-
* редакторов ячеек, добавления, удаления и кнопок сохранения.
|
|
8
|
-
*
|
|
9
|
-
* Источник без `layerName` (EQL, python-скрипт, внешний url) записи не поддерживает — контейнер
|
|
10
|
-
* деградирует в «ручную структуру поверх данных источника»: строки правятся и уезжают в фильтр,
|
|
11
|
-
* но добавление и удаление строк недоступны.
|
|
12
|
-
*/
|
|
13
|
-
export declare const useStructuredData: (type: WidgetType, elementConfig?: StructuredDataContainerConfig) => {
|
|
14
|
-
contextValue: StructuredDataContextValue;
|
|
15
|
-
dirty: boolean;
|
|
16
|
-
saving: boolean;
|
|
17
|
-
loading: boolean;
|
|
18
|
-
hasError: boolean;
|
|
19
|
-
canEdit: boolean;
|
|
20
|
-
canAddRows: boolean;
|
|
21
|
-
isDeleteConfirmOpen: boolean;
|
|
22
|
-
isDeletingSourceRow: boolean;
|
|
23
|
-
onAddRow: () => void;
|
|
24
|
-
onCancel: () => void;
|
|
25
|
-
onSave: () => Promise<void>;
|
|
26
|
-
onDeleteConfirm: () => void;
|
|
27
|
-
onDeleteCancel: () => void;
|
|
28
|
-
};
|
package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataDraft.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { FeatureAttributeValue } from '../../../../types';
|
|
2
|
-
import { SelectedFilter, WidgetDataSource } from '../../types';
|
|
3
|
-
import { DraftRow, StructuredDataAttribute } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Черновик строк: правки копятся локально и никого не трогают до «Сохранить».
|
|
6
|
-
*
|
|
7
|
-
* База (`baseline`) — последнее сохранённое состояние; «Отменить» возвращает к нему.
|
|
8
|
-
* Пока черновик грязный, приходящие обновления источника его НЕ затирают — иначе фоновая
|
|
9
|
-
* перезагрузка данных стирала бы набранное пользователем.
|
|
10
|
-
*/
|
|
11
|
-
export declare const useStructuredDataDraft: ({ schema, dataSource, hasDataSource, filterValue, }: {
|
|
12
|
-
schema: StructuredDataAttribute[];
|
|
13
|
-
dataSource?: WidgetDataSource;
|
|
14
|
-
hasDataSource: boolean;
|
|
15
|
-
filterValue?: SelectedFilter["value"];
|
|
16
|
-
}) => {
|
|
17
|
-
rows: DraftRow[];
|
|
18
|
-
visibleRows: DraftRow[];
|
|
19
|
-
dirty: boolean;
|
|
20
|
-
changeCell: (key: string, attributeName: string, value: FeatureAttributeValue) => void;
|
|
21
|
-
addRow: () => void;
|
|
22
|
-
deleteRow: (key: string) => void;
|
|
23
|
-
reset: () => void;
|
|
24
|
-
commitSaved: (next: DraftRow[]) => void;
|
|
25
|
-
};
|
package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSave.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { WidgetType } from '../../types';
|
|
2
|
-
import { DraftRow, StructuredDataAttribute } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Запись черновика: сперва в источник (если он поддерживает запись), затем в фильтр.
|
|
5
|
-
*
|
|
6
|
-
* Порядок не случаен: потребители фильтра не должны увидеть данные, которых источник не принял.
|
|
7
|
-
* При ошибке черновик остаётся нетронутым — пользователь может исправить значения и повторить.
|
|
8
|
-
*/
|
|
9
|
-
export declare const useStructuredDataSave: ({ type, schema, layerName, filterName, }: {
|
|
10
|
-
type: WidgetType;
|
|
11
|
-
schema: StructuredDataAttribute[];
|
|
12
|
-
layerName?: string;
|
|
13
|
-
filterName?: string;
|
|
14
|
-
}) => {
|
|
15
|
-
save: (rows: DraftRow[]) => Promise<DraftRow[] | null>;
|
|
16
|
-
saving: boolean;
|
|
17
|
-
};
|
package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSchema.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StructuredDataContainerConfig, WidgetType } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Схема структурированных данных и источник, к которому она привязана.
|
|
4
|
-
*
|
|
5
|
-
* Источник резолвится через общий `useRelatedDataSourceAttributes`: он собирает layerInfo
|
|
6
|
-
* реального слоя, а для EQL/python-источников — синтетический из атрибутов ответа.
|
|
7
|
-
*/
|
|
8
|
-
export declare const useStructuredDataSchema: (type: WidgetType, elementConfig?: StructuredDataContainerConfig) => {
|
|
9
|
-
schema: import('./types').StructuredDataAttribute[];
|
|
10
|
-
dataSource: import('../../types').WidgetDataSource;
|
|
11
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Режим правки одной ячейки: открывается кликом по значению, закрывается кликом снаружи.
|
|
4
|
-
*
|
|
5
|
-
* Закрывать по `blur` нельзя: `DatePicker` уводит фокус из поля уже на клике по иконке
|
|
6
|
-
* календаря — редактор исчезал бы раньше, чем календарь успевал открыться. Поэтому слушаем
|
|
7
|
-
* `mousedown` на документе, а клики внутри портала (`#portal-root`) считаем «своими»:
|
|
8
|
-
* выпадающие слои контролов uilib живут именно там, вне DOM-поддерева ячейки.
|
|
9
|
-
*/
|
|
10
|
-
export declare const useCellEditing: () => {
|
|
11
|
-
editing: boolean;
|
|
12
|
-
editorRef: import('react').MutableRefObject<HTMLDivElement>;
|
|
13
|
-
startEditing: () => void;
|
|
14
|
-
onKeyDown: ({ key }: KeyboardEvent<HTMLDivElement>) => void;
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ElementTableConfig } from '../../types';
|
|
2
|
-
import { TableSort } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Вид таблицы: набор и порядок колонок из `columnNames` плюс локальная сортировка.
|
|
5
|
-
*
|
|
6
|
-
* Сортировка живёт здесь, а не в контейнере: она ничего не меняет в данных и не должна
|
|
7
|
-
* влиять на порядок строк, уходящих в фильтр.
|
|
8
|
-
*/
|
|
9
|
-
export declare const useTableView: (elementConfig?: ElementTableConfig) => {
|
|
10
|
-
context: import('../../containers/StructuredDataContainer/types').StructuredDataContextValue;
|
|
11
|
-
columns: import('../../containers/StructuredDataContainer/types').StructuredDataAttribute[];
|
|
12
|
-
rows: import('../../containers/StructuredDataContainer/types').DraftRow[];
|
|
13
|
-
sort: TableSort;
|
|
14
|
-
sortEnabled: boolean;
|
|
15
|
-
onSortToggle: (attributeName: string) => void;
|
|
16
|
-
};
|