@bigbinary/neeto-templates-frontend

中文文档
3.3.0发布于 2026/11/04UNLICENSEDTypeScriptESM + CJS零依赖近 30 天下载 6578

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

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

neeto-templates-nano

The neeto-templates-nano facilitates the administration of templates and template settings within neeto applications. The nano exports the @bigbinary/neeto-templates-frontend NPM package and neeto-templates-engine Rails engine for development.

Contents

  1. Development with Host Application

  2. Instructions for Publishing

Development with Host Application

Engine

The engine is used to manage templates and template settings across neeto products.

Installation

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

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

    bundle install
    
  3. Run the command to bring in all migrations, routes, models, associations, and controllers required from the engine to the host application:

    bundle exec rails neeto_templates_engine:install
    

    This will prompt the user to enter the resource model name. The resource model name is the name of the model that will be used as a template. For example, if the resource model name is Form, this will dynamically generate all necessary associations, routes, and controllers required for the neeto_templates_engine to work with the Form model.

    Note: You might need to re-arrange the associations statements which are normally inserted to top most lines of the file, to satisfy the Rails standards.

  4. Add the migrations to the database:

    bundle exec rails db:migrate
    

Usage

The neeto_templates_engine whitelists the templates subdomain for creation of the templates. All the entities (sites/forms) created in the templates subdomain are fetched as templates in the other subdomains.

You can learn more about the setup and usage here:

  1. Models
  2. Controllers

Frontend package

To seamlessly integrate NeetoTemplatesNano into your host app, it iss essential to whitelist the templates subdomain. The entities built under this subdomain will be the listed as templates in the CreateTemplateModal component.

Installation

Install the latest NeetoTemplatesNano package using the below command:

yarn add @bigbinary/neeto-templates-frontend

Instructions for development

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

Components

CreateTemplateModal (source code)

The CreateTemplateModal component is a React component used for creating and previewing templates within a web application. It provides a user interface for users to create templates and view their details.

Props
  • isOpen: A boolean indicating whether the modal is open or closed.
  • onClose: A function to close the modal.
  • isCreating: A boolean flag indicating whether a template is currently being created.
  • refetchResource: A function to refetch template resources.
  • onCreate: A function to handle template creation.
  • afterCreate: A function to perform actions after template creation.
  • title: An optional prop to override the default pane title.
  • description: An optional prop to override the default pane description.
Usage
import React from "react";

import { CreateTemplateModal } from "@bigbinary/neeto-templates-frontend";

const App = () => {
  return (
    <CreateTemplateModal
      isOpen
      onClose={() => {}}
      isCreating={false}
      refetchResource={() => {}}
      onCreate={() => {}}
      afterCreate={() => {}}
    />
  );
};

TemplateSettings (source code)

The TemplateSettings component is a React component used for configuring and editing template settings within a web application. It provides a user interface for users to customize various aspects of a template, including its image, tags, and preview.

Props
  • onCancelTemplatePreview: A function to handle canceling the template preview.
  • breadcrumbs: An array of breadcrumb items for navigation.
  • className: A CSS class name for styling.
  • resourceId: A string (eg: formId, siteId), to specify the route of the entity. It is 'id' by default.
Usage
import React from "react";

import { TemplateSettings } from "@bigbinary/neeto-templates-frontend";

const App = () => {
  const breadcrumbs = [
    {
      link: "/forms",
      text: "Forms",
    },
  ];
  return (
    <TemplateSettings
      onCancelTemplatePreview={() => {}}
      breadcrumbs={breadcrumbs}
    />
  );
};

Use the PrivateRoute component to conditionally render this component only for the templates subdomain.

TemplateTags (source code)

The TemplateTags component is a React component used for displaying and managing tags within a web application. It provides a user interface for users to add, remove, edit and merge tags.

Props
  • breadcrumbs: An array of breadcrumb items for navigation.

  • tagsPath: A string representing the path to the frontend route for tags page.

  • otherProps: Additional props to be passed to the component.

    Usage
    import React from "react";
    import { TemplateTags } from "@bigbinary/neeto-templates-frontend";
    
    const App = () => {
      const breadcrumbs = [
        {
          link: "/forms",
          text: "Forms",
        },
      ];
      return (
        <TemplateTags
          breadcrumbs={breadcrumbs}
          tagsPath="/settings/templates/tags"
        />
      );
    };
    

    Use the PrivateRoute component (no need to add exact) to conditionally render this component only for the templates subdomain.

Instructions for Publishing

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

版本与发布记录

@bigbinary/neeto-templates-frontend 共发布 89 个版本,首次发布于 2023/11/01;过去 12 个月发布了 27 个版本。

版本发布日期距今
3.3.0latest2026/11/044 天前
3.2.0-beta2beta2026/11/044 天前
3.2.02026/11/044 天前
3.1.42026/11/044 天前
3.2.0-beta12026/11/044 天前
3.1.3-beta22026/11/044 天前

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

@bigbinary/neeto-templates-frontend 是什么?

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

如何安装 @bigbinary/neeto-templates-frontend?

在项目目录运行 npm install @bigbinary/neeto-templates-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.4)、@bigbinary/neeto-icons(1.20.89)、@bigbinary/neeto-molecules(5.11.2)、@tailwindcss/container-queries(0.1.1)、@tanstack/react-query-devtools(5.59.20)、@bigbinary/neeto-commons-frontend(4.14.12)、@bigbinary/neeto-filters-frontend(4.7.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bigbinary/neeto-templates-frontend 支持 TypeScript 吗?

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

@bigbinary/neeto-templates-frontend 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bigbinary/neeto-templates-frontend 需要什么版本的 Node.js?

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

@bigbinary/neeto-templates-frontend 可以商用吗?

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

@bigbinary/neeto-templates-frontend 的下载量有多少?

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

@bigbinary/neeto-templates-frontend 还在维护吗?

最新版本 3.3.0 发布于 2026/11/04(4 天前);至今共发布 89 个版本,其中过去 12 个月发布了 27 个;首次发布于 2023/11/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。