@bigbinary/neeto-thank-you-frontend

中文文档
3.4.1发布于 2026/10/30UNLICENSEDTypeScriptES Module近 30 天下载 1万

A repo acts as the source of truth for the new nano's structure, configs, data etc.

原始使用文档
文档目录8 节
  1. Engine
  2. Installation
  3. Usage
  4. Frontend package
  5. Installation
  6. Instructions for development
  7. Components
  8. Hooks

neeto-thank-you-nano

The neeto-thank-you-nano manages the "Thank You" configuration page across neeto applications. The nano exports the @bigbinary/neeto-thank-you-frontend NPM package and neeto-thank-you-engine Rails engine for development.

The nano also supports multiple thank you pages per entity, allowing you to configure and display different thank you pages as needed.

Contents

  1. Development with Host Application
  2. Instructions for Publishing

Development with Host Application

Engine

The engine is used to manage "Thank you" page configurations within an organization.

Installation

  1. Add this line to your application's Gemfile:

    source "NEETO_GEM_SERVER_URL" do
       # ..existing gems
    
       gem 'neeto-thank-you-engine'
    end
    
  2. And then execute:

    bundle install
    
  3. Add this line to your application's config/routes.rb file:

    mount NeetoThankYouEngine::Engine, at: "/neeto_thank_you"
    
  4. Run the following command to copy the migrations from the engine to the host application:

    bundle exec rails neeto_thank_you_engine:install:migrations
    
  5. Add the migrations to the database:

    bundle exec rails db:migrate
    

Usage

You can learn more about the setup and usage here:

  1. Models
  2. Controllers

Frontend package

The package exports two components: ConfigureThankYou and ShowThankYou.

The package also exports several hooks for managing thank you configurations, including useFetchThankYouConfigurations which can be used to retrieve multiple thank you configurations for an entity.

Installation

Install the latest neeto-thank-you-nano package using the below command:

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

Instructions for development

Check the Frontend package development guide for step-by-step instructions to develop the frontend package.

Components

ConfigureThankYou (source code)

This component manages the configuration of the "Thank You" page in the host application.

Props
  • id - ID of the specific thank you configuration
  • breadcrumbs - Set the header component's breadcrumbs
  • socialHandles - Set the URLs for sharing to social media
  • isPublished - Boolean to manage pointer events in the "Thank You" page configuration preview
  • entityId - Set the entity ID associated with the "Thank You" page
  • publicLinkId - Set the public link ID of the entity associated with the thank you configuration for social media sharing
  • hasImageUploader - Boolean to enable the image upload feature in the message editor on your configuration page
  • uniqueSubmissionEnabled - Boolean to show link for unique submission
  • uniqueSubmissionLink - Set link for unique submission
  • resubmitLink - Set link for resubmission
  • redirectToOnCancel - Set path to redirect to after cancelling submission
  • thankYouTextAlignment - Set alignment of the "Thank You" text in "Thank You" page
  • customHeader - Accepts a React Node & replaces the default Header.
  • appName - Accepts appName, which will be used for generating the sign up URL in the branding text.
  • appIcon - Accepts appIcon, which will be used to render custom logo in Neeto MadeWith badge.
  • disableSubmitAnotherResponse - Removes the toggle for submitting another response, incase of NeetoForm [default: false].
  • disableRadioSelection - Removes the radio selector for Custom message & Redirect to external link [default: false]
  • blockNavigation - Boolean to show the block navigation alert in the thank you configuration page when there are unsaved changes [default: false]
  • editorProps - Accepts props that needs to be passed to the editor component.
  • preview - An optional React component to render a custom preview instead of the default one.
  • allowEmptyCustomMessage - A boolean flag that, when set to true, skips the frontend validation for submitting an empty message. [default: false]
  • onConfigUpdateSuccess: The callback function to be triggered when the configuration is updated. The function's first argument corresponds to the parameters passed to the onSuccess callback of React Query mutations, while the second argument represents the previous configuration object.
  • isPassEventDetailsEnabled - A boolean flag that, when set to true, displays a switch to pass event details to the redirect url as URL parameters.
  • eventDetailsHelpDescription - Description shown inside the help popover next to that switch. Falls back to a generic default when not provided. The popover is only rendered when passEventDetailsHelpDocUrl is also given.
  • ctaProps - An object containing properties for the call-to-action button that appears in the thank you page preview. When provided, this button will link to the Neeto product page for the specified app. The button will not be rendered if this prop is not provided. The object can contain:
    • message - The message text displayed to the left of the button
    • buttonLabel - The text displayed on the button
