@reltio/components 1.4.2169 → 1.4.2171
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/cjs/constants/index.d.ts +1 -0
- package/cjs/constants/index.js +3 -1
- package/cjs/constants/segmantation.d.ts +15 -0
- package/cjs/constants/segmantation.js +19 -0
- package/cjs/hooks/useSegmentsSizesLoader/useSegmentsSizesLoader.d.ts +6 -1
- package/cjs/hooks/useSegmentsSizesLoader/useSegmentsSizesLoader.js +7 -3
- package/constants/index.d.ts +1 -0
- package/constants/index.js +1 -0
- package/constants/segmantation.d.ts +15 -0
- package/constants/segmantation.js +16 -0
- package/hooks/useSegmentsSizesLoader/useSegmentsSizesLoader.d.ts +6 -1
- package/hooks/useSegmentsSizesLoader/useSegmentsSizesLoader.js +7 -3
- package/package.json +2 -2
package/cjs/constants/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { POPUP_Z_INDEX } from './common';
|
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
|
8
8
|
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
|
9
9
|
export { theme, darkTheme } from './theme';
|
|
10
|
+
export { SegmentationColumnId } from './segmantation';
|
package/cjs/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.darkTheme = exports.theme = exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = exports.ReactSelectOptionFilters = exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.MAP_DRAWING_MODES = exports.FIXED_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeType = exports.SortingType = void 0;
|
|
3
|
+
exports.SegmentationColumnId = exports.darkTheme = exports.theme = exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = exports.ReactSelectOptionFilters = exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.MAP_DRAWING_MODES = exports.FIXED_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeType = exports.SortingType = void 0;
|
|
4
4
|
var prop_types_1 = require("./prop-types");
|
|
5
5
|
Object.defineProperty(exports, "SortingType", { enumerable: true, get: function () { return prop_types_1.SortingType; } });
|
|
6
6
|
Object.defineProperty(exports, "QueryBuilderAttributeType", { enumerable: true, get: function () { return prop_types_1.QueryBuilderAttributeType; } });
|
|
@@ -26,3 +26,5 @@ Object.defineProperty(exports, "viewingModeOption", { enumerable: true, get: fun
|
|
|
26
26
|
var theme_1 = require("./theme");
|
|
27
27
|
Object.defineProperty(exports, "theme", { enumerable: true, get: function () { return theme_1.theme; } });
|
|
28
28
|
Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return theme_1.darkTheme; } });
|
|
29
|
+
var segmantation_1 = require("./segmantation");
|
|
30
|
+
Object.defineProperty(exports, "SegmentationColumnId", { enumerable: true, get: function () { return segmantation_1.SegmentationColumnId; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum SegmentationColumnId {
|
|
2
|
+
Label = "label",
|
|
3
|
+
Status = "status",
|
|
4
|
+
Description = "description",
|
|
5
|
+
Sharing = "sharing",
|
|
6
|
+
Type = "type",
|
|
7
|
+
Owner = "owner",
|
|
8
|
+
LastEvaluationDate = "lastEvaluationDate",
|
|
9
|
+
AudienceCount = "audienceCount",
|
|
10
|
+
AudienceCountBar = "audienceCountBar",
|
|
11
|
+
NextRefreshOn = "nextRefreshOn",
|
|
12
|
+
RefreshSchedule = "refreshSchedule",
|
|
13
|
+
Destinations = "destinations",
|
|
14
|
+
Actions = "actions"
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentationColumnId = void 0;
|
|
4
|
+
var SegmentationColumnId;
|
|
5
|
+
(function (SegmentationColumnId) {
|
|
6
|
+
SegmentationColumnId["Label"] = "label";
|
|
7
|
+
SegmentationColumnId["Status"] = "status";
|
|
8
|
+
SegmentationColumnId["Description"] = "description";
|
|
9
|
+
SegmentationColumnId["Sharing"] = "sharing";
|
|
10
|
+
SegmentationColumnId["Type"] = "type";
|
|
11
|
+
SegmentationColumnId["Owner"] = "owner";
|
|
12
|
+
SegmentationColumnId["LastEvaluationDate"] = "lastEvaluationDate";
|
|
13
|
+
SegmentationColumnId["AudienceCount"] = "audienceCount";
|
|
14
|
+
SegmentationColumnId["AudienceCountBar"] = "audienceCountBar";
|
|
15
|
+
SegmentationColumnId["NextRefreshOn"] = "nextRefreshOn";
|
|
16
|
+
SegmentationColumnId["RefreshSchedule"] = "refreshSchedule";
|
|
17
|
+
SegmentationColumnId["Destinations"] = "destinations";
|
|
18
|
+
SegmentationColumnId["Actions"] = "actions";
|
|
19
|
+
})(SegmentationColumnId || (exports.SegmentationColumnId = SegmentationColumnId = {}));
|
|
@@ -2,5 +2,10 @@ import { NewSegment } from '@reltio/mdm-sdk';
|
|
|
2
2
|
type SegmentsSizes = {
|
|
3
3
|
[id: string]: number;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type SegmentsSizesLoaderProps = {
|
|
6
|
+
segments: NewSegment[];
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const useSegmentsSizesLoader: ({ segments, signal, enabled }: SegmentsSizesLoaderProps) => SegmentsSizes;
|
|
6
11
|
export {};
|
|
@@ -51,9 +51,13 @@ exports.useSegmentsSizesLoader = void 0;
|
|
|
51
51
|
var react_1 = require("react");
|
|
52
52
|
var ramda_1 = require("ramda");
|
|
53
53
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
54
|
-
var useSegmentsSizesLoader = function (
|
|
55
|
-
var
|
|
54
|
+
var useSegmentsSizesLoader = function (_a) {
|
|
55
|
+
var segments = _a.segments, signal = _a.signal, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
|
|
56
|
+
var _c = (0, react_1.useState)({}), segmentsSizes = _c[0], setSegmentsSizes = _c[1];
|
|
56
57
|
(0, react_1.useEffect)(function () {
|
|
58
|
+
if (!enabled) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
57
61
|
segments.forEach(function (segment) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
62
|
var total_1, _a, _b;
|
|
59
63
|
return __generator(this, function (_c) {
|
|
@@ -91,7 +95,7 @@ var useSegmentsSizesLoader = function (segments, signal) {
|
|
|
91
95
|
});
|
|
92
96
|
}); });
|
|
93
97
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
94
|
-
}, [segments]);
|
|
98
|
+
}, [segments, enabled]);
|
|
95
99
|
return segmentsSizes;
|
|
96
100
|
};
|
|
97
101
|
exports.useSegmentsSizesLoader = useSegmentsSizesLoader;
|
package/constants/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { POPUP_Z_INDEX } from './common';
|
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
|
8
8
|
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
|
9
9
|
export { theme, darkTheme } from './theme';
|
|
10
|
+
export { SegmentationColumnId } from './segmantation';
|
package/constants/index.js
CHANGED
|
@@ -7,3 +7,4 @@ export { POPUP_Z_INDEX } from './common';
|
|
|
7
7
|
export { ReactSelectOptionFilters } from './reactSelect';
|
|
8
8
|
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
|
9
9
|
export { theme, darkTheme } from './theme';
|
|
10
|
+
export { SegmentationColumnId } from './segmantation';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum SegmentationColumnId {
|
|
2
|
+
Label = "label",
|
|
3
|
+
Status = "status",
|
|
4
|
+
Description = "description",
|
|
5
|
+
Sharing = "sharing",
|
|
6
|
+
Type = "type",
|
|
7
|
+
Owner = "owner",
|
|
8
|
+
LastEvaluationDate = "lastEvaluationDate",
|
|
9
|
+
AudienceCount = "audienceCount",
|
|
10
|
+
AudienceCountBar = "audienceCountBar",
|
|
11
|
+
NextRefreshOn = "nextRefreshOn",
|
|
12
|
+
RefreshSchedule = "refreshSchedule",
|
|
13
|
+
Destinations = "destinations",
|
|
14
|
+
Actions = "actions"
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var SegmentationColumnId;
|
|
2
|
+
(function (SegmentationColumnId) {
|
|
3
|
+
SegmentationColumnId["Label"] = "label";
|
|
4
|
+
SegmentationColumnId["Status"] = "status";
|
|
5
|
+
SegmentationColumnId["Description"] = "description";
|
|
6
|
+
SegmentationColumnId["Sharing"] = "sharing";
|
|
7
|
+
SegmentationColumnId["Type"] = "type";
|
|
8
|
+
SegmentationColumnId["Owner"] = "owner";
|
|
9
|
+
SegmentationColumnId["LastEvaluationDate"] = "lastEvaluationDate";
|
|
10
|
+
SegmentationColumnId["AudienceCount"] = "audienceCount";
|
|
11
|
+
SegmentationColumnId["AudienceCountBar"] = "audienceCountBar";
|
|
12
|
+
SegmentationColumnId["NextRefreshOn"] = "nextRefreshOn";
|
|
13
|
+
SegmentationColumnId["RefreshSchedule"] = "refreshSchedule";
|
|
14
|
+
SegmentationColumnId["Destinations"] = "destinations";
|
|
15
|
+
SegmentationColumnId["Actions"] = "actions";
|
|
16
|
+
})(SegmentationColumnId || (SegmentationColumnId = {}));
|
|
@@ -2,5 +2,10 @@ import { NewSegment } from '@reltio/mdm-sdk';
|
|
|
2
2
|
type SegmentsSizes = {
|
|
3
3
|
[id: string]: number;
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type SegmentsSizesLoaderProps = {
|
|
6
|
+
segments: NewSegment[];
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const useSegmentsSizesLoader: ({ segments, signal, enabled }: SegmentsSizesLoaderProps) => SegmentsSizes;
|
|
6
11
|
export {};
|
|
@@ -48,9 +48,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import { useEffect, useState } from 'react';
|
|
49
49
|
import { isNil } from 'ramda';
|
|
50
50
|
import { getSegmentTotal, isSegment } from '@reltio/mdm-sdk';
|
|
51
|
-
export var useSegmentsSizesLoader = function (
|
|
52
|
-
var _a =
|
|
51
|
+
export var useSegmentsSizesLoader = function (_a) {
|
|
52
|
+
var segments = _a.segments, signal = _a.signal, _b = _a.enabled, enabled = _b === void 0 ? true : _b;
|
|
53
|
+
var _c = useState({}), segmentsSizes = _c[0], setSegmentsSizes = _c[1];
|
|
53
54
|
useEffect(function () {
|
|
55
|
+
if (!enabled) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
54
58
|
segments.forEach(function (segment) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
59
|
var total_1, _a, _b;
|
|
56
60
|
return __generator(this, function (_c) {
|
|
@@ -88,6 +92,6 @@ export var useSegmentsSizesLoader = function (segments, signal) {
|
|
|
88
92
|
});
|
|
89
93
|
}); });
|
|
90
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
91
|
-
}, [segments]);
|
|
95
|
+
}, [segments, enabled]);
|
|
92
96
|
return segmentsSizes;
|
|
93
97
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2171",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.1984",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|