# @bigbinary/neeto-thank-you-frontend 中文文档

规范地址：https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/

版本：3\.4\.1
npm 元数据更新时间：2026-10-30T05:10:08.453Z
中文译文更新时间：2026-11-08T02:12:03.269Z
软件包许可：UNLICENSED

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40bigbinary/neeto-thank-you-frontend
原文对照：https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/?lang=original
项目主页：https://github.com/bigbinary/neeto-thank-you-nano

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：814 kB，199 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22\.13
- 运行依赖：3 个
- peer 依赖：qs 6\.16\.2，url 0\.11\.4，yup 0\.32\.11，antd 5\.22\.1，util ^0\.12\.5，axios 1\.20\.0，ramda 0\.29\.0，react 18\.3\.1，buffer ^6\.0\.3，formik 2\.4\.6，i18next 22\.5\.1，zustand 4\.4\.2，dompurify 3\.4\.17，js-logger 1\.6\.1，react-dom 18\.3\.1，classnames 2\.5\.1，stream-http 3\.2\.0，tailwindcss 3\.4\.14，react-helmet ^6\.1\.0，os-browserify 0\.3\.0，react-i18next 12\.3\.1，vm-browserify 1\.1\.2，@babel/runtime 7\.29\.7，react-toastify 8\.0\.2，tty-browserify 0\.0\.1，path-browserify ^1\.0\.1，https-browserify 1\.0\.0，mixpanel-browser 2\.45\.0，react-router-dom 5\.3\.3，crypto-browserify 3\.12\.1，source-map-loader 4\.0\.1，stream-browserify ^3\.0\.0，@bigbinary/neetoui 8\.8\.3，@honeybadger-io/js 6\.10\.1，@bigbinary/neeto-cist 1\.0\.17，@honeybadger-io/react 6\.1\.25，@tanstack/react-query 5\.59\.20，@bigbinary/neeto-atoms 1\.1\.2，@bigbinary/neeto-icons 1\.20\.89，@bigbinary/neeto-molecules 5\.9\.11，@tailwindcss/container-queries 0\.1\.1，@tanstack/react-query-devtools 5\.59\.20，@bigbinary/neeto-editor-frontend 2\.3\.1，@bigbinary/neeto-commons-frontend 4\.14\.5，@bigbinary/neeto-filters-frontend 4\.6\.1
- 首次发布：2023-09-12T23:12:55.339Z
- 最新版本发布：2026-10-30T05:10:08.253Z
- 近 30 天下载量：10004（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：138（近 12 个月 41 个）

## 中文简介

一个回波作为新纳米结构,配置,数据等的真理来源.

## 安装

```sh
npm install @bigbinary/neeto-thank-you-frontend
```

也可以使用：`pnpm add @bigbinary/neeto-thank-you-frontend`、`yarn add @bigbinary/neeto-thank-you-frontend`、`bun add @bigbinary/neeto-thank-you-frontend`

## README

# {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}需要谢谢

这个 `neeto-thank-you-nano` 管理“ 谢谢” 配置页面 需要申请。 纳米出口 `@bigbinary/neeto-thank-you-frontend` 国家防范机制一揽子计划 `neeto-thank-you-engine` 铁路发展引擎.

纳米还支持每个实体的多页感谢,允许您 配置和显示不同的感谢页 .

# 目录

1.  [用主机应用程序开发](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-development-with-host-application)
    -   [发动机](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-engine)
        -   [安装](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-installation)
        -   [使用量](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-usage)
    -   [前端软件包](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-frontend-package)
        -   [安装](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-installation-1)
        -   [构成部分](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-components)
        -   [钩子](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-hooks)
