@geoit/ui 0.0.2 → 0.0.5
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/AGENTS.md +12 -8
- package/README.md +140 -17
- package/ai/AGENTS.md +43 -32
- package/ai/README.md +36 -2
- package/ai/catalog.json +5585 -437
- 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-chart.md +103 -0
- package/ai/components/geo-checkbox.md +67 -20
- package/ai/components/geo-column-picker.md +91 -18
- package/ai/components/geo-confirm-modal.md +92 -27
- package/ai/components/geo-dashboard.md +91 -0
- package/ai/components/geo-date-picker.md +105 -29
- package/ai/components/geo-date-range-picker.md +101 -28
- package/ai/components/geo-empty-state.md +75 -0
- package/ai/components/geo-feedback-form.md +97 -0
- package/ai/components/geo-file-picker.md +99 -26
- package/ai/components/geo-forgot-password.md +78 -0
- package/ai/components/geo-form-modal.md +111 -44
- package/ai/components/geo-icon.md +70 -16
- package/ai/components/geo-input.md +94 -29
- package/ai/components/geo-layout-footer.md +70 -0
- package/ai/components/geo-layout-header-actions.md +82 -0
- package/ai/components/geo-layout-header.md +89 -0
- package/ai/components/geo-layout-sidebar.md +86 -0
- package/ai/components/geo-layout.md +155 -0
- package/ai/components/geo-list-page.md +72 -0
- package/ai/components/geo-login.md +94 -0
- package/ai/components/geo-map-admin-filter.md +80 -0
- package/ai/components/geo-map-basemap-switcher.md +75 -0
- package/ai/components/geo-map-help.md +72 -0
- package/ai/components/geo-map-layer-card.md +73 -0
- package/ai/components/geo-map-layer-panel.md +75 -0
- package/ai/components/geo-map-layers-drawer.md +78 -0
- package/ai/components/geo-map-legend.md +74 -0
- package/ai/components/geo-map-locate.md +75 -0
- package/ai/components/geo-map-location-chip.md +71 -0
- package/ai/components/geo-map-measure.md +74 -0
- package/ai/components/geo-map-opacity.md +75 -0
- package/ai/components/geo-map-parcel-popup.md +79 -0
- package/ai/components/geo-map-search.md +83 -0
- package/ai/components/geo-map-shell.md +110 -0
- package/ai/components/geo-map-snapshot.md +75 -0
- package/ai/components/geo-map-swipe.md +73 -0
- package/ai/components/geo-map-toolbar.md +76 -0
- package/ai/components/geo-map-zoom.md +74 -0
- package/ai/components/geo-map.md +205 -0
- package/ai/components/geo-overlap-result.md +88 -0
- package/ai/components/geo-page-header.md +72 -0
- package/ai/components/geo-page-title.md +62 -16
- package/ai/components/geo-pagination.md +76 -24
- package/ai/components/geo-radio.md +110 -27
- package/ai/components/geo-row-actions.md +87 -19
- package/ai/components/geo-select.md +108 -28
- package/ai/components/geo-slider.md +70 -21
- package/ai/components/geo-stat-card.md +98 -0
- package/ai/components/geo-status-tag.md +67 -15
- package/ai/components/geo-step-form-layout.md +121 -38
- package/ai/components/geo-stepper.md +81 -19
- package/ai/components/geo-table-filter.md +90 -29
- package/ai/components/geo-table-pagination.md +70 -23
- package/ai/components/geo-table-toolbar.md +84 -29
- package/ai/components/geo-table.md +191 -59
- package/ai/components/geo-tabs.md +99 -27
- package/ai/components/geo-textarea.md +84 -23
- package/ai/components/geo-toast.md +138 -27
- package/ai/components/geo-tree.md +94 -22
- package/ai/components/geo-typography.md +70 -19
- package/ai/components/geo-upload.md +109 -39
- package/ai/mockup.html +1194 -0
- package/ai/recipes.md +132 -47
- package/esm2022/lib/figma/geo-alert/geo-alert.component.mjs +19 -36
- package/esm2022/lib/figma/geo-back-button/geo-back-button.component.mjs +14 -24
- package/esm2022/lib/figma/geo-breadcrumb/geo-breadcrumb.component.mjs +8 -11
- package/esm2022/lib/figma/geo-button/geo-button.component.mjs +30 -59
- package/esm2022/lib/figma/geo-chart/geo-chart.component.mjs +88 -0
- package/esm2022/lib/figma/geo-chart/geo-chart.types.mjs +2 -0
- package/esm2022/lib/figma/geo-checkbox/geo-checkbox.component.mjs +11 -22
- package/esm2022/lib/figma/geo-confirm-modal/geo-confirm-modal.component.mjs +22 -54
- package/esm2022/lib/figma/geo-dashboard/geo-dashboard.component.mjs +49 -0
- package/esm2022/lib/figma/geo-dashboard/geo-dashboard.types.mjs +2 -0
- package/esm2022/lib/figma/geo-date-picker/geo-date-picker.component.mjs +48 -78
- package/esm2022/lib/figma/geo-date-range-picker/geo-date-range-picker.component.mjs +47 -75
- package/esm2022/lib/figma/geo-empty-state/geo-empty-state.component.mjs +25 -0
- package/esm2022/lib/figma/geo-feedback-form/geo-feedback-form.component.mjs +75 -0
- package/esm2022/lib/figma/geo-feedback-form/geo-feedback-form.types.mjs +2 -0
- package/esm2022/lib/figma/geo-file-picker/geo-file-picker.component.mjs +59 -81
- package/esm2022/lib/figma/geo-forgot-password/geo-forgot-password.component.mjs +51 -0
- package/esm2022/lib/figma/geo-form-modal/geo-form-modal.component.mjs +45 -112
- package/esm2022/lib/figma/geo-icon/geo-icon.component.mjs +22 -32
- package/esm2022/lib/figma/geo-input/geo-input.component.mjs +41 -70
- package/esm2022/lib/figma/geo-layout/footer/geo-layout-footer.component.mjs +18 -0
- package/esm2022/lib/figma/geo-layout/geo-layout-actions.directive.mjs +15 -0
- package/esm2022/lib/figma/geo-layout/geo-layout.component.mjs +79 -0
- package/esm2022/lib/figma/geo-layout/geo-layout.types.mjs +42 -0
- package/esm2022/lib/figma/geo-layout/header/geo-layout-header.component.mjs +60 -0
- package/esm2022/lib/figma/geo-layout/header-actions/geo-layout-header-actions.component.mjs +70 -0
- package/esm2022/lib/figma/geo-layout/sidebar/geo-layout-sidebar.component.mjs +90 -0
- package/esm2022/lib/figma/geo-list-page/geo-list-page.component.mjs +22 -0
- package/esm2022/lib/figma/geo-login/geo-login.component.mjs +58 -0
- package/esm2022/lib/figma/geo-login/geo-login.types.mjs +2 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-admin-filter/geo-map-admin-filter.component.mjs +52 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-basemap-switcher/geo-map-basemap-switcher.component.mjs +61 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-help/geo-map-help.component.mjs +26 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layer-card/geo-map-layer-card.component.mjs +24 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layer-panel/geo-map-layer-panel.component.mjs +146 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-layers-drawer/geo-map-layers-drawer.component.mjs +37 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-legend/geo-map-legend.component.mjs +30 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-locate/geo-map-locate.component.mjs +72 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-location-chip/geo-map-location-chip.component.mjs +21 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-measure/geo-map-measure.component.mjs +375 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-opacity/geo-map-opacity.component.mjs +94 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-parcel-popup/geo-map-parcel-popup.component.mjs +136 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-search/geo-map-search.component.mjs +182 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-shell/geo-map-shell.component.mjs +577 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-snapshot/geo-map-snapshot.component.mjs +93 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-swipe/geo-map-swipe.component.mjs +129 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-toolbar/geo-map-toolbar.component.mjs +64 -0
- package/esm2022/lib/figma/geo-map/chrome/geo-map-zoom/geo-map-zoom.component.mjs +295 -0
- package/esm2022/lib/figma/geo-map/geo-map-toolbar.icons.mjs +18 -0
- package/esm2022/lib/figma/geo-map/geo-map.component.mjs +144 -0
- package/esm2022/lib/figma/geo-map/geo-map.constants.mjs +497 -0
- package/esm2022/lib/figma/geo-map/geo-map.controller.mjs +71 -0
- package/esm2022/lib/figma/geo-map/geo-map.types.mjs +2 -0
- package/esm2022/lib/figma/geo-map/services/geo-map-layer.service.mjs +368 -0
- package/esm2022/lib/figma/geo-map/services/geo-map-projection.service.mjs +110 -0
- package/esm2022/lib/figma/geo-map/services/geo-map.service.mjs +540 -0
- package/esm2022/lib/figma/geo-map/utils/geo-map-fullscreen-overlay.util.mjs +47 -0
- package/esm2022/lib/figma/geo-map/utils/geo-map-interactions.util.mjs +30 -0
- package/esm2022/lib/figma/geo-overlap-result/geo-overlap-result.component.mjs +25 -0
- package/esm2022/lib/figma/geo-overlap-result/geo-overlap-result.types.mjs +2 -0
- package/esm2022/lib/figma/geo-page-header/geo-page-header.component.mjs +23 -0
- package/esm2022/lib/figma/geo-page-title/geo-page-title.component.mjs +20 -35
- package/esm2022/lib/figma/geo-pagination/geo-pagination.component.mjs +13 -43
- package/esm2022/lib/figma/geo-radio/geo-radio.component.mjs +32 -52
- package/esm2022/lib/figma/geo-select/geo-select.component.mjs +46 -72
- package/esm2022/lib/figma/geo-slider/geo-slider.component.mjs +12 -28
- package/esm2022/lib/figma/geo-stat-card/geo-stat-card.component.mjs +163 -0
- package/esm2022/lib/figma/geo-stat-card/geo-stat-card.types.mjs +2 -0
- package/esm2022/lib/figma/geo-status-tag/geo-status-tag.component.mjs +23 -27
- package/esm2022/lib/figma/geo-step-form-layout/geo-step-form-layout.component.mjs +39 -96
- package/esm2022/lib/figma/geo-stepper/geo-stepper.component.mjs +18 -33
- package/esm2022/lib/figma/geo-table/geo-column-picker/geo-column-picker.component.mjs +14 -24
- package/esm2022/lib/figma/geo-table/geo-row-actions/geo-row-actions.component.mjs +18 -36
- package/esm2022/lib/figma/geo-table/geo-table-filter/geo-table-filter.component.mjs +41 -98
- package/esm2022/lib/figma/geo-table/geo-table-pagination/geo-table-pagination.component.mjs +40 -73
- package/esm2022/lib/figma/geo-table/geo-table-toolbar/geo-table-toolbar.component.mjs +26 -56
- package/esm2022/lib/figma/geo-table/geo-table.component.mjs +110 -210
- package/esm2022/lib/figma/geo-tabs/geo-tabs.component.mjs +33 -63
- package/esm2022/lib/figma/geo-textarea/geo-textarea.component.mjs +28 -44
- package/esm2022/lib/figma/geo-toast/geo-toast.component.mjs +18 -39
- package/esm2022/lib/figma/geo-tree/geo-tree.component.mjs +12 -40
- package/esm2022/lib/figma/geo-typography/geo-typography.component.mjs +49 -64
- package/esm2022/lib/figma/geo-upload/geo-upload.component.mjs +50 -101
- package/esm2022/lib/figma/index.mjs +50 -1
- package/esm2022/lib/styles/tokens.mjs +56 -24
- package/fesm2022/geoit-ui.mjs +5981 -1825
- package/fesm2022/geoit-ui.mjs.map +1 -1
- package/lib/figma/geo-alert/geo-alert.component.d.ts +10 -11
- package/lib/figma/geo-back-button/geo-back-button.component.d.ts +6 -7
- package/lib/figma/geo-breadcrumb/geo-breadcrumb.component.d.ts +2 -2
- package/lib/figma/geo-button/geo-button.component.d.ts +21 -17
- package/lib/figma/geo-chart/geo-chart.component.d.ts +40 -0
- package/lib/figma/geo-chart/geo-chart.types.d.ts +13 -0
- package/lib/figma/geo-checkbox/geo-checkbox.component.d.ts +6 -7
- package/lib/figma/geo-confirm-modal/geo-confirm-modal.component.d.ts +15 -17
- package/lib/figma/geo-dashboard/geo-dashboard.component.d.ts +29 -0
- package/lib/figma/geo-dashboard/geo-dashboard.types.d.ts +7 -0
- package/lib/figma/geo-date-picker/geo-date-picker.component.d.ts +26 -21
- package/lib/figma/geo-date-range-picker/geo-date-range-picker.component.d.ts +25 -20
- package/lib/figma/geo-empty-state/geo-empty-state.component.d.ts +17 -0
- package/lib/figma/geo-feedback-form/geo-feedback-form.component.d.ts +36 -0
- package/lib/figma/geo-feedback-form/geo-feedback-form.types.d.ts +8 -0
- package/lib/figma/geo-file-picker/geo-file-picker.component.d.ts +23 -20
- package/lib/figma/geo-forgot-password/geo-forgot-password.component.d.ts +24 -0
- package/lib/figma/geo-form-modal/geo-form-modal.component.d.ts +33 -35
- package/lib/figma/geo-icon/geo-icon.component.d.ts +7 -7
- package/lib/figma/geo-input/geo-input.component.d.ts +23 -21
- package/lib/figma/geo-layout/footer/geo-layout-footer.component.d.ts +10 -0
- package/lib/figma/geo-layout/geo-layout-actions.directive.d.ts +6 -0
- package/lib/figma/geo-layout/geo-layout.component.d.ts +48 -0
- package/lib/figma/geo-layout/geo-layout.types.d.ts +44 -0
- package/lib/figma/geo-layout/header/geo-layout-header.component.d.ts +31 -0
- package/lib/figma/geo-layout/header-actions/geo-layout-header-actions.component.d.ts +32 -0
- package/lib/figma/geo-layout/sidebar/geo-layout-sidebar.component.d.ts +34 -0
- package/lib/figma/geo-list-page/geo-list-page.component.d.ts +16 -0
- package/lib/figma/geo-login/geo-login.component.d.ts +27 -0
- package/lib/figma/geo-login/geo-login.types.d.ts +6 -0
- package/lib/figma/geo-map/chrome/geo-map-admin-filter/geo-map-admin-filter.component.d.ts +28 -0
- package/lib/figma/geo-map/chrome/geo-map-basemap-switcher/geo-map-basemap-switcher.component.d.ts +26 -0
- package/lib/figma/geo-map/chrome/geo-map-help/geo-map-help.component.d.ts +20 -0
- package/lib/figma/geo-map/chrome/geo-map-layer-card/geo-map-layer-card.component.d.ts +15 -0
- package/lib/figma/geo-map/chrome/geo-map-layer-panel/geo-map-layer-panel.component.d.ts +40 -0
- package/lib/figma/geo-map/chrome/geo-map-layers-drawer/geo-map-layers-drawer.component.d.ts +25 -0
- package/lib/figma/geo-map/chrome/geo-map-legend/geo-map-legend.component.d.ts +18 -0
- package/lib/figma/geo-map/chrome/geo-map-locate/geo-map-locate.component.d.ts +24 -0
- package/lib/figma/geo-map/chrome/geo-map-location-chip/geo-map-location-chip.component.d.ts +14 -0
- package/lib/figma/geo-map/chrome/geo-map-measure/geo-map-measure.component.d.ts +49 -0
- package/lib/figma/geo-map/chrome/geo-map-opacity/geo-map-opacity.component.d.ts +30 -0
- package/lib/figma/geo-map/chrome/geo-map-parcel-popup/geo-map-parcel-popup.component.d.ts +44 -0
- package/lib/figma/geo-map/chrome/geo-map-search/geo-map-search.component.d.ts +56 -0
- package/lib/figma/geo-map/chrome/geo-map-shell/geo-map-shell.component.d.ts +103 -0
- package/lib/figma/geo-map/chrome/geo-map-snapshot/geo-map-snapshot.component.d.ts +21 -0
- package/lib/figma/geo-map/chrome/geo-map-swipe/geo-map-swipe.component.d.ts +33 -0
- package/lib/figma/geo-map/chrome/geo-map-toolbar/geo-map-toolbar.component.d.ts +30 -0
- package/lib/figma/geo-map/chrome/geo-map-zoom/geo-map-zoom.component.d.ts +67 -0
- package/lib/figma/geo-map/geo-map-toolbar.icons.d.ts +17 -0
- package/lib/figma/geo-map/geo-map.component.d.ts +53 -0
- package/lib/figma/geo-map/geo-map.constants.d.ts +73 -0
- package/lib/figma/geo-map/geo-map.controller.d.ts +49 -0
- package/lib/figma/geo-map/geo-map.types.d.ts +224 -0
- package/lib/figma/geo-map/services/geo-map-layer.service.d.ts +42 -0
- package/lib/figma/geo-map/services/geo-map-projection.service.d.ts +32 -0
- package/lib/figma/geo-map/services/geo-map.service.d.ts +99 -0
- package/lib/figma/geo-map/utils/geo-map-fullscreen-overlay.util.d.ts +13 -0
- package/lib/figma/geo-map/utils/geo-map-interactions.util.d.ts +9 -0
- package/lib/figma/geo-overlap-result/geo-overlap-result.component.d.ts +18 -0
- package/lib/figma/geo-overlap-result/geo-overlap-result.types.d.ts +7 -0
- package/lib/figma/geo-page-header/geo-page-header.component.d.ts +16 -0
- package/lib/figma/geo-page-title/geo-page-title.component.d.ts +9 -9
- package/lib/figma/geo-pagination/geo-pagination.component.d.ts +9 -14
- package/lib/figma/geo-radio/geo-radio.component.d.ts +17 -15
- package/lib/figma/geo-select/geo-select.component.d.ts +24 -19
- package/lib/figma/geo-slider/geo-slider.component.d.ts +7 -9
- package/lib/figma/geo-stat-card/geo-stat-card.component.d.ts +50 -0
- package/lib/figma/geo-stat-card/geo-stat-card.types.d.ts +11 -0
- package/lib/figma/geo-status-tag/geo-status-tag.component.d.ts +7 -7
- package/lib/figma/geo-step-form-layout/geo-step-form-layout.component.d.ts +27 -29
- package/lib/figma/geo-stepper/geo-stepper.component.d.ts +6 -8
- package/lib/figma/geo-table/geo-column-picker/geo-column-picker.component.d.ts +6 -7
- package/lib/figma/geo-table/geo-row-actions/geo-row-actions.component.d.ts +11 -12
- package/lib/figma/geo-table/geo-table-filter/geo-table-filter.component.d.ts +21 -28
- package/lib/figma/geo-table/geo-table-pagination/geo-table-pagination.component.d.ts +17 -20
- package/lib/figma/geo-table/geo-table-toolbar/geo-table-toolbar.component.d.ts +17 -18
- package/lib/figma/geo-table/geo-table.component.d.ts +58 -62
- package/lib/figma/geo-tabs/geo-tabs.component.d.ts +14 -17
- package/lib/figma/geo-textarea/geo-textarea.component.d.ts +15 -13
- package/lib/figma/geo-toast/geo-toast.component.d.ts +11 -12
- package/lib/figma/geo-tree/geo-tree.component.d.ts +8 -13
- package/lib/figma/geo-typography/geo-typography.component.d.ts +13 -13
- package/lib/figma/geo-upload/geo-upload.component.d.ts +26 -28
- package/lib/figma/index.d.ts +49 -0
- package/lib/styles/tokens.d.ts +56 -23
- package/package.json +4 -2
- package/src/lib/figma/geo-map/assets/toolbar/fullscreen.svg +8 -0
- package/src/lib/figma/geo-map/assets/toolbar/home.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/layers.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/measure-area.svg +12 -0
- package/src/lib/figma/geo-map/assets/toolbar/measure-distance.svg +5 -0
- package/src/lib/figma/geo-map/assets/toolbar/pan.svg +13 -0
- package/src/lib/figma/geo-map/assets/toolbar/search.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/zoom-in.svg +3 -0
- package/src/lib/figma/geo-map/assets/toolbar/zoom-out.svg +5 -0
- package/src/lib/styles/design-tokens.scss +108 -35
- package/src/lib/styles/scrollbar.scss +2 -2
- package/src/lib/styles/theme.scss +1 -1
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-checkbox
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoCheckboxComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
4
6
|
|
|
5
7
|
## Summary
|
|
6
|
-
Checkbox with label;
|
|
8
|
+
Checkbox with label; bind with [(checked)] (not CVA/ngModel).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoCheckboxComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoCheckboxComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-checkbox`
|
|
@@ -24,31 +31,71 @@ Boolean / multi-select options in forms.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Single exclusive choice — use geo-radio.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Checkbox có label. Two-way bằng [(checked)] / (checkedChange) — không phải CVA ngModel.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
**`model()` two-way** on `checked` (Angular 18):
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<geo-checkbox [(checked)]="agreed"></geo-checkbox>
|
|
44
|
+
```
|
|
45
|
+
|
|
27
46
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
47
|
+
|
|
48
|
+
Every supported Input (do not invent others):
|
|
49
|
+
|
|
50
|
+
| Input | Type | Default | Description |
|
|
51
|
+
|-------|------|---------|-------------|
|
|
52
|
+
| `label` | `string` | `''` | — |
|
|
53
|
+
| `checked` | `boolean` | `false` | Two-way: `[(checked)]`. — Two-way `model()` (supports banana binding). |
|
|
54
|
+
| `disabled` | `boolean` | `false` | — |
|
|
55
|
+
| `indeterminate` | `boolean` | `false` | — |
|
|
34
56
|
|
|
35
57
|
## Outputs
|
|
36
|
-
| Output | Notes |
|
|
37
|
-
|--------|-------|
|
|
38
|
-
| `checkedChange` | EventEmitter |
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
_None_
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
### Basic
|
|
65
|
+
|
|
66
|
+
```html
|
|
67
|
+
<geo-checkbox label="Tôi đồng ý điều khoản" [(checked)]="agreed"></geo-checkbox>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Full options
|
|
71
|
+
|
|
41
72
|
```html
|
|
42
|
-
<geo-checkbox
|
|
73
|
+
<geo-checkbox
|
|
74
|
+
label="Chọn tất cả"
|
|
75
|
+
[(checked)]="allChecked"
|
|
76
|
+
[indeterminate]="indeterminate"
|
|
77
|
+
[disabled]="loading"
|
|
78
|
+
(checkedChange)="onToggleAll($event)"
|
|
79
|
+
></geo-checkbox>
|
|
43
80
|
```
|
|
44
81
|
|
|
82
|
+
## Tips
|
|
83
|
+
|
|
84
|
+
- Độc quyền 1 lựa chọn → geo-radio.
|
|
85
|
+
- indeterminate cho trạng thái chọn một phần (select-all).
|
|
86
|
+
- Luôn dùng [(checked)], không [(ngModel)].
|
|
87
|
+
## Related components
|
|
88
|
+
|
|
89
|
+
- [`geo-radio`](./geo-radio.md)
|
|
90
|
+
- [`geo-button`](./geo-button.md)
|
|
91
|
+
## Package path
|
|
92
|
+
`node_modules/@geoit/ui/ai/components/geo-checkbox.md`
|
|
93
|
+
|
|
45
94
|
## Source
|
|
46
95
|
`projects/geo-ui/src/lib/figma/geo-checkbox/geo-checkbox.component.ts`
|
|
47
96
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Rules for AI
|
|
52
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
97
|
+
## Rules for AI / consumers
|
|
98
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
53
99
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
54
|
-
- Match props to
|
|
100
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
101
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-column-picker
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoColumnPickerComponent** (`@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
|
Column visibility picker for tables (optional persistence).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoColumnPickerComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoColumnPickerComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-column-picker`
|
|
@@ -24,31 +31,97 @@ Let users show/hide table columns.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Static tables with fixed columns.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Popup ẩn/hiện cột bảng. [items] GeoColumnPickerItem[]; (apply) nhận payload cột đã chọn; tùy chọn storageKey để persist.
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `triggerLabel` | `string` | `'Ẩn hiện cột'` | — |
|
|
49
|
+
| `hint` | `string` | `'Chọn cột hiển thị trên bảng.'` | — |
|
|
50
|
+
| `items` | `GeoColumnPickerItem[]` | `[]` | — |
|
|
51
|
+
| `storageKey` | `string \| undefined` | `undefined` | Lưu trạng thái ẩn/hiện cột theo session khi người dùng áp dụng |
|
|
34
52
|
|
|
35
53
|
## Outputs
|
|
36
|
-
| Output | Notes |
|
|
37
|
-
|--------|-------|
|
|
38
|
-
| `apply` | EventEmitter |
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
| Output | Payload | Description |
|
|
56
|
+
|--------|---------|-------------|
|
|
57
|
+
| `apply` | `OutputEmitterRef<GeoColumnPickerApplyPayload>` | — |
|
|
58
|
+
|
|
59
|
+
## Related types
|
|
60
|
+
|
|
61
|
+
From `figma/geo-table/geo-column-picker/geo-column-picker.types.ts`:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export interface GeoColumnPickerItem {
|
|
65
|
+
key: string;
|
|
66
|
+
title: string;
|
|
67
|
+
visible: boolean;
|
|
68
|
+
locked?: boolean;
|
|
69
|
+
/** @deprecated Không còn UI ghim/di chuyển cột. */
|
|
70
|
+
pinnable?: boolean;
|
|
71
|
+
/** @deprecated Không còn UI ghim/di chuyển cột. */
|
|
72
|
+
pinned?: GeoColumnPinSide | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface GeoColumnPickerApplyPayload {
|
|
76
|
+
visibility: Record<string, boolean>;
|
|
77
|
+
/** @deprecated Luôn `{}` từ picker mới — giữ field để tương thích. */
|
|
78
|
+
pinned: Record<string, GeoColumnPinSide | null>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type GeoColumnPinSide = 'left' | 'right';
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Examples
|
|
85
|
+
|
|
86
|
+
### Basic
|
|
87
|
+
|
|
41
88
|
```html
|
|
42
89
|
<geo-column-picker [items]="cols" (apply)="onCols($event)"></geo-column-picker>
|
|
43
90
|
```
|
|
44
91
|
|
|
92
|
+
### Full options
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<geo-column-picker
|
|
96
|
+
triggerLabel="Ẩn hiện cột"
|
|
97
|
+
hint="Chọn cột hiển thị trên bảng."
|
|
98
|
+
[items]="[
|
|
99
|
+
{ key: 'code', label: 'Mã', visible: true },
|
|
100
|
+
{ key: 'name', label: 'Tên', visible: true },
|
|
101
|
+
{ key: 'status', label: 'Trạng thái', visible: false }
|
|
102
|
+
]"
|
|
103
|
+
storageKey="ho-so-columns"
|
|
104
|
+
(apply)="onColumnApply($event)"
|
|
105
|
+
></geo-column-picker>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Tips
|
|
109
|
+
|
|
110
|
+
- Thường gắn qua geo-table-toolbar [columnItems].
|
|
111
|
+
- storageKey ổn định theo màn hình (vd. 'hs-columns').
|
|
112
|
+
- triggerLabel/hint tiếng Việt mặc định đã có.
|
|
113
|
+
## Related components
|
|
114
|
+
|
|
115
|
+
- [`geo-table`](./geo-table.md)
|
|
116
|
+
- [`geo-table-toolbar`](./geo-table-toolbar.md)
|
|
117
|
+
## Package path
|
|
118
|
+
`node_modules/@geoit/ui/ai/components/geo-column-picker.md`
|
|
119
|
+
|
|
45
120
|
## Source
|
|
46
121
|
`projects/geo-ui/src/lib/figma/geo-table/geo-column-picker/geo-column-picker.component.ts`
|
|
47
122
|
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Rules for AI
|
|
52
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
123
|
+
## Rules for AI / consumers
|
|
124
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
53
125
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
54
|
-
- Match props to
|
|
126
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
127
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
# geo-confirm-modal
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoConfirmModalComponent** (`@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
|
Confirm / danger dialog (destroy actions).
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoConfirmModalComponent } from '@geoit/ui';
|
|
11
14
|
```
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoConfirmModalComponent]
|
|
20
|
+
```
|
|
14
21
|
|
|
15
22
|
## Selector
|
|
16
23
|
`geo-confirm-modal`
|
|
@@ -24,29 +31,55 @@ Delete, irreversible actions.
|
|
|
24
31
|
## Do not use when
|
|
25
32
|
Multi-field forms — use geo-form-modal.
|
|
26
33
|
|
|
34
|
+
## How to use
|
|
35
|
+
|
|
36
|
+
Dialog xác nhận hành động phá hủy (xóa). Điều khiển bằng [visible] + (visibleChange); (confirm)/(cancel).
|
|
37
|
+
|
|
38
|
+
## Binding
|
|
39
|
+
|
|
40
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
41
|
+
|
|
27
42
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
43
|
+
|
|
44
|
+
Every supported Input (do not invent others):
|
|
45
|
+
|
|
46
|
+
| Input | Type | Default | Description |
|
|
47
|
+
|-------|------|---------|-------------|
|
|
48
|
+
| `visible` | `boolean` | `false` | Two-way `model()` (supports banana binding). |
|
|
49
|
+
| `title` | `string` | `'Xác nhận xoá'` | — |
|
|
50
|
+
| `message` | `string` | `''` | — |
|
|
51
|
+
| `highlight` | `string` | `''` | — |
|
|
52
|
+
| `description` | `string` | `'Hành động không thể hoàn tác, bạn chắc chắn muốn thực hiện?'` | — |
|
|
53
|
+
| `cancelText` | `string` | `'Hủy'` | — |
|
|
54
|
+
| `confirmText` | `string` | `'Xác nhận'` | — |
|
|
55
|
+
| `confirmLoading` | `boolean` | `false` | — |
|
|
56
|
+
| `width` | `number \| string` | `445` | — |
|
|
57
|
+
| `maskClosable` | `boolean` | `false` | — |
|
|
58
|
+
| `closable` | `boolean` | `true` | — |
|
|
41
59
|
|
|
42
60
|
## Outputs
|
|
43
|
-
| Output | Notes |
|
|
44
|
-
|--------|-------|
|
|
45
|
-
| `visibleChange` | EventEmitter |
|
|
46
|
-
| `confirm` | EventEmitter |
|
|
47
|
-
| `cancel` | EventEmitter |
|
|
48
61
|
|
|
49
|
-
|
|
62
|
+
| Output | Payload | Description |
|
|
63
|
+
|--------|---------|-------------|
|
|
64
|
+
| `confirm` | `OutputEmitterRef<void>` | — |
|
|
65
|
+
| `cancel` | `OutputEmitterRef<void>` | — |
|
|
66
|
+
|
|
67
|
+
## Related types
|
|
68
|
+
|
|
69
|
+
From `figma/geo-confirm-modal/geo-confirm-modal.types.ts`:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
export interface GeoConfirmModalContent {
|
|
73
|
+
message?: string;
|
|
74
|
+
highlight?: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
### Basic
|
|
82
|
+
|
|
50
83
|
```html
|
|
51
84
|
<geo-confirm-modal
|
|
52
85
|
[visible]="open"
|
|
@@ -58,13 +91,45 @@ Multi-field forms — use geo-form-modal.
|
|
|
58
91
|
></geo-confirm-modal>
|
|
59
92
|
```
|
|
60
93
|
|
|
94
|
+
### Full options
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<geo-confirm-modal
|
|
98
|
+
[visible]="confirmOpen"
|
|
99
|
+
title="Xác nhận xoá"
|
|
100
|
+
message="Bạn sắp xóa hồ sơ"
|
|
101
|
+
highlight="HS-2024-001"
|
|
102
|
+
description="Hành động không thể hoàn tác, bạn chắc chắn muốn thực hiện?"
|
|
103
|
+
cancelText="Hủy"
|
|
104
|
+
confirmText="Xóa"
|
|
105
|
+
[confirmLoading]="deleting"
|
|
106
|
+
[width]="445"
|
|
107
|
+
[maskClosable]="false"
|
|
108
|
+
[closable]="true"
|
|
109
|
+
(confirm)="onDelete()"
|
|
110
|
+
(cancel)="confirmOpen = false"
|
|
111
|
+
(visibleChange)="confirmOpen = $event"
|
|
112
|
+
></geo-confirm-modal>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Tips
|
|
116
|
+
|
|
117
|
+
- Form nhiều field → geo-form-modal.
|
|
118
|
+
- highlight để nhấn mạnh tên đối tượng bị xóa.
|
|
119
|
+
- confirmLoading khi đang gọi API.
|
|
120
|
+
## Related components
|
|
121
|
+
|
|
122
|
+
- [`geo-form-modal`](./geo-form-modal.md)
|
|
123
|
+
- [`geo-button`](./geo-button.md)
|
|
124
|
+
- [`geo-toast`](./geo-toast.md)
|
|
125
|
+
## Package path
|
|
126
|
+
`node_modules/@geoit/ui/ai/components/geo-confirm-modal.md`
|
|
127
|
+
|
|
61
128
|
## Source
|
|
62
129
|
`projects/geo-ui/src/lib/figma/geo-confirm-modal/geo-confirm-modal.component.ts`
|
|
63
130
|
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## Rules for AI
|
|
68
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
131
|
+
## Rules for AI / consumers
|
|
132
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
69
133
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
70
|
-
- Match props to
|
|
134
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
135
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# geo-dashboard
|
|
2
|
+
|
|
3
|
+
> Complete usage reference for **GeoDashboardComponent** (`@geoit/ui`)
|
|
4
|
+
>
|
|
5
|
+
> Read this file before using the component. Use **only** the Inputs/Outputs listed here.
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
GeoDashboardComponent
|
|
9
|
+
|
|
10
|
+
## Import
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { GeoDashboardComponent } from '@geoit/ui';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Add to the consuming standalone component:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
imports: [GeoDashboardComponent]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Selector
|
|
23
|
+
`geo-dashboard`
|
|
24
|
+
|
|
25
|
+
## Category
|
|
26
|
+
`other`
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
—
|
|
30
|
+
|
|
31
|
+
## Do not use when
|
|
32
|
+
—
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Binding
|
|
36
|
+
|
|
37
|
+
Standalone component — drive via Inputs (`input()` / `model()`) and Outputs (`output()`). Banana bindings work for any `model()` fields (e.g. `[(open)]`, `[(pageIndex)]`).
|
|
38
|
+
|
|
39
|
+
## Inputs
|
|
40
|
+
|
|
41
|
+
Every supported Input (do not invent others):
|
|
42
|
+
|
|
43
|
+
| Input | Type | Default | Description |
|
|
44
|
+
|-------|------|---------|-------------|
|
|
45
|
+
| `title` | `string` | `'Dashboard thống kê'` | — |
|
|
46
|
+
| `breadcrumb` | `GeoBreadcrumbItem[]` | `[ { label: 'Trang chủ', link: '/' }, { label: 'Dashboard' }, ]` | — |
|
|
47
|
+
| `stats` | `GeoStatCardItem[]` | `[]` | — |
|
|
48
|
+
| `wardChartTitle` | `string` | `'Diện tích quy hoạch theo phường/xã'` | — |
|
|
49
|
+
| `wardData` | `GeoChartDatum[]` | `[]` | — |
|
|
50
|
+
| `mismatchChartTitle` | `string` | `'Tỷ lệ thửa quy hoạch khác mục đích hiện trạng'` | — |
|
|
51
|
+
| `mismatchData` | `GeoChartDatum[]` | `[]` | — |
|
|
52
|
+
| `wardUnit` | `string` | `'ha'` | — |
|
|
53
|
+
| `period` | `GeoDateRangeValue` | `null` | Two-way `model()` (supports banana binding). |
|
|
54
|
+
|
|
55
|
+
## Outputs
|
|
56
|
+
|
|
57
|
+
| Output | Payload | Description |
|
|
58
|
+
|--------|---------|-------------|
|
|
59
|
+
| `periodChange` | `OutputEmitterRef<GeoDateRangeValue>` | — |
|
|
60
|
+
| `mismatchSegmentClick` | `OutputEmitterRef<GeoChartSegmentClick>` | — |
|
|
61
|
+
| `wardSegmentClick` | `OutputEmitterRef<GeoChartSegmentClick>` | — |
|
|
62
|
+
|
|
63
|
+
## Related types
|
|
64
|
+
|
|
65
|
+
From `figma/geo-dashboard/geo-dashboard.types.ts`:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
export interface GeoDashboardPeriodChange {
|
|
69
|
+
range: GeoDateRangeValue | null;
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Examples
|
|
74
|
+
|
|
75
|
+
### Example
|
|
76
|
+
|
|
77
|
+
```html
|
|
78
|
+
<geo-dashboard></geo-dashboard>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Package path
|
|
82
|
+
`node_modules/@geoit/ui/ai/components/geo-dashboard.md`
|
|
83
|
+
|
|
84
|
+
## Source
|
|
85
|
+
`projects/geo-ui/src/lib/figma/geo-dashboard/geo-dashboard.component.ts`
|
|
86
|
+
|
|
87
|
+
## Rules for AI / consumers
|
|
88
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
89
|
+
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
90
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
91
|
+
- Copy examples and adapt labels/bindings only.
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
# geo-date-picker
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Complete usage reference for **GeoDatePickerComponent** (`@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
|
Single date (optional time) picker.
|
|
7
9
|
|
|
8
10
|
## Import
|
|
11
|
+
|
|
9
12
|
```ts
|
|
10
13
|
import { GeoDatePickerComponent } 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: [GeoDatePickerComponent, FormsModule]
|
|
21
|
+
```
|
|
14
22
|
|
|
15
23
|
## Selector
|
|
16
24
|
`geo-date-picker`
|
|
@@ -24,42 +32,110 @@ One date field in forms.
|
|
|
24
32
|
## Do not use when
|
|
25
33
|
Date range — use geo-date-range-picker.
|
|
26
34
|
|
|
35
|
+
## How to use
|
|
36
|
+
|
|
37
|
+
Chọn một ngày (CVA). [(ngModel)] hoặc formControlName; format mặc định dd/MM/yyyy; bật showTime khi cần giờ.
|
|
38
|
+
|
|
39
|
+
## Binding
|
|
40
|
+
|
|
41
|
+
Supports **ControlValueAccessor**.
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<geo-date-picker [(ngModel)]="value"></geo-date-picker>
|
|
45
|
+
<!-- or -->
|
|
46
|
+
<geo-date-picker formControlName="field"></geo-date-picker>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Also import `FormsModule` (template-driven) or `ReactiveFormsModule`.
|
|
50
|
+
|
|
51
|
+
Library API uses Angular 18 `input()` / `output()` signals under the hood.
|
|
52
|
+
|
|
27
53
|
## Inputs
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
54
|
+
|
|
55
|
+
Every supported Input (do not invent others):
|
|
56
|
+
|
|
57
|
+
| Input | Type | Default | Description |
|
|
58
|
+
|-------|------|---------|-------------|
|
|
59
|
+
| `label` | `string` | `''` | — |
|
|
60
|
+
| `placeholder` | `string` | `'Chọn ngày'` | — |
|
|
61
|
+
| `format` | `string` | `'dd/MM/yyyy'` | — |
|
|
62
|
+
| `mode` | `'date' \| 'week' \| 'month' \| 'year'` | `'date'` | — |
|
|
63
|
+
| `size` | `'default' \| 'small'` | `'default'` | — |
|
|
64
|
+
| `disabled` | `boolean` | `false` | — |
|
|
65
|
+
| `required` | `boolean` | `false` | — |
|
|
66
|
+
| `error` | `boolean` | `false` | — |
|
|
67
|
+
| `errorMessage` | `string` | `''` | — |
|
|
68
|
+
| `allowClear` | `boolean` | `true` | — |
|
|
69
|
+
| `showToday` | `boolean` | `true` | — |
|
|
70
|
+
| `showTime` | `boolean` | `false` | — |
|
|
71
|
+
| `block` | `boolean` | `false` | — |
|
|
72
|
+
| `width` | `number \| string \| undefined` | `undefined` | — |
|
|
73
|
+
| `disabledDate` | `((current: Date) => boolean) \| undefined` | `undefined` | — |
|
|
45
74
|
|
|
46
75
|
## Outputs
|
|
47
|
-
| Output | Notes |
|
|
48
|
-
|--------|-------|
|
|
49
|
-
| `valueChange` | EventEmitter |
|
|
50
76
|
|
|
51
|
-
|
|
77
|
+
| Output | Payload | Description |
|
|
78
|
+
|--------|---------|-------------|
|
|
79
|
+
| `valueChange` | `OutputEmitterRef<Date \| null>` | — |
|
|
80
|
+
|
|
81
|
+
## Related types
|
|
82
|
+
|
|
83
|
+
From `figma/geo-date-picker/geo-date-picker.types.ts`:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
export type GeoDatePickerMode = 'date' | 'week' | 'month' | 'year';
|
|
87
|
+
|
|
88
|
+
export type GeoDatePickerSize = 'default' | 'small';
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
### Basic
|
|
94
|
+
|
|
52
95
|
```html
|
|
53
96
|
<geo-date-picker label="Ngày tạo" [required]="true" [(ngModel)]="date" [block]="true"></geo-date-picker>
|
|
54
97
|
```
|
|
55
98
|
|
|
99
|
+
### Full options
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<geo-date-picker
|
|
103
|
+
label="Ngày hiệu lực"
|
|
104
|
+
placeholder="Chọn ngày"
|
|
105
|
+
format="dd/MM/yyyy"
|
|
106
|
+
mode="date"
|
|
107
|
+
size="default"
|
|
108
|
+
[required]="true"
|
|
109
|
+
[allowClear]="true"
|
|
110
|
+
[showToday]="true"
|
|
111
|
+
[showTime]="false"
|
|
112
|
+
[block]="true"
|
|
113
|
+
[error]="hasError"
|
|
114
|
+
errorMessage="Vui lòng chọn ngày"
|
|
115
|
+
[disabledDate]="disablePast"
|
|
116
|
+
[(ngModel)]="effectiveDate"
|
|
117
|
+
(valueChange)="onDate($event)"
|
|
118
|
+
></geo-date-picker>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Tips
|
|
122
|
+
|
|
123
|
+
- Khoảng ngày → geo-date-range-picker.
|
|
124
|
+
- [block]="true" trong form modal/grid.
|
|
125
|
+
- disabledDate để chặn ngày không hợp lệ.
|
|
126
|
+
## Related components
|
|
127
|
+
|
|
128
|
+
- [`geo-date-range-picker`](./geo-date-range-picker.md)
|
|
129
|
+
- [`geo-input`](./geo-input.md)
|
|
130
|
+
- [`geo-form-modal`](./geo-form-modal.md)
|
|
131
|
+
## Package path
|
|
132
|
+
`node_modules/@geoit/ui/ai/components/geo-date-picker.md`
|
|
133
|
+
|
|
56
134
|
## Source
|
|
57
135
|
`projects/geo-ui/src/lib/figma/geo-date-picker/geo-date-picker.component.ts`
|
|
58
136
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## Rules for AI
|
|
63
|
-
- Prefer this component over raw ng-zorro / HTML equivalents for the same UI role.
|
|
137
|
+
## Rules for AI / consumers
|
|
138
|
+
- Prefer this component over raw ng-zorro / HTML for the same UI role.
|
|
64
139
|
- Use design tokens (`var(--geo-*)`) — never hardcode brand colors or radius.
|
|
65
|
-
- Match props to
|
|
140
|
+
- Match props exactly to the Inputs table; do not invent unsupported inputs.
|
|
141
|
+
- Copy examples and adapt labels/bindings only.
|