@globalpayments/vega-angular

中文文档
2.110.1发布于 2026/11/11UNLICENSEDTypeScriptES Module近 30 天下载 6717

Angular specific wrapper for @globalpayments/vega

原始使用文档
文档目录7 节
  1. How to use
  2. For development
  3. Pre-requisite
  4. Consuming change in vega-stencil
  5. Get started
  6. Troubleshoot
  7. Publish the package

Vega Angular

Angular specific wrapper for @globalpayments/vega

How to use

For installation guidance, please refer to https://vega.globalpayments.com/guides/getting-started-developers#angular

For development

This library was generated with Angular CLI version 13.2.0.

This is the Angular specific wrapper for @globalpayments/vega with the following file structure (we only list some important file path):

...
├── src
│   ├── lib
│   │   ├── components-module.ts
│   │   └── stencil-generated
│   │       ├── angular-component-lib
│   │       │   └── utils.ts
│   │       └── components.ts => 
│   ...
...
  • ./src/lib/components-module.ts: angular module used to export auto-generated angular directive proxies
  • ./src/lib/stencil-generated/components.ts: stencil auto-generated angular directive proxies which can be used as angular components after import
  • ./src/lib/stencil-generated/angular-component-lib/utils.ts: utility class including proxy related functions used by components.ts

Pre-requisite

Make sure all the dependencies has been installed by running

> npm run install

Consuming change in vega-stencil

Once you build vega-stencil with command npm run build, stencil will auto populate corresponding component classes into ./src/lib/stencil-generated/components.ts

keeping in mind, if there is a new component created, you need to modify ./src/lib/components-module.ts to import the new component

Get started

To generate the compiled lib version for vega-angular please run

> ng build vega-angular

And the built lib can be found in ./dist/vega-angular

In order to use the unpublished lib vega-angular directly for your angular app package, you can choose one of the following options:

  1. Directly install the local package into your angular app package by running:
    > npm install file:<relative path to "./dist/vega-angular">
    
  2. Use npm symlink by running
    > npm link
    
    Note: you might also want to setup the symlink for vega-stencil as it is a direct dependency of vega-angular, so you can consume the local change in both package for your angular app

Troubleshoot

If you encounter the following error

✖ Compiling with Angular sources in Ivy partial compilation mode.
../../projects/vega-angular/src/lib/stencil-generated/value-accessor.ts:4:1 - error NG2004: Directive ValueAccessor has no selector, please add it!

  4 @Directive({})
    ~~~~~~~~~~~~~~
  5 export class ValueAccessor implements ControlValueAccessor {
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
 38   }
    ~~~
 39 }
    ~

this is a known issue in stencil https://github.com/ionic-team/stencil-ds-output-targets/issues/174, please add the selector vega-value-accessor like below to fix this issue:

@Directive({ selector: 'vega-value-accessor' })
export class ValueAccessor implements ControlValueAccessor {
    ...
}

Publish the package

Please check our general wiki

版本与发布记录

@globalpayments/vega-angular 共发布 120 个版本,首次发布于 2026/05/26;过去 12 个月发布了 120 个版本。

版本发布日期距今
2.110.1latest2026/11/115 天前
2.110.02026/11/0610 天前
2.109.02026/10/3017 天前
2.108.02026/10/2225 天前
2.107.02026/10/161 个月前
2.106.02026/10/091 个月前

其他发布通道:beta → 2.87.0-beta.1,backfill-beta → 2.13.0-backfill-beta.2,backfill → 2.85.0。

关于 @globalpayments/vega-angular 的常见问题

@globalpayments/vega-angular 是什么?

Angular specific wrapper for @globalpayments/vega

如何安装 @globalpayments/vega-angular?

在项目目录运行 npm install @globalpayments/vega-angular,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@angular/core(>=12.0.0)、@angular/common(>=12.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@globalpayments/vega-angular 支持 TypeScript 吗?

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

@globalpayments/vega-angular 支持 ESM 还是 CommonJS?

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

@globalpayments/vega-angular 可以商用吗?

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

@globalpayments/vega-angular 的下载量有多少?

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

@globalpayments/vega-angular 还在维护吗?

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