@geoit/ui 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -12
- package/ai/AGENTS.md +5 -4
- package/ai/README.md +2 -2
- package/ai/catalog.json +3064 -424
- package/ai/components/geo-alert.md +75 -21
- package/ai/components/geo-back-button.md +64 -18
- package/ai/components/geo-breadcrumb.md +71 -12
- package/ai/components/geo-button.md +90 -27
- package/ai/components/geo-checkbox.md +69 -20
- package/ai/components/geo-column-picker.md +91 -18
- package/ai/components/geo-confirm-modal.md +93 -27
- package/ai/components/geo-date-picker.md +103 -29
- package/ai/components/geo-date-range-picker.md +99 -28
- package/ai/components/geo-file-picker.md +97 -26
- package/ai/components/geo-form-modal.md +112 -44
- package/ai/components/geo-icon.md +70 -16
- package/ai/components/geo-input.md +92 -29
- package/ai/components/geo-page-title.md +62 -16
- package/ai/components/geo-pagination.md +79 -24
- package/ai/components/geo-radio.md +108 -27
- package/ai/components/geo-row-actions.md +87 -19
- package/ai/components/geo-select.md +106 -28
- package/ai/components/geo-slider.md +72 -21
- package/ai/components/geo-status-tag.md +67 -15
- package/ai/components/geo-step-form-layout.md +122 -38
- package/ai/components/geo-stepper.md +82 -19
- package/ai/components/geo-table-filter.md +91 -29
- package/ai/components/geo-table-pagination.md +73 -23
- package/ai/components/geo-table-toolbar.md +84 -29
- package/ai/components/geo-table.md +194 -59
- package/ai/components/geo-tabs.md +101 -27
- package/ai/components/geo-textarea.md +82 -23
- package/ai/components/geo-toast.md +138 -27
- package/ai/components/geo-tree.md +96 -22
- package/ai/components/geo-typography.md +70 -19
- package/ai/components/geo-upload.md +110 -39
- package/ai/recipes.md +76 -4
- package/package.json +1 -1
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-page-title
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoPageTitleComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Page title (uppercase) with short primary accent underline; uses geo-typography.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoPageTitleComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoPageTitleComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-page-title`
|
|
@@ -24,30 +31,69 @@ Top of detail/list pages, often under breadcrumb.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Modal titles — geo-form-modal has its own title.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Tiêu đề trang chữ hoa + gạch nhấn primary. title + level 1–4; accentWidth/accentHeight tùy chỉnh gạch.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone presentational / container component — drive via Inputs and Outputs (no `ngModel` unless documented).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `title` | `string` | `''` | Nội dung tiêu đề. |
|
|
49
|
+
| `uppercase` | `boolean` | `true` | Tự chuyển uppercase. Default `true`. |
|
|
50
|
+
| `accentWidth` | `number \| string` | `56` | Chiều rộng gạch chân (px hoặc CSS size). Default `56px`. |
|
|
51
|
+
| `accentHeight` | `number \| string` | `4` | Độ dày gạch chân. Default `4px`. |
|
|
52
|
+
| `level` | `1 \| 2 \| 3 \| 4` | `3` | Heading level → geo-typography variant. |
|
|
35
53
|
|
|
36
54
|
## Outputs
|
|
55
|
+
|
|
37
56
|
_None_
|
|
38
57
|
|
|
39
|
-
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### Basic
|
|
62
|
+
|
|
40
63
|
```html
|
|
41
64
|
<geo-page-title title="Thông tin chi tiết hồ sơ" [level]="3"></geo-page-title>
|
|
42
65
|
```
|
|
43
66
|
|
|
67
|
+
### Full options
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<geo-page-title
|
|
71
|
+
title="Danh sách hồ sơ khai thác"
|
|
72
|
+
[uppercase]="true"
|
|
73
|
+
[level]="3"
|
|
74
|
+
[accentWidth]="56"
|
|
75
|
+
[accentHeight]="4"
|
|
76
|
+
></geo-page-title>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Tips
|
|
80
|
+
|
|
81
|
+
- Thường dưới geo-breadcrumb.
|
|
82
|
+
- Tiêu đề modal → geo-form-modal title, không dùng page-title.
|
|
83
|
+
- uppercase mặc định true.
|
|
84
|
+
## Related components
|
|
85
|
+
|
|
86
|
+
- [`geo-breadcrumb`](./geo-breadcrumb.md)
|
|
87
|
+
- [`geo-typography`](./geo-typography.md)
|
|
88
|
+
- [`geo-back-button`](./geo-back-button.md)
|
|
89
|
+
## Package path
|
|
90
|
+
`node_modules/@geoit/ui/ai/components/geo-page-title.md`
|
|
91
|
+
|
|
44
92
|
## Source
|
|
45
93
|
`projects/geo-ui/src/lib/figma/geo-page-title/geo-page-title.component.ts`
|
|
46
94
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## Rules for AI
|
|
51
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
95
|
+
## Rules for AI / consumers
|
|
96
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
52
97
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
53
|
-
- Match props to
|
|
98
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
99
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-pagination
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoPaginationComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Standalone pagination control.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoPaginationComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoPaginationComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-pagination`
|
|
@@ -24,36 +31,84 @@ Paging outside geo-table.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Inside tables prefer geo-table / geo-table-pagination.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Phân trang độc lập ngoài bảng. [pageIndex]/[pageSize]/[total]; (pageIndexChange)/(pageSizeChange).
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone presentational / container component — drive via Inputs and Outputs (no `ngModel` unless documented).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `pageIndex` | `number` | `1` | — |
|
|
49
|
+
| `pageSize` | `number` | `10` | — |
|
|
50
|
+
| `total` | `number` | `0` | — |
|
|
51
|
+
| `size` | `'default' \| 'small'` | `'default'` | — |
|
|
52
|
+
| `simple` | `boolean` | `false` | — |
|
|
53
|
+
| `hideOnSinglePage` | `boolean` | `false` | — |
|
|
54
|
+
| `showSizeChanger` | `boolean` | `false` | — |
|
|
55
|
+
| `pageSizeOptions` | `number[]` | `[5, 10, 20, 50]` | — |
|
|
38
56
|
|
|
39
57
|
## Outputs
|
|
40
|
-
| Output | Notes |
|
|
41
|
-
|--------|-------|
|
|
42
|
-
| `pageIndexChange` | EventEmitter |
|
|
43
|
-
| `pageSizeChange` | EventEmitter |
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
| Output | Payload | Description |
|
|
60
|
+
|--------|---------|-------------|
|
|
61
|
+
| `pageIndexChange` | `EventEmitter<number>` | — |
|
|
62
|
+
| `pageSizeChange` | `EventEmitter<number>` | — |
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Examples
|
|
66
|
+
|
|
67
|
+
### Basic
|
|
68
|
+
|
|
46
69
|
```html
|
|
47
|
-
<geo-pagination
|
|
70
|
+
<geo-pagination
|
|
71
|
+
[pageIndex]="1"
|
|
72
|
+
[pageSize]="10"
|
|
73
|
+
[total]="100"
|
|
74
|
+
(pageIndexChange)="onPage($event)"
|
|
75
|
+
></geo-pagination>
|
|
48
76
|
```
|
|
49
77
|
|
|
78
|
+
### Full options
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<geo-pagination
|
|
82
|
+
[pageIndex]="pageIndex"
|
|
83
|
+
[pageSize]="pageSize"
|
|
84
|
+
[total]="total"
|
|
85
|
+
size="default"
|
|
86
|
+
[simple]="false"
|
|
87
|
+
[hideOnSinglePage]="false"
|
|
88
|
+
[showSizeChanger]="true"
|
|
89
|
+
[pageSizeOptions]="[5, 10, 20, 50]"
|
|
90
|
+
(pageIndexChange)="pageIndex = $event; load()"
|
|
91
|
+
(pageSizeChange)="pageSize = $event; load()"
|
|
92
|
+
></geo-pagination>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Tips
|
|
96
|
+
|
|
97
|
+
- Trong geo-table ưu tiên phân trang tích hợp / geo-table-pagination.
|
|
98
|
+
- showSizeChanger + pageSizeOptions khi cần đổi số dòng.
|
|
99
|
+
- hideOnSinglePage khi chỉ 1 trang.
|
|
100
|
+
## Related components
|
|
101
|
+
|
|
102
|
+
- [`geo-table`](./geo-table.md)
|
|
103
|
+
- [`geo-table-pagination`](./geo-table-pagination.md)
|
|
104
|
+
## Package path
|
|
105
|
+
`node_modules/@geoit/ui/ai/components/geo-pagination.md`
|
|
106
|
+
|
|
50
107
|
## Source
|
|
51
108
|
`projects/geo-ui/src/lib/figma/geo-pagination/geo-pagination.component.ts`
|
|
52
109
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## Rules for AI
|
|
57
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
110
|
+
## Rules for AI / consumers
|
|
111
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
58
112
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
59
|
-
- Match props to
|
|
113
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
114
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
# geo-radio
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoRadioComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Radio group (horizontal/vertical or button style).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoRadioComponent } from '@geoit/ui';
|
|
14
|
+
import { FormsModule } from '@angular/forms'; // when using [(ngModel)]
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
Add to the consuming standalone component:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
imports: [GeoRadioComponent, FormsModule]
|
|
21
|
+
```
|
|
14
22
|
|
|
15
23
|
## Selector
|
|
16
24
|
`geo-radio`
|
|
@@ -24,44 +32,117 @@ Exclusive choice among few options.
|
|
|
24
32
|
## Do not use when
|
|
25
33
|
Many options — use geo-select.
|
|
26
34
|
|
|
35
|
+
## How to use
|
|
36
|
+
|
|
37
|
+
Nhóm radio độc quyền (CVA). [options] {label,value}[]; layout horizontal|vertical; buttonStyle cho dạng nút.
|
|
38
|
+
|
|
39
|
+
## Binding
|
|
40
|
+
|
|
41
|
+
Supports **ControlValueAccessor**.
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<geo-radio [(ngModel)]="value"></geo-radio>
|
|
45
|
+
<!-- or -->
|
|
46
|
+
<geo-radio formControlName="field"></geo-radio>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Also import `FormsModule` (template-driven) or `ReactiveFormsModule`.
|
|
50
|
+
|
|
27
51
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
52
|
+
|
|
53
|
+
Every supported Input (do not invent others):
|
|
54
|
+
|
|
55
|
+
| Input | Type | Default | Description |
|
|
56
|
+
|-------|------|---------|-------------|
|
|
57
|
+
| `options` | `GeoRadioOption[]` | `[]` | — |
|
|
58
|
+
| `label` | `string` | `''` | — |
|
|
59
|
+
| `size` | `'default' \| 'small' \| 'large'` | `'default'` | — |
|
|
60
|
+
| `layout` | `'horizontal' \| 'vertical'` | `'horizontal'` | — |
|
|
61
|
+
| `buttonStyle` | `boolean` | `false` | `true` → dùng `nz-radio-button` thay vì `nz-radio` |
|
|
62
|
+
| `buttonAppearance` | `'outline' \| 'solid'` | `'outline'` | Chỉ áp dụng khi `buttonStyle: true` |
|
|
63
|
+
| `disabled` | `boolean` | `false` | — |
|
|
64
|
+
| `required` | `boolean` | `false` | — |
|
|
65
|
+
| `error` | `boolean` | `false` | — |
|
|
66
|
+
| `errorMessage` | `string` | `''` | — |
|
|
67
|
+
| `block` | `boolean` | `false` | — |
|
|
41
68
|
|
|
42
69
|
## Outputs
|
|
43
|
-
| Output | Notes |
|
|
44
|
-
|--------|-------|
|
|
45
|
-
| `valueChange` | EventEmitter |
|
|
46
70
|
|
|
47
|
-
|
|
71
|
+
| Output | Payload | Description |
|
|
72
|
+
|--------|---------|-------------|
|
|
73
|
+
| `valueChange` | `EventEmitter<string \| number \| null>` | — |
|
|
74
|
+
|
|
75
|
+
## Related types
|
|
76
|
+
|
|
77
|
+
From `figma/geo-radio/geo-radio.types.ts`:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
export interface GeoRadioOption {
|
|
81
|
+
label: string;
|
|
82
|
+
value: string | number;
|
|
83
|
+
disabled?: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type GeoRadioSize = 'default' | 'small' | 'large';
|
|
87
|
+
|
|
88
|
+
export type GeoRadioLayout = 'horizontal' | 'vertical';
|
|
89
|
+
|
|
90
|
+
export type GeoRadioButtonAppearance = 'outline' | 'solid';
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
### Basic
|
|
96
|
+
|
|
48
97
|
```html
|
|
49
98
|
<geo-radio
|
|
50
99
|
label="Loại yêu cầu"
|
|
51
100
|
layout="vertical"
|
|
52
|
-
[options]="[{ label: '
|
|
53
|
-
[(ngModel)]="
|
|
101
|
+
[options]="[{ label: 'Cấp mới', value: 'new' }, { label: 'Gia hạn', value: 'renew' }]"
|
|
102
|
+
[(ngModel)]="requestType"
|
|
103
|
+
[block]="true"
|
|
104
|
+
></geo-radio>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Full options
|
|
108
|
+
|
|
109
|
+
```html
|
|
110
|
+
<geo-radio
|
|
111
|
+
label="Trạng thái"
|
|
112
|
+
[options]="[
|
|
113
|
+
{ label: 'Hoạt động', value: 1 },
|
|
114
|
+
{ label: 'Ngưng', value: 0 }
|
|
115
|
+
]"
|
|
116
|
+
size="default"
|
|
117
|
+
layout="horizontal"
|
|
118
|
+
[buttonStyle]="true"
|
|
119
|
+
buttonAppearance="outline"
|
|
120
|
+
[required]="true"
|
|
54
121
|
[block]="true"
|
|
122
|
+
[error]="statusError"
|
|
123
|
+
errorMessage="Vui lòng chọn trạng thái"
|
|
124
|
+
[(ngModel)]="status"
|
|
125
|
+
(valueChange)="onStatus($event)"
|
|
55
126
|
></geo-radio>
|
|
56
127
|
```
|
|
57
128
|
|
|
129
|
+
## Tips
|
|
130
|
+
|
|
131
|
+
- Nhiều option → geo-select.
|
|
132
|
+
- buttonAppearance outline|solid khi buttonStyle=true.
|
|
133
|
+
- [block] + label cho form field.
|
|
134
|
+
## Related components
|
|
135
|
+
|
|
136
|
+
- [`geo-checkbox`](./geo-checkbox.md)
|
|
137
|
+
- [`geo-select`](./geo-select.md)
|
|
138
|
+
## Package path
|
|
139
|
+
`node_modules/@geoit/ui/ai/components/geo-radio.md`
|
|
140
|
+
|
|
58
141
|
## Source
|
|
59
142
|
`projects/geo-ui/src/lib/figma/geo-radio/geo-radio.component.ts`
|
|
60
143
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Rules for AI
|
|
65
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
144
|
+
## Rules for AI / consumers
|
|
145
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
66
146
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
67
|
-
- Match props to
|
|
147
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
148
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-row-actions
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoRowActionsComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
8
|
Row action icons/menu (edit, more, custom).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoRowActionsComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoRowActionsComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-row-actions`
|
|
@@ -24,31 +31,92 @@ Actions column inside geo-table.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Page-level CTAs — use geo-button.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Cụm thao tác dòng bảng. [actions] GeoRowAction[]; (actionClick) theo key. Thường qua cột renderAs: 'actions' của geo-table.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone presentational / container component — drive via Inputs and Outputs (no `ngModel` unless documented).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `actions` | `GeoRowAction[] \| null` | `null` | — |
|
|
49
|
+
| `primaryActionKey` | `string` | `'edit'` | Action ưu tiên hiển thị khi có > 2 thao tác (mặc định: edit) |
|
|
32
50
|
|
|
33
51
|
## Outputs
|
|
34
|
-
| Output | Notes |
|
|
35
|
-
|--------|-------|
|
|
36
|
-
| `actionClick` | EventEmitter |
|
|
37
|
-
| `edit` | EventEmitter |
|
|
38
|
-
| `more` | EventEmitter |
|
|
39
52
|
|
|
40
|
-
|
|
53
|
+
| Output | Payload | Description |
|
|
54
|
+
|--------|---------|-------------|
|
|
55
|
+
| `edit` | `EventEmitter<void>` | Action ưu tiên hiển thị khi có > 2 thao tác (mặc định: edit) */ @Input() primaryActionKey = 'edit'; @Output() actionClick = new EventEmitter<string>(); /** @deprecated Dùng `actionClick` với key `edit` |
|
|
56
|
+
| `more` | `EventEmitter<void>` | @deprecated Dùng `actionClick` với key `more` |
|
|
57
|
+
|
|
58
|
+
## Related types
|
|
59
|
+
|
|
60
|
+
From `figma/geo-table/geo-row-actions/geo-row-actions.types.ts`:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
export interface GeoRowAction {
|
|
64
|
+
key: string;
|
|
65
|
+
icon: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
title?: string;
|
|
68
|
+
iconTheme?: 'outline' | 'fill' | 'twotone';
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
danger?: boolean;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
### Basic
|
|
77
|
+
|
|
41
78
|
```html
|
|
42
|
-
<geo-row-actions
|
|
79
|
+
<geo-row-actions
|
|
80
|
+
[actions]="[
|
|
81
|
+
{ key: 'edit', icon: 'edit', title: 'Chỉnh sửa' },
|
|
82
|
+
{ key: 'more', icon: 'more', title: 'Thêm thao tác' }
|
|
83
|
+
]"
|
|
84
|
+
(actionClick)="onAction($event)"
|
|
85
|
+
></geo-row-actions>
|
|
43
86
|
```
|
|
44
87
|
|
|
88
|
+
### Full options
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<geo-row-actions
|
|
92
|
+
primaryActionKey="edit"
|
|
93
|
+
[actions]="[
|
|
94
|
+
{ key: 'edit', icon: 'edit', title: 'Chỉnh sửa' },
|
|
95
|
+
{ key: 'view', icon: 'eye', title: 'Xem' },
|
|
96
|
+
{ key: 'delete', icon: 'delete', title: 'Xóa', danger: true }
|
|
97
|
+
]"
|
|
98
|
+
(actionClick)="onRowAction($event)"
|
|
99
|
+
></geo-row-actions>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Tips
|
|
103
|
+
|
|
104
|
+
- ≤2 actions hiện hết; >2: primary + danger, còn lại menu.
|
|
105
|
+
- primaryActionKey mặc định 'edit'.
|
|
106
|
+
- CTA trang → geo-button, không row-actions.
|
|
107
|
+
## Related components
|
|
108
|
+
|
|
109
|
+
- [`geo-table`](./geo-table.md)
|
|
110
|
+
- [`geo-button`](./geo-button.md)
|
|
111
|
+
- [`geo-icon`](./geo-icon.md)
|
|
112
|
+
## Package path
|
|
113
|
+
`node_modules/@geoit/ui/ai/components/geo-row-actions.md`
|
|
114
|
+
|
|
45
115
|
## Source
|
|
46
116
|
`projects/geo-ui/src/lib/figma/geo-table/geo-row-actions/geo-row-actions.component.ts`
|
|
47
117
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Rules for AI
|
|
52
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
118
|
+
## Rules for AI / consumers
|
|
119
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
53
120
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
54
|
-
- Match props to
|
|
121
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
122
|
+
- Copy examples and adapt labels/bindings only.
|