@streamoid/settings 0.4.1 → 0.4.3

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.mjs CHANGED
@@ -2412,6 +2412,24 @@ var svg_rodctpja6f_default = {
2412
2412
  p83fc200: "M2.25 12.25C2.25 6.72715 6.72715 2.25 12.25 2.25C17.7728 2.25 22.25 6.72715 22.25 12.25C22.25 17.7728 17.7728 22.25 12.25 22.25C6.72715 22.25 2.25 17.7728 2.25 12.25Z"
2413
2413
  };
2414
2414
 
2415
+ // src/team-types.ts
2416
+ var APP_KEYS = [
2417
+ "artifax",
2418
+ "photogenix",
2419
+ "returns",
2420
+ "catalogix"
2421
+ ];
2422
+ var DEFAULT_PERMISSIONS = {
2423
+ artifax: true,
2424
+ photogenix: true,
2425
+ catalogix: true,
2426
+ returns: true,
2427
+ canUseCredits: true,
2428
+ canInviteUser: true,
2429
+ role: "admin",
2430
+ catalogixStores: []
2431
+ };
2432
+
2415
2433
  // src/invite-update-modal.tsx
2416
2434
  import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
2417
2435
  var T6 = {
@@ -2518,6 +2536,7 @@ function InviteUpdateModal({
2518
2536
  mode,
2519
2537
  userEmail = "email@domain.in",
2520
2538
  stores = [],
2539
+ hiddenApps = [],
2521
2540
  allowSubmitWithoutChanges = false,
2522
2541
  initialPermissions,
2523
2542
  onClose,
@@ -2532,25 +2551,35 @@ function InviteUpdateModal({
2532
2551
  const [role, setRole] = useState5("admin");
2533
2552
  const [canUseCredits, setCanUseCredits] = useState5(false);
2534
2553
  const [canInviteUser, setCanInviteUser] = useState5(false);
2535
- const [artifaxOn, setArtifaxOn] = useState5(true);
2536
- const [photogenixOn, setPhotogenixOn] = useState5(true);
2537
- const [catalogixOn, setCatalogixOn] = useState5(true);
2538
- const [returnsOn, setReturnsOn] = useState5(true);
2554
+ const [artifaxOn, setArtifaxOn] = useState5(!hiddenApps.includes("artifax"));
2555
+ const [photogenixOn, setPhotogenixOn] = useState5(
2556
+ !hiddenApps.includes("photogenix")
2557
+ );
2558
+ const [catalogixOn, setCatalogixOn] = useState5(
2559
+ !hiddenApps.includes("catalogix")
2560
+ );
2561
+ const [returnsOn, setReturnsOn] = useState5(!hiddenApps.includes("returns"));
2539
2562
  const [storeSearch, setStoreSearch] = useState5("");
2540
2563
  const [selectedStores, setSelectedStores] = useState5(/* @__PURE__ */ new Set());
2541
2564
  const filteredStores = stores.filter(
2542
2565
  (s) => (s.name || s._id).toLowerCase().includes(storeSearch.toLowerCase())
2543
2566
  );
2567
+ const hiddenKey = [...hiddenApps].sort().join(",");
2544
2568
  useEffect5(() => {
2569
+ const hidden = new Set(hiddenKey ? hiddenKey.split(",") : []);
2545
2570
  if (open && initialPermissions) {
2546
2571
  setRole(initialPermissions.role);
2547
2572
  setCanUseCredits(initialPermissions.canUseCredits);
2548
2573
  setCanInviteUser(initialPermissions.canInviteUser);
2549
- setArtifaxOn(initialPermissions.artifax);
2550
- setPhotogenixOn(initialPermissions.photogenix);
2551
- setCatalogixOn(initialPermissions.catalogix);
2552
- setReturnsOn(initialPermissions.returns);
2553
- setSelectedStores(new Set(initialPermissions.catalogixStores));
2574
+ setArtifaxOn(!hidden.has("artifax") && initialPermissions.artifax);
2575
+ setPhotogenixOn(
2576
+ !hidden.has("photogenix") && initialPermissions.photogenix
2577
+ );
2578
+ setCatalogixOn(!hidden.has("catalogix") && initialPermissions.catalogix);
2579
+ setReturnsOn(!hidden.has("returns") && initialPermissions.returns);
2580
+ setSelectedStores(
2581
+ new Set(hidden.has("catalogix") ? [] : initialPermissions.catalogixStores)
2582
+ );
2554
2583
  }
2555
2584
  if (!open) {
2556
2585
  setEmailValue("");
@@ -2558,21 +2587,32 @@ function InviteUpdateModal({
2558
2587
  setRole("admin");
2559
2588
  setCanUseCredits(true);
2560
2589
  setCanInviteUser(true);
2561
- setArtifaxOn(true);
2562
- setPhotogenixOn(true);
2563
- setCatalogixOn(true);
2564
- setReturnsOn(true);
2590
+ setArtifaxOn(!hidden.has("artifax"));
2591
+ setPhotogenixOn(!hidden.has("photogenix"));
2592
+ setCatalogixOn(!hidden.has("catalogix"));
2593
+ setReturnsOn(!hidden.has("returns"));
2565
2594
  setStoreSearch("");
2566
2595
  setSelectedStores(/* @__PURE__ */ new Set());
2567
2596
  }
2568
- }, [open, initialPermissions]);
2597
+ }, [open, initialPermissions, hiddenKey]);
2569
2598
  if (!open) return null;
2570
2599
  const isInvite = mode === "invite";
2571
2600
  const hasEmail = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(emailValue.trim());
2572
- const isSubmitDisabled = isInvite ? !hasEmail : !(allowSubmitWithoutChanges || hasChanges);
2573
2601
  function markChanged() {
2574
2602
  setHasChanges(true);
2575
2603
  }
2604
+ const shownApps = APP_KEYS.filter((key) => !hiddenApps.includes(key));
2605
+ const showsApp = (key) => shownApps.includes(key);
2606
+ const appToggles = {
2607
+ artifax: artifaxOn,
2608
+ photogenix: photogenixOn,
2609
+ returns: returnsOn,
2610
+ catalogix: catalogixOn
2611
+ };
2612
+ const notLastShown = (key) => shownApps[shownApps.length - 1] !== key;
2613
+ const appValue = (key) => role === "admin" || showsApp(key) ? appToggles[key] : false;
2614
+ const grantsNoApp = role === "member" && shownApps.length > 0 && !shownApps.some((key) => appToggles[key]);
2615
+ const isSubmitDisabled = isInvite ? !hasEmail || grantsNoApp : !(allowSubmitWithoutChanges || hasChanges);
2576
2616
  function toggleStore(storeId) {
2577
2617
  setSelectedStores((prev) => {
2578
2618
  const next = new Set(prev);
@@ -2930,7 +2970,7 @@ function InviteUpdateModal({
2930
2970
  ]
2931
2971
  }
2932
2972
  ),
2933
- role !== "admin" && /* @__PURE__ */ jsxs8(
2973
+ role !== "admin" && shownApps.length > 0 && /* @__PURE__ */ jsxs8(
2934
2974
  "div",
2935
2975
  {
2936
2976
  className: "flex flex-col items-start justify-center shrink-0 w-full",
@@ -2946,8 +2986,8 @@ function InviteUpdateModal({
2946
2986
  borderRadius: T6.r3xl
2947
2987
  },
2948
2988
  children: [
2949
- /* @__PURE__ */ jsxs8("div", { className: "shrink-0 w-full relative", children: [
2950
- /* @__PURE__ */ jsx10(
2989
+ showsApp("artifax") && /* @__PURE__ */ jsx10(Fragment5, { children: /* @__PURE__ */ jsxs8("div", { className: "shrink-0 w-full relative", children: [
2990
+ notLastShown("artifax") && /* @__PURE__ */ jsx10(
2951
2991
  "div",
2952
2992
  {
2953
2993
  "aria-hidden": true,
@@ -3018,7 +3058,7 @@ function InviteUpdateModal({
3018
3058
  lineHeight: T6.lhXs,
3019
3059
  color: T6.tertiary
3020
3060
  },
3021
- children: "Info about artifax"
3061
+ children: "Design, manage, and create\u2014all at one place."
3022
3062
  }
3023
3063
  )
3024
3064
  ]
@@ -3040,9 +3080,9 @@ function InviteUpdateModal({
3040
3080
  ]
3041
3081
  }
3042
3082
  ) })
3043
- ] }),
3044
- /* @__PURE__ */ jsxs8("div", { className: "shrink-0 w-full relative", children: [
3045
- /* @__PURE__ */ jsx10(
3083
+ ] }) }),
3084
+ showsApp("photogenix") && /* @__PURE__ */ jsx10(Fragment5, { children: /* @__PURE__ */ jsxs8("div", { className: "shrink-0 w-full relative", children: [
3085
+ notLastShown("photogenix") && /* @__PURE__ */ jsx10(
3046
3086
  "div",
3047
3087
  {
3048
3088
  "aria-hidden": true,
@@ -3113,7 +3153,7 @@ function InviteUpdateModal({
3113
3153
  lineHeight: T6.lhXs,
3114
3154
  color: T6.tertiary
3115
3155
  },
3116
- children: "Info about photogenix"
3156
+ children: "Tool for generating video/images"
3117
3157
  }
3118
3158
  )
3119
3159
  ]
@@ -3135,234 +3175,179 @@ function InviteUpdateModal({
3135
3175
  ]
3136
3176
  }
3137
3177
  ) })
3138
- ] }),
3139
- /* @__PURE__ */ jsx10("div", { className: "shrink-0 w-full", children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col justify-center size-full", children: /* @__PURE__ */ jsx10(
3178
+ ] }) }),
3179
+ showsApp("returns") && /* @__PURE__ */ jsx10(Fragment5, { children: /* @__PURE__ */ jsx10(
3140
3180
  "div",
3141
3181
  {
3142
- className: "flex flex-col items-start justify-center w-full",
3143
- style: { padding: T6.sp3xl, gap: T6.sp3xl },
3144
- children: /* @__PURE__ */ jsxs8(
3182
+ className: "shrink-0 w-full",
3183
+ style: notLastShown("returns") ? { borderBottom: `1px solid ${T6.borderSubtle}` } : void 0,
3184
+ children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col justify-center size-full", children: /* @__PURE__ */ jsx10(
3145
3185
  "div",
3146
3186
  {
3147
- className: "flex items-center shrink-0 w-full",
3148
- style: { gap: T6.sp3xl },
3149
- children: [
3150
- /* @__PURE__ */ jsxs8(
3151
- "div",
3152
- {
3153
- className: "flex flex-1 min-w-0 items-center",
3154
- style: { gap: T6.spXl },
3155
- children: [
3156
- /* @__PURE__ */ jsx10(
3157
- "div",
3158
- {
3159
- className: "shrink-0 flex items-center",
3160
- style: {
3161
- background: T6.fillHover,
3162
- borderRadius: T6.rXl,
3163
- padding: T6.spMd
3164
- },
3165
- children: /* @__PURE__ */ jsx10(
3166
- SiconArrowLeftRight,
3187
+ className: "flex flex-col items-start justify-center w-full",
3188
+ style: { padding: T6.sp3xl, gap: T6.sp3xl },
3189
+ children: /* @__PURE__ */ jsxs8(
3190
+ "div",
3191
+ {
3192
+ className: "flex items-center shrink-0 w-full",
3193
+ style: { gap: T6.sp3xl },
3194
+ children: [
3195
+ /* @__PURE__ */ jsxs8(
3196
+ "div",
3197
+ {
3198
+ className: "flex flex-1 min-w-0 items-center",
3199
+ style: { gap: T6.spXl },
3200
+ children: [
3201
+ /* @__PURE__ */ jsx10(
3202
+ "div",
3167
3203
  {
3168
- className: "w-6 h-6",
3169
- color: T6.primary
3204
+ className: "shrink-0 flex items-center",
3205
+ style: {
3206
+ background: T6.fillHover,
3207
+ borderRadius: T6.rXl,
3208
+ padding: T6.spMd
3209
+ },
3210
+ children: /* @__PURE__ */ jsx10(
3211
+ SiconArrowLeftRight,
3212
+ {
3213
+ className: "w-6 h-6",
3214
+ color: T6.primary
3215
+ }
3216
+ )
3217
+ }
3218
+ ),
3219
+ /* @__PURE__ */ jsxs8(
3220
+ "div",
3221
+ {
3222
+ className: "flex flex-1 min-w-0 flex-col items-start overflow-hidden text-ellipsis whitespace-nowrap",
3223
+ style: { opacity: returnsOn ? 1 : 0.5 },
3224
+ children: [
3225
+ /* @__PURE__ */ jsx10(
3226
+ "p",
3227
+ {
3228
+ className: "w-full overflow-hidden shrink-0",
3229
+ style: {
3230
+ fontFamily: T6.font,
3231
+ fontSize: T6.fsSm,
3232
+ fontWeight: 500,
3233
+ lineHeight: T6.lhSm,
3234
+ color: T6.primary
3235
+ },
3236
+ children: "Returns"
3237
+ }
3238
+ ),
3239
+ /* @__PURE__ */ jsx10(
3240
+ "p",
3241
+ {
3242
+ className: "w-full overflow-hidden shrink-0",
3243
+ style: {
3244
+ fontFamily: T6.font,
3245
+ fontSize: T6.fsXs,
3246
+ fontWeight: 400,
3247
+ lineHeight: T6.lhXs,
3248
+ color: T6.tertiary
3249
+ },
3250
+ children: "Raise SPF claims for Marketplaces"
3251
+ }
3252
+ )
3253
+ ]
3170
3254
  }
3171
3255
  )
3256
+ ]
3257
+ }
3258
+ ),
3259
+ /* @__PURE__ */ jsx10(
3260
+ ToggleSwitch,
3261
+ {
3262
+ active: returnsOn,
3263
+ onClick: () => {
3264
+ setReturnsOn(!returnsOn);
3265
+ markChanged();
3172
3266
  }
3173
- ),
3174
- /* @__PURE__ */ jsxs8(
3175
- "div",
3176
- {
3177
- className: "flex flex-1 min-w-0 flex-col items-start overflow-hidden text-ellipsis whitespace-nowrap",
3178
- style: { opacity: returnsOn ? 1 : 0.5 },
3179
- children: [
3180
- /* @__PURE__ */ jsx10(
3181
- "p",
3182
- {
3183
- className: "w-full overflow-hidden shrink-0",
3184
- style: {
3185
- fontFamily: T6.font,
3186
- fontSize: T6.fsSm,
3187
- fontWeight: 500,
3188
- lineHeight: T6.lhSm,
3189
- color: T6.primary
3190
- },
3191
- children: "Returns"
3192
- }
3193
- ),
3194
- /* @__PURE__ */ jsx10(
3195
- "p",
3196
- {
3197
- className: "w-full overflow-hidden shrink-0",
3198
- style: {
3199
- fontFamily: T6.font,
3200
- fontSize: T6.fsXs,
3201
- fontWeight: 400,
3202
- lineHeight: T6.lhXs,
3203
- color: T6.tertiary
3204
- },
3205
- children: "Info about returns"
3206
- }
3207
- )
3208
- ]
3209
- }
3210
- )
3211
- ]
3212
- }
3213
- ),
3214
- /* @__PURE__ */ jsx10(
3215
- ToggleSwitch,
3216
- {
3217
- active: returnsOn,
3218
- onClick: () => {
3219
- setReturnsOn(!returnsOn);
3220
- markChanged();
3221
- }
3222
- }
3223
- )
3224
- ]
3267
+ }
3268
+ )
3269
+ ]
3270
+ }
3271
+ )
3225
3272
  }
3226
- )
3273
+ ) })
3227
3274
  }
3228
- ) }) }),
3229
- /* @__PURE__ */ jsx10("div", { className: "shrink-0 w-full", children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col justify-center size-full", children: /* @__PURE__ */ jsxs8(
3275
+ ) }),
3276
+ showsApp("catalogix") && /* @__PURE__ */ jsx10(Fragment5, { children: /* @__PURE__ */ jsx10(
3230
3277
  "div",
3231
3278
  {
3232
- className: "flex flex-col items-start justify-center w-full",
3233
- style: { padding: T6.sp3xl, gap: T6.sp3xl },
3234
- children: [
3235
- /* @__PURE__ */ jsxs8(
3236
- "div",
3237
- {
3238
- className: "flex items-center shrink-0 w-full",
3239
- style: { gap: T6.sp3xl },
3240
- children: [
3241
- /* @__PURE__ */ jsxs8(
3242
- "div",
3243
- {
3244
- className: "flex flex-1 min-w-0 items-center",
3245
- style: { gap: T6.spXl },
3246
- children: [
3247
- /* @__PURE__ */ jsx10(
3248
- "div",
3249
- {
3250
- className: "shrink-0 flex items-center",
3251
- style: {
3252
- background: T6.fillHover,
3253
- borderRadius: T6.rXl,
3254
- padding: T6.spMd
3255
- },
3256
- children: /* @__PURE__ */ jsx10(
3257
- SiconArtifacts,
3258
- {
3259
- className: "w-6 h-6",
3260
- color: T6.primary
3261
- }
3262
- )
3263
- }
3264
- ),
3265
- /* @__PURE__ */ jsxs8(
3266
- "div",
3267
- {
3268
- className: "flex flex-1 min-w-0 flex-col items-start overflow-hidden text-ellipsis whitespace-nowrap",
3269
- style: { opacity: catalogixOn ? 1 : 0.5 },
3270
- children: [
3271
- /* @__PURE__ */ jsx10(
3272
- "p",
3273
- {
3274
- className: "w-full overflow-hidden shrink-0",
3275
- style: {
3276
- fontFamily: T6.font,
3277
- fontSize: T6.fsSm,
3278
- fontWeight: 500,
3279
- lineHeight: T6.lhSm,
3280
- color: T6.primary
3281
- },
3282
- children: "Catalogix"
3283
- }
3284
- ),
3285
- /* @__PURE__ */ jsx10(
3286
- "p",
3287
- {
3288
- className: "w-full overflow-hidden shrink-0",
3289
- style: {
3290
- fontFamily: T6.font,
3291
- fontSize: T6.fsXs,
3292
- fontWeight: 400,
3293
- lineHeight: T6.lhXs,
3294
- color: T6.tertiary
3295
- },
3296
- children: "Info about catalogix"
3297
- }
3298
- )
3299
- ]
3300
- }
3301
- )
3302
- ]
3303
- }
3304
- ),
3305
- /* @__PURE__ */ jsx10(
3306
- ToggleSwitch,
3307
- {
3308
- active: catalogixOn,
3309
- onClick: () => {
3310
- setCatalogixOn(!catalogixOn);
3311
- markChanged();
3312
- }
3313
- }
3314
- )
3315
- ]
3316
- }
3317
- ),
3318
- catalogixOn && /* @__PURE__ */ jsx10(
3319
- "div",
3320
- {
3321
- className: "shrink-0 w-full",
3322
- style: {
3323
- background: T6.canvasBase,
3324
- borderRadius: T6.r3xl
3325
- },
3326
- children: /* @__PURE__ */ jsxs8(
3279
+ className: "shrink-0 w-full",
3280
+ style: notLastShown("catalogix") ? { borderBottom: `1px solid ${T6.borderSubtle}` } : void 0,
3281
+ children: /* @__PURE__ */ jsx10("div", { className: "flex flex-col justify-center size-full", children: /* @__PURE__ */ jsxs8(
3282
+ "div",
3283
+ {
3284
+ className: "flex flex-col items-start justify-center w-full",
3285
+ style: { padding: T6.sp3xl, gap: T6.sp3xl },
3286
+ children: [
3287
+ /* @__PURE__ */ jsxs8(
3327
3288
  "div",
3328
3289
  {
3329
- className: "flex flex-col items-start w-full",
3330
- style: { padding: T6.sp3xl, gap: T6.spMd },
3290
+ className: "flex items-center shrink-0 w-full",
3291
+ style: { gap: T6.sp3xl },
3331
3292
  children: [
3332
3293
  /* @__PURE__ */ jsxs8(
3333
3294
  "div",
3334
3295
  {
3335
- className: "flex items-center justify-center shrink-0 w-full",
3336
- style: { gap: T6.spMd },
3296
+ className: "flex flex-1 min-w-0 items-center",
3297
+ style: { gap: T6.spXl },
3337
3298
  children: [
3338
3299
  /* @__PURE__ */ jsx10(
3339
- "p",
3300
+ "div",
3340
3301
  {
3341
- className: "flex-1 min-w-0 overflow-hidden whitespace-nowrap",
3302
+ className: "shrink-0 flex items-center",
3342
3303
  style: {
3343
- fontFamily: T6.font,
3344
- fontSize: T6.fsSm,
3345
- fontWeight: 400,
3346
- lineHeight: T6.lhSm,
3347
- color: T6.primary
3304
+ background: T6.fillHover,
3305
+ borderRadius: T6.rXl,
3306
+ padding: T6.spMd
3348
3307
  },
3349
- children: "Store access"
3308
+ children: /* @__PURE__ */ jsx10(
3309
+ SiconArtifacts,
3310
+ {
3311
+ className: "w-6 h-6",
3312
+ color: T6.primary
3313
+ }
3314
+ )
3350
3315
  }
3351
3316
  ),
3352
3317
  /* @__PURE__ */ jsxs8(
3353
- "p",
3318
+ "div",
3354
3319
  {
3355
- className: "shrink-0 overflow-hidden text-right",
3356
- style: {
3357
- fontFamily: T6.font,
3358
- fontSize: T6.fsXs,
3359
- fontWeight: 400,
3360
- lineHeight: T6.lhXs,
3361
- color: T6.muted
3362
- },
3320
+ className: "flex flex-1 min-w-0 flex-col items-start overflow-hidden text-ellipsis whitespace-nowrap",
3321
+ style: { opacity: catalogixOn ? 1 : 0.5 },
3363
3322
  children: [
3364
- selectedStores.size,
3365
- " Selected"
3323
+ /* @__PURE__ */ jsx10(
3324
+ "p",
3325
+ {
3326
+ className: "w-full overflow-hidden shrink-0",
3327
+ style: {
3328
+ fontFamily: T6.font,
3329
+ fontSize: T6.fsSm,
3330
+ fontWeight: 500,
3331
+ lineHeight: T6.lhSm,
3332
+ color: T6.primary
3333
+ },
3334
+ children: "Catalogix"
3335
+ }
3336
+ ),
3337
+ /* @__PURE__ */ jsx10(
3338
+ "p",
3339
+ {
3340
+ className: "w-full overflow-hidden shrink-0",
3341
+ style: {
3342
+ fontFamily: T6.font,
3343
+ fontSize: T6.fsXs,
3344
+ fontWeight: 400,
3345
+ lineHeight: T6.lhXs,
3346
+ color: T6.tertiary
3347
+ },
3348
+ children: "Centralized product and asset management for every storefront"
3349
+ }
3350
+ )
3366
3351
  ]
3367
3352
  }
3368
3353
  )
@@ -3370,27 +3355,42 @@ function InviteUpdateModal({
3370
3355
  }
3371
3356
  ),
3372
3357
  /* @__PURE__ */ jsx10(
3373
- "div",
3358
+ ToggleSwitch,
3374
3359
  {
3375
- className: "shrink-0 w-full",
3376
- style: {
3377
- background: T6.fillPlus,
3378
- height: 48,
3379
- borderRadius: T6.r3xl
3380
- },
3381
- children: /* @__PURE__ */ jsx10("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxs8(
3360
+ active: catalogixOn,
3361
+ onClick: () => {
3362
+ setCatalogixOn(!catalogixOn);
3363
+ markChanged();
3364
+ }
3365
+ }
3366
+ )
3367
+ ]
3368
+ }
3369
+ ),
3370
+ catalogixOn && /* @__PURE__ */ jsx10(
3371
+ "div",
3372
+ {
3373
+ className: "shrink-0 w-full",
3374
+ style: {
3375
+ background: T6.canvasBase,
3376
+ borderRadius: T6.r3xl
3377
+ },
3378
+ children: /* @__PURE__ */ jsxs8(
3379
+ "div",
3380
+ {
3381
+ className: "flex flex-col items-start w-full",
3382
+ style: { padding: T6.sp3xl, gap: T6.spMd },
3383
+ children: [
3384
+ /* @__PURE__ */ jsxs8(
3382
3385
  "div",
3383
3386
  {
3384
- className: "flex items-center relative size-full",
3385
- style: {
3386
- padding: T6.spXl,
3387
- gap: T6.sp3xl
3388
- },
3387
+ className: "flex items-center justify-center shrink-0 w-full",
3388
+ style: { gap: T6.spMd },
3389
3389
  children: [
3390
3390
  /* @__PURE__ */ jsx10(
3391
- "input",
3391
+ "p",
3392
3392
  {
3393
- className: "flex-1 min-w-0 bg-transparent border-none outline-none",
3393
+ className: "flex-1 min-w-0 overflow-hidden whitespace-nowrap",
3394
3394
  style: {
3395
3395
  fontFamily: T6.font,
3396
3396
  fontSize: T6.fsSm,
@@ -3398,97 +3398,153 @@ function InviteUpdateModal({
3398
3398
  lineHeight: T6.lhSm,
3399
3399
  color: T6.primary
3400
3400
  },
3401
- placeholder: "Search stores...",
3402
- value: storeSearch,
3403
- onChange: (e) => setStoreSearch(e.target.value)
3401
+ children: "Store access"
3404
3402
  }
3405
3403
  ),
3406
- /* @__PURE__ */ jsx10(
3407
- SiconSearch,
3408
- {
3409
- className: "w-6 h-6",
3410
- color: T6.primary
3411
- }
3412
- )
3413
- ]
3414
- }
3415
- ) })
3416
- }
3417
- ),
3418
- /* @__PURE__ */ jsx10(
3419
- "div",
3420
- {
3421
- className: "shrink-0 w-full",
3422
- style: {
3423
- background: T6.fillPlus,
3424
- borderRadius: T6.r3xl
3425
- },
3426
- children: /* @__PURE__ */ jsxs8(
3427
- "div",
3428
- {
3429
- className: "flex flex-col items-start w-full",
3430
- style: {
3431
- padding: T6.sp3xl,
3432
- gap: T6.spXl
3433
- },
3434
- children: [
3435
- filteredStores.map((store) => /* @__PURE__ */ jsxs8(
3436
- "div",
3437
- {
3438
- className: "flex items-center shrink-0 w-full cursor-pointer",
3439
- style: { gap: T6.spMd },
3440
- onClick: () => toggleStore(store._id),
3441
- children: [
3442
- /* @__PURE__ */ jsx10(
3443
- "p",
3444
- {
3445
- className: "flex-1 min-w-0",
3446
- style: {
3447
- fontFamily: T6.font,
3448
- fontSize: T6.fsSm,
3449
- fontWeight: 400,
3450
- lineHeight: T6.lhSm,
3451
- color: T6.primary
3452
- },
3453
- children: store.name || store._id
3454
- }
3455
- ),
3456
- /* @__PURE__ */ jsx10(
3457
- CheckboxSvg,
3458
- {
3459
- checked: selectedStores.has(store._id)
3460
- }
3461
- )
3462
- ]
3463
- },
3464
- store._id
3465
- )),
3466
- filteredStores.length === 0 && /* @__PURE__ */ jsx10(
3404
+ /* @__PURE__ */ jsxs8(
3467
3405
  "p",
3468
3406
  {
3407
+ className: "shrink-0 overflow-hidden text-right",
3469
3408
  style: {
3470
3409
  fontFamily: T6.font,
3471
- fontSize: T6.fsSm,
3410
+ fontSize: T6.fsXs,
3472
3411
  fontWeight: 400,
3473
- lineHeight: T6.lhSm,
3412
+ lineHeight: T6.lhXs,
3474
3413
  color: T6.muted
3475
3414
  },
3476
- children: "No stores found"
3415
+ children: [
3416
+ selectedStores.size,
3417
+ " Selected"
3418
+ ]
3477
3419
  }
3478
3420
  )
3479
3421
  ]
3480
3422
  }
3423
+ ),
3424
+ /* @__PURE__ */ jsx10(
3425
+ "div",
3426
+ {
3427
+ className: "shrink-0 w-full",
3428
+ style: {
3429
+ background: T6.fillPlus,
3430
+ height: 48,
3431
+ borderRadius: T6.r3xl
3432
+ },
3433
+ children: /* @__PURE__ */ jsx10("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxs8(
3434
+ "div",
3435
+ {
3436
+ className: "flex items-center relative size-full",
3437
+ style: {
3438
+ padding: T6.spXl,
3439
+ gap: T6.sp3xl
3440
+ },
3441
+ children: [
3442
+ /* @__PURE__ */ jsx10(
3443
+ "input",
3444
+ {
3445
+ className: "flex-1 min-w-0 bg-transparent border-none outline-none",
3446
+ style: {
3447
+ fontFamily: T6.font,
3448
+ fontSize: T6.fsSm,
3449
+ fontWeight: 400,
3450
+ lineHeight: T6.lhSm,
3451
+ color: T6.primary
3452
+ },
3453
+ placeholder: "Search stores...",
3454
+ value: storeSearch,
3455
+ onChange: (e) => setStoreSearch(e.target.value)
3456
+ }
3457
+ ),
3458
+ /* @__PURE__ */ jsx10(
3459
+ SiconSearch,
3460
+ {
3461
+ className: "w-6 h-6",
3462
+ color: T6.primary
3463
+ }
3464
+ )
3465
+ ]
3466
+ }
3467
+ ) })
3468
+ }
3469
+ ),
3470
+ /* @__PURE__ */ jsx10(
3471
+ "div",
3472
+ {
3473
+ className: "shrink-0 w-full",
3474
+ style: {
3475
+ background: T6.fillPlus,
3476
+ borderRadius: T6.r3xl
3477
+ },
3478
+ children: /* @__PURE__ */ jsxs8(
3479
+ "div",
3480
+ {
3481
+ className: "flex flex-col items-start w-full",
3482
+ style: {
3483
+ padding: T6.sp3xl,
3484
+ gap: T6.spXl
3485
+ },
3486
+ children: [
3487
+ filteredStores.map((store) => /* @__PURE__ */ jsxs8(
3488
+ "div",
3489
+ {
3490
+ className: "flex items-center shrink-0 w-full cursor-pointer",
3491
+ style: { gap: T6.spMd },
3492
+ onClick: () => toggleStore(store._id),
3493
+ children: [
3494
+ /* @__PURE__ */ jsx10(
3495
+ "p",
3496
+ {
3497
+ className: "flex-1 min-w-0",
3498
+ style: {
3499
+ fontFamily: T6.font,
3500
+ fontSize: T6.fsSm,
3501
+ fontWeight: 400,
3502
+ lineHeight: T6.lhSm,
3503
+ color: T6.primary
3504
+ },
3505
+ children: store.name || store._id
3506
+ }
3507
+ ),
3508
+ /* @__PURE__ */ jsx10(
3509
+ CheckboxSvg,
3510
+ {
3511
+ checked: selectedStores.has(
3512
+ store._id
3513
+ )
3514
+ }
3515
+ )
3516
+ ]
3517
+ },
3518
+ store._id
3519
+ )),
3520
+ filteredStores.length === 0 && /* @__PURE__ */ jsx10(
3521
+ "p",
3522
+ {
3523
+ style: {
3524
+ fontFamily: T6.font,
3525
+ fontSize: T6.fsSm,
3526
+ fontWeight: 400,
3527
+ lineHeight: T6.lhSm,
3528
+ color: T6.muted
3529
+ },
3530
+ children: "No stores found"
3531
+ }
3532
+ )
3533
+ ]
3534
+ }
3535
+ )
3536
+ }
3481
3537
  )
3482
- }
3483
- )
3484
- ]
3538
+ ]
3539
+ }
3540
+ )
3485
3541
  }
3486
3542
  )
3487
- }
3488
- )
3489
- ]
3543
+ ]
3544
+ }
3545
+ ) })
3490
3546
  }
3491
- ) }) })
3547
+ ) })
3492
3548
  ]
3493
3549
  }
