@seliseblocks/genesis-os 4.3.3 → 4.3.4

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 chunkGZSVB47D_cjs = require('./chunk-GZSVB47D.cjs');
4
+ var chunkXALNVJQU_cjs = require('./chunk-XALNVJQU.cjs');
5
5
  var chunkVTOD5ZQU_cjs = require('./chunk-VTOD5ZQU.cjs');
6
6
  var chunkZVGCCTNK_cjs = require('./chunk-ZVGCCTNK.cjs');
7
7
  var chunkQ7Y32IBM_cjs = require('./chunk-Q7Y32IBM.cjs');
@@ -1525,7 +1525,7 @@ function RightSidePanelProvider({
1525
1525
  const close = React8__namespace.useCallback(() => {
1526
1526
  setOpen(false);
1527
1527
  }, [setOpen]);
1528
- chunkGZSVB47D_cjs.useKeyboardShortcut(shortcut, toggle);
1528
+ chunkXALNVJQU_cjs.useKeyboardShortcut(shortcut, toggle);
1529
1529
  React8__namespace.useEffect(() => {
1530
1530
  if (!syncHash || isControlled || typeof window === "undefined") return;
1531
1531
  const handleHashChange = () => {
@@ -3501,7 +3501,7 @@ function MultiSelect({
3501
3501
  onChange,
3502
3502
  value: selectedValues
3503
3503
  }) {
3504
- const [buttonRef, popoverWidth] = chunkGZSVB47D_cjs.usePopoverWidth();
3504
+ const [buttonRef, popoverWidth] = chunkXALNVJQU_cjs.usePopoverWidth();
3505
3505
  const onSelectHandler = (value) => {
3506
3506
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
3507
3507
  onChange(nextValues);
@@ -6690,7 +6690,7 @@ function useAppRedirectUrls({
6690
6690
  const controller = new AbortController();
6691
6691
  const { signal } = controller;
6692
6692
  stableApps.forEach((app) => {
6693
- chunkGZSVB47D_cjs.initiateService.fetchRedirectUrl({
6693
+ chunkXALNVJQU_cjs.initiateService.fetchRedirectUrl({
6694
6694
  clientId: chunkX4YCRWXO_cjs.getRuntimeEnv(app.clientId),
6695
6695
  redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv(app.redirectUri),
6696
6696
  forwardedTo: resolveRef.current(app)
@@ -6716,7 +6716,7 @@ function useAppRedirectUrls({
6716
6716
  }
6717
6717
  var AppSwitcher = ({ forwardedTo }) => {
6718
6718
  const [open, setOpen] = React8.useState(false);
6719
- const config = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6719
+ const config = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6720
6720
  const filteredApps = React8.useMemo(
6721
6721
  () => filteredAppSwitcherData.filter((app) => app.id !== config.name),
6722
6722
  [config.name]
@@ -6755,7 +6755,7 @@ function ThemeSwitcher({
6755
6755
  className,
6756
6756
  showChevron = true
6757
6757
  } = {}) {
6758
- const { theme, setTheme } = chunkGZSVB47D_cjs.useTheme();
6758
+ const { theme, setTheme } = chunkXALNVJQU_cjs.useTheme();
6759
6759
  const { Icon: ThemeIcon, label: themeLabel } = OPTIONS[theme];
6760
6760
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
6761
6761
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6866,14 +6866,14 @@ function UserAvatar({ size = "sm" }) {
6866
6866
  );
6867
6867
  }
6868
6868
  function UserDropdownMenu() {
6869
- const { name } = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.config);
6869
+ const { name } = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.config);
6870
6870
  const { data: data2 } = useGetUserInfo();
6871
6871
  const userData = data2?.data;
6872
- const { isPending, mutateAsync } = chunkGZSVB47D_cjs.useLogout();
6872
+ const { isPending, mutateAsync } = chunkXALNVJQU_cjs.useLogout();
6873
6873
  const { resetProjectStore } = chunkVAKGHXK6_cjs.useProjectStore();
6874
6874
  const { setUnAuthenticated, clearTokens } = chunkVAKGHXK6_cjs.useAuthStore();
6875
6875
  const { resetSelectedLanguages } = chunk3VNGGYRG_cjs.useLanguageViewStore();
6876
- const { data: myOrgsData, isLoading: isOrgsLoading } = chunkGZSVB47D_cjs.useGetMyOrganizations();
6876
+ const { data: myOrgsData, isLoading: isOrgsLoading } = chunkXALNVJQU_cjs.useGetMyOrganizations();
6877
6877
  const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
6878
6878
  const email = userData?.email || "";
6879
6879
  const roles = Object.values(userData?.roles || {}).flat();
@@ -7003,7 +7003,7 @@ var languages = [
7003
7003
  { key: "fr", title: "French" }
7004
7004
  ];
7005
7005
  function LanguageSelector() {
7006
- const { changeLanguage, language } = chunkGZSVB47D_cjs.useLanguageSwitcher();
7006
+ const { changeLanguage, language } = chunkXALNVJQU_cjs.useLanguageSwitcher();
7007
7007
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
7008
7008
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
7009
7009
  "button",
@@ -7093,7 +7093,7 @@ var notificationListenerService = new NotificationListenerService();
7093
7093
 
7094
7094
  // src/components/common/notification/use-notification-socket.ts
7095
7095
  function useNotificationSocket() {
7096
- const { data: configData } = chunkGZSVB47D_cjs.useGetBlocksNotificationConfig(0, 100);
7096
+ const { data: configData } = chunkXALNVJQU_cjs.useGetBlocksNotificationConfig(0, 100);
7097
7097
  const queryClient = reactQuery.useQueryClient();
7098
7098
  notificationListenerService.connect();
7099
7099
  React8.useEffect(() => {
@@ -7108,7 +7108,7 @@ function useNotificationSocket() {
7108
7108
  notificationListenerService.connection.on(
7109
7109
  config.notifyMethod,
7110
7110
  (message) => {
7111
- chunkGZSVB47D_cjs.notificationService.getNotificationConfig(config, message);
7111
+ chunkXALNVJQU_cjs.notificationService.getNotificationConfig(config, message);
7112
7112
  try {
7113
7113
  const notice = typeof message === "string" ? JSON.parse(message) : message;
7114
7114
  const denom = JSON.parse(
@@ -7132,12 +7132,12 @@ function useNotificationFeed(open) {
7132
7132
  const [notifications, setNotifications] = React8.useState([]);
7133
7133
  const [hasMore, setHasMore] = React8.useState(true);
7134
7134
  const listRef = React8.useRef(null);
7135
- const { data: data2, isLoading, isFetching } = chunkGZSVB47D_cjs.useGetNotifications(
7135
+ const { data: data2, isLoading, isFetching } = chunkXALNVJQU_cjs.useGetNotifications(
7136
7136
  pageNumber,
7137
7137
  PAGE_SIZE
7138
7138
  );
7139
- const markAsRead = chunkGZSVB47D_cjs.useMarkAsRead();
7140
- const markAllAsRead = chunkGZSVB47D_cjs.useMarkAllAsRead();
7139
+ const markAsRead = chunkXALNVJQU_cjs.useMarkAsRead();
7140
+ const markAllAsRead = chunkXALNVJQU_cjs.useMarkAllAsRead();
7141
7141
  React8.useEffect(() => {
7142
7142
  if (!data2?.notifications) return;
7143
7143
  setNotifications((prev) => {
@@ -7371,7 +7371,7 @@ function ConsoleHeader() {
7371
7371
  window.addEventListener("scroll", handleScroll);
7372
7372
  return () => window.removeEventListener("scroll", handleScroll);
7373
7373
  }, []);
7374
- const { appLightLogo, appDarkLogo } = chunkGZSVB47D_cjs.useLogo();
7374
+ const { appLightLogo, appDarkLogo } = chunkXALNVJQU_cjs.useLogo();
7375
7375
  return /* @__PURE__ */ jsxRuntime.jsx(
7376
7376
  "div",
7377
7377
  {
@@ -7838,7 +7838,7 @@ var LoginHeader = ({
7838
7838
  }) => {
7839
7839
  const {
7840
7840
  config: { appLogoUrl }
7841
- } = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state);
7841
+ } = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state);
7842
7842
  const resolveLogo = (variant) => {
7843
7843
  if (!appLogoUrl) return void 0;
7844
7844
  if (typeof appLogoUrl === "string") return appLogoUrl;
@@ -8221,10 +8221,15 @@ var blocksLoginStyles = `
8221
8221
  display: inline-flex; align-items: center; gap: 6px;
8222
8222
  color: var(--accent2); text-decoration: none; font-weight: 600;
8223
8223
  transition: gap 0.25s var(--ease-out-expo), text-shadow 0.25s ease;
8224
+ /* Renders as a button: it asks IAM for the signup URL rather than linking to one,
8225
+ so the UA button styling has to be reset back to the inline-link look. */
8226
+ background: none; border: 0; padding: 0; margin: 0;
8227
+ font: inherit; font-weight: 600; cursor: pointer;
8224
8228
  }
8225
- .blocksLogin-page .cta-signup-link:hover { gap: 10px; text-shadow: 0 0 10px var(--accent2-glow); }
8229
+ .blocksLogin-page .cta-signup-link:disabled { cursor: default; opacity: 0.7; }
8230
+ .blocksLogin-page .cta-signup-link:hover:not(:disabled) { gap: 10px; text-shadow: 0 0 10px var(--accent2-glow); }
8226
8231
  .blocksLogin-page .cta-signup-link svg { transition: transform 0.25s var(--ease-out-expo); }
8227
- .blocksLogin-page .cta-signup-link:hover svg { transform: translateX(3px); }
8232
+ .blocksLogin-page .cta-signup-link:hover:not(:disabled) svg { transform: translateX(3px); }
8228
8233
 
8229
8234
  .blocksLogin-page .col-right {
8230
8235
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
@@ -8779,7 +8784,9 @@ var BlocksLoginPage = ({
8779
8784
  loginLabel = "Log in to your account",
8780
8785
  docsUrl = "https://docs.seliseblocks.com/",
8781
8786
  footerLink = { label: "Visit Blocks", url: "https://seliseblocks.com" },
8782
- signUpUrl,
8787
+ showSignUp = false,
8788
+ onSignUp,
8789
+ isSignUpLoading = false,
8783
8790
  carouselItems
8784
8791
  }) => {
8785
8792
  const canvasRef = React8.useRef(null);
@@ -8953,24 +8960,33 @@ var BlocksLoginPage = ({
8953
8960
  }
8954
8961
  )
8955
8962
  ] }),
8956
- signUpUrl && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "cta-signup", children: [
8963
+ showSignUp && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "cta-signup", children: [
8957
8964
  "Not a member?",
8958
8965
  " ",
8959
- /* @__PURE__ */ jsxRuntime.jsxs("a", { href: signUpUrl, className: "cta-signup-link", children: [
8960
- "Sign up",
8961
- /* @__PURE__ */ jsxRuntime.jsx(
8962
- "svg",
8963
- {
8964
- width: "11",
8965
- height: "11",
8966
- viewBox: "0 0 24 24",
8967
- fill: "none",
8968
- stroke: "currentColor",
8969
- strokeWidth: "2.5",
8970
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M12 5l7 7-7 7" })
8971
- }
8972
- )
8973
- ] })
8966
+ /* @__PURE__ */ jsxRuntime.jsxs(
8967
+ "button",
8968
+ {
8969
+ type: "button",
8970
+ onClick: onSignUp,
8971
+ disabled: isSignUpLoading,
8972
+ className: "cta-signup-link",
8973
+ children: [
8974
+ isSignUpLoading ? "Redirecting\u2026" : "Sign up",
8975
+ /* @__PURE__ */ jsxRuntime.jsx(
8976
+ "svg",
8977
+ {
8978
+ width: "11",
8979
+ height: "11",
8980
+ viewBox: "0 0 24 24",
8981
+ fill: "none",
8982
+ stroke: "currentColor",
8983
+ strokeWidth: "2.5",
8984
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M12 5l7 7-7 7" })
8985
+ }
8986
+ )
8987
+ ]
8988
+ }
8989
+ )
8974
8990
  ] })
8975
8991
  ] }),
8976
8992
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-right", children: [
@@ -9087,16 +9103,19 @@ var BlocksLoginPage = ({
9087
9103
  ] });
9088
9104
  };
9089
9105
  var LoginPage = () => {
9090
- const config = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.getConfig());
9091
- const { start, isLoading } = chunkGZSVB47D_cjs.useLogin();
9092
- const { signUpUrl } = chunkGZSVB47D_cjs.useSignUpAffordance();
9106
+ const config = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.getConfig());
9107
+ const { start, isLoading } = chunkXALNVJQU_cjs.useLogin();
9108
+ const { canSignUp } = chunkXALNVJQU_cjs.useSignUpAffordance();
9109
+ const { start: startSignUp, isLoading: isSignUpLoading } = chunkXALNVJQU_cjs.useSignUpRedirect();
9093
9110
  return /* @__PURE__ */ jsxRuntime.jsx(
9094
9111
  BlocksLoginPage,
9095
9112
  {
9096
9113
  name: config.name,
9097
9114
  onLogin: start,
9098
9115
  isLoading,
9099
- signUpUrl,
9116
+ showSignUp: canSignUp,
9117
+ onSignUp: startSignUp,
9118
+ isSignUpLoading,
9100
9119
  carouselItems: BLOCKS_PRODUCTS
9101
9120
  }
9102
9121
  );
@@ -9172,10 +9191,10 @@ var DefaultDoc = () => {
9172
9191
  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)) });
9173
9192
  };
9174
9193
  function useCreateProjectRedirect() {
9175
- const { name } = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.config);
9194
+ const { name } = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.config);
9176
9195
  const navigate = reactRouter.useNavigate();
9177
9196
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9178
- const { isFetching, isReady, redirect } = chunkGZSVB47D_cjs.usePrefetchRedirect({
9197
+ const { isFetching, isReady, redirect } = chunkXALNVJQU_cjs.usePrefetchRedirect({
9179
9198
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9180
9199
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9181
9200
  forwardedTo: "/app/create-project",
@@ -9267,10 +9286,10 @@ function useProjectOverviewRedirect({
9267
9286
  tenantGroupId
9268
9287
  }) {
9269
9288
  const navigate = reactRouter.useNavigate();
9270
- const { name } = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.config);
9289
+ const { name } = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.config);
9271
9290
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
9272
9291
  const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
9273
- const { isFetching, isReady, redirect } = chunkGZSVB47D_cjs.usePrefetchRedirect({
9292
+ const { isFetching, isReady, redirect } = chunkXALNVJQU_cjs.usePrefetchRedirect({
9274
9293
  clientId: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.clientId) : "",
9275
9294
  redirectUri: osApp ? chunkX4YCRWXO_cjs.getRuntimeEnv(osApp.redirectUri) : "",
9276
9295
  forwardedTo: redirectedRoute,
@@ -9628,7 +9647,7 @@ function MultiSelect2({
9628
9647
  onChange,
9629
9648
  value: selectedValues
9630
9649
  }) {
9631
- const [buttonRef, popoverWidth] = chunkGZSVB47D_cjs.usePopoverWidth();
9650
+ const [buttonRef, popoverWidth] = chunkXALNVJQU_cjs.usePopoverWidth();
9632
9651
  const onSelectHandler = (value) => {
9633
9652
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
9634
9653
  onChange(nextValues);
@@ -9909,7 +9928,7 @@ var useProjectListState = (projectGroups) => {
9909
9928
  })),
9910
9929
  [projectGroups]
9911
9930
  );
9912
- const searchedGroups = chunkGZSVB47D_cjs.useDebouncedFuseFilter(
9931
+ const searchedGroups = chunkXALNVJQU_cjs.useDebouncedFuseFilter(
9913
9932
  searchableGroups,
9914
9933
  searchText,
9915
9934
  SEARCH_OPTIONS
@@ -10140,7 +10159,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
10140
10159
  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" }) });
10141
10160
  };
10142
10161
  function ProfilePage() {
10143
- const { isLoading, error } = chunkGZSVB47D_cjs.useInitiateRedirect({
10162
+ const { isLoading, error } = chunkXALNVJQU_cjs.useInitiateRedirect({
10144
10163
  clientId: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
10145
10164
  redirectUri: chunkX4YCRWXO_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
10146
10165
  forwardedTo: "/app/profile"
@@ -10418,7 +10437,7 @@ var ConfirmationModal = ({
10418
10437
  ] })
10419
10438
  ] });
10420
10439
  var DashboardOverview = () => {
10421
- const { name } = chunkGZSVB47D_cjs.useBlocksAppConfigStore((state) => state.config);
10440
+ const { name } = chunkXALNVJQU_cjs.useBlocksAppConfigStore((state) => state.config);
10422
10441
  const { data: data2, isFetching } = chunkUVMFL4UV_cjs.useGetProject();
10423
10442
  const {
10424
10443
  endpoints,
@@ -11086,7 +11105,7 @@ function SidebarMobileView({
11086
11105
  navigationMenus
11087
11106
  }) {
11088
11107
  const [open, setOpen] = React8.useState(false);
11089
- const { appLightLogo, appDarkLogo } = chunkGZSVB47D_cjs.useLogo();
11108
+ const { appLightLogo, appDarkLogo } = chunkXALNVJQU_cjs.useLogo();
11090
11109
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
11091
11110
  return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
11092
11111
  /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
@@ -11136,8 +11155,8 @@ function SidebarMenuDesktop({
11136
11155
  navigationMenus
11137
11156
  }) {
11138
11157
  const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkZVGCCTNK_cjs.SidebarContext);
11139
- const { appLightLogo, appDarkLogo } = chunkGZSVB47D_cjs.useLogo();
11140
- const icon = chunkGZSVB47D_cjs.useIcon();
11158
+ const { appLightLogo, appDarkLogo } = chunkXALNVJQU_cjs.useLogo();
11159
+ const icon = chunkXALNVJQU_cjs.useIcon();
11141
11160
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
11142
11161
  const { isActivePath: isProjectOverviewRoute } = chunkQ7Y32IBM_cjs.useIsActiveMenu("/app/project");
11143
11162
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -12236,7 +12255,7 @@ var ClearButton = ({ onClear }) => {
12236
12255
  };
12237
12256
  function Radio({ label, options, onChange, value }) {
12238
12257
  const [search, setSearch] = React8.useState("");
12239
- const [buttonRef, popoverWidth] = chunkGZSVB47D_cjs.usePopoverWidth();
12258
+ const [buttonRef, popoverWidth] = chunkXALNVJQU_cjs.usePopoverWidth();
12240
12259
  const isMobile = chunkQ7Y32IBM_cjs.useIsMobile();
12241
12260
  const selected = React8.useMemo(
12242
12261
  () => options.find((item) => item.value === value) || null,
@@ -13238,5 +13257,5 @@ exports.usePaginationQueryParams = usePaginationQueryParams;
13238
13257
  exports.useRightSidePanel = useRightSidePanel;
13239
13258
  exports.useSortQueryParams = useSortQueryParams;
13240
13259
  exports.useWizardStepper = useWizardStepper;
13241
- //# sourceMappingURL=chunk-SG3SZ45K.cjs.map
13242
- //# sourceMappingURL=chunk-SG3SZ45K.cjs.map
13260
+ //# sourceMappingURL=chunk-CME46DIB.cjs.map
13261
+ //# sourceMappingURL=chunk-CME46DIB.cjs.map