@proveanything/smartlinks-utils-ui 0.12.1 → 0.12.2

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.
@@ -8686,8 +8686,20 @@ function RecordsAdminShellInner(props) {
8686
8686
  return productBrowse.items;
8687
8687
  }, [pinnedProduct.item, productBrowse.items]);
8688
8688
  const singletonConflicts = useMemo(
8689
- () => cardinality === "singleton" ? groupSingletonConflicts(recordList.items, activeStatuses) : [],
8690
- [cardinality, recordList.items, activeStatuses]
8689
+ () => {
8690
+ if (cardinality !== "singleton") return [];
8691
+ if (recordList.isLoading) return [];
8692
+ if (recordList.isFetchingNextPage || recordList.hasNextPage) return [];
8693
+ return groupSingletonConflicts(recordList.items, activeStatuses);
8694
+ },
8695
+ [
8696
+ cardinality,
8697
+ recordList.items,
8698
+ recordList.isLoading,
8699
+ recordList.isFetchingNextPage,
8700
+ recordList.hasNextPage,
8701
+ activeStatuses
8702
+ ]
8691
8703
  );
8692
8704
  const hasSingletonConflicts = singletonConflicts.length > 0;
8693
8705
  const totalDuplicateCount = useMemo(
@@ -9337,7 +9349,7 @@ function RecordsAdminShellInner(props) {
9337
9349
  to: e.to
9338
9350
  }),
9339
9351
  onChanged: () => {
9340
- void recordList.refetch();
9352
+ void refetchAll();
9341
9353
  if (cardinality === "singleton") {
9342
9354
  ruleScopedList.refetch();
9343
9355
  globalScopedList.refetch();
@@ -9656,8 +9668,12 @@ function RecordsAdminShellInner(props) {
9656
9668
  setRuleWizardStep(2);
9657
9669
  } else {
9658
9670
  setRuleWizardStep(2);
9671
+ if (ruleWizardSeedMode) {
9672
+ setRuleWizardDraftKey(mintRuleWizardDraftKey());
9673
+ setSelectedRecordId(DRAFT_ID3);
9674
+ }
9659
9675
  }
9660
- }, [cardinality]);
9676
+ }, [cardinality, ruleWizardSeedMode, mintRuleWizardDraftKey]);
9661
9677
  const startRuleWizardDraft = useCallback((seed) => {
9662
9678
  setRuleWizardSeedMode(seed);
9663
9679
  setRuleWizardDraftKey(mintRuleWizardDraftKey());
@@ -10269,11 +10285,11 @@ function RecordsAdminShellInner(props) {
10269
10285
  console.warn("[RecordsAdminShell] archive-duplicate failed", id, err);
10270
10286
  }
10271
10287
  }
10272
- recordList.refetch();
10273
10288
  if (cardinality === "singleton") {
10274
10289
  ruleScopedList.refetch();
10275
10290
  globalScopedList.refetch();
10276
10291
  }
10292
+ await refetchAll();
10277
10293
  } : void 0,
10278
10294
  onDeleteDuplicates: enableDeleteDuplicates ? async () => {
10279
10295
  const ids = singletonConflicts.flatMap((c) => c.duplicates.map((d) => d.id)).filter((id) => !!id);
@@ -10290,11 +10306,11 @@ function RecordsAdminShellInner(props) {
10290
10306
  console.warn("[RecordsAdminShell] delete-duplicate failed", id, err);
10291
10307
  }
10292
10308
  }
10293
- recordList.refetch();
10294
10309
  if (cardinality === "singleton") {
10295
10310
  ruleScopedList.refetch();
10296
10311
  globalScopedList.refetch();
10297
10312
  }
10313
+ await refetchAll();
10298
10314
  } : void 0,
10299
10315
  i18n: {
10300
10316
  title: i18n.conflictBannerTitle,