@evergis/react 4.0.56 → 4.0.58

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 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`!
@@ -0,0 +1,11 @@
1
+ import { IPreviewImage } from '@evergis/uilib-gl';
2
+ import { ConfigContainerChild, WidgetType } from '../../types';
3
+ interface UseElementSlideshowProps {
4
+ type?: WidgetType;
5
+ elementConfig?: ConfigContainerChild;
6
+ }
7
+ interface UseElementSlideshowResult {
8
+ images: IPreviewImage[];
9
+ }
10
+ export declare const useElementSlideshow: ({ type, elementConfig, }: UseElementSlideshowProps) => UseElementSlideshowResult;
11
+ export {};
@@ -5,9 +5,11 @@ export declare const HeaderContainer: import('styled-components').StyledComponen
5
5
  export declare const FeatureTitleContainer: import('styled-components').StyledComponent<"div", any, {
6
6
  clickable?: boolean;
7
7
  }, never>;
8
- export declare const LayerDescription: import('styled-components').StyledComponent<"div", any, {}, never>;
9
- export declare const HeaderTitleContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
10
8
  export declare const Header: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
11
9
  $isRow?: boolean;
12
10
  }, never>;
13
- export declare const DefaultHeaderWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
11
+ export declare const DefaultHeaderWrapper: import('styled-components').StyledComponent<"div", any, {
12
+ withPadding?: boolean;
13
+ height?: number;
14
+ fontColor?: string;
15
+ }, never>;
@@ -2,6 +2,7 @@ export declare const HeaderIcon: import('styled-components').StyledComponent<"di
2
2
  export declare const GradientHeaderWrapper: import('styled-components').StyledComponent<"div", any, {
3
3
  $fontColor?: string;
4
4
  $bgColor?: string;
5
+ $height?: number;
5
6
  $bigIcon?: boolean;
6
7
  $withPadding?: boolean;
7
8
  $bottomBlur?: boolean;
@@ -1,4 +1,6 @@
1
1
  export declare const SlideshowHeaderWrapper: import('styled-components').StyledComponent<"div", any, {
2
+ fontColor?: string;
3
+ height?: number;
2
4
  big?: boolean;
3
5
  withPadding?: boolean;
4
6
  }, never>;
@@ -1,3 +1,4 @@
1
+ export * from './styled';
1
2
  export * from './DashboardDefaultHeader';
2
3
  export * from './DashboardDefaultHeader/styled';
3
4
  export * from './FeatureCardDefaultHeader';
@@ -0,0 +1,5 @@
1
+ export declare const HeaderTitleContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
2
+ export declare const LayerDescription: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const HeaderFontColorMixin: import('styled-components').FlattenInterpolation<import('styled-components').ThemedStyledProps<{
4
+ $fontColor?: string;
5
+ }, any>>;
@@ -1,5 +1,8 @@
1
+ export * from './useAttachmentItems';
2
+ export * from './useAttachmentPreviewImages';
1
3
  export * from './useAutoCompleteControl';
2
4
  export * from './useContainerAttributes';
5
+ export * from './useEditGroupAttributes';
3
6
  export * from './useFetchImageWithAuth';
4
7
  export * from './useFetchWithAuth';
5
8
  export * from './useChartChange';
@@ -0,0 +1,13 @@
1
+ import { ConfigContainerChild, WidgetType } from '../types';
2
+ import { Attachment } from '../containers/AttachmentContainer/types';
3
+ export interface UseAttachmentItemsProps {
4
+ type?: WidgetType;
5
+ elementConfig?: ConfigContainerChild;
6
+ valueOverride?: unknown;
7
+ }
8
+ export interface UseAttachmentItemsResult {
9
+ items: Attachment[];
10
+ attributeName?: string;
11
+ rawValue: unknown;
12
+ }
13
+ export declare const useAttachmentItems: ({ type, elementConfig, valueOverride, }: UseAttachmentItemsProps) => UseAttachmentItemsResult;
@@ -0,0 +1,8 @@
1
+ import { IPreviewImage } from '@evergis/uilib-gl';
2
+ import { Attachment } from '../containers/AttachmentContainer/types';
3
+ interface UseAttachmentPreviewImagesParams {
4
+ items: Attachment[];
5
+ active: boolean;
6
+ }
7
+ export declare const useAttachmentPreviewImages: ({ items, active, }: UseAttachmentPreviewImagesParams) => IPreviewImage[];
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ContainerProps } from '../types';
2
+ type UseEditGroupAttributesProps = Pick<ContainerProps, "elementConfig" | "type">;
3
+ export declare const useEditGroupAttributes: ({ elementConfig, type }: UseEditGroupAttributesProps) => {
4
+ filteredAttributes: import('../types').ClientFeatureAttribute[];
5
+ filteredControls: import('../types').ConfigControl[];
6
+ };
7
+ export {};
@@ -374,7 +374,6 @@ export interface ContainerProps {
374
374
  config?: ConfigContainer;
375
375
  elementConfig?: ConfigContainerChild;
376
376
  maxValue?: number;
377
- isRow?: boolean;
378
377
  isVisible?: boolean;
379
378
  noBorders?: boolean;
380
379
  type?: WidgetType;
@@ -1,5 +1,5 @@
1
1
  import { ClientFeatureAttribute, ConfigContainerChild } from '../types';
2
2
  export declare const getSlideshowImages: ({ element, attribute, }: {
3
3
  element: ConfigContainerChild;
4
- attribute: ClientFeatureAttribute;
4
+ attribute?: ClientFeatureAttribute;
5
5
  }) => string[];
@@ -59,6 +59,7 @@ export * from './removeDataSource';
59
59
  export * from './roundTotalSum';
60
60
  export * from './updateDataSource';
61
61
  export * from './sliceShownOtherItems';
62
+ export * from './toRenderableValue';
62
63
  export * from './tooltipNameFromAttributes';
63
64
  export * from './tooltipValueFromAttributes';
64
65
  export * from './tooltipValueFromRelatedFeatures';
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Returns a value safe to render as a React child.
4
+ *
5
+ * If the input is a non-primitive object (array or plain object) that is NOT
6
+ * a React element, returns an empty string to prevent the runtime error
7
+ * "Objects are not valid as a React child" that React throws on such values.
8
+ *
9
+ * Use in places where a rendered slot receives a raw attribute value that may
10
+ * be a structured payload (e.g. an attribute with `subType: Attachments`
11
+ * exposes its value as `Attachment[]`). React elements and primitives pass
12
+ * through unchanged, preserving existing rendering behaviour for normal data.
13
+ */
14
+ export declare const toRenderableValue: (value: unknown) => ReactNode;
@@ -3,4 +3,5 @@ import { QueryLayerServiceInfoDc } from '@evergis/api';
3
3
  export declare const LayerIcon: FC<{
4
4
  layerInfo: QueryLayerServiceInfoDc;
5
5
  error?: boolean;
6
+ innerRef?: (node: HTMLElement | null) => void;
6
7
  }>;