@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,24 @@
|
|
|
1
1
|
# geo-select
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoSelectComponent** (`@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
|
Select / multi-select dropdown.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoSelectComponent } 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: [GeoSelectComponent, FormsModule]
|
|
21
|
+
```
|
|
14
22
|
|
|
15
23
|
## Selector
|
|
16
24
|
`geo-select`
|
|
@@ -24,45 +32,115 @@ Choosing from a list of options.
|
|
|
24
32
|
## Do not use when
|
|
25
33
|
2–3 exclusive options may use geo-radio instead.
|
|
26
34
|
|
|
35
|
+
## How to use
|
|
36
|
+
|
|
37
|
+
Select danh sách (CVA). [options] {label,value}[]; mode default|multiple|tags; showSearch khi danh sách dài.
|
|
38
|
+
|
|
39
|
+
## Binding
|
|
40
|
+
|
|
41
|
+
Supports **ControlValueAccessor**.
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<geo-select [(ngModel)]="value"></geo-select>
|
|
45
|
+
<!-- or -->
|
|
46
|
+
<geo-select formControlName="field"></geo-select>
|
|
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
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
52
|
+
|
|
53
|
+
Every supported Input (do not invent others):
|
|
54
|
+
|
|
55
|
+
| Input | Type | Default | Description |
|
|
56
|
+
|-------|------|---------|-------------|
|
|
57
|
+
| `options` | `GeoSelectOption[]` | `[]` | — |
|
|
58
|
+
| `label` | `string` | `''` | — |
|
|
59
|
+
| `placeholder` | `string` | `'Chọn giá trị'` | — |
|
|
60
|
+
| `size` | `'default' \| 'small'` | `'default'` | — |
|
|
61
|
+
| `mode` | `'default' \| 'multiple' \| 'tags'` | `'default'` | — |
|
|
62
|
+
| `disabled` | `boolean` | `false` | — |
|
|
63
|
+
| `required` | `boolean` | `false` | — |
|
|
64
|
+
| `error` | `boolean` | `false` | — |
|
|
65
|
+
| `errorMessage` | `string` | `''` | — |
|
|
66
|
+
| `allowClear` | `boolean` | `true` | — |
|
|
67
|
+
| `showSearch` | `boolean` | `false` | — |
|
|
68
|
+
| `block` | `boolean` | `false` | — |
|
|
69
|
+
| `width` | `number \| string` | — | — |
|
|
43
70
|
|
|
44
71
|
## Outputs
|
|
45
|
-
| Output | Notes |
|
|
46
|
-
|--------|-------|
|
|
47
|
-
| `valueChange` | EventEmitter |
|
|
48
72
|
|
|
49
|
-
|
|
73
|
+
| Output | Payload | Description |
|
|
74
|
+
|--------|---------|-------------|
|
|
75
|
+
| `valueChange` | `EventEmitter<string \| number \| Array<string \| number> \| null>` | — |
|
|
76
|
+
|
|
77
|
+
## Related types
|
|
78
|
+
|
|
79
|
+
From `figma/geo-select/geo-select.types.ts`:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
export interface GeoSelectOption<T = string | number> {
|
|
83
|
+
label: string;
|
|
84
|
+
value: T;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type GeoSelectSize = 'default' | 'small';
|
|
89
|
+
|
|
90
|
+
export type GeoSelectMode = 'default' | 'multiple' | 'tags';
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
### Basic
|
|
96
|
+
|
|
50
97
|
```html
|
|
51
98
|
<geo-select
|
|
52
99
|
label="Trạng thái"
|
|
53
|
-
[options]="[{ label: '
|
|
100
|
+
[options]="[{ label: 'Hoạt động', value: 1 }, { label: 'Ngưng', value: 0 }]"
|
|
54
101
|
[(ngModel)]="status"
|
|
55
102
|
[block]="true"
|
|
56
103
|
></geo-select>
|
|
57
104
|
```
|
|
58
105
|
|
|
106
|
+
### Full options
|
|
107
|
+
|
|
108
|
+
```html
|
|
109
|
+
<geo-select
|
|
110
|
+
label="Đơn vị"
|
|
111
|
+
placeholder="Chọn giá trị"
|
|
112
|
+
mode="default"
|
|
113
|
+
size="default"
|
|
114
|
+
[options]="unitOptions"
|
|
115
|
+
[showSearch]="true"
|
|
116
|
+
[allowClear]="true"
|
|
117
|
+
[required]="true"
|
|
118
|
+
[block]="true"
|
|
119
|
+
[error]="unitError"
|
|
120
|
+
errorMessage="Vui lòng chọn đơn vị"
|
|
121
|
+
[(ngModel)]="unitId"
|
|
122
|
+
(valueChange)="onUnit($event)"
|
|
123
|
+
></geo-select>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Tips
|
|
127
|
+
|
|
128
|
+
- 2–3 lựa chọn độc quyền có thể dùng geo-radio.
|
|
129
|
+
- allowClear mặc định true.
|
|
130
|
+
- [block]="true" trong form.
|
|
131
|
+
## Related components
|
|
132
|
+
|
|
133
|
+
- [`geo-radio`](./geo-radio.md)
|
|
134
|
+
- [`geo-input`](./geo-input.md)
|
|
135
|
+
- [`geo-form-modal`](./geo-form-modal.md)
|
|
136
|
+
## Package path
|
|
137
|
+
`node_modules/@geoit/ui/ai/components/geo-select.md`
|
|
138
|
+
|
|
59
139
|
## Source
|
|
60
140
|
`projects/geo-ui/src/lib/figma/geo-select/geo-select.component.ts`
|
|
61
141
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Rules for AI
|
|
66
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
142
|
+
## Rules for AI / consumers
|
|
143
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
67
144
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
68
|
-
- Match props to
|
|
145
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
146
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-slider
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoSliderComponent** (`@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
|
Numeric range slider.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoSliderComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoSliderComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-slider`
|
|
@@ -24,33 +31,77 @@ Continuous numeric value in a range.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Discrete small sets — use select/radio.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Thanh trượt số liên tục. Two-way [(value)] / (valueChange); min/max/step; tipFormatter tùy chỉnh tooltip.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
**Not CVA.** Use two-way `value`:
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<geo-slider [(value)]="n" (valueChange)="onChange($event)"></geo-slider>
|
|
44
|
+
```
|
|
45
|
+
|
|
27
46
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
47
|
+
|
|
48
|
+
Every supported Input (do not invent others):
|
|
49
|
+
|
|
50
|
+
| Input | Type | Default | Description |
|
|
51
|
+
|-------|------|---------|-------------|
|
|
52
|
+
| `value` | `number` | `0` | — |
|
|
53
|
+
| `min` | `number` | `0` | — |
|
|
54
|
+
| `max` | `number` | `100` | — |
|
|
55
|
+
| `step` | `number` | `1` | — |
|
|
56
|
+
| `disabled` | `boolean` | `false` | — |
|
|
57
|
+
| `tipFormatter` | `(value: number)` | `> string` | — |
|
|
36
58
|
|
|
37
59
|
## Outputs
|
|
38
|
-
| Output | Notes |
|
|
39
|
-
|--------|-------|
|
|
40
|
-
| `valueChange` | EventEmitter |
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
| Output | Payload | Description |
|
|
62
|
+
|--------|---------|-------------|
|
|
63
|
+
| `valueChange` | `EventEmitter<number>` | — |
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
### Basic
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<geo-slider [(value)]="percent" [min]="0" [max]="100"></geo-slider>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Full options
|
|
75
|
+
|
|
43
76
|
```html
|
|
44
|
-
<geo-slider
|
|
77
|
+
<geo-slider
|
|
78
|
+
[(value)]="zoom"
|
|
79
|
+
[min]="0"
|
|
80
|
+
[max]="100"
|
|
81
|
+
[step]="5"
|
|
82
|
+
[disabled]="false"
|
|
83
|
+
[tipFormatter]="formatZoom"
|
|
84
|
+
(valueChange)="onZoom($event)"
|
|
85
|
+
></geo-slider>
|
|
45
86
|
```
|
|
46
87
|
|
|
88
|
+
## Tips
|
|
89
|
+
|
|
90
|
+
- Tập rời rạc nhỏ → select/radio.
|
|
91
|
+
- Không phải CVA — dùng [(value)].
|
|
92
|
+
- tipFormatter nhận number → string hiển thị.
|
|
93
|
+
## Related components
|
|
94
|
+
|
|
95
|
+
- [`geo-input`](./geo-input.md)
|
|
96
|
+
- [`geo-select`](./geo-select.md)
|
|
97
|
+
## Package path
|
|
98
|
+
`node_modules/@geoit/ui/ai/components/geo-slider.md`
|
|
99
|
+
|
|
47
100
|
## Source
|
|
48
101
|
`projects/geo-ui/src/lib/figma/geo-slider/geo-slider.component.ts`
|
|
49
102
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Rules for AI
|
|
54
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
103
|
+
## Rules for AI / consumers
|
|
104
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
55
105
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
56
|
-
- Match props to
|
|
106
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
107
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-status-tag
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoStatusTagComponent** (`@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
|
Pill status tag with optional dot (success/error/warning/info/teal/…).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoStatusTagComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoStatusTagComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-status-tag`
|
|
@@ -24,28 +31,73 @@ Status in tables, cards, lists.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Clickable filters — use button/tabs.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Tag trạng thái (dot + label). status preset success|primary|error|warning|info|teal|neutral (hoặc legacy completed|cancelled|…); [label] ghi đè text.
|
|
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
|
-
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `status` | `GeoStatusPreset \| string` | `'success'` | Status preset or free-form string. Semantic: success \| primary \| error \| warning \| info \| teal \| neutral Legacy: completed \| cancelled \| in_progress \| adjusting |
|
|
49
|
+
| `label` | `string` | — | Override label text. |
|
|
50
|
+
| `showDot` | `boolean` | `true` | Show leading status dot (design default). |
|
|
33
51
|
|
|
34
52
|
## Outputs
|
|
53
|
+
|
|
35
54
|
_None_
|
|
36
55
|
|
|
37
|
-
##
|
|
56
|
+
## Related types
|
|
57
|
+
|
|
58
|
+
From `figma/geo-status-tag/geo-status-tag.types.ts`:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
export type GeoStatusColor = 'success' | 'primary' | 'error' | 'warning' | 'info' | 'teal' | 'neutral';
|
|
62
|
+
|
|
63
|
+
export type GeoStatusPreset = GeoStatusColor | 'completed' | 'cancelled' | 'in_progress' | 'adjusting';
|
|
64
|
+
|
|
65
|
+
export const UI_STATUS_LABELS = GEO_STATUS_LABELS;
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Examples
|
|
69
|
+
|
|
70
|
+
### Basic
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<geo-status-tag status="success" label="Đã duyệt"></geo-status-tag>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Full options
|
|
77
|
+
|
|
38
78
|
```html
|
|
39
|
-
<geo-status-tag status="
|
|
79
|
+
<geo-status-tag status="warning" label="Chờ xử lý" [showDot]="true"></geo-status-tag>
|
|
80
|
+
<geo-status-tag status="error" label="Từ chối"></geo-status-tag>
|
|
81
|
+
<geo-status-tag status="in_progress" label="Đang xử lý"></geo-status-tag>
|
|
40
82
|
```
|
|
41
83
|
|
|
84
|
+
## Tips
|
|
85
|
+
|
|
86
|
+
- Trong bảng dùng cột renderAs: 'status'.
|
|
87
|
+
- Không dùng làm filter clickable.
|
|
88
|
+
- showDot mặc định true.
|
|
89
|
+
## Related components
|
|
90
|
+
|
|
91
|
+
- [`geo-table`](./geo-table.md)
|
|
92
|
+
- [`geo-typography`](./geo-typography.md)
|
|
93
|
+
## Package path
|
|
94
|
+
`node_modules/@geoit/ui/ai/components/geo-status-tag.md`
|
|
95
|
+
|
|
42
96
|
## Source
|
|
43
97
|
`projects/geo-ui/src/lib/figma/geo-status-tag/geo-status-tag.component.ts`
|
|
44
98
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## Rules for AI
|
|
49
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
99
|
+
## Rules for AI / consumers
|
|
100
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
50
101
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
51
|
-
- Match props to
|
|
102
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
103
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-step-form-layout
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoStepFormLayoutComponent** (`@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
|
Full-page multi-step form: vertical stepper + content card + footer actions.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoStepFormLayoutComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoStepFormLayoutComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-step-form-layout`
|
|
@@ -24,38 +31,67 @@ Long registration / create wizards as a page.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Dialogs — use geo-form-modal + geo-stepper.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Wizard full-page: stepper dọc + card nội dung + footer Hủy/Trở lại/Lưu/Tiếp theo. [steps] + [activeIndex]; (next)/(previous)/(save)/(cancel).
|
|
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
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `steps` | `GeoStepperStep[]` | `[]` | — |
|
|
49
|
+
| `activeIndex` | `number` | `0` | — |
|
|
50
|
+
| `title` | `string` | `''` | — |
|
|
51
|
+
| `clickableSteps` | `boolean` | `true` | — |
|
|
52
|
+
| `showScrollButtons` | `boolean` | `true` | Hiện nút ↑/↓ góc phải card (chuyển bước). Mặc định `true`. |
|
|
53
|
+
| `showCancel` | `boolean` | `true` | — |
|
|
54
|
+
| `showPrevious` | `boolean` | `true` | — |
|
|
55
|
+
| `showSave` | `boolean` | `true` | — |
|
|
56
|
+
| `showNext` | `boolean` | `true` | — |
|
|
57
|
+
| `cancelLabel` | `string` | `'Hủy'` | — |
|
|
58
|
+
| `previousLabel` | `string` | `'Trở lại'` | — |
|
|
59
|
+
| `saveLabel` | `string` | `'Lưu'` | — |
|
|
60
|
+
| `nextLabel` | `string` | `'Tiếp theo'` | — |
|
|
61
|
+
| `finishLabel` | `string` | `'Hoàn thành'` | — |
|
|
62
|
+
| `saveLoading` | `boolean` | `false` | — |
|
|
63
|
+
| `nextLoading` | `boolean` | `false` | — |
|
|
64
|
+
| `hideDefaultFooter` | `boolean` | `false` | Ẩn footer actions (dùng slot `[footer]` hoặc không cần nút). |
|
|
47
65
|
|
|
48
66
|
## Outputs
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
|
|
68
|
+
| Output | Payload | Description |
|
|
69
|
+
|--------|---------|-------------|
|
|
70
|
+
| `activeIndexChange` | `EventEmitter<number>` | — |
|
|
71
|
+
| `stepSelect` | `EventEmitter<{ index: number; step: GeoStepperStep }>` | — |
|
|
72
|
+
| `cancel` | `EventEmitter<void>` | — |
|
|
73
|
+
| `previous` | `EventEmitter<void>` | — |
|
|
74
|
+
| `save` | `EventEmitter<void>` | — |
|
|
75
|
+
| `next` | `EventEmitter<void>` | — |
|
|
76
|
+
|
|
77
|
+
## Related types
|
|
78
|
+
|
|
79
|
+
From `figma/geo-step-form-layout/geo-step-form-layout.types.ts`:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
export interface GeoStepFormLayoutLabels {
|
|
83
|
+
back?: string;
|
|
84
|
+
cancel?: string;
|
|
85
|
+
save?: string;
|
|
86
|
+
next?: string;
|
|
87
|
+
finish?: string;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
### Basic
|
|
94
|
+
|
|
59
95
|
```html
|
|
60
96
|
<geo-step-form-layout
|
|
61
97
|
title="Thêm mới"
|
|
@@ -65,17 +101,65 @@ Dialogs — use geo-form-modal + geo-stepper.
|
|
|
65
101
|
(previous)="goPrev()"
|
|
66
102
|
(cancel)="cancel()"
|
|
67
103
|
>
|
|
68
|
-
<!--
|
|
104
|
+
<!-- nội dung bước -->
|
|
105
|
+
</geo-step-form-layout>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Full options
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<geo-step-form-layout
|
|
112
|
+
title="Đăng ký khai thác"
|
|
113
|
+
[steps]="[
|
|
114
|
+
{ key: 'info', label: '1. Thông tin' },
|
|
115
|
+
{ key: 'files', label: '2. Tài liệu' },
|
|
116
|
+
{ key: 'confirm', label: '3. Xác nhận' }
|
|
117
|
+
]"
|
|
118
|
+
[activeIndex]="activeIndex"
|
|
119
|
+
[clickableSteps]="true"
|
|
120
|
+
[showScrollButtons]="true"
|
|
121
|
+
[showCancel]="true"
|
|
122
|
+
[showPrevious]="true"
|
|
123
|
+
[showSave]="true"
|
|
124
|
+
[showNext]="true"
|
|
125
|
+
cancelLabel="Hủy"
|
|
126
|
+
previousLabel="Trở lại"
|
|
127
|
+
saveLabel="Lưu"
|
|
128
|
+
nextLabel="Tiếp theo"
|
|
129
|
+
finishLabel="Hoàn thành"
|
|
130
|
+
[saveLoading]="saving"
|
|
131
|
+
[nextLoading]="validating"
|
|
132
|
+
(activeIndexChange)="activeIndex = $event"
|
|
133
|
+
(stepSelect)="onStep($event)"
|
|
134
|
+
(cancel)="onCancel()"
|
|
135
|
+
(previous)="goPrev()"
|
|
136
|
+
(save)="onSave()"
|
|
137
|
+
(next)="goNext()"
|
|
138
|
+
>
|
|
139
|
+
@if (activeIndex === 0) {
|
|
140
|
+
<geo-input label="Tên hồ sơ" [block]="true" [(ngModel)]="name"></geo-input>
|
|
141
|
+
}
|
|
69
142
|
</geo-step-form-layout>
|
|
70
143
|
```
|
|
71
144
|
|
|
145
|
+
## Tips
|
|
146
|
+
|
|
147
|
+
- Dialog multi-step → geo-form-modal + geo-stepper.
|
|
148
|
+
- finishLabel hiện khi bước cuối (thay nextLabel).
|
|
149
|
+
- hideDefaultFooter nếu tự render footer.
|
|
150
|
+
## Related components
|
|
151
|
+
|
|
152
|
+
- [`geo-stepper`](./geo-stepper.md)
|
|
153
|
+
- [`geo-form-modal`](./geo-form-modal.md)
|
|
154
|
+
- [`geo-button`](./geo-button.md)
|
|
155
|
+
## Package path
|
|
156
|
+
`node_modules/@geoit/ui/ai/components/geo-step-form-layout.md`
|
|
157
|
+
|
|
72
158
|
## Source
|
|
73
159
|
`projects/geo-ui/src/lib/figma/geo-step-form-layout/geo-step-form-layout.component.ts`
|
|
74
160
|
|
|
75
|
-
##
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## Rules for AI
|
|
79
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
161
|
+
## Rules for AI / consumers
|
|
162
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
80
163
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
81
|
-
- Match props to
|
|
164
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
165
|
+
- Copy examples and adapt labels/bindings only.
|