@evergis/react 4.0.58 → 4.0.61

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.
Files changed (66) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -7
  3. package/dist/components/Dashboard/branded.d.ts +52 -0
  4. package/dist/components/Dashboard/componentTypes.d.ts +571 -0
  5. package/dist/components/Dashboard/containers/AddFeatureContainer/index.d.ts +2 -2
  6. package/dist/components/Dashboard/containers/AttachmentContainer/index.d.ts +2 -2
  7. package/dist/components/Dashboard/containers/CameraContainer/index.d.ts +2 -2
  8. package/dist/components/Dashboard/containers/ChartContainer/index.d.ts +2 -2
  9. package/dist/components/Dashboard/containers/ContainersGroupContainer/index.d.ts +2 -2
  10. package/dist/components/Dashboard/containers/DataSourceContainer/index.d.ts +2 -2
  11. package/dist/components/Dashboard/containers/DataSourceProgressContainer/index.d.ts +2 -2
  12. package/dist/components/Dashboard/containers/DefaultAttributesContainer/index.d.ts +2 -2
  13. package/dist/components/Dashboard/containers/DividerContainer/index.d.ts +2 -2
  14. package/dist/components/Dashboard/containers/EditContainer/components/EditAttachmentContainer.d.ts +2 -2
  15. package/dist/components/Dashboard/containers/EditContainer/components/EditBooleanContainer.d.ts +2 -2
  16. package/dist/components/Dashboard/containers/EditContainer/components/EditCheckboxContainer.d.ts +2 -2
  17. package/dist/components/Dashboard/containers/EditContainer/components/EditChipsContainer.d.ts +2 -2
  18. package/dist/components/Dashboard/containers/EditContainer/components/EditDateContainer.d.ts +2 -2
  19. package/dist/components/Dashboard/containers/EditContainer/components/EditDropdownContainer.d.ts +2 -2
  20. package/dist/components/Dashboard/containers/EditContainer/components/EditGroupContainer.d.ts +2 -2
  21. package/dist/components/Dashboard/containers/EditContainer/components/EditNumberContainer.d.ts +2 -2
  22. package/dist/components/Dashboard/containers/EditContainer/components/EditStringContainer.d.ts +2 -2
  23. package/dist/components/Dashboard/containers/EditContainer/index.d.ts +2 -2
  24. package/dist/components/Dashboard/containers/ExportPdfContainer/index.d.ts +2 -2
  25. package/dist/components/Dashboard/containers/FiltersContainer/index.d.ts +2 -2
  26. package/dist/components/Dashboard/containers/IconContainer/index.d.ts +2 -2
  27. package/dist/components/Dashboard/containers/ImageContainer/index.d.ts +2 -2
  28. package/dist/components/Dashboard/containers/LayersContainer/index.d.ts +2 -2
  29. package/dist/components/Dashboard/containers/OneColumnContainer/index.d.ts +2 -2
  30. package/dist/components/Dashboard/containers/PagesContainer/index.d.ts +2 -2
  31. package/dist/components/Dashboard/containers/SlideshowContainer/index.d.ts +2 -2
  32. package/dist/components/Dashboard/containers/TabsContainer/index.d.ts +2 -2
  33. package/dist/components/Dashboard/containers/TaskContainer/index.d.ts +2 -2
  34. package/dist/components/Dashboard/containers/TitleContainer/index.d.ts +2 -2
  35. package/dist/components/Dashboard/containers/TwoColumnContainer/index.d.ts +2 -2
  36. package/dist/components/Dashboard/containers/UploadContainer/index.d.ts +2 -2
  37. package/dist/components/Dashboard/containers/registry.d.ts +37 -34
  38. package/dist/components/Dashboard/elements/ElementButton/index.d.ts +2 -2
  39. package/dist/components/Dashboard/elements/ElementCamera/types.d.ts +2 -2
  40. package/dist/components/Dashboard/elements/ElementChart/index.d.ts +2 -2
  41. package/dist/components/Dashboard/elements/ElementChips/index.d.ts +2 -2
  42. package/dist/components/Dashboard/elements/ElementControl/index.d.ts +2 -2
  43. package/dist/components/Dashboard/elements/ElementIcon/index.d.ts +2 -2
  44. package/dist/components/Dashboard/elements/ElementImage/index.d.ts +2 -2
  45. package/dist/components/Dashboard/elements/ElementLegend/index.d.ts +2 -4
  46. package/dist/components/Dashboard/elements/ElementLink/index.d.ts +2 -2
  47. package/dist/components/Dashboard/elements/ElementMarkdown/index.d.ts +2 -2
  48. package/dist/components/Dashboard/elements/ElementModal/index.d.ts +2 -2
  49. package/dist/components/Dashboard/elements/ElementSlideshow/types.d.ts +2 -2
  50. package/dist/components/Dashboard/elements/ElementSvg/index.d.ts +2 -6
  51. package/dist/components/Dashboard/elements/ElementTooltip/index.d.ts +2 -2
  52. package/dist/components/Dashboard/elements/ElementUploader/index.d.ts +2 -2
  53. package/dist/components/Dashboard/elements/registry.d.ts +12 -14
  54. package/dist/components/Dashboard/headers/{FeatureCardGradientHeader → FeatureCardBackgroundHeader}/index.d.ts +1 -1
  55. package/dist/components/Dashboard/headers/{FeatureCardGradientHeader → FeatureCardBackgroundHeader}/styled.d.ts +1 -1
  56. package/dist/components/Dashboard/headers/FeatureCardDefaultHeader/styled.d.ts +1 -0
  57. package/dist/components/Dashboard/headers/index.d.ts +1 -1
  58. package/dist/components/Dashboard/hooks/useWidgetConfig.d.ts +5 -1
  59. package/dist/components/Dashboard/hooks/useWidgetContext.d.ts +12 -1
  60. package/dist/components/Dashboard/hooks/useWidgetPage.d.ts +4 -1
  61. package/dist/components/Dashboard/types.d.ts +198 -93
  62. package/dist/index.js +2672 -2576
  63. package/dist/index.js.map +1 -1
  64. package/dist/react.esm.js +2660 -2576
  65. package/dist/react.esm.js.map +1 -1
  66. 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`!
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Branded types для entity-id.
3
+ *
4
+ * Идея — TS-only бренд на строку, чтобы `ChartId`, `ModalId`, `TabId`, ... были
5
+ * несовместимы между собой на этапе компиляции (`findChart(modalId)` → ошибка),
6
+ * при этом в runtime оставались обычными строками (JSON/Redux/fetch совместимы).
7
+ *
8
+ * Slot-id (`"alias" | "chart" | "legend" | ...`) **не покрываются** этим модулем — это
9
+ * литералы фиксированного набора, типизируются через сужение `id` в parent-specific
10
+ * child-типах.
11
+ *
12
+ * Использование:
13
+ * ```ts
14
+ * import { ChartId, asChartId } from "@evergis/react";
15
+ *
16
+ * // на границе deserialize: cast через конструктор
17
+ * const id = asChartId("chart-1"); // ChartId
18
+ *
19
+ * function findChart(id: ChartId): Chart | undefined { ... }
20
+ *
21
+ * findChart(id); // ✓
22
+ * findChart("chart-1"); // ❌ TS error — string не подставится в ChartId
23
+ * findChart(modalId); // ❌ TS error — ModalId ≠ ChartId
24
+ * ```
25
+ *
26
+ * Иерархия: `ChartId`/`ModalId`/`TabId` — подтипы `ContainerId` (один runtime-keyspace,
27
+ * `ConfigContainer.id`). `LayerName`/`FilterName`/`AttributeName`/`DataSourceName`/`ResourceId`
28
+ * — независимые бренды.
29
+ */
30
+ declare const brand: unique symbol;
31
+ export type Brand<T, B extends string> = T & {
32
+ readonly [brand]: B;
33
+ };
34
+ export type ContainerId = Brand<string, "ContainerId">;
35
+ export type ChartId = ContainerId & Brand<string, "ChartId">;
36
+ export type ModalId = ContainerId & Brand<string, "ModalId">;
37
+ export type TabId = ContainerId & Brand<string, "TabId">;
38
+ export type FilterName = Brand<string, "FilterName">;
39
+ export type LayerName = Brand<string, "LayerName">;
40
+ export type AttributeName = Brand<string, "AttributeName">;
41
+ export type DataSourceName = Brand<string, "DataSourceName">;
42
+ export type ResourceId = Brand<string, "ResourceId">;
43
+ export declare const asContainerId: (value: string) => ContainerId;
44
+ export declare const asChartId: (value: string) => ChartId;
45
+ export declare const asModalId: (value: string) => ModalId;
46
+ export declare const asTabId: (value: string) => TabId;
47
+ export declare const asFilterName: (value: string) => FilterName;
48
+ export declare const asLayerName: (value: string) => LayerName;
49
+ export declare const asAttributeName: (value: string) => AttributeName;
50
+ export declare const asDataSourceName: (value: string) => DataSourceName;
51
+ export declare const asResourceId: (value: string) => ResourceId;
52
+ export {};