@evergis/react 4.0.141 → 4.0.142
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/LICENSE +21 -21
- package/README.md +7 -7
- package/dist/components/Dashboard/constants.d.ts +12 -0
- package/dist/components/Dashboard/hooks/useGlobalContext.d.ts +2 -0
- 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/getProjectValue.d.ts +11 -0
- package/dist/components/Dashboard/utils/index.d.ts +1 -0
- package/dist/contexts/GlobalContext/types.d.ts +4 -0
- package/dist/index.js +3351 -3274
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +3347 -3275
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Everpoint
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Everpoint
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @evergis/react
|
|
2
|
-
|
|
3
|
-
В данном репозитории находятся специфичные (в отличии от `@evergis/uilib-gl`) для `Evergis Online`,
|
|
4
|
-
но в целом переиспользуемые на других проектах, построенных на Evergis API, React-компоненты.
|
|
5
|
-
|
|
6
|
-
***ВАЖНО!!!***: Разрабатываемые компоненты не должны иметь зависимостей
|
|
7
|
-
от системы поддержки мультиязычности `Evergis Online`!
|
|
1
|
+
# @evergis/react
|
|
2
|
+
|
|
3
|
+
В данном репозитории находятся специфичные (в отличии от `@evergis/uilib-gl`) для `Evergis Online`,
|
|
4
|
+
но в целом переиспользуемые на других проектах, построенных на Evergis API, React-компоненты.
|
|
5
|
+
|
|
6
|
+
***ВАЖНО!!!***: Разрабатываемые компоненты не должны иметь зависимостей
|
|
7
|
+
от системы поддержки мультиязычности `Evergis Online`!
|
|
@@ -51,6 +51,18 @@ export declare const ZOOM_FILTER_NAME = "zoom";
|
|
|
51
51
|
* перехвачен системной подстановкой — ровно как в случае `geometry`.
|
|
52
52
|
*/
|
|
53
53
|
export declare const MAP_VIEW_FILTER_NAMES: string[];
|
|
54
|
+
/** Имя системного фильтра «текущий проект» — `%project`, `%project.name`, `%project.alias`. */
|
|
55
|
+
export declare const PROJECT_FILTER_NAME = "project";
|
|
56
|
+
/** Свойство `%project.name` — системное имя проекта. */
|
|
57
|
+
export declare const PROJECT_NAME_PROP = "name";
|
|
58
|
+
/** Свойство `%project.alias` — алиас проекта, при пустом алиасе используется системное имя. */
|
|
59
|
+
export declare const PROJECT_ALIAS_PROP = "alias";
|
|
60
|
+
/**
|
|
61
|
+
* Свойства подстановки проекта в порядке замены: составные формы идут раньше голого плейсхолдера,
|
|
62
|
+
* иначе `%project` съел бы начало `%project.alias`. Пустая строка — голый `%project`, он равен
|
|
63
|
+
* `%project.name`.
|
|
64
|
+
*/
|
|
65
|
+
export declare const PROJECT_PROPS: string[];
|
|
54
66
|
export declare const PROVIDER_PREFIX = "$";
|
|
55
67
|
export declare enum ProviderPrefix {
|
|
56
68
|
Card = "card",
|
|
@@ -7,6 +7,8 @@ export declare const useGlobalContext: () => {
|
|
|
7
7
|
ewktGeometry: string;
|
|
8
8
|
ewktExtent: string;
|
|
9
9
|
zoomLevel: number;
|
|
10
|
+
projectName: string;
|
|
11
|
+
projectAlias: string;
|
|
10
12
|
notification: {
|
|
11
13
|
add: (item: import('@evergis/uilib-gl').INotificationItem) => void;
|
|
12
14
|
update: (patch: Partial<import('@evergis/uilib-gl').INotificationItem> & {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ClientFeatureAttribute, ConfigFilter, SelectedFilters, WidgetDataSource } from '../types';
|
|
2
2
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
|
-
export declare const applyQueryFilters: ({ parameters: configParameters, filters: configFilters, selectedFilters, geometry, extent, zoomLevel, attributes, layerInfo, dataSources, projectDataSources, }: {
|
|
3
|
+
export declare const applyQueryFilters: ({ parameters: configParameters, filters: configFilters, selectedFilters, geometry, extent, zoomLevel, projectName, projectAlias, attributes, layerInfo, dataSources, projectDataSources, }: {
|
|
4
4
|
parameters: Record<string, any>;
|
|
5
5
|
filters: ConfigFilter[];
|
|
6
6
|
selectedFilters?: SelectedFilters;
|
|
7
7
|
geometry?: string;
|
|
8
8
|
extent?: string;
|
|
9
9
|
zoomLevel?: number;
|
|
10
|
+
projectName?: string;
|
|
11
|
+
projectAlias?: string;
|
|
10
12
|
attributes?: ClientFeatureAttribute[];
|
|
11
13
|
layerInfo?: QueryLayerServiceInfoDc;
|
|
12
14
|
dataSources: WidgetDataSource[];
|
|
@@ -9,7 +9,7 @@ export declare const applyFiltersToCondition: ({ condition, name, defaultValue,
|
|
|
9
9
|
isSetParams?: boolean;
|
|
10
10
|
configFilter?: ConfigFilter;
|
|
11
11
|
}) => string | number;
|
|
12
|
-
export declare const applyVarsToCondition: <T extends string | string[]>({ section, configFilters, filters, attributes, layerParams, eqlParameters, geometry, extent, zoomLevel, isSetParams, }: Pick<QueryLayerServiceConfigurationDc, "eqlParameters"> & {
|
|
12
|
+
export declare const applyVarsToCondition: <T extends string | string[]>({ section, configFilters, filters, attributes, layerParams, eqlParameters, geometry, extent, zoomLevel, projectName, projectAlias, isSetParams, }: Pick<QueryLayerServiceConfigurationDc, "eqlParameters"> & {
|
|
13
13
|
section: T;
|
|
14
14
|
configFilters: ConfigFilter[];
|
|
15
15
|
filters: SelectedFilters;
|
|
@@ -18,6 +18,8 @@ export declare const applyVarsToCondition: <T extends string | string[]>({ secti
|
|
|
18
18
|
geometry?: string;
|
|
19
19
|
extent?: string;
|
|
20
20
|
zoomLevel?: number;
|
|
21
|
+
projectName?: string;
|
|
22
|
+
projectAlias?: string;
|
|
21
23
|
isSetParams?: boolean;
|
|
22
24
|
}) => T;
|
|
23
25
|
type FormatDataSourceConditionParams = {
|
|
@@ -29,6 +31,8 @@ type FormatDataSourceConditionParams = {
|
|
|
29
31
|
geometry?: string;
|
|
30
32
|
extent?: string;
|
|
31
33
|
zoomLevel?: number;
|
|
34
|
+
projectName?: string;
|
|
35
|
+
projectAlias?: string;
|
|
32
36
|
};
|
|
33
37
|
export declare const formatDataSourceCondition: ({ condition, ...rest }: FormatDataSourceConditionParams & {
|
|
34
38
|
condition?: string | string[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Значение системной подстановки текущего проекта. Голый `%project` и `%project.name` дают
|
|
3
|
+
* системное имя, `%project.alias` — алиас с фолбэком на имя: пустой алиас не должен уводить
|
|
4
|
+
* запрос в пустое значение. Чужое свойство (`%project.foo`) не наше — вернём `undefined`,
|
|
5
|
+
* и плейсхолдер останется нетронутым, как у незаполненного фильтра.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getProjectValue: ({ prop, projectName, projectAlias, }: {
|
|
8
|
+
prop?: string | null;
|
|
9
|
+
projectName?: string;
|
|
10
|
+
projectAlias?: string;
|
|
11
|
+
}) => string | undefined;
|
|
@@ -46,6 +46,7 @@ export * from './getLayerInfoAttribute';
|
|
|
46
46
|
export * from './getLayerInfoFromDataSources';
|
|
47
47
|
export * from './getPagesFromConfig';
|
|
48
48
|
export * from './getPagesFromProjectInfo';
|
|
49
|
+
export * from './getProjectValue';
|
|
49
50
|
export * from './getRelatedAttribute';
|
|
50
51
|
export * from './getRenderElement';
|
|
51
52
|
export * from './getResourceUrl';
|
|
@@ -11,6 +11,10 @@ export type GlobalContextProps = PropsWithChildren<{
|
|
|
11
11
|
ewktExtent?: string;
|
|
12
12
|
/** Целый уровень зума карты — плейсхолдер `%zoom`. */
|
|
13
13
|
zoomLevel?: number;
|
|
14
|
+
/** Системное имя текущего проекта — плейсхолдеры `%project` и `%project.name`. */
|
|
15
|
+
projectName?: string;
|
|
16
|
+
/** Алиас текущего проекта — плейсхолдер `%project.alias`. */
|
|
17
|
+
projectAlias?: string;
|
|
14
18
|
themeName?: ThemeName;
|
|
15
19
|
api?: Api;
|
|
16
20
|
notification?: {
|