Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(sf): non-built-in widget registration method #1768

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/form/widgets-third/monaco-editor/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ Markdown Editor

`yarn add @ng-util/monaco-editor`

**Import module**

- 1. Import `NuMonacoEditorModule.forRoot()` in `app.module.ts`
- 2. Import `MonacoEditorWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
- 1. Register `provideNuMonacoEditorConfig()` in `app.config.ts`
- 2. Register `withMonacoEditorWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

> For more Monaco Editor configuration, please refer to [@ng-util/monaco-editor](https://github.com/ng-util/ng-util/blob/master/packages/monaco-editor/README.md#usage).

Expand Down
6 changes: 2 additions & 4 deletions packages/form/widgets-third/monaco-editor/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ Markdown编辑器。

`yarn add @ng-util/monaco-editor`

**导入模块**

- 1、在 `app.module.ts` 下导入 `NuMonacoEditorModule.forRoot()`
- 2、在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `MonacoEditorWidgetModule`。
- 1、在 `app.config.ts` 下注册 `provideNuMonacoEditorConfig()`
- 2、在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withMonacoEditorWidget`。

> 关于更多 Monaco Editor 配置请参考 [@ng-util/monaco-editor](https://github.com/ng-util/ng-util/blob/master/packages/monaco-editor/README.md#usage)。

Expand Down
6 changes: 2 additions & 4 deletions packages/form/widgets-third/tinymce/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ Since the Tinymce editor relies on a third-party plug-in [ngx-tinymce](https://g

`npm i -S ngx-tinymce`

**Import module**

- 1. Import `NgxTinymceModule.forRoot()` in `app.module.ts`
- 2. Import `TinymceWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
- 1. Register `provideNuMonacoEditorConfig()` in `app.config.ts`
- 2. Register `withTinymceWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

> For more tinymce configuration, please refer to [ngx-tinymce](https://github.com/cipchk/ngx-tinymce).

Expand Down
6 changes: 2 additions & 4 deletions packages/form/widgets-third/tinymce/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ Tinymce富文本。

`npm i -S ngx-tinymce`

**导入模块**

- 1、在 `app.module.ts` 下导入 `NgxTinymceModule.forRoot()`
- 2、在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `TinymceWidgetModule`。
- 1、在 `app.config.ts` 下注册 `provideTinymce()`
- 2、在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withTinymceWidget`。

> 关于更多 tinymce 配置请参考 [ngx-tinymce](https://github.com/cipchk/ngx-tinymce)。

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/autocomplete/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Input complete automatically.

## Import module
## How to use

Non-built-in modules, Should be import `AutoCompleteWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withAutoCompleteWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Data Source

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/autocomplete/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

输入框自动完成功能。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `AutoCompleteWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withAutoCompleteWidget`。

## 数据源说明

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/cascader/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Usually, it's used in province/city/district, company hierarchy, category of things, etc.

## Import module
## How to use

Non-built-in modules, Should be import `CascaderWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withCascaderWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Note

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/cascader/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

一般用于省市区,公司层级,事物分类等。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `CascaderWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withCascaderWidget`。

## 注意事项

Expand Down
6 changes: 2 additions & 4 deletions packages/form/widgets/color/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ type: Non-built-in widgets

Used when the user needs to customize the color selection.

## How to Use
## How to use

**Installation dependencies**

`yarn add ng-antd-color-picker`

**Import Module**

Non-built-in modules, Should be import `ColorWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withColorWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
3 changes: 1 addition & 2 deletions packages/form/widgets/color/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ type: Non-built-in widgets

`yarn add ng-antd-color-picker`

**导入模块**
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withColorWidget`。

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `ColorWidgetModule`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/mention/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Mention widget.

## Import module
## How to use

Non-built-in modules, Should be import `MentionWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withMentionWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Note

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/mention/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

提及组件。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `MentionWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withMentionWidget`。

## 注意事项

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/qr-code/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Used when the link needs to be converted into a QR Code.

## Import module
## How to use

Non-built-in modules, Should be import `QrCodeWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withQrCodeWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/qr-code/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

当需要将链接转换成为二维码时使用。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `QrCodeWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withQrCodeWidget`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/rate/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

A quick rating operation on something.

## Import module
## How to use

Non-built-in modules, Should be import `RateWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withRateWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/rate/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

对评价进行展示,对事物进行快速的评级操作。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `RateWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withRateWidget`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/segmented/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type: Non-built-in widgets
- When displaying multiple options and user can select a single option;
- When switching the selected option, the content of the associated area changes.

## Import module
## How to use

Non-built-in modules, Should be import `SegmentedWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withSegmentedWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/segmented/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ type: Non-built-in widgets
- 用于展示多个选项并允许用户选择其中单个选项;
- 当切换选中选项时,关联区域的内容会发生变化。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `SegmentedWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withSegmentedWidget`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/slider/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

A Slider component for displaying current value and intervals in range.

## Import module
## How to use

Non-built-in modules, Should be import `SliderWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withSliderWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Notice

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/slider/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

滑动型输入器,展示当前值和可选范围。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `SliderWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withSliderWidget`。

## 注意事项

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/tag/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Tag for categorizing or markup, **Notice:** Just only supported `checkable` tag mode.

## Import module
## How to use

Non-built-in modules, Should be import `TagWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withTagWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/tag/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

进行标记和分类的小标签,**注:** 只支持 `checkable` 标签模式。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `TagWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withTagWidget`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/time/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

To select/input a time.

## Import module
## How to use

Non-built-in modules, Should be import `TimeWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withTimeWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Notice

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/time/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

输入或选择时间的控件。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `TimeWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withTimeWidget`。

## 注意事项

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/transfer/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Double column transfer choice box.

## Import module
## How to use

Non-built-in modules, Should be import `TransferWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withTransferWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Note

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/transfer/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

双栏穿梭选择框。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `TransferWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withTransferWidget`。

## 注意事项

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/tree-select/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Tree select widget.

- Data source of `tree-select` must have keys of `title`、`key`

## Import module
## How to use

Non-built-in modules, Should be import `TreeSelectWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withTreeSelectWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/tree-select/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ type: Non-built-in widgets

- `tree-select` 的数据源必须包含 `title`、`key` 键名

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `TreeSelectWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withTreeSelectWidget`。

## API

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/upload/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

Upload file widget by select or drag.

## Import module
## How to use

Non-built-in modules, Should be import `UploadWidgetModule` in [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11).
Non-built-in modules need to additionally register `withUploadWidget` in [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9).

## Note

Expand Down
4 changes: 2 additions & 2 deletions packages/form/widgets/upload/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ type: Non-built-in widgets

文件选择上传和拖拽上传控件。

## 导入模块
## 如何使用

非内置模块,需要额外在 [json-schema.module.ts](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/json-schema.module.ts#L11) 导入 `UploadWidgetModule`。
非内置模块,需要额外在 [json-schema](https://github.com/ng-alain/ng-alain/blob/master/src/app/shared/json-schema/index.ts#L9) 注册 `withUploadWidget`。

## 注意事项

Expand Down
Loading