Configuration

Refer to the ConfigureThankYou section for detailed information on the available configurations for the ConfigureThankYou component.

Usage
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 (source code)

This component displays the "Thank You" page after submission as per the configurations set in the host application.

Note: dompurify is required in ShowThankYou. Use the below command to install dompurify.

yarn add dompurify
Props
  • entityId - Set the entity ID associated with the "Thank You" page
  • socialHandles - Set the URLs for sharing to social media
  • isDraftPreview - Boolean to generate the draft resubmission URL
  • resubmitLink - Set link for resubmission
  • isThankYouPageLoading - Boolean value to show the loading state
  • thankYouTextAlignment - Set alignment of contents on "Thank You" page
  • customPageLoader - Specify a custom loader component to replace the default page loader.
  • appName - Accepts appName, which will be used for generating the sign up URL in the branding text.
  • appIcon - Accepts appIcon, which will be used to render custom logo in Neeto MadeWith badge.
  • editorProps - Accepts props that needs to be passed to the editor component.
  • enableTopLevelRedirect - Boolean value to control whether the top-level page or only the embedded iframe should be redirected. By default, the top-level page will be redirected. Disabling this option will restrict the redirect to the embedded iframe only.
  • eventDetails – An object containing key-value pairs that will be appended as query parameters to the redirect URL if pass_event_details_to_redirect_url is set to true. Defaults to an empty object ({}).
  • ctaProps - An object containing properties for the call-to-action button that appears in the thank you page. When provided, this button will link to the Neeto product page for the specified app. The button will not be rendered if this prop is not provided. The object can contain:
    • message - The message text displayed to the left of the button
    • buttonLabel - The text displayed on the button
  • resourceId - ID of the resource associated with the thank you configuration (e.g., submissionId in NeetoForm).
Usage
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;

Hooks

useShowThankYouPage (source code)

This hook is used to fetch the "Thank You" page of the entity.

Props
  • entityId - ID of the entity to load the thank you configuration
  • resourceId - ID of the resource associated with the thank you configuration (e.g., submissionId in NeetoForm).
  • isTemplateView - Boolean to check if the current page is the template view
Return value

Returns the data object which includes the thankYouConfiguration object containing the thank you configuration for the entity.

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

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

useShowThankYouConfiguration (source code)

This hook is used to fetch the thank you configuration of the entity.

Props
  • entityId - ID of the entity to load the thank you configuration
  • id - ID of the specific thank you configuration to fetch
Return value

Returns the data object which includes the thankYouConfiguration object containing the thank you configuration for the entity, and an isLoading boolean.

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

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

useFetchThankYouConfigurations (source code)

This hook is used to fetch multiple thank you configurations for an entity.

Props
  • entityId - ID of the entity to load the thank you configurations
  • filters - Optional filters to apply when fetching configurations
  • options - Optional React Query options
Return value

Returns the data object which includes the thankYouConfigurations array containing all thank you configurations for the entity, and an isLoading boolean.

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

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

useCreateThankYouConfiguration (source code)

This hook is used to create a new thank you configuration for an entity.

Props
  • entityId - ID of the entity to create the thank you configuration for
  • options - Optional React Query mutation options
Return value

Returns a mutation function and mutation state including isPending and error properties.

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

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

useUpdateThankYouConfiguration (source code)

This hook is used to update an existing thank you configuration.

Props
  • id - ID of the thank you configuration to update
  • options - Optional React Query mutation options
Return value

Returns a mutation function and mutation state including isPending and error properties.

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

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

useDeleteThankYouConfiguration (source code)

This hook is used to delete a thank you configuration.

Props
  • entityId - ID of the entity that owns the thank you configuration
  • options - Optional React Query mutation options
Return value

Returns a mutation function and mutation state including isPending and error properties.

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

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

Instructions for Publishing

Consult the building and releasing packages guide for details on how to publish.

版本与发布记录

@bigbinary/neeto-thank-you-frontend 共发布 138 个版本,首次发布于 2023/09/13;过去 12 个月发布了 41 个版本。

版本发布日期距今
3.4.1latest2026/10/309 天前
3.4.1-beta1beta2026/10/309 天前
3.4.02026/10/2712 天前
3.3.0-beta22026/10/2612 天前
3.3.02026/10/2612 天前
3.3.0-beta12026/10/2612 天前

关于 @bigbinary/neeto-thank-you-frontend 的常见问题

@bigbinary/neeto-thank-you-frontend 是什么?

A repo acts as the source of truth for the new nano's structure, configs, data etc.

如何安装 @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 和提交记录判断。