@reltio/components 1.4.1908 → 1.4.1910
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/MatchRulesTooltip/MatchRulesTooltip.js +11 -7
- package/cjs/MatchRulesTooltip/MatchRulesTooltip.test.js +20 -24
- package/cjs/MatchRulesTooltip/styles.d.ts +1 -1
- package/cjs/MatchRulesTooltip/styles.js +5 -1
- package/cjs/ProfileResizablePanes/ProfileResizablePanes.spec.js +113 -68
- package/cjs/ResizablePanes/ResizablePanes.d.ts +3 -2
- package/cjs/ResizablePanes/ResizablePanes.js +83 -16
- package/cjs/ResizablePanes/ResizablePanes.test.js +289 -0
- package/cjs/ResizablePanes/styles.d.ts +1 -1
- package/cjs/ResizablePanes/styles.js +47 -38
- package/cjs/SimpleMatchRules/SimpleMatchRules.js +16 -13
- package/cjs/SimpleMatchRules/SimpleMatchRules.test.js +8 -35
- package/cjs/SimpleMatchRules/styles.d.ts +1 -1
- package/cjs/SimpleMatchRules/styles.js +8 -0
- package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +3 -3
- package/cjs/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +1 -1
- package/cjs/icons/AIPowered.d.ts +5 -0
- package/cjs/icons/AIPowered.js +76 -0
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -1
- package/cjs/test-utils/index.d.ts +1 -0
- package/cjs/test-utils/index.js +15 -1
- package/esm/MatchRulesTooltip/MatchRulesTooltip.js +11 -7
- package/esm/MatchRulesTooltip/MatchRulesTooltip.test.js +20 -24
- package/esm/MatchRulesTooltip/styles.d.ts +1 -1
- package/esm/MatchRulesTooltip/styles.js +5 -1
- package/esm/ProfileResizablePanes/ProfileResizablePanes.spec.js +113 -68
- package/esm/ResizablePanes/ResizablePanes.d.ts +3 -2
- package/esm/ResizablePanes/ResizablePanes.js +84 -17
- package/esm/ResizablePanes/ResizablePanes.test.js +284 -0
- package/esm/ResizablePanes/styles.d.ts +1 -1
- package/esm/ResizablePanes/styles.js +47 -38
- package/esm/SimpleMatchRules/SimpleMatchRules.js +16 -13
- package/esm/SimpleMatchRules/SimpleMatchRules.test.js +8 -35
- package/esm/SimpleMatchRules/styles.d.ts +1 -1
- package/esm/SimpleMatchRules/styles.js +8 -0
- package/esm/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +3 -3
- package/esm/SimpleMatchRulesBlock/SimpleMatchRulesBlock.test.js +1 -1
- package/esm/icons/AIPowered.d.ts +5 -0
- package/esm/icons/AIPowered.js +71 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/test-utils/index.d.ts +1 -0
- package/esm/test-utils/index.js +13 -0
- package/package.json +3 -3
- package/cjs/MatchRulesTitle/MatchRulesTitle.d.ts +0 -5
- package/cjs/MatchRulesTitle/MatchRulesTitle.js +0 -13
- package/cjs/MatchRulesTitle/MatchRulesTitle.test.js +0 -18
- package/cjs/MatchRulesTitle/index.d.ts +0 -1
- package/cjs/MatchRulesTitle/index.js +0 -5
- package/cjs/ResizablePanes/ResizablePanes.spec.js +0 -192
- package/esm/MatchRulesTitle/MatchRulesTitle.d.ts +0 -5
- package/esm/MatchRulesTitle/MatchRulesTitle.js +0 -6
- package/esm/MatchRulesTitle/MatchRulesTitle.test.d.ts +0 -1
- package/esm/MatchRulesTitle/MatchRulesTitle.test.js +0 -13
- package/esm/MatchRulesTitle/index.d.ts +0 -1
- package/esm/MatchRulesTitle/index.js +0 -1
- package/esm/ResizablePanes/ResizablePanes.spec.d.ts +0 -1
- package/esm/ResizablePanes/ResizablePanes.spec.js +0 -164
- /package/cjs/{MatchRulesTitle/MatchRulesTitle.test.d.ts → ResizablePanes/ResizablePanes.test.d.ts} +0 -0
- /package/{cjs/ResizablePanes/ResizablePanes.spec.d.ts → esm/ResizablePanes/ResizablePanes.test.d.ts} +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var AIPowered = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
|
|
20
|
+
react_1.default.createElement("g", { clipPath: "url(#clip0_6347_29)" },
|
|
21
|
+
react_1.default.createElement("path", { d: "M11.5 2.57735C12.1188 2.22008 12.8812 2.22008 13.5 2.57735L19.7272 6.17265C20.346 6.52992 20.7272 7.19017 20.7272 7.9047V15.0953C20.7272 15.8098 20.346 16.4701 19.7272 16.8274L13.5 20.4226C12.8812 20.7799 12.1188 20.7799 11.5 20.4226L5.27276 16.8274C4.65396 16.4701 4.27276 15.8098 4.27276 15.0953V7.9047C4.27276 7.19017 4.65396 6.52992 5.27276 6.17265L11.5 2.57735Z", fill: "url(#paint0_linear_6347_29)" }),
|
|
22
|
+
react_1.default.createElement("path", { opacity: "0.5", d: "M11.5 4.57735C12.1188 4.22008 12.8812 4.22008 13.5 4.57735L17.9952 7.17265C18.614 7.52992 18.9952 8.19017 18.9952 8.9047V14.0953C18.9952 14.8098 18.614 15.4701 17.9952 15.8274L13.5 18.4226C12.8812 18.7799 12.1188 18.7799 11.5 18.4226L7.00481 15.8274C6.38601 15.4701 6.00481 14.8098 6.00481 14.0953V8.9047C6.00481 8.19017 6.38601 7.52992 7.00481 7.17265L11.5 4.57735Z", fill: "url(#paint1_linear_6347_29)" }),
|
|
23
|
+
react_1.default.createElement("path", { opacity: "0.5", d: "M11.5 7.57735C12.1188 7.22008 12.8812 7.22008 13.5 7.57735L15.3971 8.67265C16.0159 9.02992 16.3971 9.69017 16.3971 10.4047V12.5953C16.3971 13.3098 16.0159 13.9701 15.3971 14.3274L13.5 15.4226C12.8812 15.7799 12.1188 15.7799 11.5 15.4226L9.60289 14.3274C8.98408 13.9701 8.60289 13.3098 8.60289 12.5953V10.4047C8.60289 9.69017 8.98408 9.02992 9.60289 8.67265L11.5 7.57735Z", fill: "url(#paint2_linear_6347_29)" }),
|
|
24
|
+
react_1.default.createElement("g", { filter: "url(#filter0_f_6347_29)" },
|
|
25
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "white" })),
|
|
26
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.4698 2.27726C18.3093 1.84052 17.6916 1.84052 17.5311 2.27726L17.1356 3.3538C16.8319 4.18016 16.1807 4.83145 15.3543 5.13508L14.2778 5.53063C13.841 5.6911 13.841 6.3088 14.2778 6.46927L15.3543 6.86482C16.1807 7.16845 16.8319 7.81974 17.1356 8.6461L17.5311 9.72264C17.6916 10.1594 18.3093 10.1594 18.4698 9.72264L18.8653 8.6461C19.1689 7.81974 19.8202 7.16845 20.6466 6.86482L21.7231 6.46927C22.1599 6.3088 22.1599 5.6911 21.7231 5.53063L20.6466 5.13508C19.8202 4.83145 19.1689 4.18016 18.8653 3.3538L18.4698 2.27726ZM10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27727L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.4715 15.8776 8.12278 16.5289 8.42641 17.3553L10.0311 21.7226C10.1916 22.1594 10.8093 22.1594 10.9698 21.7226L12.5745 17.3553C12.8781 16.5289 13.5294 15.8776 14.3557 15.574L18.7231 13.9693C19.1599 13.8088 19.1599 13.1911 18.7231 13.0306L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726Z", fill: "#FDDF1C" }),
|
|
27
|
+
react_1.default.createElement("path", { d: "M9.5 14.4999C8.7 13.2999 5 13.3333 3.5 13.5L5.5 14.4999L7.5 15.4998L8.5 16.4998L10.5 20.9998C10.5 19.3332 10.3 15.6999 9.5 14.4999Z", fill: "#FFF174" }),
|
|
28
|
+
react_1.default.createElement("path", { d: "M11.5 12.4999C12.3 13.6999 16 13.6664 17.5 13.4998L15.5 12.4999L13.5 11.4999L12.5 10.4999L10.5 5.99994C10.5 7.66658 10.7 11.2999 11.5 12.4999Z", fill: "#FFF174" }),
|
|
29
|
+
react_1.default.createElement("path", { d: "M9.28571 12.142C8.71429 13.0913 6.07143 13.0648 5 12.933L6.42857 12.142L7.85714 11.351L8.57143 10.5599L10 7C10 8.31845 9.85714 11.1927 9.28571 12.142Z", fill: "#FFF6A9" }),
|
|
30
|
+
react_1.default.createElement("path", { d: "M11.8571 15.001C12.5429 13.8935 15.7143 13.9244 17 14.0782L15.2857 15.001L13.5714 15.9239L12.7143 16.8468L11 21C11 19.4618 11.1714 16.1085 11.8571 15.001Z", fill: "#FFF6A9" }),
|
|
31
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.0004 3.88493C17.5956 4.83678 16.8373 5.59511 15.8854 5.99995C16.8373 6.40479 17.5956 7.16312 18.0004 8.11497C18.4053 7.16312 19.1636 6.40479 20.1155 5.99995C19.1636 5.59511 18.4053 4.83678 18.0004 3.88493ZM17.5311 2.27726C17.6916 1.84052 18.3093 1.84052 18.4698 2.27726L18.8653 3.3538C19.1689 4.18016 19.8202 4.83145 20.6466 5.13508L21.7231 5.53063C22.1599 5.6911 22.1599 6.3088 21.7231 6.46927L20.6466 6.86482C19.8202 7.16845 19.1689 7.81974 18.8653 8.6461L18.4698 9.72264C18.3093 10.1594 17.6916 10.1594 17.5311 9.72264L17.1356 8.6461C16.8319 7.81974 16.1807 7.16845 15.3543 6.86482L14.2778 6.46927C13.841 6.3088 13.841 5.6911 14.2778 5.53063L15.3543 5.13508C16.1807 4.83145 16.8319 4.18016 17.1356 3.3538L17.5311 2.27726Z", fill: "url(#paint3_linear_6347_29)" }),
|
|
32
|
+
react_1.default.createElement("g", { filter: "url(#filter1_f_6347_29)" },
|
|
33
|
+
react_1.default.createElement("path", { d: "M17.5481 3.40715C17.5946 3.13582 17.9843 3.13582 18.0309 3.40715L18.2266 4.54831C18.3232 5.11115 18.7218 5.57509 19.2637 5.75524V5.75524C19.4991 5.8335 19.4991 6.1665 19.2637 6.24476L19.1579 6.27994C18.6665 6.44331 18.2712 6.81374 18.0764 7.29358L18.0411 7.38037C17.9494 7.60624 17.6296 7.60624 17.5378 7.38037V7.38037C17.3251 6.85645 16.8559 6.48029 16.2983 6.38651L15.3139 6.22097C15.0647 6.17905 15.0647 5.82095 15.3139 5.77903V5.77903C16.4409 5.58951 17.3249 4.70837 17.5181 3.58205L17.5481 3.40715Z", fill: "white" })),
|
|
34
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L17.1009 13.4999L14.0109 14.6353C12.909 15.0402 12.0407 15.9085 11.6358 17.0104L10.5004 20.1004L9.36506 17.0104C8.96022 15.9085 8.09184 15.0402 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946ZM10.0311 5.27726C10.1916 4.84052 10.8093 4.84052 10.9698 5.27726L12.5745 9.64465C12.8781 10.471 13.5294 11.1223 14.3557 11.4259L18.7231 13.0306C19.1599 13.1911 19.1599 13.8088 18.7231 13.9693L14.3557 15.574C13.5294 15.8776 12.8781 16.5289 12.5745 17.3553L10.9698 21.7226C10.8093 22.1594 10.1916 22.1594 10.0311 21.7226L8.42641 17.3553C8.12278 16.5289 7.4715 15.8776 6.64513 15.574L2.27775 13.9693C1.84101 13.8088 1.84101 13.1911 2.27775 13.0306L6.64513 11.4259C7.4715 11.1223 8.12278 10.471 8.42641 9.64465L10.0311 5.27726Z", fill: "url(#paint4_linear_6347_29)" }),
|
|
35
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.5009 6.89941L11.6363 9.98948C12.0411 11.0913 12.9095 11.9597 14.0113 12.3645L17.1014 13.4999L14.0113 14.6353C12.9095 15.0401 12.0411 15.9085 11.6363 17.0103L10.5009 20.1004L9.3655 17.0103C8.96066 15.9085 8.09228 15.0401 6.99046 14.6353L3.90039 13.4999L6.99046 12.3645C8.09228 11.9597 8.96066 11.0913 9.3655 9.98948L10.5009 6.89941Z", fill: "url(#paint5_linear_6347_29)" }),
|
|
36
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.8482 11.9743L14.3557 11.4259C13.5294 11.1223 12.8781 10.471 12.5745 9.64465L10.9698 5.27726C10.8093 4.84052 10.1916 4.84052 10.0311 5.27726L8.42641 9.64465C8.12278 10.471 7.4715 11.1223 6.64513 11.4259L2.27775 13.0306C1.84101 13.1911 1.84101 13.8088 2.27775 13.9693L6.64513 15.574C7.16928 15.7666 7.62299 16.099 7.96223 16.5273L8.83524 16.0233C8.37471 15.3958 7.73584 14.9094 6.99002 14.6353L3.89995 13.4999L6.99002 12.3646C8.09184 11.9597 8.96022 11.0913 9.36506 9.98953L10.5004 6.89946L11.6358 9.98953C12.0407 11.0913 12.909 11.9597 14.0109 12.3646L14.7206 12.6253L15.8482 11.9743Z", fill: "#FFD884" }),
|
|
37
|
+
react_1.default.createElement("g", { filter: "url(#filter2_f_6347_29)" },
|
|
38
|
+
react_1.default.createElement("path", { d: "M9.75296 7.59175C9.79676 7.30954 10.2032 7.30954 10.247 7.59175L10.7042 10.5372C10.85 11.4767 11.4941 12.263 12.3865 12.5909V12.5909C12.7672 12.7308 12.7672 13.2692 12.3865 13.4091L12.2328 13.4656C11.413 13.7668 10.7668 14.413 10.4656 15.2328L10.4171 15.3648C10.2745 15.753 9.72552 15.753 9.58291 15.3648V15.3648C9.25844 14.4818 8.49257 13.8351 7.5676 13.6631L5.32233 13.2458C5.04991 13.1952 5.04991 12.8048 5.32233 12.7542L6.96934 12.4481C8.22153 12.2153 9.19027 11.2173 9.38561 9.95869L9.75296 7.59175Z", fill: "white" }))),
|
|
39
|
+
react_1.default.createElement("defs", null,
|
|
40
|
+
react_1.default.createElement("filter", { id: "filter0_f_6347_29", x: "0.950195", y: "0.949707", width: "22.1006", height: "22.1006", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
41
|
+
react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
42
|
+
react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
43
|
+
react_1.default.createElement("feGaussianBlur", { stdDeviation: "0.5", result: "effect1_foregroundBlur_6347_29" })),
|
|
44
|
+
react_1.default.createElement("filter", { id: "filter1_f_6347_29", x: "13.127", y: "1.20361", width: "8.31348", height: "8.34619", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
45
|
+
react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
46
|
+
react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
47
|
+
react_1.default.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
|
|
48
|
+
react_1.default.createElement("filter", { id: "filter2_f_6347_29", x: "3.11816", y: "5.38013", width: "11.5537", height: "12.2759", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
|
|
49
|
+
react_1.default.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
50
|
+
react_1.default.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
|
|
51
|
+
react_1.default.createElement("feGaussianBlur", { stdDeviation: "1", result: "effect1_foregroundBlur_6347_29" })),
|
|
52
|
+
react_1.default.createElement("linearGradient", { id: "paint0_linear_6347_29", x1: "12", y1: "1.5", x2: "12", y2: "21.5", gradientUnits: "userSpaceOnUse" },
|
|
53
|
+
react_1.default.createElement("stop", { stopColor: "#82CCFF" }),
|
|
54
|
+
react_1.default.createElement("stop", { offset: "0.336134", stopColor: "#B0FBF4" }),
|
|
55
|
+
react_1.default.createElement("stop", { offset: "0.965", stopColor: "#FDE6FF" })),
|
|
56
|
+
react_1.default.createElement("linearGradient", { id: "paint1_linear_6347_29", x1: "12", y1: "3.5", x2: "12", y2: "19.5", gradientUnits: "userSpaceOnUse" },
|
|
57
|
+
react_1.default.createElement("stop", { stopColor: "#63BBFF" }),
|
|
58
|
+
react_1.default.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
|
|
59
|
+
react_1.default.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
|
|
60
|
+
react_1.default.createElement("linearGradient", { id: "paint2_linear_6347_29", x1: "12", y1: "6.5", x2: "12", y2: "16.5", gradientUnits: "userSpaceOnUse" },
|
|
61
|
+
react_1.default.createElement("stop", { stopColor: "#63BBFF" }),
|
|
62
|
+
react_1.default.createElement("stop", { offset: "0.49", stopColor: "#B1D9FF" }),
|
|
63
|
+
react_1.default.createElement("stop", { offset: "1", stopColor: "#F6C7FF" })),
|
|
64
|
+
react_1.default.createElement("linearGradient", { id: "paint3_linear_6347_29", x1: "12", y1: "1", x2: "12", y2: "23", gradientUnits: "userSpaceOnUse" },
|
|
65
|
+
react_1.default.createElement("stop", { stopColor: "#FFB830" }),
|
|
66
|
+
react_1.default.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
|
|
67
|
+
react_1.default.createElement("linearGradient", { id: "paint4_linear_6347_29", x1: "3.5", y1: "4", x2: "15.5", y2: "22", gradientUnits: "userSpaceOnUse" },
|
|
68
|
+
react_1.default.createElement("stop", { stopColor: "#FFCE66" }),
|
|
69
|
+
react_1.default.createElement("stop", { offset: "1", stopColor: "#EF9C01" })),
|
|
70
|
+
react_1.default.createElement("linearGradient", { id: "paint5_linear_6347_29", x1: "6.5", y1: "5", x2: "12", y2: "17", gradientUnits: "userSpaceOnUse" },
|
|
71
|
+
react_1.default.createElement("stop", { stopColor: "#FFFACE" }),
|
|
72
|
+
react_1.default.createElement("stop", { offset: "1", stopColor: "#FFFACE", stopOpacity: "0" })),
|
|
73
|
+
react_1.default.createElement("clipPath", { id: "clip0_6347_29" },
|
|
74
|
+
react_1.default.createElement("rect", { width: "24", height: "24", fill: "white" })))));
|
|
75
|
+
};
|
|
76
|
+
exports.default = AIPowered;
|
package/cjs/index.d.ts
CHANGED
|
@@ -270,7 +270,7 @@ export * from './types';
|
|
|
270
270
|
export * from './constants';
|
|
271
271
|
export { TestPerspectivesSettingsProvider } from './test-utils/TestPerspectiveSettingsProvider';
|
|
272
272
|
export { TestStylesProvider } from './test-utils/TestStylesProvider';
|
|
273
|
-
export { awaitMockPromises, deepFreeze, delayPromise, getMuiIconByName, getMuiIconsByName, mockBasicTableSizing, mockElementSizes, rerenderWrapper, FakeMouseEvent } from './test-utils';
|
|
273
|
+
export { awaitMockPromises, deepFreeze, delayPromise, getMuiIconByName, getMuiIconsByName, mockBasicTableSizing, fixClicksOnResizablePanes, mockElementSizes, rerenderWrapper, FakeMouseEvent } from './test-utils';
|
|
274
274
|
export * from './features/activity-log';
|
|
275
275
|
export * from './features/crosswalks';
|
|
276
276
|
export * from './features/graph';
|
package/cjs/index.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.PotentialMatchReviewCard = exports.PopupWithArrow = exports.Popper = exp
|
|
|
20
20
|
exports.usePerspectivesSettings = exports.PerspectivesSettingsContext = exports.PivotingAttributeContext = exports.UsersContext = exports.InitialCollaborationContextValue = exports.CollaborationContextProvider = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = exports.MdmModuleProvider = exports.withTableContext = exports.withFilterAtBottom = exports.withPercents = exports.withContext = exports.withDateRangeSelector = exports.withDragHandle = exports.withAsyncMount = exports.withTooltip = exports.RelationEditor = exports.ReltioMap = exports.Marginator = exports.LightArrowTooltip = exports.ScrollableTabs = exports.VirtualGroupedList = exports.ViewMoreToggle = exports.VerticalHeadingsTable = exports.VerticalDivider = exports.AttributeTitle = exports.Spacer = exports.SimpleDropDownSelector = exports.SidePanelContentHeader = exports.SidePanel = exports.SidePanelEmptyState = exports.SideButtonsPanel = exports.SelectorWithOnlyOptionAutoSelect = exports.SelectionPopup = exports.WhiteSearchInput = exports.SearchInput = exports.ProfileResizablePanes = exports.ResizablePanes = exports.ReltioGridLayout = exports.reactSortableTreeHelpers = exports.ReactSortableTree = exports.MultiSelect = exports.QueryBuilderRowsGroup = exports.QueryBuilderRow = exports.ProfileCard = exports.ProfileBand = void 0;
|
|
21
21
|
exports.HiddenAttributesContext = exports.BasicTableContext = exports.BasicTableRowCollapseContext = exports.useUnmaskedAttributeValue = exports.useUnmaskAttributeValue = exports.useMaskAttributeValue = exports.MaskedAttributesProvider = exports.SegmentationContext = exports.useReloadData = exports.ReloadDataProvider = exports.useAttributeValueConfigPermissions = exports.ConfigPermissionsContextProvider = exports.ConfigPermissionsContext = exports.useActionsHook = exports.ActionsHookProvider = exports.PageRequestsAbortingContext = exports.DependentLookupAutopopulationContext = exports.FeaturesContext = exports.LabelsContext = exports.UrlGeneratorsContext = exports.isHighlightedAttributeType = exports.isHighlightedErrorType = exports.ScrollType = exports.ScrollToElementProvider = exports.ScrollToElementContext = exports.SearchValueContext = exports.InterceptHandlersContext = exports.HighlightedValuesContext = exports.SnackbarContext = exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.useEntityLoadingIndication = exports.EntityLoadingIndicationProvider = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = void 0;
|
|
22
22
|
exports.TestPerspectivesSettingsProvider = exports.mergeClasses = exports.isControlOrCommandPressed = exports.getValue = exports.getChecked = exports.showErrorMessage = exports.showDefaultErrorMessage = exports.enrichDataWithPercents = exports.defaultRenderRowCell = exports.defaultGetRowCellHeight = exports.columnFilterToMdmFilter = exports.buildColumnsFilter = exports.useKeyboardNavigation = exports.useDynamicRowCellHeight = exports.useClickableStyle = exports.BasicTableCellRenderer = exports.useBasicTableCellRenderer = exports.useHiddenAttributes = exports.useSavedSearchesRequest = exports.useRequestDCRReview = exports.useAutoFocus = exports.useExpandInvalidRelations = exports.useLayoutResetter = exports.useIsMountedRef = exports.useSnackbar = exports.useSavedStateForEntityType = exports.useReadableSearchState = exports.useEditableConnection = exports.useCustomScripts = exports.useMarkAsNotMatchRequest = exports.useMergeAllRequest = exports.usePagingSimulator = exports.useMatchesLoader = exports.useConfigPermissions = exports.useWhyDidYouUpdate = exports.useUsers = exports.useSavedState = exports.useSafePromise = exports.useRunOnceAfterValueInitialization = exports.useRelationsLoader = exports.useRelationTypeSelector = exports.usePrevious = exports.useDidUpdateEffect = exports.useCommentsEntitiesMap = exports.useCollaboration = exports.useAsyncMount = exports.useAPI = exports.useActions = exports.useMatchesColumnsData = exports.useScrollToAttributeError = void 0;
|
|
23
|
-
exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.delayPromise = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = void 0;
|
|
23
|
+
exports.FakeMouseEvent = exports.rerenderWrapper = exports.mockElementSizes = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.getMuiIconsByName = exports.getMuiIconByName = exports.delayPromise = exports.deepFreeze = exports.awaitMockPromises = exports.TestStylesProvider = void 0;
|
|
24
24
|
// components
|
|
25
25
|
var ActionButton_1 = require("./ActionButton");
|
|
26
26
|
Object.defineProperty(exports, "ActionButton", { enumerable: true, get: function () { return ActionButton_1.ActionButton; } });
|
|
@@ -604,6 +604,7 @@ Object.defineProperty(exports, "delayPromise", { enumerable: true, get: function
|
|
|
604
604
|
Object.defineProperty(exports, "getMuiIconByName", { enumerable: true, get: function () { return test_utils_1.getMuiIconByName; } });
|
|
605
605
|
Object.defineProperty(exports, "getMuiIconsByName", { enumerable: true, get: function () { return test_utils_1.getMuiIconsByName; } });
|
|
606
606
|
Object.defineProperty(exports, "mockBasicTableSizing", { enumerable: true, get: function () { return test_utils_1.mockBasicTableSizing; } });
|
|
607
|
+
Object.defineProperty(exports, "fixClicksOnResizablePanes", { enumerable: true, get: function () { return test_utils_1.fixClicksOnResizablePanes; } });
|
|
607
608
|
Object.defineProperty(exports, "mockElementSizes", { enumerable: true, get: function () { return test_utils_1.mockElementSizes; } });
|
|
608
609
|
Object.defineProperty(exports, "rerenderWrapper", { enumerable: true, get: function () { return test_utils_1.rerenderWrapper; } });
|
|
609
610
|
Object.defineProperty(exports, "FakeMouseEvent", { enumerable: true, get: function () { return test_utils_1.FakeMouseEvent; } });
|
|
@@ -15,6 +15,7 @@ export declare const mockBasicTableSizing: ({ width, height }?: {
|
|
|
15
15
|
width?: number;
|
|
16
16
|
height?: number;
|
|
17
17
|
}) => () => void;
|
|
18
|
+
export declare const fixClicksOnResizablePanes: () => void;
|
|
18
19
|
export declare const getMuiIconByName: (name: string, el?: HTMLElement) => HTMLElement;
|
|
19
20
|
export declare const getMuiIconsByName: (name: string, el?: HTMLElement) => HTMLElement[];
|
|
20
21
|
interface MouseEventWithOffsets extends MouseEventInit {
|
package/cjs/test-utils/index.js
CHANGED
|
@@ -62,7 +62,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
62
62
|
return t;
|
|
63
63
|
};
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.FakeMouseEvent = exports.getMuiIconsByName = exports.getMuiIconByName = exports.mockBasicTableSizing = exports.mockElementSizes = exports.rerenderWrapper = exports.deepFreeze = exports.awaitMockPromises = exports.delayPromise = void 0;
|
|
65
|
+
exports.FakeMouseEvent = exports.getMuiIconsByName = exports.getMuiIconByName = exports.fixClicksOnResizablePanes = exports.mockBasicTableSizing = exports.mockElementSizes = exports.rerenderWrapper = exports.deepFreeze = exports.awaitMockPromises = exports.delayPromise = void 0;
|
|
66
66
|
var react_1 = require("@testing-library/react");
|
|
67
67
|
var delayPromise = function (delay) {
|
|
68
68
|
if (delay === void 0) { delay = 0; }
|
|
@@ -137,6 +137,20 @@ var mockBasicTableSizing = function (_a) {
|
|
|
137
137
|
return unmock;
|
|
138
138
|
};
|
|
139
139
|
exports.mockBasicTableSizing = mockBasicTableSizing;
|
|
140
|
+
var originalPreventDefault = Event.prototype.preventDefault;
|
|
141
|
+
var fixClicksOnResizablePanes = function () {
|
|
142
|
+
// https://github.com/bvaughn/react-resizable-panels/issues/367
|
|
143
|
+
// https://github.com/testing-library/user-event/issues/1206
|
|
144
|
+
// Workaround until the user-event issue is resolved
|
|
145
|
+
jest.spyOn(Event.prototype, 'preventDefault').mockImplementation(function () {
|
|
146
|
+
var e = this;
|
|
147
|
+
if (e.currentTarget === document.body && e.eventPhase === Event.CAPTURING_PHASE) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
originalPreventDefault.call(e);
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
exports.fixClicksOnResizablePanes = fixClicksOnResizablePanes;
|
|
140
154
|
var getMuiIconByName = function (name, el) {
|
|
141
155
|
if (el === void 0) { el = document.documentElement; }
|
|
142
156
|
var dataTestId = name + 'Icon';
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MatchRulesTitle } from '../MatchRulesTitle';
|
|
3
2
|
import NegativeRuleTooltipIcon from '../icons/NegativeRuleTooltipIcon';
|
|
4
3
|
import { useStyles } from './styles';
|
|
4
|
+
import i18n from 'ui-i18n';
|
|
5
5
|
export var MatchRulesTooltip = function (_a) {
|
|
6
6
|
var _b = _a.isMlMatch, isMlMatch = _b === void 0 ? false : _b, matchRules = _a.matchRules;
|
|
7
7
|
var styles = useStyles();
|
|
8
|
+
var hasMatchRules = matchRules.length > 0;
|
|
9
|
+
var showTitle = !isMlMatch && hasMatchRules;
|
|
8
10
|
return (React.createElement("div", { className: styles.container },
|
|
9
|
-
React.createElement("div", { className: styles.
|
|
10
|
-
React.createElement(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
React.createElement("div", { className: showTitle ? styles.bodyWithMargin : styles.bodyWithoutMargin },
|
|
12
|
+
showTitle && React.createElement("div", { className: styles.title }, i18n.text('Match rules')),
|
|
13
|
+
hasMatchRules
|
|
14
|
+
? matchRules.map(function (match) { return (React.createElement("div", { key: match.uri },
|
|
15
|
+
'- ',
|
|
16
|
+
match.negativeRule && React.createElement(NegativeRuleTooltipIcon, { className: styles.negativeRuleIcon }),
|
|
17
|
+
match.label)); })
|
|
18
|
+
: null)));
|
|
15
19
|
};
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MatchRulesTitle } from '../MatchRulesTitle';
|
|
4
|
-
import NegativeRuleTooltipIcon from '../icons/NegativeRuleTooltipIcon';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
5
3
|
import { MatchRulesTooltip } from './MatchRulesTooltip';
|
|
6
4
|
describe('MatchRulesTooltip test', function () {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
expect(
|
|
12
|
-
component.setProps({ isMlMatch: false });
|
|
13
|
-
expect(getMatchRulesTitle(component).prop('isMlMatch')).toBe(false);
|
|
5
|
+
it('should render correct title depending on isMlMatch prop', function () {
|
|
6
|
+
var rerender = render(React.createElement(MatchRulesTooltip, { isMlMatch: true, matchRules: [] })).rerender;
|
|
7
|
+
expect(screen.queryByText(/Match rules/i)).not.toBeInTheDocument();
|
|
8
|
+
rerender(React.createElement(MatchRulesTooltip, { isMlMatch: false, matchRules: [{ uri: 'uri1', label: 'label1' }] }));
|
|
9
|
+
expect(screen.getByText(/Match rules/i)).toBeInTheDocument();
|
|
14
10
|
});
|
|
15
11
|
it('should render match rule correctly', function () {
|
|
16
12
|
var matchRules = [
|
|
17
13
|
{ uri: 'uri1', label: 'label1' },
|
|
18
|
-
{ uri: '
|
|
14
|
+
{ uri: 'uri2', label: 'label2' }
|
|
19
15
|
];
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
expect(
|
|
23
|
-
expect(
|
|
24
|
-
expect(
|
|
16
|
+
render(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
|
|
17
|
+
var ruleItems = screen.getAllByText(/^-\s+/);
|
|
18
|
+
expect(ruleItems).toHaveLength(2);
|
|
19
|
+
expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
|
|
20
|
+
expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
|
|
25
21
|
});
|
|
26
22
|
it('should render negative rule correctly', function () {
|
|
27
23
|
var matchRules = [
|
|
28
24
|
{ uri: 'uri1', label: 'label1' },
|
|
29
|
-
{ uri: '
|
|
25
|
+
{ uri: 'uri2', label: 'label2', negativeRule: {} }
|
|
30
26
|
];
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
expect(
|
|
34
|
-
expect(
|
|
35
|
-
expect(
|
|
36
|
-
expect(
|
|
37
|
-
expect(
|
|
27
|
+
render(React.createElement(MatchRulesTooltip, { matchRules: matchRules }));
|
|
28
|
+
var ruleItems = screen.getAllByText(/^-\s+/);
|
|
29
|
+
expect(ruleItems).toHaveLength(2);
|
|
30
|
+
expect(ruleItems[0]).toHaveTextContent(matchRules[0].label);
|
|
31
|
+
expect(ruleItems[0].querySelector('svg')).not.toBeInTheDocument();
|
|
32
|
+
expect(ruleItems[1]).toHaveTextContent(matchRules[1].label);
|
|
33
|
+
expect(ruleItems[1].querySelector('svg')).toBeInTheDocument();
|
|
38
34
|
});
|
|
39
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"container" | "title" | "bodyWithMargin" | "bodyWithoutMargin" | "negativeRuleIcon">;
|
|
@@ -4,10 +4,14 @@ export var useStyles = makeStyles({
|
|
|
4
4
|
fontWeight: 500,
|
|
5
5
|
marginBottom: '9px'
|
|
6
6
|
},
|
|
7
|
-
|
|
7
|
+
bodyWithMargin: {
|
|
8
8
|
fontWeight: 'normal',
|
|
9
9
|
marginLeft: '16px'
|
|
10
10
|
},
|
|
11
|
+
bodyWithoutMargin: {
|
|
12
|
+
fontWeight: 'normal',
|
|
13
|
+
marginLeft: '0px'
|
|
14
|
+
},
|
|
11
15
|
container: {
|
|
12
16
|
padding: '8px',
|
|
13
17
|
fontSize: '12px',
|
|
@@ -94,11 +94,28 @@ var setUp = function (props) {
|
|
|
94
94
|
React.createElement(PaneStub, { key: 0, id: "content" }),
|
|
95
95
|
React.createElement(PaneStub, { key: 1, id: "rightPanel" })), { wrapper: Providers })), { user: user });
|
|
96
96
|
};
|
|
97
|
-
var getSplitPane1 = function (container) { return container.
|
|
98
|
-
var getSplitPane2 = function (container) { return container.
|
|
99
|
-
var getSplitPanesResizer = function (container) { return container.
|
|
100
|
-
var isResizingDisabled = function (container) {
|
|
97
|
+
var getSplitPane1 = function (container) { return container.querySelectorAll('[data-panel-id]')[0]; };
|
|
98
|
+
var getSplitPane2 = function (container) { return container.querySelectorAll('[data-panel-id]')[1]; };
|
|
99
|
+
var getSplitPanesResizer = function (container) { return container.querySelector('[data-resize-handle]'); };
|
|
100
|
+
var isResizingDisabled = function (container) {
|
|
101
|
+
return getSplitPanesResizer(container).getAttribute('data-panel-resize-handle-enabled') === 'false';
|
|
102
|
+
};
|
|
103
|
+
var checkPanelSize = function (panel, size) { return expect(panel.getAttribute('data-panel-size')).toBe(size); };
|
|
101
104
|
describe('ProfileResizablePanes tests', function () {
|
|
105
|
+
beforeAll(function () {
|
|
106
|
+
jest.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1000);
|
|
107
|
+
jest.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({
|
|
108
|
+
width: 1000,
|
|
109
|
+
height: 1000,
|
|
110
|
+
top: 0,
|
|
111
|
+
left: 0,
|
|
112
|
+
right: 1000,
|
|
113
|
+
bottom: 1000,
|
|
114
|
+
x: 0,
|
|
115
|
+
y: 0,
|
|
116
|
+
toJSON: function () { return ''; }
|
|
117
|
+
});
|
|
118
|
+
});
|
|
102
119
|
it('should render resizable panes with closed second pane (active is undefined)', function () {
|
|
103
120
|
var container = setUp().container;
|
|
104
121
|
expect(screen.getByTestId('content')).toBeInTheDocument();
|
|
@@ -106,10 +123,11 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
106
123
|
expect(getSplitPane1(container)).toBeInTheDocument();
|
|
107
124
|
expect(getSplitPane2(container)).toBeInTheDocument();
|
|
108
125
|
expect(isResizingDisabled(container)).toBe(true);
|
|
109
|
-
|
|
126
|
+
checkPanelSize(getSplitPane1(container), '100.0');
|
|
127
|
+
checkPanelSize(getSplitPane2(container), '0.0');
|
|
110
128
|
expect(screen.getByRole('button', { name: 'Button 1' })).toBeInTheDocument();
|
|
111
129
|
expect(screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
112
|
-
expect(screen.getByRole('
|
|
130
|
+
expect(screen.getByRole('separator')).toBeInTheDocument();
|
|
113
131
|
});
|
|
114
132
|
it('should render resizable panes with open second pane', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
115
133
|
var _a, container, user, button2;
|
|
@@ -122,7 +140,8 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
122
140
|
expect(getSplitPane1(container)).toBeInTheDocument();
|
|
123
141
|
expect(getSplitPane2(container)).toBeInTheDocument();
|
|
124
142
|
expect(isResizingDisabled(container)).toBe(true);
|
|
125
|
-
|
|
143
|
+
checkPanelSize(getSplitPane1(container), '100.0');
|
|
144
|
+
checkPanelSize(getSplitPane2(container), '0.0');
|
|
126
145
|
expect(screen.getByRole('button', { name: 'Button 1' })).toBeInTheDocument();
|
|
127
146
|
expect(screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
128
147
|
button2 = screen.getByRole('button', { name: 'Button 2' });
|
|
@@ -130,7 +149,8 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
130
149
|
case 1:
|
|
131
150
|
_b.sent();
|
|
132
151
|
expect(isResizingDisabled(container)).toBe(false);
|
|
133
|
-
|
|
152
|
+
checkPanelSize(getSplitPane1(container), '52.0');
|
|
153
|
+
checkPanelSize(getSplitPane2(container), '48.0');
|
|
134
154
|
expect(screen.getByRole('button', { name: 'Button 1' })).toBeInTheDocument();
|
|
135
155
|
expect(screen.getByTestId('reltio-profile-right-side-button-2')).toBeInTheDocument();
|
|
136
156
|
return [2 /*return*/];
|
|
@@ -141,11 +161,11 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
141
161
|
var container;
|
|
142
162
|
return __generator(this, function (_a) {
|
|
143
163
|
container = setUp(__assign(__assign({}, defaultProps), { disabled: true })).container;
|
|
144
|
-
|
|
164
|
+
checkPanelSize(getSplitPane2(container), '0.0');
|
|
145
165
|
expect(screen.getByRole('button', { name: 'Button 1' })).toBeInTheDocument();
|
|
146
166
|
expect(screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
147
167
|
expect(isResizingDisabled(container)).toBe(true);
|
|
148
|
-
|
|
168
|
+
checkPanelSize(getSplitPane2(container), '0.0');
|
|
149
169
|
expect(screen.getByRole('button', { name: 'Button 1' }).hasAttribute('disabled')).toBe(true);
|
|
150
170
|
expect(screen.getByRole('button', { name: 'Button 2' }).hasAttribute('disabled')).toBe(true);
|
|
151
171
|
return [2 /*return*/];
|
|
@@ -158,80 +178,105 @@ describe('ProfileResizablePanes tests', function () {
|
|
|
158
178
|
case 0:
|
|
159
179
|
_a = setUp(__assign(__assign({}, defaultProps), { perspectiveId: 'graph' })), container = _a.container, user = _a.user;
|
|
160
180
|
expect(isResizingDisabled(container)).toBe(false);
|
|
161
|
-
|
|
181
|
+
checkPanelSize(getSplitPane1(container), '68.0');
|
|
182
|
+
checkPanelSize(getSplitPane2(container), '32.0');
|
|
162
183
|
expect(screen.getByRole('button', { name: 'Button 1' })).toBeInTheDocument();
|
|
163
184
|
expect(screen.getByRole('button', { name: 'Button 2' })).toBeInTheDocument();
|
|
164
|
-
Divider = screen.getByRole('
|
|
185
|
+
Divider = screen.getByRole('separator');
|
|
165
186
|
expect(Divider).toBeInTheDocument();
|
|
166
187
|
// move mouse to an x-coordinate between MIN_R_PANE_SIZE and MAX_R_PANE_SIZE
|
|
167
|
-
return [4 /*yield*/, user.pointer(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
188
|
+
return [4 /*yield*/, user.pointer([
|
|
189
|
+
{
|
|
190
|
+
keys: '[MouseLeft>]',
|
|
191
|
+
target: Divider,
|
|
192
|
+
coords: {
|
|
193
|
+
x: 680,
|
|
194
|
+
y: 0
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
target: Divider,
|
|
199
|
+
coords: {
|
|
200
|
+
x: 500,
|
|
201
|
+
y: 20
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
keys: '[/MouseLeft]',
|
|
206
|
+
target: Divider,
|
|
207
|
+
coords: {
|
|
208
|
+
x: 500,
|
|
209
|
+
y: 20
|
|
210
|
+
}
|
|
173
211
|
}
|
|
174
|
-
|
|
212
|
+
])];
|
|
175
213
|
case 1:
|
|
176
214
|
// move mouse to an x-coordinate between MIN_R_PANE_SIZE and MAX_R_PANE_SIZE
|
|
177
215
|
_b.sent();
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
target: Divider,
|
|
181
|
-
coords: {
|
|
182
|
-
x: -500,
|
|
183
|
-
y: 20
|
|
184
|
-
}
|
|
185
|
-
})];
|
|
186
|
-
case 2:
|
|
187
|
-
_b.sent();
|
|
188
|
-
expect(getSplitPane2(container).style.width).toBe('500px');
|
|
216
|
+
checkPanelSize(getSplitPane1(container), '50.0');
|
|
217
|
+
checkPanelSize(getSplitPane2(container), '50.0');
|
|
189
218
|
// move mouse to a larger x-coordinate than MAX_R_PANE_SIZE
|
|
190
|
-
return [4 /*yield*/, user.pointer(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
219
|
+
return [4 /*yield*/, user.pointer([
|
|
220
|
+
{
|
|
221
|
+
keys: '[MouseLeft>]',
|
|
222
|
+
target: Divider,
|
|
223
|
+
coords: {
|
|
224
|
+
x: 500,
|
|
225
|
+
y: 0
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
target: Divider,
|
|
230
|
+
coords: {
|
|
231
|
+
x: 300,
|
|
232
|
+
y: 20
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
keys: '[/MouseLeft]',
|
|
237
|
+
target: Divider,
|
|
238
|
+
coords: {
|
|
239
|
+
x: 300,
|
|
240
|
+
y: 20
|
|
241
|
+
}
|
|
196
242
|
}
|
|
197
|
-
|
|
198
|
-
case
|
|
243
|
+
])];
|
|
244
|
+
case 2:
|
|
199
245
|
// move mouse to a larger x-coordinate than MAX_R_PANE_SIZE
|
|
200
246
|
_b.sent();
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
target: Divider,
|
|
204
|
-
coords: {
|
|
205
|
-
x: -650,
|
|
206
|
-
y: 0
|
|
207
|
-
}
|
|
208
|
-
})];
|
|
209
|
-
case 4:
|
|
210
|
-
_b.sent();
|
|
211
|
-
expect(getSplitPane2(container).style.width).toBe('640px');
|
|
247
|
+
checkPanelSize(getSplitPane1(container), '36.0');
|
|
248
|
+
checkPanelSize(getSplitPane2(container), '64.0');
|
|
212
249
|
// move mouse to a smaller x-coordinate than MIN_R_PANE_SIZE
|
|
213
|
-
return [4 /*yield*/, user.pointer(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
250
|
+
return [4 /*yield*/, user.pointer([
|
|
251
|
+
{
|
|
252
|
+
keys: '[MouseLeft>]',
|
|
253
|
+
target: Divider,
|
|
254
|
+
coords: {
|
|
255
|
+
x: 360,
|
|
256
|
+
y: 0
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
target: Divider,
|
|
261
|
+
coords: {
|
|
262
|
+
x: 690,
|
|
263
|
+
y: 20
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
keys: '[/MouseLeft]',
|
|
268
|
+
target: Divider,
|
|
269
|
+
coords: {
|
|
270
|
+
x: 690,
|
|
271
|
+
y: 20
|
|
272
|
+
}
|
|
219
273
|
}
|
|
220
|
-
|
|
221
|
-
case
|
|
274
|
+
])];
|
|
275
|
+
case 3:
|
|
222
276
|
// move mouse to a smaller x-coordinate than MIN_R_PANE_SIZE
|
|
223
277
|
_b.sent();
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
target: Divider,
|
|
227
|
-
coords: {
|
|
228
|
-
x: -310,
|
|
229
|
-
y: 0
|
|
230
|
-
}
|
|
231
|
-
})];
|
|
232
|
-
case 6:
|
|
233
|
-
_b.sent();
|
|
234
|
-
expect(getSplitPane2(container).style.width).toBe('320px');
|
|
278
|
+
checkPanelSize(getSplitPane1(container), '68.0');
|
|
279
|
+
checkPanelSize(getSplitPane2(container), '32.0');
|
|
235
280
|
return [2 /*return*/];
|
|
236
281
|
}
|
|
237
282
|
});
|
|
@@ -12,15 +12,16 @@ type Props = {
|
|
|
12
12
|
allowResize?: boolean;
|
|
13
13
|
primary?: 'first' | 'second';
|
|
14
14
|
minSize?: Size;
|
|
15
|
+
/** if you set the maxSize to negative value (e.g. -200), then the splitter stops 200px before the border (in other words it sets the minimal size of the 'resizable' pane in this case) */
|
|
15
16
|
maxSize?: Size;
|
|
16
|
-
defaultSize?: Size;
|
|
17
17
|
debounceInterval?: number;
|
|
18
|
+
/** Can be a positive or negative number (e.g., 250, -250), a percentage string (e.g., "50%"), or a string with pixels (e.g., "50px") */
|
|
18
19
|
size?: Size;
|
|
19
20
|
orientation?: 'vertical' | 'horizontal';
|
|
20
21
|
onChange?: ({ size, percentageSize, isMaxSize, isMinSize }: OnChange) => void;
|
|
21
22
|
};
|
|
22
23
|
export declare const ResizablePanes: {
|
|
23
|
-
({ className, children, orientation, primary,
|
|
24
|
+
({ className, children, orientation, primary, size, minSize, maxSize, allowResize, debounceInterval, onChange }: Props): JSX.Element;
|
|
24
25
|
displayName: string;
|
|
25
26
|
};
|
|
26
27
|
export {};
|