@burdenoff/microfe-planmagnet 2026.930.21 → 2026.930.23
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/dist/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseSum.js +17 -0
- package/dist/node_modules/lodash/_baseSum.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/maxBy.js +17 -0
- package/dist/node_modules/lodash/maxBy.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/lodash/sumBy.js +16 -0
- package/dist/node_modules/lodash/sumBy.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/Sankey.js +556 -0
- package/dist/node_modules/recharts/es6/chart/Sankey.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/Treemap.js +545 -0
- package/dist/node_modules/recharts/es6/chart/Treemap.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Polygon.js +112 -0
- package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/Constants.js +31 -0
- package/dist/node_modules/recharts/es6/util/Constants.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +15 -10
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
- package/dist/planmagnet/controls/AutomationRuleControls.js +10 -10
- package/dist/planmagnet/controls/CompetitorControls.js +7 -7
- package/dist/planmagnet/controls/FeatureControls.js +38 -38
- package/dist/planmagnet/controls/ProgramControls.js +8 -8
- package/dist/planmagnet/dependency/DependencyGraph.d.ts.map +1 -1
- package/dist/planmagnet/dependency/DependencyGraph.js +13 -10
- package/dist/planmagnet/dependency/DependencyGraph.js.map +1 -1
- package/dist/planmagnet/dependency/DependencyPanel.js +13 -13
- package/dist/planmagnet/dependency/GanttChart.d.ts.map +1 -1
- package/dist/planmagnet/dependency/GanttChart.js +11 -5
- package/dist/planmagnet/dependency/GanttChart.js.map +1 -1
- package/dist/planmagnet/pages/ActivityActivityPagePage.js +16 -16
- package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +91 -73
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +6 -6
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +4 -4
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +11 -11
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +5 -5
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +5 -5
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js +6 -6
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js.map +1 -1
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.js +8 -8
- package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +5 -5
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +8 -8
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +4 -4
- package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.js +234 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts +6 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js +367 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.js +17 -17
- package/dist/planmagnet/utils/statusColor.d.ts +8 -9
- package/dist/planmagnet/utils/statusColor.d.ts.map +1 -1
- package/dist/planmagnet/utils/statusColor.js +8 -40
- package/dist/planmagnet/utils/statusColor.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import e from "../../../clsx/dist/clsx.js";
|
|
2
|
+
import { filterProps as t } from "../util/ReactUtils.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
//#region node_modules/recharts/es6/shape/Polygon.js
|
|
5
|
+
var r = [
|
|
6
|
+
"points",
|
|
7
|
+
"className",
|
|
8
|
+
"baseLinePoints",
|
|
9
|
+
"connectNulls"
|
|
10
|
+
];
|
|
11
|
+
function i() {
|
|
12
|
+
return i = Object.assign ? Object.assign.bind() : function(e) {
|
|
13
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
+
var n = arguments[t];
|
|
15
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
16
|
+
}
|
|
17
|
+
return e;
|
|
18
|
+
}, i.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
function a(e, t) {
|
|
21
|
+
if (e == null) return {};
|
|
22
|
+
var n = o(e, t), r, i;
|
|
23
|
+
if (Object.getOwnPropertySymbols) {
|
|
24
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
25
|
+
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
26
|
+
}
|
|
27
|
+
return n;
|
|
28
|
+
}
|
|
29
|
+
function o(e, t) {
|
|
30
|
+
if (e == null) return {};
|
|
31
|
+
var n = {};
|
|
32
|
+
for (var r in e) if (Object.prototype.hasOwnProperty.call(e, r)) {
|
|
33
|
+
if (t.indexOf(r) >= 0) continue;
|
|
34
|
+
n[r] = e[r];
|
|
35
|
+
}
|
|
36
|
+
return n;
|
|
37
|
+
}
|
|
38
|
+
function s(e) {
|
|
39
|
+
return d(e) || u(e) || l(e) || c();
|
|
40
|
+
}
|
|
41
|
+
function c() {
|
|
42
|
+
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43
|
+
}
|
|
44
|
+
function l(e, t) {
|
|
45
|
+
if (e) {
|
|
46
|
+
if (typeof e == "string") return f(e, t);
|
|
47
|
+
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
48
|
+
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
49
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return f(e, t);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function u(e) {
|
|
53
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
54
|
+
}
|
|
55
|
+
function d(e) {
|
|
56
|
+
if (Array.isArray(e)) return f(e);
|
|
57
|
+
}
|
|
58
|
+
function f(e, t) {
|
|
59
|
+
(t == null || t > e.length) && (t = e.length);
|
|
60
|
+
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
61
|
+
return r;
|
|
62
|
+
}
|
|
63
|
+
var p = function(e) {
|
|
64
|
+
return e && e.x === +e.x && e.y === +e.y;
|
|
65
|
+
}, m = function() {
|
|
66
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = [[]];
|
|
67
|
+
return e.forEach(function(e) {
|
|
68
|
+
p(e) ? t[t.length - 1].push(e) : t[t.length - 1].length > 0 && t.push([]);
|
|
69
|
+
}), p(e[0]) && t[t.length - 1].push(e[0]), t[t.length - 1].length <= 0 && (t = t.slice(0, -1)), t;
|
|
70
|
+
}, h = function(e, t) {
|
|
71
|
+
var n = m(e);
|
|
72
|
+
t && (n = [n.reduce(function(e, t) {
|
|
73
|
+
return [].concat(s(e), s(t));
|
|
74
|
+
}, [])]);
|
|
75
|
+
var r = n.map(function(e) {
|
|
76
|
+
return e.reduce(function(e, t, n) {
|
|
77
|
+
return `${e}${n === 0 ? "M" : "L"}${t.x},${t.y}`;
|
|
78
|
+
}, "");
|
|
79
|
+
}).join("");
|
|
80
|
+
return n.length === 1 ? `${r}Z` : r;
|
|
81
|
+
}, g = function(e, t, n) {
|
|
82
|
+
var r = h(e, n);
|
|
83
|
+
return `${r.slice(-1) === "Z" ? r.slice(0, -1) : r}L${h(t.reverse(), n).slice(1)}`;
|
|
84
|
+
}, _ = function(o) {
|
|
85
|
+
var s = o.points, c = o.className, l = o.baseLinePoints, u = o.connectNulls, d = a(o, r);
|
|
86
|
+
if (!s || !s.length) return null;
|
|
87
|
+
var f = e("recharts-polygon", c);
|
|
88
|
+
if (l && l.length) {
|
|
89
|
+
var p = d.stroke && d.stroke !== "none", m = g(s, l, u);
|
|
90
|
+
return /* @__PURE__ */ n.createElement("g", { className: f }, /* @__PURE__ */ n.createElement("path", i({}, t(d, !0), {
|
|
91
|
+
fill: m.slice(-1) === "Z" ? d.fill : "none",
|
|
92
|
+
stroke: "none",
|
|
93
|
+
d: m
|
|
94
|
+
})), p ? /* @__PURE__ */ n.createElement("path", i({}, t(d, !0), {
|
|
95
|
+
fill: "none",
|
|
96
|
+
d: h(s, u)
|
|
97
|
+
})) : null, p ? /* @__PURE__ */ n.createElement("path", i({}, t(d, !0), {
|
|
98
|
+
fill: "none",
|
|
99
|
+
d: h(l, u)
|
|
100
|
+
})) : null);
|
|
101
|
+
}
|
|
102
|
+
var _ = h(s, u);
|
|
103
|
+
return /* @__PURE__ */ n.createElement("path", i({}, t(d, !0), {
|
|
104
|
+
fill: _.slice(-1) === "Z" ? d.fill : "none",
|
|
105
|
+
className: f,
|
|
106
|
+
d: _
|
|
107
|
+
}));
|
|
108
|
+
};
|
|
109
|
+
//#endregion
|
|
110
|
+
export { _ as Polygon };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=Polygon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Polygon.js","names":[],"sources":["../../../../../node_modules/recharts/es6/shape/Polygon.js"],"sourcesContent":["var _excluded = [\"points\", \"className\", \"baseLinePoints\", \"connectNulls\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n/**\n * @fileOverview Polygon\n */\nimport React from 'react';\nimport clsx from 'clsx';\nimport { filterProps } from '../util/ReactUtils';\nvar isValidatePoint = function isValidatePoint(point) {\n return point && point.x === +point.x && point.y === +point.y;\n};\nvar getParsedPoints = function getParsedPoints() {\n var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var segmentPoints = [[]];\n points.forEach(function (entry) {\n if (isValidatePoint(entry)) {\n segmentPoints[segmentPoints.length - 1].push(entry);\n } else if (segmentPoints[segmentPoints.length - 1].length > 0) {\n // add another path\n segmentPoints.push([]);\n }\n });\n if (isValidatePoint(points[0])) {\n segmentPoints[segmentPoints.length - 1].push(points[0]);\n }\n if (segmentPoints[segmentPoints.length - 1].length <= 0) {\n segmentPoints = segmentPoints.slice(0, -1);\n }\n return segmentPoints;\n};\nvar getSinglePolygonPath = function getSinglePolygonPath(points, connectNulls) {\n var segmentPoints = getParsedPoints(points);\n if (connectNulls) {\n segmentPoints = [segmentPoints.reduce(function (res, segPoints) {\n return [].concat(_toConsumableArray(res), _toConsumableArray(segPoints));\n }, [])];\n }\n var polygonPath = segmentPoints.map(function (segPoints) {\n return segPoints.reduce(function (path, point, index) {\n return \"\".concat(path).concat(index === 0 ? 'M' : 'L').concat(point.x, \",\").concat(point.y);\n }, '');\n }).join('');\n return segmentPoints.length === 1 ? \"\".concat(polygonPath, \"Z\") : polygonPath;\n};\nvar getRanglePath = function getRanglePath(points, baseLinePoints, connectNulls) {\n var outerPath = getSinglePolygonPath(points, connectNulls);\n return \"\".concat(outerPath.slice(-1) === 'Z' ? outerPath.slice(0, -1) : outerPath, \"L\").concat(getSinglePolygonPath(baseLinePoints.reverse(), connectNulls).slice(1));\n};\nexport var Polygon = function Polygon(props) {\n var points = props.points,\n className = props.className,\n baseLinePoints = props.baseLinePoints,\n connectNulls = props.connectNulls,\n others = _objectWithoutProperties(props, _excluded);\n if (!points || !points.length) {\n return null;\n }\n var layerClass = clsx('recharts-polygon', className);\n if (baseLinePoints && baseLinePoints.length) {\n var hasStroke = others.stroke && others.stroke !== 'none';\n var rangePath = getRanglePath(points, baseLinePoints, connectNulls);\n return /*#__PURE__*/React.createElement(\"g\", {\n className: layerClass\n }, /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: rangePath.slice(-1) === 'Z' ? others.fill : 'none',\n stroke: \"none\",\n d: rangePath\n })), hasStroke ? /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: \"none\",\n d: getSinglePolygonPath(points, connectNulls)\n })) : null, hasStroke ? /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: \"none\",\n d: getSinglePolygonPath(baseLinePoints, connectNulls)\n })) : null);\n }\n var singlePath = getSinglePolygonPath(points, connectNulls);\n return /*#__PURE__*/React.createElement(\"path\", _extends({}, filterProps(others, true), {\n fill: singlePath.slice(-1) === 'Z' ? others.fill : 'none',\n className: layerClass,\n d: singlePath\n }));\n};"],"x_google_ignoreList":[0],"mappings":";;;;AAAA,IAAI,IAAY;CAAC;CAAU;CAAa;CAAkB;CAAe;AACzE,SAAS,IAAW;AAAsR,QAApR,IAAW,OAAO,SAAS,OAAO,OAAO,MAAM,GAAG,SAAU,GAAQ;AAAE,OAAK,IAAI,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;GAAE,IAAI,IAAS,UAAU;AAAI,QAAK,IAAI,KAAO,EAAU,CAAI,OAAO,UAAU,eAAe,KAAK,GAAQ,EAAI,KAAI,EAAO,KAAO,EAAO;;AAAY,SAAO;IAAkB,EAAS,MAAM,MAAM,UAAU;;AAChV,SAAS,EAAyB,GAAQ,GAAU;AAAE,KAAI,KAAU,KAAM,QAAO,EAAE;CAAE,IAAI,IAAS,EAA8B,GAAQ,EAAS,EAA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;EACnD,WAAW;EACX,GAAG;EACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region node_modules/recharts/es6/util/Constants.js
|
|
2
|
+
var e = [
|
|
3
|
+
"#1890FF",
|
|
4
|
+
"#66B5FF",
|
|
5
|
+
"#41D9C7",
|
|
6
|
+
"#2FC25B",
|
|
7
|
+
"#6EDB8F",
|
|
8
|
+
"#9AE65C",
|
|
9
|
+
"#FACC14",
|
|
10
|
+
"#E6965C",
|
|
11
|
+
"#57AD71",
|
|
12
|
+
"#223273",
|
|
13
|
+
"#738AE6",
|
|
14
|
+
"#7564CC",
|
|
15
|
+
"#8543E0",
|
|
16
|
+
"#A877ED",
|
|
17
|
+
"#5C8EE6",
|
|
18
|
+
"#13C2C2",
|
|
19
|
+
"#70E0E0",
|
|
20
|
+
"#5CA3E6",
|
|
21
|
+
"#3436C7",
|
|
22
|
+
"#8082FF",
|
|
23
|
+
"#DD81E6",
|
|
24
|
+
"#F04864",
|
|
25
|
+
"#FA7D92",
|
|
26
|
+
"#D598D9"
|
|
27
|
+
];
|
|
28
|
+
//#endregion
|
|
29
|
+
export { e as COLOR_PANEL };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=Constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Constants.js","names":[],"sources":["../../../../../node_modules/recharts/es6/util/Constants.js"],"sourcesContent":["export var COLOR_PANEL = ['#1890FF', '#66B5FF', '#41D9C7', '#2FC25B', '#6EDB8F', '#9AE65C', '#FACC14', '#E6965C', '#57AD71', '#223273', '#738AE6', '#7564CC', '#8543E0', '#A877ED', '#5C8EE6', '#13C2C2', '#70E0E0', '#5CA3E6', '#3436C7', '#8082FF', '#DD81E6', '#F04864', '#FA7D92', '#D598D9'];"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAW,IAAc;CAAC;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAW;CAAU"}
|
|
@@ -85,7 +85,12 @@ var M = function(e) {
|
|
|
85
85
|
}, I = function(e, t, n, r) {
|
|
86
86
|
var i = u?.[r] ?? [];
|
|
87
87
|
return t.startsWith("data-") || !(0, _.default)(e) && (r && i.includes(t) || d.includes(t)) || n && l.includes(t);
|
|
88
|
-
}, L = function(e
|
|
88
|
+
}, L = function(e) {
|
|
89
|
+
var t = [];
|
|
90
|
+
return k(e).forEach(function(e) {
|
|
91
|
+
P(e) && t.push(e);
|
|
92
|
+
}), t;
|
|
93
|
+
}, R = function(e, t, n) {
|
|
89
94
|
if (!e || typeof e == "function" || typeof e == "boolean") return null;
|
|
90
95
|
var r = e;
|
|
91
96
|
if (/* @__PURE__ */ p(e) && (r = e.props), !(0, v.default)(r)) return null;
|
|
@@ -93,27 +98,27 @@ var M = function(e) {
|
|
|
93
98
|
return Object.keys(r).forEach(function(e) {
|
|
94
99
|
I(r?.[e], e, t, n) && (i[e] = r[e]);
|
|
95
100
|
}), i;
|
|
96
|
-
},
|
|
101
|
+
}, z = function e(t, n) {
|
|
97
102
|
if (t === n) return !0;
|
|
98
103
|
var r = f.count(t);
|
|
99
104
|
if (r !== f.count(n)) return !1;
|
|
100
105
|
if (r === 0) return !0;
|
|
101
|
-
if (r === 1) return
|
|
106
|
+
if (r === 1) return B(Array.isArray(t) ? t[0] : t, Array.isArray(n) ? n[0] : n);
|
|
102
107
|
for (var i = 0; i < r; i++) {
|
|
103
108
|
var a = t[i], o = n[i];
|
|
104
109
|
if (Array.isArray(a) || Array.isArray(o)) {
|
|
105
110
|
if (!e(a, o)) return !1;
|
|
106
|
-
} else if (!
|
|
111
|
+
} else if (!B(a, o)) return !1;
|
|
107
112
|
}
|
|
108
113
|
return !0;
|
|
109
|
-
},
|
|
114
|
+
}, B = function(e, t) {
|
|
110
115
|
if ((0, h.default)(e) && (0, h.default)(t)) return !0;
|
|
111
116
|
if (!(0, h.default)(e) && !(0, h.default)(t)) {
|
|
112
117
|
var n = e.props || {}, r = n.children, i = S(n, b), a = t.props || {}, o = a.children, s = S(a, x);
|
|
113
|
-
return r && o ? c(i, s) &&
|
|
118
|
+
return r && o ? c(i, s) && z(r, o) : !r && !o ? c(i, s) : !1;
|
|
114
119
|
}
|
|
115
120
|
return !1;
|
|
116
|
-
},
|
|
121
|
+
}, V = function(e, t) {
|
|
117
122
|
var n = [], r = {};
|
|
118
123
|
return k(e).forEach(function(e, i) {
|
|
119
124
|
if (P(e)) n.push(e);
|
|
@@ -125,13 +130,13 @@ var M = function(e) {
|
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
}), n;
|
|
128
|
-
},
|
|
133
|
+
}, H = function(e) {
|
|
129
134
|
var t = e && e.type;
|
|
130
135
|
return t && T[t] ? T[t] : null;
|
|
131
|
-
},
|
|
136
|
+
}, U = function(e, t) {
|
|
132
137
|
return k(t).indexOf(e);
|
|
133
138
|
};
|
|
134
139
|
//#endregion
|
|
135
|
-
export {
|
|
140
|
+
export { R as filterProps, L as filterSvgElements, A as findAllByType, j as findChildByType, E as getDisplayName, H as getReactEventByType, F as hasClipDot, z as isChildrenEqual, U as parseChildIndex, V as renderByOrder, M as validateWidthHeight };
|
|
136
141
|
|
|
137
142
|
//# sourceMappingURL=ReactUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactUtils.js","names":[],"sources":["../../../../../node_modules/recharts/es6/util/ReactUtils.js"],"sourcesContent":["var _excluded = [\"children\"],\n _excluded2 = [\"children\"];\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport get from 'lodash/get';\nimport isNil from 'lodash/isNil';\nimport isString from 'lodash/isString';\nimport isFunction from 'lodash/isFunction';\nimport isObject from 'lodash/isObject';\nimport { Children, isValidElement } from 'react';\nimport { isFragment } from 'react-is';\nimport { isNumber } from './DataUtils';\nimport { shallowEqual } from './ShallowEqual';\nimport { FilteredElementKeyMap, SVGElementPropKeys, EventKeys } from './types';\nvar REACT_BROWSER_EVENT_MAP = {\n click: 'onClick',\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n mouseout: 'onMouseOut',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n touchcancel: 'onTouchCancel',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchstart: 'onTouchStart',\n contextmenu: 'onContextMenu',\n dblclick: 'onDoubleClick'\n};\nexport var SCALE_TYPES = ['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold'];\nexport var LEGEND_TYPES = ['plainline', 'line', 'square', 'rect', 'circle', 'cross', 'diamond', 'star', 'triangle', 'wye', 'none'];\nexport var TOOLTIP_TYPES = ['none'];\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport var getDisplayName = function getDisplayName(Comp) {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name || 'Component';\n};\n\n// `toArray` gets called multiple times during the render\n// so we can memoize last invocation (since reference to `children` is the same)\nvar lastChildren = null;\nvar lastResult = null;\nexport var toArray = function toArray(children) {\n if (children === lastChildren && Array.isArray(lastResult)) {\n return lastResult;\n }\n var result = [];\n Children.forEach(children, function (child) {\n if (isNil(child)) return;\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n // @ts-expect-error this could still be Iterable<ReactNode> and TS does not like that\n result.push(child);\n }\n });\n lastResult = result;\n lastChildren = children;\n return result;\n};\n\n/*\n * Find and return all matched children by type.\n * `type` must be a React.ComponentType\n */\nexport function findAllByType(children, type) {\n var result = [];\n var types = [];\n if (Array.isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n toArray(children).forEach(function (child) {\n var childType = get(child, 'type.displayName') || get(child, 'type.name');\n if (types.indexOf(childType) !== -1) {\n result.push(child);\n }\n });\n return result;\n}\n\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` must be a React.ComponentType\n */\nexport function findChildByType(children, type) {\n var result = findAllByType(children, type);\n return result && result[0];\n}\n\n/*\n * Create a new array of children excluding the ones matched the type\n */\nexport var withoutType = function withoutType(children, type) {\n var newChildren = [];\n var types;\n if (Array.isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n toArray(children).forEach(function (child) {\n var displayName = get(child, 'type.displayName');\n if (displayName && types.indexOf(displayName) !== -1) {\n return;\n }\n newChildren.push(child);\n });\n return newChildren;\n};\n\n/**\n * validate the width and height props of a chart element\n * @param {Object} el A chart element\n * @return {Boolean} true If the props width and height are number, and greater than 0\n */\nexport var validateWidthHeight = function validateWidthHeight(el) {\n if (!el || !el.props) {\n return false;\n }\n var _el$props = el.props,\n width = _el$props.width,\n height = _el$props.height;\n if (!isNumber(width) || width <= 0 || !isNumber(height) || height <= 0) {\n return false;\n }\n return true;\n};\nvar SVG_TAGS = ['a', 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColormatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', 'font-face-format', 'font-face-name', 'font-face-url', 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', 'lineGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'script', 'set', 'stop', 'style', 'svg', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', 'tspan', 'use', 'view', 'vkern'];\nvar isSvgElement = function isSvgElement(child) {\n return child && child.type && isString(child.type) && SVG_TAGS.indexOf(child.type) >= 0;\n};\nexport var hasClipDot = function hasClipDot(dot) {\n return dot && _typeof(dot) === 'object' && 'clipDot' in dot;\n};\n\n/**\n * Checks if the property is valid to spread onto an SVG element or onto a specific component\n * @param {unknown} property property value currently being compared\n * @param {string} key property key currently being compared\n * @param {boolean} includeEvents if events are included in spreadable props\n * @param {boolean} svgElementType checks against map of SVG element types to attributes\n * @returns {boolean} is prop valid\n */\nexport var isValidSpreadableProp = function isValidSpreadableProp(property, key, includeEvents, svgElementType) {\n var _FilteredElementKeyMa;\n /**\n * If the svg element type is explicitly included, check against the filtered element key map\n * to determine if there are attributes that should only exist on that element type.\n * @todo Add an internal cjs version of https://github.com/wooorm/svg-element-attributes for full coverage.\n */\n var matchingElementTypeKeys = (_FilteredElementKeyMa = FilteredElementKeyMap === null || FilteredElementKeyMap === void 0 ? void 0 : FilteredElementKeyMap[svgElementType]) !== null && _FilteredElementKeyMa !== void 0 ? _FilteredElementKeyMa : [];\n return key.startsWith('data-') || !isFunction(property) && (svgElementType && matchingElementTypeKeys.includes(key) || SVGElementPropKeys.includes(key)) || includeEvents && EventKeys.includes(key);\n};\n\n/**\n * Filter all the svg elements of children\n * @param {Array} children The children of a react element\n * @return {Array} All the svg elements\n */\nexport var filterSvgElements = function filterSvgElements(children) {\n var svgElements = [];\n toArray(children).forEach(function (entry) {\n if (isSvgElement(entry)) {\n svgElements.push(entry);\n }\n });\n return svgElements;\n};\nexport var filterProps = function filterProps(props, includeEvents, svgElementType) {\n if (!props || typeof props === 'function' || typeof props === 'boolean') {\n return null;\n }\n var inputProps = props;\n if ( /*#__PURE__*/isValidElement(props)) {\n inputProps = props.props;\n }\n if (!isObject(inputProps)) {\n return null;\n }\n var out = {};\n\n /**\n * Props are blindly spread onto SVG elements. This loop filters out properties that we don't want to spread.\n * Items filtered out are as follows:\n * - functions in properties that are SVG attributes (functions are included when includeEvents is true)\n * - props that are SVG attributes but don't matched the passed svgElementType\n * - any prop that is not in SVGElementPropKeys (or in EventKeys if includeEvents is true)\n */\n Object.keys(inputProps).forEach(function (key) {\n var _inputProps;\n if (isValidSpreadableProp((_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps[key], key, includeEvents, svgElementType)) {\n out[key] = inputProps[key];\n }\n });\n return out;\n};\n\n/**\n * Wether props of children changed\n * @param {Object} nextChildren The latest children\n * @param {Object} prevChildren The prev children\n * @return {Boolean} equal or not\n */\nexport var isChildrenEqual = function isChildrenEqual(nextChildren, prevChildren) {\n if (nextChildren === prevChildren) {\n return true;\n }\n var count = Children.count(nextChildren);\n if (count !== Children.count(prevChildren)) {\n return false;\n }\n if (count === 0) {\n return true;\n }\n if (count === 1) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return isSingleChildEqual(Array.isArray(nextChildren) ? nextChildren[0] : nextChildren, Array.isArray(prevChildren) ? prevChildren[0] : prevChildren);\n }\n for (var i = 0; i < count; i++) {\n var nextChild = nextChildren[i];\n var prevChild = prevChildren[i];\n if (Array.isArray(nextChild) || Array.isArray(prevChild)) {\n if (!isChildrenEqual(nextChild, prevChild)) {\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n } else if (!isSingleChildEqual(nextChild, prevChild)) {\n return false;\n }\n }\n return true;\n};\nexport var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {\n if (isNil(nextChild) && isNil(prevChild)) {\n return true;\n }\n if (!isNil(nextChild) && !isNil(prevChild)) {\n var _ref = nextChild.props || {},\n nextChildren = _ref.children,\n nextProps = _objectWithoutProperties(_ref, _excluded);\n var _ref2 = prevChild.props || {},\n prevChildren = _ref2.children,\n prevProps = _objectWithoutProperties(_ref2, _excluded2);\n if (nextChildren && prevChildren) {\n return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);\n }\n if (!nextChildren && !prevChildren) {\n return shallowEqual(nextProps, prevProps);\n }\n return false;\n }\n return false;\n};\nexport var renderByOrder = function renderByOrder(children, renderMap) {\n var elements = [];\n var record = {};\n toArray(children).forEach(function (child, index) {\n if (isSvgElement(child)) {\n elements.push(child);\n } else if (child) {\n var displayName = getDisplayName(child.type);\n var _ref3 = renderMap[displayName] || {},\n handler = _ref3.handler,\n once = _ref3.once;\n if (handler && (!once || !record[displayName])) {\n var results = handler(child, displayName, index);\n elements.push(results);\n record[displayName] = true;\n }\n }\n });\n return elements;\n};\nexport var getReactEventByType = function getReactEventByType(e) {\n var type = e && e.type;\n if (type && REACT_BROWSER_EVENT_MAP[type]) {\n return REACT_BROWSER_EVENT_MAP[type];\n }\n return null;\n};\nexport var parseChildIndex = function parseChildIndex(child, children) {\n return toArray(children).indexOf(child);\n};"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;yJAAI,IAAY,CAAC,WAAW,EAC1B,IA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= [\"children\"],\n _excluded2 = [\"children\"];\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport get from 'lodash/get';\nimport isNil from 'lodash/isNil';\nimport isString from 'lodash/isString';\nimport isFunction from 'lodash/isFunction';\nimport isObject from 'lodash/isObject';\nimport { Children, isValidElement } from 'react';\nimport { isFragment } from 'react-is';\nimport { isNumber } from './DataUtils';\nimport { shallowEqual } from './ShallowEqual';\nimport { FilteredElementKeyMap, SVGElementPropKeys, EventKeys } from './types';\nvar REACT_BROWSER_EVENT_MAP = {\n click: 'onClick',\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n mouseout: 'onMouseOut',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n touchcancel: 'onTouchCancel',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchstart: 'onTouchStart',\n contextmenu: 'onContextMenu',\n dblclick: 'onDoubleClick'\n};\nexport var SCALE_TYPES = ['auto', 'linear', 'pow', 'sqrt', 'log', 'identity', 'time', 'band', 'point', 'ordinal', 'quantile', 'quantize', 'utc', 'sequential', 'threshold'];\nexport var LEGEND_TYPES = ['plainline', 'line', 'square', 'rect', 'circle', 'cross', 'diamond', 'star', 'triangle', 'wye', 'none'];\nexport var TOOLTIP_TYPES = ['none'];\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport var getDisplayName = function getDisplayName(Comp) {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name || 'Component';\n};\n\n// `toArray` gets called multiple times during the render\n// so we can memoize last invocation (since reference to `children` is the same)\nvar lastChildren = null;\nvar lastResult = null;\nexport var toArray = function toArray(children) {\n if (children === lastChildren && Array.isArray(lastResult)) {\n return lastResult;\n }\n var result = [];\n Children.forEach(children, function (child) {\n if (isNil(child)) return;\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n // @ts-expect-error this could still be Iterable<ReactNode> and TS does not like that\n result.push(child);\n }\n });\n lastResult = result;\n lastChildren = children;\n return result;\n};\n\n/*\n * Find and return all matched children by type.\n * `type` must be a React.ComponentType\n */\nexport function findAllByType(children, type) {\n var result = [];\n var types = [];\n if (Array.isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n toArray(children).forEach(function (child) {\n var childType = get(child, 'type.displayName') || get(child, 'type.name');\n if (types.indexOf(childType) !== -1) {\n result.push(child);\n }\n });\n return result;\n}\n\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` must be a React.ComponentType\n */\nexport function findChildByType(children, type) {\n var result = findAllByType(children, type);\n return result && result[0];\n}\n\n/*\n * Create a new array of children excluding the ones matched the type\n */\nexport var withoutType = function withoutType(children, type) {\n var newChildren = [];\n var types;\n if (Array.isArray(type)) {\n types = type.map(function (t) {\n return getDisplayName(t);\n });\n } else {\n types = [getDisplayName(type)];\n }\n toArray(children).forEach(function (child) {\n var displayName = get(child, 'type.displayName');\n if (displayName && types.indexOf(displayName) !== -1) {\n return;\n }\n newChildren.push(child);\n });\n return newChildren;\n};\n\n/**\n * validate the width and height props of a chart element\n * @param {Object} el A chart element\n * @return {Boolean} true If the props width and height are number, and greater than 0\n */\nexport var validateWidthHeight = function validateWidthHeight(el) {\n if (!el || !el.props) {\n return false;\n }\n var _el$props = el.props,\n width = _el$props.width,\n height = _el$props.height;\n if (!isNumber(width) || width <= 0 || !isNumber(height) || height <= 0) {\n return false;\n }\n return true;\n};\nvar SVG_TAGS = ['a', 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColormatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', 'font-face-format', 'font-face-name', 'font-face-url', 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', 'lineGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'script', 'set', 'stop', 'style', 'svg', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', 'tspan', 'use', 'view', 'vkern'];\nvar isSvgElement = function isSvgElement(child) {\n return child && child.type && isString(child.type) && SVG_TAGS.indexOf(child.type) >= 0;\n};\nexport var hasClipDot = function hasClipDot(dot) {\n return dot && _typeof(dot) === 'object' && 'clipDot' in dot;\n};\n\n/**\n * Checks if the property is valid to spread onto an SVG element or onto a specific component\n * @param {unknown} property property value currently being compared\n * @param {string} key property key currently being compared\n * @param {boolean} includeEvents if events are included in spreadable props\n * @param {boolean} svgElementType checks against map of SVG element types to attributes\n * @returns {boolean} is prop valid\n */\nexport var isValidSpreadableProp = function isValidSpreadableProp(property, key, includeEvents, svgElementType) {\n var _FilteredElementKeyMa;\n /**\n * If the svg element type is explicitly included, check against the filtered element key map\n * to determine if there are attributes that should only exist on that element type.\n * @todo Add an internal cjs version of https://github.com/wooorm/svg-element-attributes for full coverage.\n */\n var matchingElementTypeKeys = (_FilteredElementKeyMa = FilteredElementKeyMap === null || FilteredElementKeyMap === void 0 ? void 0 : FilteredElementKeyMap[svgElementType]) !== null && _FilteredElementKeyMa !== void 0 ? _FilteredElementKeyMa : [];\n return key.startsWith('data-') || !isFunction(property) && (svgElementType && matchingElementTypeKeys.includes(key) || SVGElementPropKeys.includes(key)) || includeEvents && EventKeys.includes(key);\n};\n\n/**\n * Filter all the svg elements of children\n * @param {Array} children The children of a react element\n * @return {Array} All the svg elements\n */\nexport var filterSvgElements = function filterSvgElements(children) {\n var svgElements = [];\n toArray(children).forEach(function (entry) {\n if (isSvgElement(entry)) {\n svgElements.push(entry);\n }\n });\n return svgElements;\n};\nexport var filterProps = function filterProps(props, includeEvents, svgElementType) {\n if (!props || typeof props === 'function' || typeof props === 'boolean') {\n return null;\n }\n var inputProps = props;\n if ( /*#__PURE__*/isValidElement(props)) {\n inputProps = props.props;\n }\n if (!isObject(inputProps)) {\n return null;\n }\n var out = {};\n\n /**\n * Props are blindly spread onto SVG elements. This loop filters out properties that we don't want to spread.\n * Items filtered out are as follows:\n * - functions in properties that are SVG attributes (functions are included when includeEvents is true)\n * - props that are SVG attributes but don't matched the passed svgElementType\n * - any prop that is not in SVGElementPropKeys (or in EventKeys if includeEvents is true)\n */\n Object.keys(inputProps).forEach(function (key) {\n var _inputProps;\n if (isValidSpreadableProp((_inputProps = inputProps) === null || _inputProps === void 0 ? void 0 : _inputProps[key], key, includeEvents, svgElementType)) {\n out[key] = inputProps[key];\n }\n });\n return out;\n};\n\n/**\n * Wether props of children changed\n * @param {Object} nextChildren The latest children\n * @param {Object} prevChildren The prev children\n * @return {Boolean} equal or not\n */\nexport var isChildrenEqual = function isChildrenEqual(nextChildren, prevChildren) {\n if (nextChildren === prevChildren) {\n return true;\n }\n var count = Children.count(nextChildren);\n if (count !== Children.count(prevChildren)) {\n return false;\n }\n if (count === 0) {\n return true;\n }\n if (count === 1) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return isSingleChildEqual(Array.isArray(nextChildren) ? nextChildren[0] : nextChildren, Array.isArray(prevChildren) ? prevChildren[0] : prevChildren);\n }\n for (var i = 0; i < count; i++) {\n var nextChild = nextChildren[i];\n var prevChild = prevChildren[i];\n if (Array.isArray(nextChild) || Array.isArray(prevChild)) {\n if (!isChildrenEqual(nextChild, prevChild)) {\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n } else if (!isSingleChildEqual(nextChild, prevChild)) {\n return false;\n }\n }\n return true;\n};\nexport var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {\n if (isNil(nextChild) && isNil(prevChild)) {\n return true;\n }\n if (!isNil(nextChild) && !isNil(prevChild)) {\n var _ref = nextChild.props || {},\n nextChildren = _ref.children,\n nextProps = _objectWithoutProperties(_ref, _excluded);\n var _ref2 = prevChild.props || {},\n prevChildren = _ref2.children,\n prevProps = _objectWithoutProperties(_ref2, _excluded2);\n if (nextChildren && prevChildren) {\n return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);\n }\n if (!nextChildren && !prevChildren) {\n return shallowEqual(nextProps, prevProps);\n }\n return false;\n }\n return false;\n};\nexport var renderByOrder = function renderByOrder(children, renderMap) {\n var elements = [];\n var record = {};\n toArray(children).forEach(function (child, index) {\n if (isSvgElement(child)) {\n elements.push(child);\n } else if (child) {\n var displayName = getDisplayName(child.type);\n var _ref3 = renderMap[displayName] || {},\n handler = _ref3.handler,\n once = _ref3.once;\n if (handler && (!once || !record[displayName])) {\n var results = handler(child, displayName, index);\n elements.push(results);\n record[displayName] = true;\n }\n }\n });\n return elements;\n};\nexport var getReactEventByType = function getReactEventByType(e) {\n var type = e && e.type;\n if (type && REACT_BROWSER_EVENT_MAP[type]) {\n return REACT_BROWSER_EVENT_MAP[type];\n }\n return null;\n};\nexport var parseChildIndex = function parseChildIndex(child, children) {\n return toArray(children).indexOf(child);\n};"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;yJAAI,IAAY,CAAC,WAAW,EAC1B,IAAa,CAAC,WAAW;AAC3B,SAAS,EAAyB,GAAQ,GAAU;AAAE,KAAI,KAAU,KAAM,QAAO,EAAE;CAAE,IAAI,IAAS,EAA8B,GAAQ,EAAS,EAAM,GAAK;AAAG,KAAI,OAAO,uBAAuB;EAAE,IAAI,IAAmB,OAAO,sBAAsB,EAAO;AAAE,OAAK,IAAI,GAAG,IAAI,EAAiB,QAAQ,IAAO,KAAM,EAAiB,IAAQ,IAAS,QAAQ,EAAI,IAAI,MAAkB,OAAO,UAAU,qBAAqB,KAAK,GAAQ,EAAI,KAAY,EAAO,KAAO,EAAO;;AAAU,QAAO;;AACne,SAAS,EAA8B,GAAQ,GAAU;AAAE,KAAI,KAAU,KAAM,QAAO,EAAE;CAAE,IAAI,IAAS,EAAE;AAAE,MAAK,IAAI,KAAO,EAAU,KAAI,OAAO,UAAU,eAAe,KAAK,GAAQ,EAAI,EAAE;AAAE,MAAI,EAAS,QAAQ,EAAI,IAAI,EAAG;AAAU,IAAO,KAAO,EAAO;;AAAU,QAAO;;AAC9Q,SAAS,EAAQ,GAAG;AAAE;AAA2B,QAAO,IAAwB,OAAO,UAArB,cAA2C,OAAO,OAAO,YAA1B,WAAqC,SAAU,GAAG;AAAE,SAAO,OAAO;KAAO,SAAU,GAAG;AAAE,SAAO,KAAmB,OAAO,UAArB,cAA+B,EAAE,gBAAgB,UAAU,MAAM,OAAO,YAAY,WAAW,OAAO;IAAM,EAAQ,EAAE;;AAW3T,IAAI,IAA0B;CAC5B,OAAO;CACP,WAAW;CACX,SAAS;CACT,WAAW;CACX,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AAY,CAAC,KAAQ,CAAC,EAAO,KAAe;IAC9C,IAAI,IAAU,EAAQ,GAAO,GAAa,EAAM;AAEhD,IADA,EAAS,KAAK,EAAQ,EACtB,EAAO,KAAe;;;GAG1B,EACK;GAEE,IAAsB,SAA6B,GAAG;CAC/D,IAAI,IAAO,KAAK,EAAE;AAIlB,QAHI,KAAQ,EAAwB,KAC3B,EAAwB,KAE1B;GAEE,IAAkB,SAAyB,GAAO,GAAU;AACrE,QAAO,EAAQ,EAAS,CAAC,QAAQ,EAAM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { LEAVES_PAGE_CONTEXT as t, throwOnError as n } from "../utils/mutationResult.js";
|
|
3
3
|
import { ConfirmButton as r, ErrorLine as i } from "./ConfirmButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { isForbidden as a, mutationErrorMessage as o } from "../utils/graphqlErrors.js";
|
|
5
|
+
import { WorkItemSearchSelect as s } from "./Pickers.js";
|
|
6
6
|
import { splitExecutionErrors as c } from "../automation/automationRuleTypes.js";
|
|
7
7
|
import { useState as l } from "react";
|
|
8
8
|
import { Play as u, Trash2 as d } from "lucide-react";
|
|
@@ -33,7 +33,7 @@ var E = ["AutomationRulesList", "GetAutomationRule"], D = f`
|
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
35
|
function A({ ruleId: e, status: t }) {
|
|
36
|
-
let [r, { loading:
|
|
36
|
+
let [r, { loading: s }] = p(D, { refetchQueries: E }), [c, u] = l(null), d = t === "ACTIVE", f = async (t) => {
|
|
37
37
|
u(null);
|
|
38
38
|
try {
|
|
39
39
|
await n(r({ variables: {
|
|
@@ -41,7 +41,7 @@ function A({ ruleId: e, status: t }) {
|
|
|
41
41
|
status: t ? "ACTIVE" : "PAUSED"
|
|
42
42
|
} }));
|
|
43
43
|
} catch (e) {
|
|
44
|
-
u(
|
|
44
|
+
u(a(e) ? "Your role can view automation rules but not change them." : o(e, "The rule could not be changed."));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
return /* @__PURE__ */ h("div", {
|
|
@@ -55,22 +55,22 @@ function A({ ruleId: e, status: t }) {
|
|
|
55
55
|
"aria-label": d ? "Active — turn off to pause" : "Paused — turn on to activate",
|
|
56
56
|
"data-testid": "automation-rule-toggle",
|
|
57
57
|
checked: d,
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: s,
|
|
59
59
|
onCheckedChange: (e) => void f(e)
|
|
60
60
|
})]
|
|
61
61
|
}), c && /* @__PURE__ */ m(i, { message: c })]
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
function j({ ruleId:
|
|
64
|
+
function j({ ruleId: s, name: c }) {
|
|
65
65
|
let u = e(), [f, { loading: g }] = p(O, {
|
|
66
66
|
refetchQueries: E.filter((e) => e !== "GetAutomationRule"),
|
|
67
67
|
context: t
|
|
68
68
|
}), [_, v] = l(null), y = async () => {
|
|
69
69
|
v(null);
|
|
70
70
|
try {
|
|
71
|
-
await n(f({ variables: { id:
|
|
71
|
+
await n(f({ variables: { id: s } })), u("/automation/automation-rules-page");
|
|
72
72
|
} catch (e) {
|
|
73
|
-
v(
|
|
73
|
+
v(a(e) ? "Your role can view automation rules but not delete them." : o(e, "The rule could not be deleted."));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
return /* @__PURE__ */ h("div", {
|
|
@@ -107,7 +107,7 @@ function N({ ruleId: e, projectId: t }) {
|
|
|
107
107
|
triggerData: { workItemId: f }
|
|
108
108
|
} }))).data?.planmagnetExecuteAutomationRule ?? null);
|
|
109
109
|
} catch (e) {
|
|
110
|
-
O(
|
|
110
|
+
O(a(e) ? "Your role can view automation rules but not run them." : o(e, "The rule could not be run."));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
};
|
|
@@ -137,7 +137,7 @@ function N({ ruleId: e, projectId: t }) {
|
|
|
137
137
|
children: "Work item"
|
|
138
138
|
}), /* @__PURE__ */ m("div", {
|
|
139
139
|
className: "mt-1",
|
|
140
|
-
children: /* @__PURE__ */ m(
|
|
140
|
+
children: /* @__PURE__ */ m(s, {
|
|
141
141
|
id: "automation-run-work-item",
|
|
142
142
|
projectId: t,
|
|
143
143
|
value: f,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { LEAVES_PAGE_CONTEXT as t, throwOnError as n } from "../utils/mutationResult.js";
|
|
3
3
|
import { ConfirmButton as r, ErrorLine as i } from "./ConfirmButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { detailPath as a } from "../utils/rowNavigation.js";
|
|
5
|
+
import { CompetitorSearchSelect as o } from "./Pickers.js";
|
|
6
6
|
import { useState as s } from "react";
|
|
7
7
|
import { Pencil as c, Plus as l, Trash2 as u, X as d } from "lucide-react";
|
|
8
8
|
import { gql as f } from "@apollo/client";
|
|
@@ -19,14 +19,14 @@ var _ = [
|
|
|
19
19
|
planmagnetDeleteCompetitor(id: $id)
|
|
20
20
|
}
|
|
21
21
|
`;
|
|
22
|
-
function y({ competitorId:
|
|
22
|
+
function y({ competitorId: o, name: l }) {
|
|
23
23
|
let d = e(), [f, y] = p(v, {
|
|
24
24
|
refetchQueries: _.filter((e) => e !== "GetCompetitor"),
|
|
25
25
|
context: t
|
|
26
26
|
}), [b, x] = s(null), S = async () => {
|
|
27
27
|
x(null);
|
|
28
28
|
try {
|
|
29
|
-
await n(f({ variables: { id:
|
|
29
|
+
await n(f({ variables: { id: o } })), d("/products/competitors-page");
|
|
30
30
|
} catch (e) {
|
|
31
31
|
x(e instanceof Error ? e.message : "The competitor could not be deleted.");
|
|
32
32
|
}
|
|
@@ -39,7 +39,7 @@ function y({ competitorId: a, name: l }) {
|
|
|
39
39
|
size: "sm",
|
|
40
40
|
variant: "outline",
|
|
41
41
|
"data-testid": "competitor-edit",
|
|
42
|
-
onClick: () => d(
|
|
42
|
+
onClick: () => d(a("/products/edit-competitor-page", o)),
|
|
43
43
|
children: [/* @__PURE__ */ m(c, { className: "mr-1 h-4 w-4" }), "Edit"]
|
|
44
44
|
}), /* @__PURE__ */ m(r, {
|
|
45
45
|
label: "Delete",
|
|
@@ -116,7 +116,7 @@ function S({ featureRequestId: t, competitors: r }) {
|
|
|
116
116
|
children: [/* @__PURE__ */ h("button", {
|
|
117
117
|
type: "button",
|
|
118
118
|
className: "flex-1 text-left",
|
|
119
|
-
onClick: () => c(
|
|
119
|
+
onClick: () => c(a("/products/competitor-detail-page", e.id)),
|
|
120
120
|
children: [/* @__PURE__ */ h("div", {
|
|
121
121
|
className: "flex items-center gap-2",
|
|
122
122
|
children: [/* @__PURE__ */ m("span", {
|
|
@@ -143,7 +143,7 @@ function S({ featureRequestId: t, competitors: r }) {
|
|
|
143
143
|
className: "flex items-start gap-2 pt-2 border-t",
|
|
144
144
|
children: [/* @__PURE__ */ m("div", {
|
|
145
145
|
className: "flex-1",
|
|
146
|
-
children: /* @__PURE__ */ m(
|
|
146
|
+
children: /* @__PURE__ */ m(o, {
|
|
147
147
|
id: "feature-add-competitor",
|
|
148
148
|
value: u,
|
|
149
149
|
onChange: f,
|