@seliseblocks/genesis-os 4.3.0 → 4.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @seliseblocks/genesis-os
2
2
 
3
+ ## 4.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Hide the open-project icon on a shared project card when the owner has granted the viewer no
8
+ menu. The project-overview route admits nobody without a grant and redirects back to the
9
+ console, so the icon looked like a page that refused to load. `IProjectGroup` now carries the
10
+ `accessPolicies` the API already returned, and `ProjectCard` takes a `canOpen` prop (default
11
+ `true`). A response without `accessPolicies` at all is read as unknown, not as denied, so an
12
+ older API keeps the previous behaviour.
13
+
3
14
  ## 4.2.0
4
15
 
5
16
  ### Minor Changes
@@ -9197,7 +9197,8 @@ var INLINE_LIMIT = 3;
9197
9197
  var ProjectCard = ({
9198
9198
  project,
9199
9199
  projects,
9200
- isShared
9200
+ isShared,
9201
+ canOpen = true
9201
9202
  }) => {
9202
9203
  const navigate = reactRouter.useNavigate();
9203
9204
  const { setTenantGroup, setSelectedProject } = chunkVAKGHXK6_cjs.useProjectStore();
@@ -9257,7 +9258,7 @@ var ProjectCard = ({
9257
9258
  ]
9258
9259
  }
9259
9260
  ),
9260
- /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
9261
+ canOpen && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
9261
9262
  /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
9262
9263
  Button,
9263
9264
  {
@@ -9352,6 +9353,7 @@ var cardVariants = {
9352
9353
  }
9353
9354
  })
9354
9355
  };
9356
+ var canOpenProject = (group) => !group.isShared || !group.accessPolicies || group.accessPolicies.length > 0;
9355
9357
  var SelfProjectLoading = () => {
9356
9358
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: ["sk-1", "sk-2", "sk-3", "sk-4", "sk-5", "sk-6", "sk-7", "sk-8"].map(
9357
9359
  (itemKey) => /* @__PURE__ */ jsxRuntime.jsx(ProjectCardLoadingSkeleton, {}, itemKey)
@@ -9394,7 +9396,8 @@ var SelfProject = ({ canCreateProject = false }) => {
9394
9396
  {
9395
9397
  project: project.projects[0],
9396
9398
  projects: project.projects,
9397
- isShared: project.isShared
9399
+ isShared: project.isShared,
9400
+ canOpen: canOpenProject(project)
9398
9401
  }
9399
9402
  )
9400
9403
  },
@@ -12737,5 +12740,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
12737
12740
  exports.useRightSidePanel = useRightSidePanel;
12738
12741
  exports.useSortQueryParams = useSortQueryParams;
12739
12742
  exports.useWizardStepper = useWizardStepper;
12740
- //# sourceMappingURL=chunk-GGIIYGN4.cjs.map
12741
- //# sourceMappingURL=chunk-GGIIYGN4.cjs.map
12743
+ //# sourceMappingURL=chunk-V4GJPS3E.cjs.map
12744
+ //# sourceMappingURL=chunk-V4GJPS3E.cjs.map