3494
3550
  )
@@ -3535,11 +3591,15 @@ function InviteUpdateModal({
3535
3591
  role,
3536
3592
  canUseCredits,
3537
3593
  canInviteUser,
3538
- artifax: artifaxOn,
3539
- photogenix: photogenixOn,
3540
- catalogix: catalogixOn,
3541
- returns: returnsOn,
3542
- catalogixStores: Array.from(selectedStores)
3594
+ artifax: appValue("artifax"),
3595
+ photogenix: appValue("photogenix"),
3596
+ catalogix: appValue("catalogix"),
3597
+ returns: appValue("returns"),
3598
+ // Stores ride on Catalogix, so they follow it: a
3599
+ // hidden Catalogix grants no app and therefore no
3600
+ // storefronts. Keeping them would leave a member
3601
+ // scoped to stores in a product they cannot open.
3602
+ catalogixStores: role === "admin" || showsApp("catalogix") ? Array.from(selectedStores) : []
3543
3603
  };
3544
3604
  if (isInvite && onInvite) {
3545
3605
  onInvite(perms, emailValue.trim());
@@ -4292,7 +4352,8 @@ function TeamsContent({
4292
4352
  onInviteOpenChange,
4293
4353
  workspaceName,
4294
4354
  workspaceImageUrl,
4295
- organizationName
4355
+ organizationName,
4356
+ hiddenApps
4296
4357
  } = {}) {
4297
4358
  const { auth, api, organization, workspace, toast } = useSettingsAdapters();
4298
4359
  const user = auth.user;
@@ -4764,6 +4825,7 @@ function TeamsContent({
4764
4825
  mode: modal.mode,
4765
4826
  userEmail: modal.target?.userEmail,
4766
4827
  stores: allStores,
4828
+ hiddenApps,
4767
4829
  allowSubmitWithoutChanges: modal.target?.kind === "invite",
4768
4830
  initialPermissions: currentMemberPermissions,
4769
4831
  onClose: closeModal,
@@ -11091,19 +11153,22 @@ function ReferralTab() {
11091
11153
  function SettingsContent({
11092
11154
  adapters,
11093
11155
  activeTab = "profile",
11094
- onClose
11156
+ onClose,
11157
+ hiddenApps
11095
11158
  }) {
11096
11159
  return /* @__PURE__ */ jsx20(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx20(
11097
11160
  SettingsContentInner,
11098
11161
  {
11099
11162
  activeTab,
11100
- onClose: onClose ?? adapters.navigation.close
11163
+ onClose: onClose ?? adapters.navigation.close,
11164
+ hiddenApps
11101
11165
  }
11102
11166
  ) });
11103
11167
  }
11104
11168
  function SettingsContentInner({
11105
11169
  activeTab,
11106
- onClose
11170
+ onClose,
11171
+ hiddenApps
11107
11172
  }) {
11108
11173
  const {
11109
11174
  auth: _auth,
@@ -11771,7 +11836,8 @@ function SettingsContentInner({
11771
11836
  onInviteOpenChange: setTeamInviteOpen,
11772
11837
  workspaceName: workspaceScopeName,
11773
11838
  workspaceImageUrl: currentWorkspaceData?.imageUrl,
11774
- organizationName: organizationScopeName
11839
+ organizationName: organizationScopeName,
11840
+ hiddenApps
11775
11841
  }
11776
11842
  ) }),
11777
11843
  activeTab === "workspaceList" && /* @__PURE__ */ jsx20(
@@ -11910,19 +11976,8 @@ function SettingsContentInner({
11910
11976
  }
11911
11977
  );
11912
11978
  }
11913
-
11914
- // src/team-types.ts
11915
- var DEFAULT_PERMISSIONS = {
11916
- artifax: true,
11917
- photogenix: true,
11918
- catalogix: true,
11919
- returns: true,
11920
- canUseCredits: true,
11921
- canInviteUser: true,
11922
- role: "admin",
11923
- catalogixStores: []
11924
- };
11925
11979
  export {
11980
+ APP_KEYS,
11926
11981
  BillingContent,
11927
11982
  BuyCreditsModal,
11928
11983
  ConfirmDeleteModal,