@geniee-inc/sfa-kit 1.7.0 → 1.7.1

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/GUIDE.md CHANGED
@@ -600,9 +600,9 @@ function CompanyRow({ record }: { record: SfaRecord }) {
600
600
  }
601
601
  ```
602
602
 
603
- Returns `{ url: string, target: '_top' | '_blank' } | null`.
603
+ Returns `{ url: string, target: '_blank' } | null`.
604
604
 
605
- - `target` is `'_top'` when running inside an SFA iframe (navigates the parent frame to the record).
605
+ - `target` is always `'_blank'` so the record detail page opens in a new browser tab, preserving the user's current Studio page.
606
606
  - Returns `null` in standalone preview mode (no host origin to build a URL from), when no `organizationId` is in context, or when the collection does not have a standard record page (e.g. `schedules`).
607
607
 
608
608
  ### buildRecordDetailUrl (advanced)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geniee-inc/sfa-kit",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "React hooks and components for building pages that connect to GENIEE SFA/CRM data.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -7,8 +7,8 @@ import type { RecordDetailLink } from '../navigation/record-detail-url';
7
7
  * Reads the organization ID from `SfaContext` and the host origin from
8
8
  * `document.referrer` (the SFA parent frame). No configuration needed.
9
9
  *
10
- * The returned `target` is always `'_top'` (navigates the SFA parent frame),
11
- * because the hook only returns a link when running inside an iframe.
10
+ * The returned `target` is always `'_blank'` so the record opens in a new
11
+ * browser tab, preserving the user's current Studio page context.
12
12
  *
13
13
  * @example
14
14
  * ```tsx
@@ -9,8 +9,8 @@ import { useSfaContext } from '../provider/useSfaClient';
9
9
  * Reads the organization ID from `SfaContext` and the host origin from
10
10
  * `document.referrer` (the SFA parent frame). No configuration needed.
11
11
  *
12
- * The returned `target` is always `'_top'` (navigates the SFA parent frame),
13
- * because the hook only returns a link when running inside an iframe.
12
+ * The returned `target` is always `'_blank'` so the record opens in a new
13
+ * browser tab, preserving the user's current Studio page context.
14
14
  *
15
15
  * @example
16
16
  * ```tsx
@@ -37,6 +37,6 @@ export function useRecordDetailUrl(collectionName, recordId) {
37
37
  if (url == null) {
38
38
  return null;
39
39
  }
40
- return { url, target: '_top' };
40
+ return { url, target: '_blank' };
41
41
  }, [organizationId, collectionName, recordId]);
42
42
  }
@@ -24,12 +24,11 @@ export interface RecordDetailLink {
24
24
  /** The full URL to the record detail page. */
25
25
  readonly url: string;
26
26
  /**
27
- * Suggested link target. Always `'_top'` because the hook only returns a
28
- * link when running inside an iframe, and `_top` navigates the SFA parent
29
- * frame to the record detail page. Callers may override with `'_blank'`
30
- * in their `<a>` tag if the user prefers a new tab.
27
+ * Suggested link target. Always `'_blank'` so the record detail page opens
28
+ * in a new browser tab, preserving the user's current Studio page context.
29
+ * The SFA iframe sandbox includes `allow-popups` to permit this.
31
30
  */
32
- readonly target: '_top';
31
+ readonly target: '_blank';
33
32
  }
34
33
  /**
35
34
  * @description Builds the full URL for a record's detail page in SFA/CRM.
@@ -1 +1 @@
1
- export declare const SFA_KIT_VERSION = "1.7.0";
1
+ export declare const SFA_KIT_VERSION = "1.7.1";
@@ -1 +1,3 @@
1
- export const SFA_KIT_VERSION = "1.7.0";
1
+ // このファイルは libs/sfa-kit/scripts/sync-version.cjs が生成する。
2
+ // 手で編集しないこと。バージョンを上げるときは libs/sfa-kit/package.json を変更する。
3
+ export const SFA_KIT_VERSION = '1.7.1';