Skip to content

Commit 48cdb65

Browse files
committed
l10n(moji): update translations
1 parent 4372c52 commit 48cdb65

File tree

3 files changed

+167
-10
lines changed

3 files changed

+167
-10
lines changed

guides/embed/box-embed.md

Lines changed: 167 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ fullyTranslated: true
2222
---
2323
# Box Embed
2424

25-
Box EmbedはHTMLベースのフレームワークで、これにより、独自に作成したアプリケーションにBoxウェブアプリの機能全体を埋め込むことができます。Box Embedを使用すると、ファイルのアップロード、検索、コメント付け、共有、タグ付けに加え、Box Editを使用したファイルの編集も可能になります。
25+
Box Embed is a HTML-based framework that allows embedding the entire Box Web App experience in a custom-made application. Box Embed provides the ability to upload, search, comment, share, tag, and edit files using Box Edit. You can also embed Box Hubs AI Chat for a focused chatbot experience.
2626

2727
## 開始する前に
2828

2929
ウィジェットを作成するには、以下のことが必要です。
3030

31-
* 共有用の埋め込み可能な要素 (**フォルダ****ファイル****Hub****メモ****アプリ**など) を設定する。
31+
* Set an embeddable element, such as a folder, file, hub, note, or app for sharing.
3232
* **ビューアー**以上の[権限][5]がある。
3333

3434
## ウェブアプリの使用
@@ -43,19 +43,25 @@ BoxウェブアプリからBox埋め込みウィジェットのコードを取
4343

4444
### Hub
4545

46-
1. 選択したHubに移動します。
47-
2. 右上にある省略記号メニューをクリックします。
46+
1. Navigate to the chosen hub.
47+
2. Click on the ellipsis menu in the upper-right corner.
4848
3. \[**Hubを埋め込む**] をクリックします。
4949

50+
<Message type="notice">
51+
52+
You can also embed only the AI chat interface from a hub. Users can ask questions and get AI-powered answers based on the hub's files, without accessing navigation or file browsing features. For more information, see the [Box Hubs AI Chat embedding][6] section.
53+
54+
</Message>
55+
5056
### メモ
5157

52-
1. 選択したBox Noteに移動します。
58+
1. Navigate to the chosen note.
5359
2. 省略記号メニューをクリックします。
5460
3. \[**埋め込みウィジェット**] をクリックします。
5561

5662
### アプリ
5763

58-
1. 選択したBoxアプリまたはBoxアプリビューに移動します。
64+
1. Navigate to the chosen app or Box App View.
5965
2. 省略記号メニューをクリックします。
6066
3. \[**埋め込む**] をクリックします。
6167

@@ -67,9 +73,14 @@ BoxウェブアプリからBox埋め込みウィジェットのコードを取
6773

6874
次の手順では、埋め込み可能な要素のパラメータを構成します。
6975

70-
| ファイル | フォルダ | Hub | メモ | アプリ |
71-
| ---------- | ----------------------------------------------- | -------------------------------- | --------------------------------------------------------------------- | ---------- |
72-
| ウィジェットのサイズ | ウィジェットのサイズ、フォルダ内のファイルの並べ替え、ナビゲーションパスとサイドバーの非表示。 | ウィジェットのサイズ、親のナビゲーションパスとサイドバーの非表示 | ウィジェットのサイズ、クラウド (雲) ゲームのスキップ (その結果、メモは読み取り専用モードになります)、メモのナビゲーションの非表示。 | ウィジェットのサイズ |
76+
| Element Type | Configuration Options |
77+
| ------------ | --------------------------------------------------------------------- |
78+
| ファイル | ウィジェットのサイズ |
79+
| フォルダ | ウィジェットのサイズ、フォルダ内のファイルの並べ替え、ナビゲーションパスとサイドバーの非表示。 |
80+
| Hub | ウィジェットのサイズ、親のナビゲーションパスとサイドバーの非表示 |
81+
| Hubs AI Chat | Chat mode: button or widget. |
82+
| メモ | ウィジェットのサイズ、クラウド (雲) ゲームのスキップ (その結果、メモは読み取り専用モードになります)、メモのナビゲーションの非表示。 |
83+
| アプリ | ウィジェットのサイズ |
7384

