@seliseblocks/genesis-os 4.2.4 → 4.2.6

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
4
- var chunkFJ4KYZYG_cjs = require('./chunk-FJ4KYZYG.cjs');
4
+ var chunkQKZZDZ4S_cjs = require('./chunk-QKZZDZ4S.cjs');
5
5
  var chunkZ6N3Y5AQ_cjs = require('./chunk-Z6N3Y5AQ.cjs');
6
6
  var chunkROV7S3SC_cjs = require('./chunk-ROV7S3SC.cjs');
7
7
  var chunkQ7Y32IBM_cjs = require('./chunk-Q7Y32IBM.cjs');
@@ -1466,7 +1466,7 @@ function RightSidePanelProvider({
1466
1466
  onOpenChange,
1467
1467
  syncHash = true,
1468
1468
  hashKey = DEFAULT_HASH_KEY,
1469
- shortcut = "mod+j",
1469
+ shortcut = "mod+.",
1470
1470
  width = DEFAULT_SIZING_VALUES.width,
1471
1471
  minWidth = DEFAULT_SIZING_VALUES.minWidth,
1472
1472
  maxWidth = DEFAULT_SIZING_VALUES.maxWidth,
@@ -1523,7 +1523,7 @@ function RightSidePanelProvider({
1523
1523
  const close = React8__namespace.useCallback(() => {
1524
1524
  setOpen(false);
1525
1525
  }, [setOpen]);
1526
- chunkFJ4KYZYG_cjs.useKeyboardShortcut(shortcut, toggle);
1526
+ chunkQKZZDZ4S_cjs.useKeyboardShortcut(shortcut, toggle);
1527
1527
  React8__namespace.useEffect(() => {
1528
1528
  if (!syncHash || isControlled || typeof window === "undefined") return;
1529
1529
  const handleHashChange = () => {
@@ -3499,7 +3499,7 @@ function MultiSelect({
3499
3499
  onChange,
3500
3500
  value: selectedValues
3501
3501
  }) {
3502
- const [buttonRef, popoverWidth] = chunkFJ4KYZYG_cjs.usePopoverWidth();
3502
+ const [buttonRef, popoverWidth] = chunkQKZZDZ4S_cjs.usePopoverWidth();
3503
3503
  const onSelectHandler = (value) => {
3504
3504
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
3505
3505
  onChange(nextValues);
@@ -6688,7 +6688,7 @@ function useAppRedirectUrls({
6688
6688
  const controller = new AbortController();
6689
6689
  const { signal } = controller;
6690
6690
  stableApps.forEach((app) => {
6691
- chunkFJ4KYZYG_cjs.initiateService.fetchRedirectUrl({
6691
+ chunkQKZZDZ4S_cjs.initiateService.fetchRedirectUrl({
6692
6692
  clientId: chunkHF24SZFI_cjs.getRuntimeEnv(app.clientId),
6693
6693
  redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv(app.redirectUri),
6694
6694
  forwardedTo: resolveRef.current(app)
@@ -6714,7 +6714,7 @@ function useAppRedirectUrls({
6714
6714
  }
6715
6715
  var AppSwitcher = ({ forwardedTo }) => {
6716
6716
  const [open, setOpen] = React8.useState(false);
6717
- const config = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6717
+ const config = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6718
6718
  const filteredApps = React8.useMemo(
6719
6719
  () => filteredAppSwitcherData.filter((app) => app.id !== config.name),
6720
6720
  [config.name]
@@ -6747,7 +6747,7 @@ var OPTIONS = [
6747
6747
  { value: "dark", Icon: lucideReact.Moon, label: "Dark" }
6748
6748
  ];
6749
6749
  function ThemeSwitcher() {
6750
- const { theme, setTheme } = chunkFJ4KYZYG_cjs.useTheme();
6750
+ const { theme, setTheme } = chunkQKZZDZ4S_cjs.useTheme();
6751
6751
  return /* @__PURE__ */ jsxRuntime.jsx(
6752
6752
  Tabs,
6753
6753
  {
@@ -6814,14 +6814,14 @@ function UserAvatar({ size = "sm" }) {
6814
6814
  );
6815
6815
  }
6816
6816
  function UserDropdownMenu() {
6817
- const { name } = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.config);
6817
+ const { name } = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.config);
6818
6818
  const { data: data2 } = useGetUserInfo();
6819
6819
  const userData = data2?.data;
6820
- const { isPending, mutateAsync } = chunkFJ4KYZYG_cjs.useLogout();
6820
+ const { isPending, mutateAsync } = chunkQKZZDZ4S_cjs.useLogout();
6821
6821
  const { resetProjectStore } = chunkVAKGHXK6_cjs.useProjectStore();
6822
6822
  const { setUnAuthenticated, clearTokens } = chunkVAKGHXK6_cjs.useAuthStore();
6823
6823
  const { resetSelectedLanguages } = chunk3VNGGYRG_cjs.useLanguageViewStore();
6824
- const { data: myOrgsData, isLoading: isOrgsLoading } = chunkFJ4KYZYG_cjs.useGetMyOrganizations();
6824
+ const { data: myOrgsData, isLoading: isOrgsLoading } = chunkQKZZDZ4S_cjs.useGetMyOrganizations();
6825
6825
  const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
6826
6826
  const email = userData?.email || "";
6827
6827
  const roles = Object.values(userData?.roles || {}).flat();
@@ -6951,7 +6951,7 @@ var languages = [
6951
6951
  { key: "fr", title: "French" }
6952
6952
  ];
6953
6953
  function LanguageSelector() {
6954
- const { changeLanguage, language } = chunkFJ4KYZYG_cjs.useLanguageSwitcher();
6954
+ const { changeLanguage, language } = chunkQKZZDZ4S_cjs.useLanguageSwitcher();
6955
6955
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
6956
6956
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
6957
6957
  "button",
@@ -7041,7 +7041,7 @@ var notificationListenerService = new NotificationListenerService();
7041
7041
 
7042
7042
  // src/components/common/notification/use-notification-socket.ts
7043
7043
  function useNotificationSocket() {
7044
- const { data: configData } = chunkFJ4KYZYG_cjs.useGetBlocksNotificationConfig(0, 100);
7044
+ const { data: configData } = chunkQKZZDZ4S_cjs.useGetBlocksNotificationConfig(0, 100);
7045
7045
  const queryClient = reactQuery.useQueryClient();
7046
7046
  notificationListenerService.connect();
7047
7047
  React8.useEffect(() => {
@@ -7056,7 +7056,7 @@ function useNotificationSocket() {
7056
7056
  notificationListenerService.connection.on(
7057
7057
  config.notifyMethod,
7058
7058
  (message) => {
7059
- chunkFJ4KYZYG_cjs.notificationService.getNotificationConfig(config, message);
7059
+ chunkQKZZDZ4S_cjs.notificationService.getNotificationConfig(config, message);
7060
7060
  try {
7061
7061
  const notice = typeof message === "string" ? JSON.parse(message) : message;
7062
7062
  const denom = JSON.parse(
@@ -7080,12 +7080,12 @@ function useNotificationFeed(open) {
7080
7080
  const [notifications, setNotifications] = React8.useState([]);
7081
7081
  const [hasMore, setHasMore] = React8.useState(true);
7082
7082
  const listRef = React8.useRef(null);
7083
- const { data: data2, isLoading, isFetching } = chunkFJ4KYZYG_cjs.useGetNotifications(
7083
+ const { data: data2, isLoading, isFetching } = chunkQKZZDZ4S_cjs.useGetNotifications(
7084
7084
  pageNumber,
7085
7085
  PAGE_SIZE
7086
7086
  );
7087
- const markAsRead = chunkFJ4KYZYG_cjs.useMarkAsRead();
7088
- const markAllAsRead = chunkFJ4KYZYG_cjs.useMarkAllAsRead();
7087
+ const markAsRead = chunkQKZZDZ4S_cjs.useMarkAsRead();
7088
+ const markAllAsRead = chunkQKZZDZ4S_cjs.useMarkAllAsRead();
7089
7089
  React8.useEffect(() => {
7090
7090
  if (!data2?.notifications) return;
7091
7091
  setNotifications((prev) => {
@@ -7319,7 +7319,7 @@ function ConsoleHeader() {
7319
7319
  window.addEventListener("scroll", handleScroll);
7320
7320
  return () => window.removeEventListener("scroll", handleScroll);
7321
7321
  }, []);
7322
- const { appLightLogo, appDarkLogo } = chunkFJ4KYZYG_cjs.useLogo();
7322
+ const { appLightLogo, appDarkLogo } = chunkQKZZDZ4S_cjs.useLogo();
7323
7323
  return /* @__PURE__ */ jsxRuntime.jsx(
7324
7324
  "div",
7325
7325
  {
@@ -7786,7 +7786,7 @@ var LoginHeader = ({
7786
7786
  }) => {
7787
7787
  const {
7788
7788
  config: { appLogoUrl }
7789
- } = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state);
7789
+ } = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state);
7790
7790
  const resolveLogo = (variant) => {
7791
7791
  if (!appLogoUrl) return void 0;
7792
7792
  if (typeof appLogoUrl === "string") return appLogoUrl;
@@ -8990,8 +8990,8 @@ var BlocksLoginPage = ({
8990
8990
  ] });
8991
8991
  };
8992
8992
  var LoginPage = () => {
8993
- const config = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.getConfig());
8994
- const { start, isLoading } = chunkFJ4KYZYG_cjs.useLogin();
8993
+ const config = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.getConfig());
8994
+ const { start, isLoading } = chunkQKZZDZ4S_cjs.useLogin();
8995
8995
  return /* @__PURE__ */ jsxRuntime.jsx(
8996
8996
  BlocksLoginPage,
8997
8997
  {
@@ -9073,10 +9073,10 @@ var DefaultDoc = () => {
9073
9073
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-5 md:grid-cols-2 lg:grid-cols-3", children: data.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DocCard, { ...item }, item.url)) });
9074
9074
  };
9075
9075
  function useCreateProjectRedirect() {
9076
- const { name } = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.config);
9076
+ const { name } = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.config);
9077
9077
  const navigate = reactRouter.useNavigate();
9078
9078
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9079
- const { isFetching, isReady, redirect } = chunkFJ4KYZYG_cjs.usePrefetchRedirect({
9079
+ const { isFetching, isReady, redirect } = chunkQKZZDZ4S_cjs.usePrefetchRedirect({
9080
9080
  clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
9081
9081
  redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9082
9082
  forwardedTo: "/app/create-project",
@@ -9168,10 +9168,10 @@ function useProjectOverviewRedirect({
9168
9168
  tenantGroupId
9169
9169
  }) {
9170
9170
  const navigate = reactRouter.useNavigate();
9171
- const { name } = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.config);
9171
+ const { name } = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.config);
9172
9172
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9173
9173
  const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
9174
- const { isFetching, isReady, redirect } = chunkFJ4KYZYG_cjs.usePrefetchRedirect({
9174
+ const { isFetching, isReady, redirect } = chunkQKZZDZ4S_cjs.usePrefetchRedirect({
9175
9175
  clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
9176
9176
  redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9177
9177
  forwardedTo: redirectedRoute,
@@ -9192,10 +9192,13 @@ function useProjectOverviewRedirect({
9192
9192
  };
9193
9193
  }
9194
9194
  var INLINE_LIMIT = 3;
9195
- var ProjectCard = ({ project, projects }) => {
9195
+ var ProjectCard = ({
9196
+ project,
9197
+ projects,
9198
+ isShared
9199
+ }) => {
9196
9200
  const navigate = reactRouter.useNavigate();
9197
9201
  const { setTenantGroup, setSelectedProject } = chunkVAKGHXK6_cjs.useProjectStore();
9198
- const { user } = chunkVAKGHXK6_cjs.useAuthStore();
9199
9202
  const { handleClick, isDisabled, isFetching } = useProjectOverviewRedirect({
9200
9203
  tenantGroupId: project.tenantGroupId
9201
9204
  });
@@ -9233,15 +9236,25 @@ var ProjectCard = ({ project, projects }) => {
9233
9236
  const hasOverflow = projects.length > INLINE_LIMIT;
9234
9237
  const visibleProjects = hasOverflow ? projects.slice(0, INLINE_LIMIT) : projects;
9235
9238
  const overflowCount = projects.length - INLINE_LIMIT;
9236
- const isOwner = user?.sub === project?.createdBy;
9237
9239
  return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "border-border/60 bg-card hover:border-primary/30 group flex h-40 flex-col overflow-hidden rounded-xl border p-4 shadow-sm transition-all duration-200 hover:shadow-md", children: [
9238
9240
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-start justify-between gap-2", children: [
9239
9241
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "line-clamp-3 break-all text-base font-semibold leading-snug", children: project.name }) }),
9240
9242
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
9241
9243
  RenderAlternatively,
9242
9244
  {
9243
- condition: isOwner,
9244
- whenTrue: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
9245
+ condition: isShared,
9246
+ whenTrue: /* @__PURE__ */ jsxRuntime.jsxs(
9247
+ Badge,
9248
+ {
9249
+ variant: "outline",
9250
+ className: "flex items-center gap-1 shrink-0",
9251
+ children: [
9252
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
9253
+ "Shared"
9254
+ ]
9255
+ }
9256
+ ),
9257
+ whenFalse: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
9245
9258
  /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
9246
9259
  Button,
9247
9260
  {
@@ -9255,18 +9268,7 @@ var ProjectCard = ({ project, projects }) => {
9255
9268
  }
9256
9269
  ) }),
9257
9270
  /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: "Configure Project" })
9258
- ] }),
9259
- whenFalse: /* @__PURE__ */ jsxRuntime.jsxs(
9260
- Badge,
9261
- {
9262
- variant: "outline",
9263
- className: "flex items-center gap-1 shrink-0",
9264
- children: [
9265
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersRound, { size: 16 }),
9266
- "Shared"
9267
- ]
9268
- }
9269
- )
9271
+ ] })
9270
9272
  }
9271
9273
  ) })
9272
9274
  ] }),
@@ -9371,7 +9373,8 @@ var SelfProject = ({ canCreateProject = false }) => {
9371
9373
  ProjectCard,
9372
9374
  {
9373
9375
  project: project.projects[0],
9374
- projects: project.projects
9376
+ projects: project.projects,
9377
+ isShared: project.isShared
9375
9378
  }
9376
9379
  )
9377
9380
  },
@@ -9439,7 +9442,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
9439
9442
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { className: "h-12 w-12 animate-spin text-gray-500" }) });
9440
9443
  };
9441
9444
  function ProfilePage() {
9442
- const { isLoading, error } = chunkFJ4KYZYG_cjs.useInitiateRedirect({
9445
+ const { isLoading, error } = chunkQKZZDZ4S_cjs.useInitiateRedirect({
9443
9446
  clientId: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
9444
9447
  redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
9445
9448
  forwardedTo: "/app/profile"
@@ -9717,7 +9720,7 @@ var ConfirmationModal = ({
9717
9720
  ] })
9718
9721
  ] });
9719
9722
  var DashboardOverview = () => {
9720
- const { name } = chunkFJ4KYZYG_cjs.useBlocksAppConfigStore((state) => state.config);
9723
+ const { name } = chunkQKZZDZ4S_cjs.useBlocksAppConfigStore((state) => state.config);
9721
9724
  const { data: data2, isFetching } = chunkU3WXD3OX_cjs.useGetProject();
9722
9725
  const {
9723
9726
  endpoints,
@@ -10377,7 +10380,7 @@ function SidebarMobileView({
10377
10380
  navigationMenus
10378
10381
  }) {
10379
10382
  const [open, setOpen] = React8.useState(false);
10380
- const { appLightLogo, appDarkLogo } = chunkFJ4KYZYG_cjs.useLogo();
10383
+ const { appLightLogo, appDarkLogo } = chunkQKZZDZ4S_cjs.useLogo();
10381
10384
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
10382
10385
  return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
10383
10386
  /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
@@ -10427,8 +10430,8 @@ function SidebarMenuDesktop({
10427
10430
  navigationMenus
10428
10431
  }) {
10429
10432
  const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkROV7S3SC_cjs.SidebarContext);
10430
- const { appLightLogo, appDarkLogo } = chunkFJ4KYZYG_cjs.useLogo();
10431
- const icon = chunkFJ4KYZYG_cjs.useIcon();
10433
+ const { appLightLogo, appDarkLogo } = chunkQKZZDZ4S_cjs.useLogo();
10434
+ const icon = chunkQKZZDZ4S_cjs.useIcon();
10432
10435
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
10433
10436
  const { isActivePath: isProjectOverviewRoute } = chunkQ7Y32IBM_cjs.useIsActiveMenu("/app/project");
10434
10437
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -11520,7 +11523,7 @@ function MultiSelect2({
11520
11523
  onChange,
11521
11524
  value: selectedValues
11522
11525
  }) {
11523
- const [buttonRef, popoverWidth] = chunkFJ4KYZYG_cjs.usePopoverWidth();
11526
+ const [buttonRef, popoverWidth] = chunkQKZZDZ4S_cjs.usePopoverWidth();
11524
11527
  const onSelectHandler = (value) => {
11525
11528
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
11526
11529
  onChange(nextValues);
@@ -11637,7 +11640,7 @@ var ClearButton = ({ onClear }) => {
11637
11640
  };
11638
11641
  function Radio({ label, options, onChange, value }) {
11639
11642
  const [search, setSearch] = React8.useState("");
11640
- const [buttonRef, popoverWidth] = chunkFJ4KYZYG_cjs.usePopoverWidth();
11643
+ const [buttonRef, popoverWidth] = chunkQKZZDZ4S_cjs.usePopoverWidth();
11641
11644
  const isMobile = chunkQ7Y32IBM_cjs.useIsMobile();
11642
11645
  const selected = React8.useMemo(
11643
11646
  () => options.find((item) => item.value === value) || null,
@@ -12714,5 +12717,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
12714
12717
  exports.useRightSidePanel = useRightSidePanel;
12715
12718
  exports.useSortQueryParams = useSortQueryParams;
12716
12719
  exports.useWizardStepper = useWizardStepper;
12717
- //# sourceMappingURL=chunk-WOKUPQ7C.cjs.map
12718
- //# sourceMappingURL=chunk-WOKUPQ7C.cjs.map
12720
+ //# sourceMappingURL=chunk-CZPJCY4W.cjs.map
12721
+ //# sourceMappingURL=chunk-CZPJCY4W.cjs.map