@aemforms/af-core

中文文档
1.0.11发布于 2026/11/01Adobe ProprietaryTypeScriptCommonJS近 30 天下载 5712

Core Module for Forms Runtime

原始使用文档
文档目录5 节
  1. Usage
  2. Create a new Form from JSON
  3. Validate form Data
  4. Testing Local Changes
  5. License

Introduction

The core module containing the model to interpret Adaptive Form JSON Definition and execute rules/expressions specified in that.

Usage

Save it as a dependency

npm i --save @aemforms/af-core

Create a new Form from JSON

import {createFormInstance} from '@aemforms/af-core';
const formJson = {..}
const form = createFormInstance(formJson)

//import data in the form
form.importData({})

//export data after form is being filled by the user
const data = form.exportData()

Validate form Data

import {validateFormInstance} from '@aemforms/af-core';
const formJson = {..}
const data = {...}
const valid = validateFormInstance(formJson, data)

Testing Local Changes

# Login to download dependencies
npm login

# Build the package
npm run build

# Link it for local testing
npm link

In your project that uses this package:

npm link @aemforms/af-core

License

Copyright 2022 Adobe All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of Adobe and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to Adobe and its suppliers and are protected by all applicable intellectual property laws, including trade secret and copyright laws. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from Adobe.

Adobe permits you to use and modify this file solely in accordance with the terms of the Adobe license agreement accompanying it.

版本与发布记录

@aemforms/af-core 共发布 176 个版本,首次发布于 2022/06/16;过去 12 个月发布了 27 个版本。

版本发布日期距今
1.0.11latest2026/11/016 天前
1.0.102026/10/2315 天前
1.0.92026/10/051 个月前
1.0.82026/10/051 个月前
1.0.72026/10/021 个月前
1.0.62026/10/011 个月前

关于 @aemforms/af-core 的常见问题

@aemforms/af-core 是什么?

Core Module for Forms Runtime

如何安装 @aemforms/af-core?

在项目目录运行 npm install @aemforms/af-core,或使用 pnpm add / yarn add / bun add。

@aemforms/af-core 支持 TypeScript 吗?

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

@aemforms/af-core 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aemforms/af-core 可以商用吗?

@aemforms/af-core 使用 Adobe Proprietary 许可。声明的许可为 Adobe Proprietary,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@aemforms/af-core 的下载量有多少?

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

@aemforms/af-core 还在维护吗?

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