2.  [出版指令](https://npmcn.com/package/%40bigbinary/neeto-thank-you-frontend/#readme-instructions-for-publishing)

# 用主机应用程序开发

## 发动机

该引擎用于管理一个内“谢谢”页面配置 组织.

### 安装

1.  将此行添加到您的应用程序的 Gemfile 中 :
    
    ```ruby
    source "NEETO_GEM_SERVER_URL" do
       # ..existing gems
    
       gem 'neeto-thank-you-engine'
    end
    ```
    
2.  然后执行:
    
    ```ruby
    bundle install
    ```
    
3.  将此行添加到您的应用程序 `config/routes.rb` 文件 :
    
    ```ruby
    mount NeetoThankYouEngine::Engine, at: "/neeto_thank_you"
    ```
    
4.  运行以下命令以复制从引擎到主机的迁移 应用程序 :
    
    ```ruby
    bundle exec rails neeto_thank_you_engine:install:migrations
    ```
    
5.  添加迁移到数据库 :
    
    ```ruby
    bundle exec rails db:migrate
    ```
    

### 使用量

您可以在此了解更多设置和用途:

1.  [模型](https://npmcn.com/docs/engine/models.md)
2.  [主计长](https://npmcn.com/docs/engine/controllers.md)

## 前端软件包

软件包输出两个组件: `ConfigureThankYou` 财务报告和审定财务报表 `ShowThankYou`。 。 。 .

软件包还输出了多个用于管理感谢配置的钩子, 包括 `useFetchThankYouConfigurations` 用于检索 多谢您的实体配置 .

### 安装

安装最新的 `neeto-thank-you-nano` 使用下列命令的软件包:

```zsh
yarn add @bigbinary/neeto-thank-you-frontend
```

### 发展指示

检查 [前端软件包开发指南](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) 用于开发前端软件包的分步指令.

### 构成部分

#### `ConfigureThankYou` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/f7c53e11319268eac4de3bd5642e228063d431fb/app/javascript/src/components/ConfigureThankYou/index.jsx)(中文(简体) )

此组件管理主机中“ Thank you” 页的配置 应用.

##### 道具

-   `id` - 特定谢谢配置的标识
-   `breadcrumbs` - 设置头部组件的面包屑
-   `socialHandles` - 设定共享到社交媒体的URL
-   `isPublished` - 布尔以管理“谢谢”页面中的指针事件 配置预览
-   `entityId` - 设置与“谢谢”页面相关的实体ID
-   `publicLinkId` - 设置与该实体有关的实体的公共链接标识 谢谢你的社交媒体共享配置
-   `hasImageUploader` - 布尔以启用信件中的图像上传功能 在配置页面上编辑
-   `uniqueSubmissionEnabled` - 布尔以显示唯一提交文件的链接
-   `uniqueSubmissionLink` - 为独特的提交设定链接
-   `resubmitLink` - 为重新提交设置链接
-   `redirectToOnCancel` - 设定取消提交后重定向的路径
-   `thankYouTextAlignment` - 设置“ 谢谢” 文本的对齐 页 次
-   `customHeader` - 接受反应节点并替换默认标题.
-   `appName` - 接受吗 `appName`,用于生成符号 品牌文本中的 URL .
-   `appIcon` - 接受吗 `appIcon`,用于在 (原始内容存档于2018-03-21). Neeto MadeWith徽章.
-   `disableSubmitAnotherResponse` - 删除提交另一个文件的切换 响应,以 NeetoForm \[默认:虚假\]为例.
-   `disableRadioSelection` - 移除用于 `Custom message` 打开 `Redirect to external link` \[默认:虚假\]
-   `blockNavigation` - 布尔在感谢中显示区块导航警报 当有未保存的更改时, 配置页面 \[默认: 假\]
-   `editorProps` - 接受需要传递给编辑部分的道具.
-   `preview` - 可选反应组件,用于提供自定义预览,而不是 默认的.
-   `allowEmptyCustomMessage` - 一个布尔的旗帜,当设定为真实,跳过 提交空信件的前端验证 。 \[默认:虚假\]
-   `onConfigUpdateSuccess`: 当 配置正在更新。 函数的第一个参数对应 参数传递到 `onSuccess` 调用 React 查询突变, 而 第二个参数代表先前的配置对象.
-   `isPassEventDetailsEnabled` - 一个布尔旗,当设置为真实,显示 切换将事件细节传递到重定向 URL 参数.
-   `eventDetailsHelpDescription` - 描述在帮助中显示 跳过下一个 开关。 在未提供时, 返回为通用默认 。 弹出 仅在 `passEventDetailsHelpDocUrl` 也给予.
-   `ctaProps` - 包含呼叫对动作按钮属性的对象 页面预览。 提供时,此按钮将 链接到指定应用的 Neeto 产品页面。 按钮不会是 如果不提供这种道具,则提供。 该对象可以包含:
    -   `message` - 显示在按钮左侧的信件文本
    -   `buttonLabel` - 按钮上显示的文字

##### 配置

参见 [配置谢谢](https://npmcn.com/docs/frontend/configure_thank_you.md) 节 详细信息,说明现有配置 `ConfigureThankYou` 组件.

##### 使用量

```jsx
import React from "react";

import { ConfigureThankYou } from "@bigbinary/neeto-thank-you-frontend";

const App = () => {
  const breadcrumbs = [{ text: "Configure", link: "/configure" }];
  const socialHandles = [
    {
      icon: Facebook,
      generateShareUrl: entityId => `https://www.facebook.com/${entityId}`,
    },
  ];

  const handleConfigUpdateSuccess = (
    onSuccessCallbackParams,
    previousConfiguration
  ) => {
    // Add your logic here
  };

  return (
    <>
      <ConfigureThankYou
        blockNavigation
        hasImageUploader
        id
        breadcrumbs={breadcrumbs}
        entityId={entityId}
        publicLinkId={publicLinkId}
        isPublished={isPublished}
        resubmitLink={resubmitLink}
        socialHandles={socialHandles}
        uniqueSubmissionEnabled={uniqueSubmissionEnabled}
        uniqueSubmissionLink={uniqueSubmissionLink}
        redirectToOnCancel={redirectToOnCancel}
        thankYouTextAlignment={thankYouTextAlignment}
        appName="NeetoForm"
        appIcon={() => {}}
        ctaProps={{
          message:
            "This form was built with NeetoForm — modern forms made simple.",
          buttonLabel: "Create your NeetoForm",
        }}
        onConfigUpdateSuccess={handleConfigUpdateSuccess}
        helpPopoverProps={HELP_POPOVER_PROPS}
        eventDetailsSwitchLabel={eventDetailsSwitchLabel}
        eventDetailsHelpDescription={eventDetailsHelpDescription}
      />
    </>
  );
};

export default App;
```

#### `ShowThankYou` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/f7c53e11319268eac4de3bd5642e228063d431fb/app/javascript/src/components/ShowThankYou/index.jsx)(中文(简体) )

此组件在提交后按 主机应用程序中设置的配置 .

说明: `dompurify` 需要在 Show Thank you 中显示。 使用以下命令安装 `dompurify`。 。 。 .

```bash
yarn add dompurify
```

##### 道具

-   `entityId` - 设置与“谢谢”页面相关的实体ID
-   `socialHandles` - 设定共享到社交媒体的URL
-   `isDraftPreview` - 布尔生成重提交 URL 草稿
-   `resubmitLink` - 为重新提交设置链接
-   `isThankYouPageLoading` - 显示装入状态的布尔值
-   `thankYouTextAlignment` - 在“谢谢”一页设置内容对齐
-   `customPageLoader` - 指定自定义加载器组件来替换默认 页面加载器.
-   `appName` - 接受吗 `appName`,用于生成符号 品牌文本中的 URL .
-   `appIcon` - 接受吗 `appIcon`,用于在 (原始内容存档于2018-03-21). Neeto MadeWith徽章.
-   `editorProps` - 接受需要传递给编辑部分的道具.
-   `enableTopLevelRedirect` - 布尔值以控制顶级页面 或只调整嵌入式iframe。 默认情况下, 顶级 页面将重新定向。 禁用此选项将限制重定向到 只有嵌入式iframe.
-   `eventDetails` - 包含按键值对的对象,将附加为 如果 `pass_event_details_to_redirect_url` 被设定为真实。 默认为空对象 (QQ) .
-   `ctaProps` - 包含呼叫对动作按钮属性的对象 出现在感谢页。 当提供时,此按钮将链接到 指定应用程序的 Neeto 产品页。 按钮不会被打开 如果不提供此道具。 该对象可以包含:
    -   `message` - 显示在按钮左侧的信件文本
    -   `buttonLabel` - 按钮上显示的文字
-   `resourceId` - 与感谢配置相关的资源标识 (例如, `submissionId` 在尼托福尔姆.

##### 使用量

```jsx
import React from "react";

import { ShowThankYou } from "@bigbinary/neeto-thank-you-frontend";

const App = () => {
  const socialHandles = [
    {
      icon: Facebook,
      generateShareUrl: entityId => `https://www.facebook.com/${entityId}`,
    },
  ];

  return (
    <>
      <ShowThankYou
        appName="NeetoForm"
        appIcon={() => {}}
        ctaProps={{
          message:
            "This form was built with NeetoForm — modern forms made simple.",
          buttonLabel: "Create your NeetoForm",
        }}
        entityId={entityId}
        isDraftPreview={isDraftPreview}
        resubmitLink={resubmitLink}
        socialHandles={socialHandles}
        isThankYouPageLoading={isThankYouPageLoading}
        thankYouTextAlignment={thankYouTextAlignment}
        resourceId={submissionId}
      />
    </>
  );
};

export default App;
```

### 钩子

#### `useShowThankYouPage` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/fd519090a7b0ce63db912bdf795872bbdb6f9194/app/javascript/src/hooks/reactQuery/useThankYouPageApi.js#L6)(中文(简体) )

此钩用于获取实体的"谢谢"页面.

##### 道具

-   `entityId` - 装入谢谢配置的实体的标识
-   `resourceId` - 与感谢配置相关的资源标识 (例如, `submissionId` 在尼托福尔姆.
-   `isTemplateView` - 布尔以检查当前页面是否为模板视图

##### 返回值

返回 `data` 对象,包括 `thankYouConfiguration` 对象 包含实体的感谢配置.

##### 使用量

```js
import { useShowThankYouPage } from "@bigbinary/neeto-thank-you-frontend";

const { data: { thankYouConfiguration } = {} } = useShowThankYouPage({
  entityId,
  resourceId,
  isTemplateView,
});
```

#### `useShowThankYouConfiguration` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/5183a59e3a3f097e58498ed27395c4d35067e8d1/app/javascript/src/hooks/reactQuery/useThankYouConfigurationApi.js#L27)(中文(简体) )

此钩用于获取实体的感谢配置 .

##### 道具

-   `entityId` - 装入谢谢配置的实体的标识
-   `id` - 要获取的特定感谢配置的标识

##### 返回值

返回 `data` 对象,包括 `thankYouConfiguration` 对象 包含对实体的感谢配置,以及 `isLoading` 布尔.

##### 使用量

```js
import { useShowThankYouConfiguration } from "@bigbinary/neeto-thank-you-frontend";

const {
  isLoading: isThankYouActionLoading,
  data: { thankYouConfiguration } = {},
} = useShowThankYouConfiguration({
  entityId,
  id,
});
```

#### `useFetchThankYouConfigurations` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/5183a59e3a3f097e58498ed27395c4d35067e8d1/app/javascript/src/hooks/reactQuery/useThankYouConfigurationApi.js#L7)(中文(简体) )

此钩子用于获取一个实体的多重感谢配置 .

##### 道具

-   `entityId` - 载入感谢配置的实体的ID
-   `filters` - 获取配置时可选的过滤器
-   `options` - 可选反应查询选项

##### 返回值

返回 `data` 对象,包括 `thankYouConfigurations` 数组 包含所有实体的感谢配置,以及 `isLoading` 布尔.

##### 使用量

```js
import { useFetchThankYouConfigurations } from "@bigbinary/neeto-thank-you-frontend";

const { isLoading, data: { thankYouConfigurations } = {} } =
  useFetchThankYouConfigurations(entityId, filters, options);
```

#### `useCreateThankYouConfiguration` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/5183a59e3a3f097e58498ed27395c4d35067e8d1/app/javascript/src/hooks/reactQuery/useThankYouConfigurationApi.js#L18)(中文(简体) )

此钩用于为实体创建新的感谢配置 .

##### 道具

-   `entityId` - 创建感谢配置的实体的ID
-   `options` - 可选反应查询变异选项

##### 返回值

返回一个突变函数和突变状态,包括 `isPending` 财务报告和审定财务报表 `error` 属性.

##### 使用量

```js
import { useCreateThankYouConfiguration } from "@bigbinary/neeto-thank-you-frontend";

const { mutate: createConfiguration, isPending } =
  useCreateThankYouConfiguration(entityId);
```

#### `useUpdateThankYouConfiguration` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/5183a59e3a3f097e58498ed27395c4d35067e8d1/app/javascript/src/hooks/reactQuery/useThankYouConfigurationApi.js#L34)(中文(简体) )

此钩用于更新已有的感谢配置 .

##### 道具

-   `id` - 用于更新的感谢配置的标识
-   `options` - 可选反应查询变异选项

##### 返回值

返回一个突变函数和突变状态,包括 `isPending` 财务报告和审定财务报表 `error` 属性.

##### 使用量

```js
import { useUpdateThankYouConfiguration } from "@bigbinary/neeto-thank-you-frontend";

const { mutate: updateConfiguration, isPending } =
  useUpdateThankYouConfiguration(configurationId);
```

#### `useDeleteThankYouConfiguration` (单位:千美元)[源代码](https://github.com/bigbinary/neeto-thank-you-nano/blob/5183a59e3a3f097e58498ed27395c4d35067e8d1/app/javascript/src/hooks/reactQuery/useThankYouConfigurationApi.js#L44)(中文(简体) )

此钩用于删除一个谢谢配置 .

##### 道具

-   `entityId` - 拥有感谢配置的实体的身份
-   `options` - 可选反应查询变异选项

##### 返回值

返回一个突变函数和突变状态,包括 `isPending` 财务报告和审定财务报表 `error` 属性.

##### 使用量

```js
import { useDeleteThankYouConfiguration } from "@bigbinary/neeto-thank-you-frontend";

const { mutate: deleteConfiguration, isPending } =
  useDeleteThankYouConfiguration(entityId);
```

# 出版指令

咨询 [构建和释放软件包](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages) 关于如何出版的详细指南.

## 常见问题

### @bigbinary/neeto-thank-you-frontend 是什么？

一个回波作为新纳米结构,配置,数据等的真理来源\.

### 如何安装 @bigbinary/neeto-thank-you-frontend？

在项目目录运行 npm install @bigbinary/neeto-thank-you-frontend，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：qs（6\.16\.2）、url（0\.11\.4）、yup（0\.32\.11）、antd（5\.22\.1）、util（^0\.12\.5）、axios（1\.20\.0）、ramda（0\.29\.0）、react（18\.3\.1）、buffer（^6\.0\.3）、formik（2\.4\.6）、i18next（22\.5\.1）、zustand（4\.4\.2）、dompurify（3\.4\.17）、js-logger（1\.6\.1）、react-dom（18\.3\.1）、classnames（2\.5\.1）、stream-http（3\.2\.0）、tailwindcss（3\.4\.14）、react-helmet（^6\.1\.0）、os-browserify（0\.3\.0）、react-i18next（12\.3\.1）、vm-browserify（1\.1\.2）、@babel/runtime（7\.29\.7）、react-toastify（8\.0\.2）、tty-browserify（0\.0\.1）、path-browserify（^1\.0\.1）、https-browserify（1\.0\.0）、mixpanel-browser（2\.45\.0）、react-router-dom（5\.3\.3）、crypto-browserify（3\.12\.1）、source-map-loader（4\.0\.1）、stream-browserify（^3\.0\.0）、@bigbinary/neetoui（8\.8\.3）、@honeybadger-io/js（6\.10\.1）、@bigbinary/neeto-cist（1\.0\.17）、@honeybadger-io/react（6\.1\.25）、@tanstack/react-query（5\.59\.20）、@bigbinary/neeto-atoms（1\.1\.2）、@bigbinary/neeto-icons（1\.20\.89）、@bigbinary/neeto-molecules（5\.9\.11）、@tailwindcss/container-queries（0\.1\.1）、@tanstack/react-query-devtools（5\.59\.20）、@bigbinary/neeto-editor-frontend（2\.3\.1）、@bigbinary/neeto-commons-frontend（4\.14\.5）、@bigbinary/neeto-filters-frontend（4\.6\.1）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @bigbinary/neeto-thank-you-frontend 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @bigbinary/neeto-thank-you-frontend 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @bigbinary/neeto-thank-you-frontend 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.13。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @bigbinary/neeto-thank-you-frontend 可以商用吗？

@bigbinary/neeto-thank-you-frontend 使用 UNLICENSED 许可。作者声明为 UNLICENSED，即不授予公开使用许可（与公共领域的 Unlicense 不同）。使用前需获得作者授权。以上为概括，不构成法律意见，请以许可原文为准。

### @bigbinary/neeto-thank-you-frontend 的下载量有多少？

根据 npm 官方下载统计，@bigbinary/neeto-thank-you-frontend 在 2026/10/08 – 2026/11/06 这 30 天内被下载 10,004 次，日均约 333 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @bigbinary/neeto-thank-you-frontend 还在维护吗？

最新版本 3\.4\.1 发布于 2026/10/30（9 天前）；至今共发布 138 个版本，其中过去 12 个月发布了 41 个；首次发布于 2023/09/13。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

