@proveanything/smartlinks-utils-ui 0.11.9 → 0.11.10

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.
@@ -2043,7 +2043,7 @@ var useEditingScope = (args) => {
2043
2043
  const editingItemRecordId = isCollection ? selectedItemId : null;
2044
2044
  const editingScope = useMemo(() => {
2045
2045
  if (activeScope === "rule" || activeScope === "collection" || activeScope === "all") {
2046
- if (activeScope === "rule" && ruleWizardStep === 2 && selectedRecordId === null) {
2046
+ if (activeScope === "rule" && isCollection && ruleWizardStep === 2 && selectedRecordId === null) {
2047
2047
  return { ...parseRef(""), kind: "rule", raw: "rule:__draft__" };
2048
2048
  }
2049
2049
  if (selectedRecordId === null) {
@@ -9532,7 +9532,7 @@ function RecordsAdminShellInner(props) {
9532
9532
  facets: ruleWizardFacets,
9533
9533
  itemNoun,
9534
9534
  children: [
9535
- ruleWizardStep === 2 && !isCollection && !editingTargetScope && /* @__PURE__ */ jsx(
9535
+ ruleWizardStep === 2 && !isCollection && selectedRecordId !== DRAFT_ID3 && /* @__PURE__ */ jsx(
9536
9536
  CreateRecordChooser,
9537
9537
  {
9538
9538
  title: `Create your first ${itemNoun} for this rule`,
@@ -9545,7 +9545,7 @@ function RecordsAdminShellInner(props) {
9545
9545
  onTertiary: wizardClipboard.entry ? () => startRuleWizardDraft("paste") : void 0
9546
9546
  }
9547
9547
  ),
9548
- ruleWizardStep === 2 && !isCollection && !!editingTargetScope && renderEditorWithPreview(),
9548
+ ruleWizardStep === 2 && !isCollection && selectedRecordId === DRAFT_ID3 && !!editingTargetScope && renderEditorWithPreview(),
9549
9549
  ruleWizardStep === 2 && isCollection && !selectedItemId && /* @__PURE__ */ jsx("div", { className: "h-full flex items-center justify-center px-6 py-10", children: /* @__PURE__ */ jsxs("div", { className: "max-w-sm text-center space-y-3", children: [
9550
9550
  /* @__PURE__ */ jsxs(
9551
9551
  "h3",
@@ -9623,7 +9623,7 @@ function RecordsAdminShellInner(props) {
9623
9623
  }
9624
9624
  ),
9625
9625
  ruleWizardStep === null && !isCollection && !editingScope && activeScope === "product" && !selectedProductId && /* @__PURE__ */ jsx(EmptyState, { title: i18n.emptyTitle, body: i18n.emptyBody }),
9626
- ruleWizardStep === null && isProductTab && selectedProductId && (!isCollection || selectedItemId) && /* @__PURE__ */ jsx(
9626
+ ruleWizardStep === null && isProductTab && selectedProductId && (!isCollection || selectedItemId) && !(!isCollection && editingTargetScope && resolved.source !== "self" && selectedRecordId !== DRAFT_ID3) && /* @__PURE__ */ jsx(
9627
9627
  ProductDrillDown,
9628
9628
  {
9629
9629
  productLabel: productBrowse.items.find((p) => p.id === selectedProductId)?.name ?? selectedProductId,
@@ -9660,7 +9660,7 @@ function RecordsAdminShellInner(props) {
9660
9660
  )
9661
9661
  }
9662
9662
  ),
9663
- ruleWizardStep === null && isProductTab && selectedProductId && !isCollection && editingTargetScope && resolved.source === "empty" && selectedRecordId === null ? /* @__PURE__ */ jsx(
9663
+ ruleWizardStep === null && isProductTab && selectedProductId && !isCollection && editingTargetScope && resolved.source !== "self" && selectedRecordId !== DRAFT_ID3 ? /* @__PURE__ */ jsx(
9664
9664
  CreateRecordChooser,
9665
9665
  {
9666
9666
  title: "No record set for this product",