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.js CHANGED
@@ -7908,6 +7908,13 @@ var ResourceTypeIcon = ({ type }) => {
7908
7908
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M12 16h.01" })
7909
7909
  ] });
7910
7910
  };
7911
+ function isInactiveResourceStatus(status) {
7912
+ return status?.trim().toLocaleLowerCase() === "inactive";
7913
+ }
7914
+ var ResourceStatusLockIcon = () => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { className: "gantt-resourceTimeline-resourceStatusIcon", width: "12", height: "12", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
7915
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { x: "5", y: "11", width: "14", height: "10", rx: "2" }),
7916
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8 11V8a4 4 0 1 1 8 0v3" })
7917
+ ] });
7911
7918
  var ResourceHeader = ({
7912
7919
  resource,
7913
7920
  resourceId,
@@ -7937,6 +7944,7 @@ var ResourceHeader = ({
7937
7944
  const type = resource.type ?? "\u0414\u0440\u0443\u0433\u043E\u0435";
7938
7945
  const scope = resource.scope ?? "Project";
7939
7946
  const scopeLabel = RESOURCE_SCOPE_LABELS[scope] ?? scope;
7947
+ const isInactive = isInactiveResourceStatus(resource.status);
7940
7948
  const applyResourcePatch = (0, import_react14.useCallback)((patch) => {
7941
7949
  onResourceChange?.({ ...resource, ...patch });
7942
7950
  }, [onResourceChange, resource]);
@@ -7997,7 +8005,7 @@ var ResourceHeader = ({
7997
8005
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
7998
8006
  "div",
7999
8007
  {
8000
- className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}`,
8008
+ className: `gantt-resourceTimeline-resourceHeader${menuOpen ? " gantt-resourceTimeline-resourceHeaderMenuOpen" : ""}${isInactive ? " gantt-resourceTimeline-resourceHeaderInactive" : ""}`,
8001
8009
  "data-resource-row-id": resourceId,
8002
8010
  style: {
8003
8011
  height: `${height}px`,
@@ -8064,7 +8072,18 @@ var ResourceHeader = ({
8064
8072
  onResourceNameClick?.(resourceId);
8065
8073
  },
8066
8074
  onDoubleClick: handleNameDoubleClick,
8067
- children: resource.name
8075
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "gantt-resourceTimeline-resourceNameContent", children: [
8076
+ isInactive && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
8077
+ "span",
8078
+ {
8079
+ className: "gantt-resourceTimeline-resourceStatusMarker",
8080
+ "aria-label": `\u0420\u0435\u0441\u0443\u0440\u0441 ${resource.name} \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D`,
8081
+ title: "\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D",
8082
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ResourceStatusLockIcon, {})
8083
+ }
8084
+ ),
8085
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "gantt-resourceTimeline-resourceNameText", children: resource.name })
8086
+ ] })
8068
8087
  }
8069
8088
  )
8070
8089
  ] }),