Skip to content

Commit

Permalink
refactor(module:docs): bump marked to latest version (#8990)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laffery authored Jan 22, 2025
1 parent 6ef72c8 commit 225a8e8
Show file tree
Hide file tree
Showing 21 changed files with 368 additions and 411 deletions.
2 changes: 1 addition & 1 deletion components/affix/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';

**Note:** Children of `nz-affix` can not be `position: absolute`, but you can set `nz-affix` as `position: absolute`:

```jsx
```html
<nz-affix style="position: absolute; top: 10px, left: 10px">
...
</nz-affix>
Expand Down
2 changes: 1 addition & 1 deletion components/affix/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { NzAffixModule } from 'ng-zorro-antd/affix';

**注意:**`nz-affix` 内的元素不要使用绝对定位,如需要绝对定位的效果,可以直接设置 `nz-affix` 为绝对定位:

```jsx
```html
<nz-affix style="position: absolute; top: 10px, left: 10px">
...
</nz-affix>
Expand Down
22 changes: 11 additions & 11 deletions components/pipes/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@ Common Pipe Collections in Projects

## When To Use

- After introducing Pipe, use it like angular's default Pipe
- After introducing Pipe, use it like Angular's built-in Pipe

```ts
import { NzPipesModule } from 'ng-zorro-antd/pipes';
```

## API

### **nzBytes**
### nzBytes

| Property | Description | Type | Default |
| --------- | ------------------------------- | -------- | ------- |
|-----------|---------------------------------|----------|---------|
| `decimal` | Decimal | `number` | '0' |
| `from` | Unit of current value | `string` | 'B' |
| `to` | Units converted to target value | `string` | '' |

### **nzToCssUnit**
### nzToCssUnit

| Property | Description | Type | Default |
| ------------- | ------------ | -------- | ------- |
|---------------|--------------|----------|---------|
| `defaultUnit` | Default Unit | `string` | 'px' |

### **nzEllipsis**
### nzEllipsis

| Property | Description | Type | Default |
| -------- | ----------------- | -------- | ------- |
|----------|-------------------|----------|---------|
| `length` | Truncate length | `number` | '' |
| `suffix` | Replace character | `string` | '' |

### **nzAggregate**
### nzAggregate

| Property | Description | Type | Default |
| -------- | ----------- | ---------------------------------- | ------- |
|----------|-------------|------------------------------------|---------|
| `method` | Aggregation | `'sum' \| 'max' \| 'min' \| 'avg'` | '' |

### **nzSanitizer**
### nzSanitizer

| Property | Description | Type | Default |
| -------- | -------------- | -------- | ------- |
|----------|----------------|----------|---------|
| `type` | sanitizer type | `string` | 'html' |
10 changes: 5 additions & 5 deletions components/pipes/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,34 @@ import { NzPipesModule } from 'ng-zorro-antd/pipes';

## API

### **nzBytes**
### nzBytes

| 参数 | 说明 | 类型 | 默认值 |
| --------- | ------------------ | -------- | ------ |
| `decimal` | 保留小数位 | `number` | '0' |
| `from` | 当前值的单位 | `string` | 'B' |
| `to` | 转换到目标值的单位 | `string` | '' |

### **nzToCssUnit**
### nzToCssUnit

| 参数 | 说明 | 类型 | 默认值 |
| ------------- | -------- | -------- | ------ |
| `defaultUnit` | 默认单位 | `string` | 'px' |

### **nzEllipsis**
### nzEllipsis

| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------- | -------- | ------ |
| `length` | 截取长度 | `number` | '' |
| `suffix` | 替换字符 | `string` | '' |

### **nzAggregate**
### nzAggregate

| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------- | ---------------------------------- | ------ |
| `method` | 聚合方式 | `'sum' \| 'max' \| 'min' \| 'avg'` | '' |

### **nzSanitizer**
### nzSanitizer

| 参数 | 说明 | 类型 | 默认值 |
| ------ | -------------- | -------- | ------ |
Expand Down
84 changes: 42 additions & 42 deletions components/tree-view/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,36 @@ import { NzTreeViewModule } from 'ng-zorro-antd/tree-view';

### nz-tree-view

| Property | Description | Type | Default |
| ----------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------- |
| [nzTreeControl] | The tree controller | [TreeControl](https://material.angular.io/cdk/tree/api#TreeControl) | - |
| [nzDataSource] | The data array to render | [DataSource](https://material.angular.io/cdk/tree/overview#data-source)&lt;T&gt; \| Observable<T[]> \| T[] | - |
| [nzDirectoryTree] | Whether nodes are displayed as directory style | `boolean` | `false` |
| [nzBlockNode] | Whether tree nodes fill remaining horizontal space | `boolean` | `false` |
| Property | Description | Type | Default |
|---------------------|----------------------------------------------------|------------------------------------------------------------------------------------------------------------|---------|
| `[nzTreeControl]` | The tree controller | [TreeControl](https://material.angular.io/cdk/tree/api#TreeControl) | - |
| `[nzDataSource]` | The data array to render | [DataSource](https://material.angular.io/cdk/tree/overview#data-source)&lt;T&gt; \| Observable<T[]> \| T[] | - |
| `[nzDirectoryTree]` | Whether nodes are displayed as directory style | `boolean` | `false` |
| `[nzBlockNode]` | Whether tree nodes fill remaining horizontal space | `boolean` | `false` |

### nz-tree-virtual-scroll-view

The virtual scroll tree view, which can be accessed from
the [CdkVirtualScrollViewport](https://material.angular.io/cdk/scrolling/api#CdkVirtualScrollViewport) instance through
the `virtualScrollViewport` member of the component instance.

| Property | Description | Type | Default |
| ----------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | --------- |
| [nzTreeControl] | The tree controller | [TreeControl](https://material.angular.io/cdk/tree/api#TreeControl) | - |
| [nzDataSource] | The data array to render | [DataSource](https://material.angular.io/cdk/tree/overview#data-source)&lt;T&gt; \| Observable<T[]> \| T[] | - |
| [nzDirectoryTree] | Whether nodes are displayed as directory style | `boolean` | `false` |
| [nzBlockNode] | Whether tree nodes fill remaining horizontal space | `boolean` | `false` |
| [nzItemSize] | The size of nodes in the tree (in pixels) | `number` | `28` |
| [nzMinBufferPx] | The minimum amount of buffer rendered allowed outside the viewport (in pixels) | `number` | `28 * 5` |
| [nzMaxBufferPx] | The amount of buffer required for rendering new nodes (in pixels) | `number` | `28 * 10` |
| Property | Description | Type | Default |
|---------------------|--------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|-----------|
| `[nzTreeControl]` | The tree controller | [TreeControl](https://material.angular.io/cdk/tree/api#TreeControl) | - |
| `[nzDataSource]` | The data array to render | [DataSource](https://material.angular.io/cdk/tree/overview#data-source)&lt;T&gt; \| Observable<T[]> \| T[] | - |
| `[nzDirectoryTree]` | Whether nodes are displayed as directory style | `boolean` | `false` |
| `[nzBlockNode]` | Whether tree nodes fill remaining horizontal space | `boolean` | `false` |
| `[nzItemSize]` | The size of nodes in the tree (in pixels) | `number` | `28` |
| `[nzMinBufferPx]` | The minimum amount of buffer rendered allowed outside the viewport (in pixels) | `number` | `28 * 5` |
| `[nzMaxBufferPx]` | The amount of buffer required for rendering new nodes (in pixels) | `number` | `28 * 10` |

### [nzTreeNodeDef]

Directive to define `nz-tree-node`.

| Property | Description | Type | Default |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ------- |
| [nzTreeNodeDefWhen] | A matching function which indicates whether inputted node should be used. It matches the very first node that makes this function return `true`. If no nodes that makes this function return `true`, the node which does not define this function would be matched instead. | `(index: number, nodeData: T) => boolean` | - |
| Property | Description | Type | Default |
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|---------|
| `[nzTreeNodeDefWhen]` | A matching function which indicates whether inputted node should be used. It matches the very first node that makes this function return `true`. If no nodes that makes this function return `true`, the node which does not define this function would be matched instead. | `(index: number, nodeData: T) => boolean` | - |

### nz-tree-node

Expand All @@ -73,9 +73,9 @@ Show node indentation by adding indent lines.

A toggle which is used to expand / collapse the node.

| Property | Description | Type | Default |
| --------------------------- | ----------------------------------- | --------- | ------- |
| [nzTreeNodeToggleRecursive] | Is it recursively expand / collapse | `boolean` | `false` |
| Property | Description | Type | Default |
|-------------------------------|-------------------------------------|-----------|---------|
| `[nzTreeNodeToggleRecursive]` | Is it recursively expand / collapse | `boolean` | `false` |

### nz-tree-node-toggle[nzTreeNodeNoopToggle]

Expand All @@ -93,60 +93,60 @@ Define an icon in the toggle for an active style, which it can be used for the l

Define the selectable feature of a node.

| Property | Description | Type | Default |
| ------------ | ------------------------------ | -------------------------- | ------- |
| [nzSelected] | Whether the option is selected | `boolean` | `false` |
| [nzDisabled] | Whether the option is disabled | `boolean` | `false` |
| (nzClick) | Event on click | `EventEmitter<MouseEvent>` | - |
| Property | Description | Type | Default |
|----------------|--------------------------------|----------------------------|---------|
| `[nzSelected]` | Whether the option is selected | `boolean` | `false` |
| `[nzDisabled]` | Whether the option is disabled | `boolean` | `false` |
| `(nzClick)` | Event on click | `EventEmitter<MouseEvent>` | - |

### nz-tree-node-checkbox

Define the checkbox feature of a node.

| Property | Description | Type | Default |
| ----------------- | ------------------------------------- | -------------------------- | ------- |
| [nzChecked] | Whether the checkbox is checked | `boolean` | `false` |
| [nzDisabled] | Whether the checkbox is disabled | `boolean` | `false` |
| [nzIndeterminate] | Whether the checkbox is indeterminate | `boolean` | `false` |
| (nzClick) | Event on click | `EventEmitter<MouseEvent>` | - |
| Property | Description | Type | Default |
|---------------------|---------------------------------------|----------------------------|---------|
| `[nzChecked]` | Whether the checkbox is checked | `boolean` | `false` |
| `[nzDisabled]` | Whether the checkbox is disabled | `boolean` | `false` |
| `[nzIndeterminate]` | Whether the checkbox is indeterminate | `boolean` | `false` |
| `(nzClick)` | Event on click | `EventEmitter<MouseEvent>` | - |

## Classes

### **NzTreeFlatDataSource extends DataSource**
### NzTreeFlatDataSource extends DataSource

### Construction Parameters
**Construction Parameters**

| Name | Description |
| ----------------------------------------- | ---------------------------------------------------------------- |
|-------------------------------------------|------------------------------------------------------------------|
| `treeControl: FlatTreeControl<F, K>` | The tree controller. |
| `treeFlattener: NzTreeFlattener<T, F, K>` | Flattener for convert nested nodes `T` into flattened nodes `F`. |
| `initialData: T[] = []` | Initialized data. |

### Methods
**Methods**

| Name | Description |
| -------------------------------------------------------------- | ------------------------------------------------------------ |
|----------------------------------------------------------------|--------------------------------------------------------------|
| `connect(collectionViewer: CollectionViewer): Observable<F[]>` | Call from the TreeView component to listen for data updates. |
| `disconnect(): void` | Call when TreeView component is destroyed. |
| `setData(value: T[]): void` | Set the origin data |
| `getData(): T[]` | Get the origin data |

### **NzTreeFlattener**
### NzTreeFlattener

Convert nested data with child nodes into node data with level information.

### Construction Parameters
**Construction Parameters**

| Name | Description |
| ----------------------------------------------------------------------- | ----------------------------------------------------- |
|-------------------------------------------------------------------------|-------------------------------------------------------|
| `transformFunction: (node: T, level: number) => F` | Receive a nested node and return a flattened node |
| `getLevel: (node: F) => number` | Define the method to get the `level` property |
| `isExpandable: (node: F) => boolean` | Methods for defining whether a node is expandable |
| `getChildren: (node: T) => Observable<T[]> \| T[] \| undefined \| null` | Define methods to get children nodes from nested node |

### Methods
**Methods**

| Name | Description |
| ----------------------------------------------------------------------- | ------------------------------------------------- |
|-------------------------------------------------------------------------|---------------------------------------------------|
| `flattenNodes(structuredData: T[]): F[]` | Receive nested data and return flattened data |
| `expandFlattenedNodes(nodes: F[], treeControl: TreeControl<F, K>): F[]` | Get flattened node data based on expansion status |
Loading

0 comments on commit 225a8e8

Please sign in to comment.