@solcre-org/core-ui 2.19.2 → 2.20.0
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 +10 -0
- package/fesm2022/solcre-org-core-ui.mjs +5 -5
- package/fesm2022/solcre-org-core-ui.mjs.map +1 -1
- package/llm/README.md +34 -0
- package/llm/components/active-filters.md +25 -0
- package/llm/components/ad-login-button.md +57 -0
- package/llm/components/alert-container.md +26 -0
- package/llm/components/alert.md +46 -0
- package/llm/components/base-field.md +39 -0
- package/llm/components/card.md +23 -0
- package/llm/components/carousel.md +68 -0
- package/llm/components/checkbox-field.md +61 -0
- package/llm/components/color-picker-field.md +55 -0
- package/llm/components/confirmation-dialog.md +46 -0
- package/llm/components/data-list-item.md +35 -0
- package/llm/components/data-list.md +27 -0
- package/llm/components/date-field.md +56 -0
- package/llm/components/daterange-field.md +59 -0
- package/llm/components/datetime-field.md +61 -0
- package/llm/components/document-field.md +60 -0
- package/llm/components/dropdown.md +73 -0
- package/llm/components/field-errors.md +33 -0
- package/llm/components/file-field.md +60 -0
- package/llm/components/file-preview.md +25 -0
- package/llm/components/filter-modal.md +25 -0
- package/llm/components/fixed-actions-mobile-modal.md +23 -0
- package/llm/components/gallery-modal.md +23 -0
- package/llm/components/generic-button.md +82 -0
- package/llm/components/generic-calendar.md +70 -0
- package/llm/components/generic-chat.md +81 -0
- package/llm/components/generic-documentation.md +32 -0
- package/llm/components/generic-fixed-actions.md +24 -0
- package/llm/components/generic-gallery.md +75 -0
- package/llm/components/generic-modal.md +95 -0
- package/llm/components/generic-pagination.md +29 -0
- package/llm/components/generic-rating.md +26 -0
- package/llm/components/generic-scheduler.md +92 -0
- package/llm/components/generic-sidebar.md +80 -0
- package/llm/components/generic-skeleton.md +80 -0
- package/llm/components/generic-steps.md +99 -0
- package/llm/components/generic-switch.md +140 -0
- package/llm/components/generic-table.md +157 -0
- package/llm/components/generic-timeline.md +70 -0
- package/llm/components/header.md +39 -0
- package/llm/components/image-modal.md +23 -0
- package/llm/components/image-preview.md +79 -0
- package/llm/components/index.md +66 -0
- package/llm/components/layout-auth.md +82 -0
- package/llm/components/layout.md +92 -0
- package/llm/components/loader.md +35 -0
- package/llm/components/main-nav.md +56 -0
- package/llm/components/manual-refresh.md +25 -0
- package/llm/components/mobile-header.md +25 -0
- package/llm/components/multi-entry-field.md +67 -0
- package/llm/components/nav[core-generic-tabs].md +28 -0
- package/llm/components/number-field.md +56 -0
- package/llm/components/password-field.md +56 -0
- package/llm/components/phone-field.md +60 -0
- package/llm/components/progress-bar.md +49 -0
- package/llm/components/select-field.md +61 -0
- package/llm/components/server-select-field.md +59 -0
- package/llm/components/sidebar-custom-modal.md +23 -0
- package/llm/components/smart-field.md +62 -0
- package/llm/components/switch-field.md +56 -0
- package/llm/components/text-area-field.md +56 -0
- package/llm/components/text-field.md +58 -0
- package/llm/components/time-field.md +62 -0
- package/llm/components.md +56 -0
- package/llm/demo-examples.md +186 -0
- package/llm/exports.md +286 -0
- package/llm/form-recipes.md +203 -0
- package/llm/llms.txt +47 -0
- package/llm/repo-map.md +30 -0
- package/llm/screen-blueprints.md +129 -0
- package/llm/screen-recipes.md +53 -0
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# core-layout
|
|
2
|
+
|
|
3
|
+
- Class: `LayoutComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/layout/layout.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `navItems`: `NavItem[]`
|
|
8
|
+
- `bottomNavItems`: `BottomNavItem[]`
|
|
9
|
+
- `collapsedLogo`: `string`
|
|
10
|
+
- `expandedLogo`: `string`
|
|
11
|
+
- `logoImagesConfig`: `LogoImagesConfig | null`
|
|
12
|
+
- `navConfig`: `NavConfig`
|
|
13
|
+
- `mobileHeaderConfig`: `MobileHeaderConfig | null`
|
|
14
|
+
|
|
15
|
+
## Outputs
|
|
16
|
+
- `onLogout`: `void`
|
|
17
|
+
- `onMobileRefresh`: `void`
|
|
18
|
+
- `onMobileFilter`: `void`
|
|
19
|
+
|
|
20
|
+
## Usage notes
|
|
21
|
+
- Use as the main app shell; it renders header, navigation, sidebars, and common modals.
|
|
22
|
+
- Left/right sidebars are controlled via `LayoutStateService` and `LayoutService`.
|
|
23
|
+
- Mobile behavior uses `MobileResolutionService`; mobile header is toggled via `mobileHeaderConfig`.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
```html
|
|
27
|
+
<core-layout
|
|
28
|
+
[navItems]="navItems"
|
|
29
|
+
[navConfig]="navConfig"
|
|
30
|
+
[logoImagesConfig]="logoImagesConfig"
|
|
31
|
+
[mobileHeaderConfig]="mobileHeaderConfig"
|
|
32
|
+
(onLogout)="handleLogout()"
|
|
33
|
+
(onMobileRefresh)="reloadData()"
|
|
34
|
+
>
|
|
35
|
+
<!-- page content goes here -->
|
|
36
|
+
</core-layout>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Demo usage
|
|
40
|
+
|
|
41
|
+
- `projects/core-ui-demo/src/app/layout/dashboard/dashboard.component.html`:1 — `<core-layout`
|
|
42
|
+
- `projects/core-ui-demo/src/app/layout/dashboard/dashboard.component.html`:9 — `</core-layout>`
|
|
43
|
+
|
|
44
|
+
## Demo snippet (HTML)
|
|
45
|
+
|
|
46
|
+
Source: `projects/core-ui-demo/src/app/layout/dashboard/dashboard.component.html`:1-9
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<core-layout
|
|
50
|
+
[navItems]="navItems"
|
|
51
|
+
[navConfig]="navConfig"
|
|
52
|
+
[logoImagesConfig]="logoConfig"
|
|
53
|
+
[mobileHeaderConfig]="mobileHeaderConfig"
|
|
54
|
+
(onLogout)="onLogout()"
|
|
55
|
+
>
|
|
56
|
+
<router-outlet></router-outlet>
|
|
57
|
+
</core-layout>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Demo snippet (TS)
|
|
61
|
+
|
|
62
|
+
Source: `projects/core-ui-demo/src/app/layout/dashboard/dashboard.component.ts`
|
|
63
|
+
|
|
64
|
+
Lines: 68-92
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
logoConfig: LogoImagesConfig = {
|
|
70
|
+
collapsedSettings: {
|
|
71
|
+
image: '/favicon.ico',
|
|
72
|
+
width: 40,
|
|
73
|
+
height: 40,
|
|
74
|
+
alt: 'Solcre'
|
|
75
|
+
},
|
|
76
|
+
expandedSettings: {
|
|
77
|
+
image: '/assets/images/logo.svg',
|
|
78
|
+
width: 103,
|
|
79
|
+
height: 40,
|
|
80
|
+
alt: 'WTC - Logo iso'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
mobileHeaderConfig: MobileHeaderConfig = {
|
|
85
|
+
title: 'Core UI Demo',
|
|
86
|
+
refreshButtonLabel: 'Actualizar',
|
|
87
|
+
filterButtonLabel: 'Filtrar',
|
|
88
|
+
lightSubnav: true
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
navConfig: NavConfig = {
|
|
92
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# core-loader
|
|
2
|
+
|
|
3
|
+
- Class: `LoaderComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/loader/loader.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `imageUrl`: `string | null`
|
|
8
|
+
- `requestId`: `string`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- none
|
|
12
|
+
|
|
13
|
+
## Usage notes
|
|
14
|
+
- Typically controlled via `LoaderService` to show/hide spinners per request ID.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
```html
|
|
18
|
+
<core-loader [requestId]="'users.list'"></core-loader>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Demo usage
|
|
22
|
+
|
|
23
|
+
- `projects/core-ui-demo/src/app/app.html`:5 — `<core-loader></core-loader>`
|
|
24
|
+
|
|
25
|
+
## Demo snippet (HTML)
|
|
26
|
+
|
|
27
|
+
Source: `projects/core-ui-demo/src/app/app.html`:5-5
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<core-loader></core-loader>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Demo snippet (TS)
|
|
34
|
+
|
|
35
|
+
Source: `projects/core-ui-demo/src/app/app.ts` (no matching bindings found)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# core-main-nav
|
|
2
|
+
|
|
3
|
+
- Class: `MainNavComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/main-nav/main-nav.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `navConfig`: `NavConfig`
|
|
8
|
+
- `appVersion`: `any`
|
|
9
|
+
- `navItems`: `NavItem[]`
|
|
10
|
+
- `bottomNavItems`: `BottomNavItem[]`
|
|
11
|
+
- `isProduction`: `boolean`
|
|
12
|
+
- `logoImagesConfig`: `LogoImagesConfig | null`
|
|
13
|
+
- `collapsedLogo`: `string`
|
|
14
|
+
- `expandedLogo`: `string`
|
|
15
|
+
|
|
16
|
+
## Outputs
|
|
17
|
+
- `onLogout`: `void`
|
|
18
|
+
- `onNavItemAction`: `NavItem`
|
|
19
|
+
|
|
20
|
+
## Usage notes
|
|
21
|
+
- Handles permissions via `PermissionWrapperService` and `NavItem.requiredPermission`.
|
|
22
|
+
- Supports mobile bottom nav and toggle behavior (adds/removes CSS classes).
|
|
23
|
+
- Emits `onLogout` if `navConfig.customLogout` is set; otherwise logs out via `AuthService`.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
```html
|
|
27
|
+
<core-main-nav
|
|
28
|
+
[navItems]="navItems"
|
|
29
|
+
[bottomNavItems]="bottomNavItems"
|
|
30
|
+
[navConfig]="navConfig"
|
|
31
|
+
[logoImagesConfig]="logoImagesConfig"
|
|
32
|
+
(onLogout)="handleLogout()"
|
|
33
|
+
(onNavItemAction)="handleNavAction($event)"
|
|
34
|
+
></core-main-nav>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Demo usage
|
|
38
|
+
|
|
39
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:155 — `<h2>6.6. 🎯 Selector de Elemento Personalizado (core-main-nav)</h2>`
|
|
40
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:158 — `<strong>🔧 Selección Directa:</strong> También puedes usar el nombre del elemento personalizado <code><core-main-nav></code>`
|
|
41
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:164 — `<small>Agregan padding, borde y sombra al elemento <core-main-nav></small>`
|
|
42
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:184 — `customClassService.addClass('core-main-nav', 'extra-padding');`
|
|
43
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:185 — `customClassService.addClass('core-main-nav', ['nav-border', 'nav-shadow']);`
|
|
44
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.html`:186 — `customClassService.removeClass('core-main-nav', 'extra-padding');</code></pre>`
|
|
45
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.ts`:127 — `// Example 6.6: Using custom element selector (core-main-nav)`
|
|
46
|
+
- `projects/core-ui-demo/src/app/admin/components/custom-class-service/custom-class-service.component.ts`:129 — `// Agregar padding directamente al elemento core-main-nav`
|
|
47
|
+
- …and 4 more matches
|
|
48
|
+
|
|
49
|
+
## Demo snippet (HTML)
|
|
50
|
+
|
|
51
|
+
- No demo snippet found in `core-ui-demo`.
|
|
52
|
+
|
|
53
|
+
## Demo snippet (TS)
|
|
54
|
+
|
|
55
|
+
- No demo snippet found in `core-ui-demo`.
|
|
56
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# core-manual-refresh
|
|
2
|
+
|
|
3
|
+
- Class: `CoreManualRefreshComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/manual-refresh/manual-refresh.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `ManualRefreshConfig`
|
|
8
|
+
- `refreshId`: `string | undefined`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `onRefresh`: `string`
|
|
12
|
+
- `timestampUpdated`: `string`
|
|
13
|
+
|
|
14
|
+
## Demo usage
|
|
15
|
+
|
|
16
|
+
- No demo usage found in `core-ui-demo`.
|
|
17
|
+
|
|
18
|
+
## Demo snippet (HTML)
|
|
19
|
+
|
|
20
|
+
- No demo snippet found in `core-ui-demo`.
|
|
21
|
+
|
|
22
|
+
## Demo snippet (TS)
|
|
23
|
+
|
|
24
|
+
- No demo snippet found in `core-ui-demo`.
|
|
25
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# core-mobile-header
|
|
2
|
+
|
|
3
|
+
- Class: `MobileHeaderComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/mobile-header/mobile-header.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `MobileHeaderConfig` (required)
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `menuClick`: `void`
|
|
11
|
+
- `refreshClick`: `void`
|
|
12
|
+
- `filterClick`: `void`
|
|
13
|
+
|
|
14
|
+
## Demo usage
|
|
15
|
+
|
|
16
|
+
- No demo usage found in `core-ui-demo`.
|
|
17
|
+
|
|
18
|
+
## Demo snippet (HTML)
|
|
19
|
+
|
|
20
|
+
- No demo snippet found in `core-ui-demo`.
|
|
21
|
+
|
|
22
|
+
## Demo snippet (TS)
|
|
23
|
+
|
|
24
|
+
- No demo snippet found in `core-ui-demo`.
|
|
25
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# core-multi-entry-field
|
|
2
|
+
|
|
3
|
+
- Class: `MultiEntryFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/multi-entry-field/multi-entry-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `field`: `ExtendedModalFieldConfig<T>` (required)
|
|
8
|
+
- `value`: `any`
|
|
9
|
+
- `mode`: `ModalMode` (required)
|
|
10
|
+
- `errors`: `string[]`
|
|
11
|
+
- `rowData`: `T | null`
|
|
12
|
+
- `formValue`: `any`
|
|
13
|
+
|
|
14
|
+
## Outputs
|
|
15
|
+
- `valueChange`: `any`
|
|
16
|
+
- `onBlurEvent`: `keyof T`
|
|
17
|
+
- `onEnterEvent`: `keyof T`
|
|
18
|
+
- `hasErrors`: `boolean`
|
|
19
|
+
|
|
20
|
+
## Usage notes
|
|
21
|
+
- Uses a similar input contract to `core-base-field`, but does not extend it.
|
|
22
|
+
- Configure behavior via `multiEntryConfig` (min/max entries, output format, labels).
|
|
23
|
+
- Emits `hasErrors` to indicate per-entry validation errors.
|
|
24
|
+
|
|
25
|
+
## Config sketch
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
const tagsField: ExtendedModalFieldConfig<User> = {
|
|
30
|
+
key: 'tags',
|
|
31
|
+
label: 'Tags',
|
|
32
|
+
type: FieldType.TEXT,
|
|
33
|
+
multiEntryConfig: {
|
|
34
|
+
allowMultipleEntries: true,
|
|
35
|
+
maxEntries: 10,
|
|
36
|
+
outputFormat: MultiEntryOutputFormat.COMMA_SEPARATED,
|
|
37
|
+
},
|
|
38
|
+
readonly: false,
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Example
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<core-multi-entry-field
|
|
47
|
+
[field]="fieldConfig"
|
|
48
|
+
[value]="formData[fieldConfig.key]"
|
|
49
|
+
[mode]="mode"
|
|
50
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
51
|
+
[formValue]="formData"
|
|
52
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
53
|
+
></core-multi-entry-field>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Demo usage
|
|
57
|
+
|
|
58
|
+
- No demo usage found in `core-ui-demo`.
|
|
59
|
+
|
|
60
|
+
## Demo snippet (HTML)
|
|
61
|
+
|
|
62
|
+
- No demo snippet found in `core-ui-demo`.
|
|
63
|
+
|
|
64
|
+
## Demo snippet (TS)
|
|
65
|
+
|
|
66
|
+
- No demo snippet found in `core-ui-demo`.
|
|
67
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# nav[core-generic-tabs]
|
|
2
|
+
|
|
3
|
+
- Class: `GenericTabsComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-tabs/generic-tabs.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `GenericTabConfig`
|
|
8
|
+
- `activeTabId`: `string | null`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `tabClick`: `GenericTabClickEvent`
|
|
12
|
+
- `tabChange`: `GenericTab`
|
|
13
|
+
|
|
14
|
+
## Usage notes
|
|
15
|
+
- Provide `config` with tab list and optional per-tab templates.
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
```html
|
|
19
|
+
<nav core-generic-tabs
|
|
20
|
+
[config]="tabsConfig"
|
|
21
|
+
[activeTabId]="activeTabId"
|
|
22
|
+
(tabChange)="onTabChange($event)"
|
|
23
|
+
></nav>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Demo usage
|
|
27
|
+
|
|
28
|
+
- No demo usage found in `core-ui-demo`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# core-number-field
|
|
2
|
+
|
|
3
|
+
- Class: `NumberFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/number-field/number-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
15
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
16
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
17
|
+
|
|
18
|
+
## Config sketch
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const ageField: NumberModalFieldConfig<User> = {
|
|
23
|
+
key: 'age',
|
|
24
|
+
label: 'Age',
|
|
25
|
+
type: FieldType.NUMBER,
|
|
26
|
+
numberConfig: { chars: 3 },
|
|
27
|
+
readonly: false,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<core-number-field
|
|
36
|
+
[field]="fieldConfig"
|
|
37
|
+
[value]="formData[fieldConfig.key]"
|
|
38
|
+
[mode]="mode"
|
|
39
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
40
|
+
[formValue]="formData"
|
|
41
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
42
|
+
></core-number-field>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Demo usage
|
|
46
|
+
|
|
47
|
+
- No demo usage found in `core-ui-demo`.
|
|
48
|
+
|
|
49
|
+
## Demo snippet (HTML)
|
|
50
|
+
|
|
51
|
+
- No demo snippet found in `core-ui-demo`.
|
|
52
|
+
|
|
53
|
+
## Demo snippet (TS)
|
|
54
|
+
|
|
55
|
+
- No demo snippet found in `core-ui-demo`.
|
|
56
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# core-password-field
|
|
2
|
+
|
|
3
|
+
- Class: `PasswordFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/password-field/password-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
15
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
16
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
17
|
+
|
|
18
|
+
## Config sketch
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const passwordField: ModalFieldConfig<User> = {
|
|
23
|
+
key: 'password',
|
|
24
|
+
label: 'Password',
|
|
25
|
+
type: FieldType.PASSWORD,
|
|
26
|
+
readonly: false,
|
|
27
|
+
validators: [Validators.required],
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<core-password-field
|
|
36
|
+
[field]="fieldConfig"
|
|
37
|
+
[value]="formData[fieldConfig.key]"
|
|
38
|
+
[mode]="mode"
|
|
39
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
40
|
+
[formValue]="formData"
|
|
41
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
42
|
+
></core-password-field>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Demo usage
|
|
46
|
+
|
|
47
|
+
- No demo usage found in `core-ui-demo`.
|
|
48
|
+
|
|
49
|
+
## Demo snippet (HTML)
|
|
50
|
+
|
|
51
|
+
- No demo snippet found in `core-ui-demo`.
|
|
52
|
+
|
|
53
|
+
## Demo snippet (TS)
|
|
54
|
+
|
|
55
|
+
- No demo snippet found in `core-ui-demo`.
|
|
56
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# core-phone-field
|
|
2
|
+
|
|
3
|
+
- Class: `PhoneFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/phone-field/phone-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
15
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
16
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
17
|
+
|
|
18
|
+
## Config sketch
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const phoneField: PhoneModalFieldConfig<User> = {
|
|
23
|
+
key: 'phone',
|
|
24
|
+
label: 'Phone',
|
|
25
|
+
type: FieldType.PHONE,
|
|
26
|
+
phoneConfig: {
|
|
27
|
+
defaultCountry: CountryCode.UY,
|
|
28
|
+
showFlags: true,
|
|
29
|
+
showPhoneCode: true,
|
|
30
|
+
},
|
|
31
|
+
readonly: false,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<core-phone-field
|
|
40
|
+
[field]="fieldConfig"
|
|
41
|
+
[value]="formData[fieldConfig.key]"
|
|
42
|
+
[mode]="mode"
|
|
43
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
44
|
+
[formValue]="formData"
|
|
45
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
46
|
+
></core-phone-field>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Demo usage
|
|
50
|
+
|
|
51
|
+
- No demo usage found in `core-ui-demo`.
|
|
52
|
+
|
|
53
|
+
## Demo snippet (HTML)
|
|
54
|
+
|
|
55
|
+
- No demo snippet found in `core-ui-demo`.
|
|
56
|
+
|
|
57
|
+
## Demo snippet (TS)
|
|
58
|
+
|
|
59
|
+
- No demo snippet found in `core-ui-demo`.
|
|
60
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# core-progress-bar
|
|
2
|
+
|
|
3
|
+
- Class: `ProgressBarComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/progress-bar/progress-bar.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `progress`: `number`
|
|
8
|
+
- `size`: `ProgressBarSize`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- none
|
|
12
|
+
|
|
13
|
+
## Demo usage
|
|
14
|
+
|
|
15
|
+
- `projects/core-ui-demo/src/app/admin/components/progressbar/progressbar.html`:3 — `<core-progress-bar [progress]="10" [size]="progressBarSizes.SMALL"/>`
|
|
16
|
+
- `projects/core-ui-demo/src/app/admin/components/progressbar/progressbar.html`:6 — `<core-progress-bar [progress]="50" />`
|
|
17
|
+
- `projects/core-ui-demo/src/app/admin/components/progressbar/progressbar.html`:9 — `<core-progress-bar [progress]="5" [size]="progressBarSizes.LARGE"/>`
|
|
18
|
+
|
|
19
|
+
## Demo snippet (HTML)
|
|
20
|
+
|
|
21
|
+
Source: `projects/core-ui-demo/src/app/admin/components/progressbar/progressbar.html`:3-3
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<core-progress-bar [progress]="10" [size]="progressBarSizes.SMALL"/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Demo snippet (TS)
|
|
28
|
+
|
|
29
|
+
Source: `projects/core-ui-demo/src/app/admin/components/progressbar/progressbar.ts`
|
|
30
|
+
|
|
31
|
+
Lines: 1-16
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { Component, computed } from '@angular/core';
|
|
35
|
+
import { ComponentsGrid } from '../../../shared/components/components-grid/components-grid';
|
|
36
|
+
import { ComponentsGridRow } from '../../../shared/components/components-grid-row/components-grid-row';
|
|
37
|
+
import { CardComponent, ProgressBarComponent, ProgressBarSize } from '@solcre-org/core-ui';
|
|
38
|
+
|
|
39
|
+
@Component({
|
|
40
|
+
selector: 'app-progressbar',
|
|
41
|
+
imports: [
|
|
42
|
+
ProgressBarComponent,
|
|
43
|
+
],
|
|
44
|
+
templateUrl: './progressbar.html',
|
|
45
|
+
})
|
|
46
|
+
export class Progressbar {
|
|
47
|
+
progressBarSizes = ProgressBarSize
|
|
48
|
+
}
|
|
49
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# core-select-field
|
|
2
|
+
|
|
3
|
+
- Class: `SelectFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/select-field/select-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `selectionChange`: `{ selectedItem: any; newFormValue: any }`
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
15
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
16
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
17
|
+
|
|
18
|
+
## Config sketch
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const statusField: SelectFieldConfig<User> = {
|
|
23
|
+
key: 'status',
|
|
24
|
+
label: 'Status',
|
|
25
|
+
type: FieldType.SELECT,
|
|
26
|
+
options: [
|
|
27
|
+
{ value: 'active', label: 'Active' },
|
|
28
|
+
{ value: 'inactive', label: 'Inactive' },
|
|
29
|
+
],
|
|
30
|
+
searchable: true,
|
|
31
|
+
clearable: true,
|
|
32
|
+
readonly: false,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<core-select-field
|
|
41
|
+
[field]="fieldConfig"
|
|
42
|
+
[value]="formData[fieldConfig.key]"
|
|
43
|
+
[mode]="mode"
|
|
44
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
45
|
+
[formValue]="formData"
|
|
46
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
47
|
+
></core-select-field>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Demo usage
|
|
51
|
+
|
|
52
|
+
- No demo usage found in `core-ui-demo`.
|
|
53
|
+
|
|
54
|
+
## Demo snippet (HTML)
|
|
55
|
+
|
|
56
|
+
- No demo snippet found in `core-ui-demo`.
|
|
57
|
+
|
|
58
|
+
## Demo snippet (TS)
|
|
59
|
+
|
|
60
|
+
- No demo snippet found in `core-ui-demo`.
|
|
61
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# core-server-select-field
|
|
2
|
+
|
|
3
|
+
- Class: `ServerSelectFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/server-select-field/server-select-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `selectionChange`: `{ selectedItem: any; newFormValue: any }`
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
15
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
16
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
17
|
+
|
|
18
|
+
## Config sketch
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const companyField: SelectServerSideConfig<User> = {
|
|
23
|
+
key: 'companyId',
|
|
24
|
+
label: 'Company',
|
|
25
|
+
type: FieldType.SERVER_SELECT,
|
|
26
|
+
endpoint: '/api/companies',
|
|
27
|
+
bindValue: 'id',
|
|
28
|
+
bindLabel: 'name',
|
|
29
|
+
searchParam: 'q',
|
|
30
|
+
readonly: false,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<core-server-select-field
|
|
39
|
+
[field]="fieldConfig"
|
|
40
|
+
[value]="formData[fieldConfig.key]"
|
|
41
|
+
[mode]="mode"
|
|
42
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
43
|
+
[formValue]="formData"
|
|
44
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
45
|
+
></core-server-select-field>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Demo usage
|
|
49
|
+
|
|
50
|
+
- No demo usage found in `core-ui-demo`.
|
|
51
|
+
|
|
52
|
+
## Demo snippet (HTML)
|
|
53
|
+
|
|
54
|
+
- No demo snippet found in `core-ui-demo`.
|
|
55
|
+
|
|
56
|
+
## Demo snippet (TS)
|
|
57
|
+
|
|
58
|
+
- No demo snippet found in `core-ui-demo`.
|
|
59
|
+
|