7485
<ImageFrame border>
7586

@@ -89,7 +100,8 @@ Box Embedをさらにカスタマイズする場合は、プログラムを使
89100
width="{pixels}"
90101
height="{pixels}"
91102
frameborder="0"
92-
allow="local-network-access; clipboard-read; clipboard-write"
103+
<!-- Optionally replace * with your enterprise-specific domain (for example, mycompanydomain.app.box.com) -->
104+
allow="local-network-access *; clipboard-read *; clipboard-write *"
93105
allowfullscreen
94106
webkitallowfullscreen
95107
msallowfullscreen>
@@ -174,6 +186,143 @@ Box Embedスニペットの全画面表示機能を有効にするために、
174186
* `oallowfullscreen`
175187
* `msallowfullscreen`
176188

189+
## Box Hubs AI Chat embedding
190+
191+
In addition to embedding the complete Box Hub experience, you can embed only the AI-powered chat interface. This mode provides a focused chatbot experience powered by the files within a specific hub, without navigation or content browsing options.
192+
193+
### 前提条件
194+
195+
To access a hub embedded in AI Chat mode:
196+
197+
* The enterprise that owns the hub must have Box AI for Hubs enabled.
198+
* The user must be authenticated and have Box AI for Hubs enabled at their enterprise.
199+
* The user needs at least Viewer [permissions][5] on the hub.
200+
201+
### Creating an AI Chat embed
202+
203+
1. Navigate to the hub that will serve as the knowledge source for the AI Chat.
204+
205+
2. Click the ellipsis menu in the upper-right corner.
206+
207+
3. \[**Hubを埋め込む**] をクリックします。
208+
209+
4. Select the **Hub AI Chat** tab.
210+
211+
5. Select chat mode:
212+
213+
* [Chat button][7]
214+
* [Chat widget][8]
215+
216+
6. Copy the embed code.
217+
218+
<Message type="notice">
219+
220+
If you experience issues with the Box Hubs AI Chat embedding, regenerate the embed code to get the latest version of the script by repeating steps 1-6 above.
221+
222+
</Message>
223+
224+
### Chat button
225+
226+
In **Chat button** mode, the AI chat widget opens after the user clicks the button. It is generated as a Box-hosted `script` and displays a floating chat button on your page.
227+
228+
![Chat button mode](./chat-button.png)
229+
230+
#### Chat button parameters
231+
232+
The **Chat button** mode supports the following parameters:
233+
234+
| パラメータ | 必須 | 説明 |
235+
| ------------------------ | --- | ------------------------------------------------------------------------------------------------------------------------------------ |
236+
| `data-hub-id` | はい | The ID of the hub that powers the chatbot. |
237+
| `data-custom-box-domain` | いいえ | For Box instances with custom domains. Default: `app.box.com`. Example: `mycompanydomain.app.box.com`. |
238+
| `data-button-text` | いいえ | Custom text to display on the chat button. Default: `Box AI`. This value is also used for the button's area label for accessibility. |
239+
| `data-shared-link` | いいえ | Optional shared link for hub access. If not provided, the chat loads only for users who are collaborators on the hub. |
240+
241+
The following example shows a fully configured chat button with all available parameters:
242+
243+
```html
244+
<script
245+
src="https://cdn01.boxcdn.net/embeddable-ai-chat-script/2.8.0/box_integrations_ai_chat_button.js"
246+
data-hub-id="123456789"
247+
data-custom-box-domain="mycompanydomain.app.box.com"
248+
data-shared-link="abcdefghijklmnopqrst123"
249+
data-button-text="Ask our HR chatbot">
250+
</script>
251+
252+
```
253+
254+
### Chat widget
255+
256+
In **Chat widget** mode, the AI chat widget is embedded directly on page load. It is generated as an `iframe` and displays the full chat interface immediately.
257+
258+
<ImageFrame shadow>
259+
260+
![Chat widget mode](./chat-widget.png)
261+
262+
</ImageFrame>
263+
264+
#### Chat widget parameters
265+
266+
In **Chat widget** mode, the AI chat widget is embedded directly on the page using an `iframe`. You can customize the behavior by adding URL parameters to the iframe's `src` attribute:
267+
268+
| パラメータ | 説明 |
269+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
270+
| `hubId` | The ID of the hub that powers the chatbot. |
271+
| `sharedLink` | The shared link hash for hub access. If not provided, the chat loads only for users who are collaborators on the hub. |
272+
| `showCloseButton` | Whether to show the [X (close) button][9] in the chat interface. When set to `true`, the close button is displayed. When a user clicks this button, Box generates an event that is sent to the parent web application, enabling you to implement custom closing logic based on the user interaction. |
273+
274+
The following example shows a fully configured chat widget with all available parameters:
275+
276+
```html
277+
<iframe
278+
src="https://yourcompanydomain.app.box.com/ai-chat?hubId=123456789&sharedLink=abcdefghijklmnop123&showCloseButton=false"
279+
width="800"
280+
height="550"
281+
frameBorder="0"
282+
<!-- Optionally replace * with your enterprise-specific domain (for example, mycompanydomain.app.box.com) -->
283+
allow="local-network-access *; clipboard-read *; clipboard-write *"
284+
allowfullscreen
285+
webkitallowfullscreen
286+
msallowfullscreen>
287+
</iframe>
288+
289+
```
290+
291+
#### Using the close button
292+
293+
When embedding the Box AI chat directly with `iframe` (without using the provided script), you can enable a close button within the chat interface that communicates with your parent application through `postMessage`.
294+
295+
##### Enabling the close button
296+
297+
To display a close button (✕) in the corner of the iframe, add the `showCloseButton=true` query parameter to your `iframe` URL as follows: `https://app.box.com/ai-chat?hubId=YOUR_HUB_ID&showCloseButton=true`
298+
299+
##### How it works
300+
301+
1. When `showCloseButton=true` is set, an X button appears in the corner of the chat iframe.
302+
2. When a user clicks this button, the iframe sends a `postMessage` event to the parent window.
303+
3. The event contains `event.data.type` set to `"BOX_AI_CHAT_CLOSE"`.
304+
4. Your hosting application listens for this event and handles the closing logic.
305+
306+
##### Implementation example
307+
308+
```javascript
309+
window.addEventListener('message', (event) => {
310+
// Optional: validate origin is from Box for additional security
311+
// if (event.origin !== 'https://app.box.com') return;
312+
313+
if (event.data && event.data.type === 'BOX_AI_CHAT_CLOSE') {
314+
closeChat();
315+
}
316+
});
317+
318+
```
319+
320+
##### Event reference
321+
322+
| プロパティ || 説明 |
323+
| ----------------- | --------------------- | --------------------------------------------------------------- |
324+
| `event.data.type` | `"BOX_AI_CHAT_CLOSE"` | Indicates the user clicked the close button in the chat iframe. |
325+
177326
## 有効期限付き埋め込みリンク
178327

179328
ファイルの場合、[`GET /files/:id`][1]を呼び出し、`fields`クエリパラメータを使用して`expiring_embed_link`をリクエストすることもできます。
@@ -286,3 +435,11 @@ Box Embedは、モバイルブラウザ向けには最適化されていない
286435
[5]: https://support.box.com/hc/ja/articles/360044196413-コラボレータの権限レベルについて
287436

288437
[cloud-game]: https://support.box.com/hc/ja/articles/360043691034-Boxはどのようにしてクリックジャッキングを防止していますか
438+
439+
[6]: g://embed/box-embed/#box-hubs-ai-chat-embedding
440+
441+
[7]: g://embed/box-embed/#chat-button
442+
443+
[8]: g://embed/box-embed/#chat-widget
444+
445+
[9]: g://embed/box-embed/#using-the-close-button

guides/embed/chat-button.png

229 KB
Loading

guides/embed/chat-widget.png

109 KB
Loading

0 commit comments

Comments
 (0)