gantt-lib 0.84.0 → 0.85.0
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/index.css.map +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +39 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7794,6 +7794,13 @@ var ResourceTypeIcon = ({ type }) => {
|
|
|
7794
7794
|
/* @__PURE__ */ jsx15("path", { d: "M12 16h.01" })
|
|
7795
7795
|
] });
|
|
7796
7796
|
};
|
|
7797
|
+
function isInactiveResourceStatus(status) {
|
|
7798
|
+
return status?.trim().toLocaleLowerCase() === "inactive";
|
|
7799
|
+
}
|
|
7800
|
+
var ResourceStatusLockIcon = () => /* @__PURE__ */ jsxs12("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
|
|
7801
|
+
/* @__PURE__ */ jsx15("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
|
|
7802
|
+
/* @__PURE__ */ jsx15("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
|
|
7803
|
+
] });
|
|
7797
7804
|
var ResourceHeader = ({
|
|
7798
7805
|
resource,
|
|
7799
7806
|
resourceId,
|
|
@@ -7823,6 +7830,7 @@ var ResourceHeader = ({
|
|
|
7823
7830
|
const type = resource.type ?? "\u0414\u0440\u0443\u0433\u043E\u0435";
|
|
7824
7831
|
const scope = resource.scope ?? "Project";
|
|
7825
7832
|
const scopeLabel = RESOURCE_SCOPE_LABELS[scope] ?? scope;
|
|
7833
|
+
const isInactive = isInactiveResourceStatus(resource.status);
|
|
7826
7834
|
const applyResourcePatch = useCallback7((patch) => {
|
|
7827
7835
|
onResourceChange?.({ ...resource, ...patch });
|
|
7828
7836
|
}, [onResourceChange, resource]);
|
|
@@ -7883,7 +7891,7 @@ var ResourceHeader = ({
|
|
|
7883
7891
|
return /* @__PURE__ */ jsxs12(
|
|
7884
7892
|
"div",
|
|
7885
7893
|
{
|
|
7886
|
-
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}`,
|
|
7894
|
+
className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
|
|
7887
7895
|
"data-resource-row-id": resourceId,
|
|
7888
7896
|
style: {
|
|
7889
7897
|
height: `${height}px`,
|
|
@@ -7950,7 +7958,18 @@ var ResourceHeader = ({
|
|
|
7950
7958
|
onResourceNameClick?.(resourceId);
|
|
7951
7959
|
},
|
|
7952
7960
|
onDoubleClick: handleNameDoubleClick,
|
|
7953
|
-
children:
|
|
7961
|
+
children: /* @__PURE__ */ jsxs12("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
|
|
7962
|
+
isInactive && /* @__PURE__ */ jsx15(
|
|
7963
|
+
"span",
|
|
7964
|
+
{
|
|
7965
|
+
className: "gantt-resourceTimeline-resourceStatusMarker",
|
|
7966
|
+
"aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
|
|
7967
|
+
title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
|
|
7968
|
+
children: /* @__PURE__ */ jsx15(ResourceStatusLockIcon, {})
|
|
7969
|
+
}
|
|
7970
|
+
),
|
|
7971
|
+
/* @__PURE__ */ jsx15("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
|
|
7972
|
+
] })
|
|
7954
7973
|
}
|
|
7955
7974
|
)
|
|
7956
7975
|
] }),
|