@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,140 @@
|
|
|
1
|
+
# core-generic-switch
|
|
2
|
+
|
|
3
|
+
- Class: `GenericSwitchComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-switch/generic-switch.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `selectedValue`: `T`
|
|
8
|
+
- `ariaLabel`: `string`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `valueChange`: `T`
|
|
12
|
+
|
|
13
|
+
## Demo usage
|
|
14
|
+
|
|
15
|
+
- `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.html`:15 — `<core-generic-switch`
|
|
16
|
+
- `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.html`:33 — `<core-generic-switch`
|
|
17
|
+
- `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.html`:52 — `<core-generic-switch`
|
|
18
|
+
- `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.html`:86 — `<pre><code><core-generic-switch`
|
|
19
|
+
|
|
20
|
+
## Demo snippet (HTML)
|
|
21
|
+
|
|
22
|
+
Source: `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.html`:15-95
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<core-generic-switch
|
|
26
|
+
[options]="viewOptions"
|
|
27
|
+
[selectedValue]="viewMode()"
|
|
28
|
+
[ariaLabel]="'View mode selector'"
|
|
29
|
+
(valueChange)="onViewChange($event)" />
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="example-result">
|
|
33
|
+
<p><strong>Modo seleccionado:</strong> {{ viewMode() }}</p>
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
|
|
37
|
+
<!-- Example 2: Three options -->
|
|
38
|
+
<section class="example-section">
|
|
39
|
+
<h2 class="c-title c-title--h3">Ejemplo 2: Switch con tres opciones</h2>
|
|
40
|
+
<p class="c-text">Switch con múltiples opciones para cambiar entre diferentes modos de visualización.</p>
|
|
41
|
+
|
|
42
|
+
<div class="example-demo">
|
|
43
|
+
<core-generic-switch
|
|
44
|
+
[options]="displayOptions"
|
|
45
|
+
[selectedValue]="displayMode()"
|
|
46
|
+
[ariaLabel]="'Display mode selector'"
|
|
47
|
+
(valueChange)="onDisplayChange($event)" />
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="example-result">
|
|
51
|
+
<p><strong>Modo de visualización:</strong> {{ displayMode() }}</p>
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<!-- Example 3: Switch with disabled option -->
|
|
57
|
+
<section class="example-section">
|
|
58
|
+
<h2 class="c-title c-title--h3">Ejemplo 3: Switch con opción deshabilitada</h2>
|
|
59
|
+
<p class="c-text">Switch donde una de las opciones está deshabilitada.</p>
|
|
60
|
+
|
|
61
|
+
<div class="example-demo">
|
|
62
|
+
<core-generic-switch
|
|
63
|
+
[options]="sortOptions"
|
|
64
|
+
[selectedValue]="sortMode()"
|
|
65
|
+
[ariaLabel]="'Sort mode selector'"
|
|
66
|
+
(valueChange)="onSortChange($event)" />
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="example-result">
|
|
70
|
+
<p><strong>Ordenamiento seleccionado:</strong> {{ sortMode() }}</p>
|
|
71
|
+
<p class="c-text c-text--small">Nota: La opción "por tamaño" está deshabilitada.</p>
|
|
72
|
+
</div>
|
|
73
|
+
</section>
|
|
74
|
+
|
|
75
|
+
<!-- Usage Documentation -->
|
|
76
|
+
<section class="example-section">
|
|
77
|
+
<h2 class="c-title c-title--h3">Uso</h2>
|
|
78
|
+
|
|
79
|
+
<div class="code-example">
|
|
80
|
+
<h4>TypeScript:</h4>
|
|
81
|
+
<pre><code>import { Component, signal } from '@angular/core';
|
|
82
|
+
import { GenericSwitchComponent, SwitchOption } from '@solcre-org/core-ui';
|
|
83
|
+
|
|
84
|
+
viewMode = signal<'list' | 'calendar'>('list');
|
|
85
|
+
|
|
86
|
+
viewOptions: SwitchOption<'list' | 'calendar'>[] = [
|
|
87
|
+
{ value: 'list', icon: 'icon-list', tooltip: 'Vista de lista' },
|
|
88
|
+
{ value: 'calendar', icon: 'icon-calendar', tooltip: 'Vista de calendario' }
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
onViewChange(value: 'list' | 'calendar'): void {
|
|
92
|
+
this.viewMode.set(value);
|
|
93
|
+
}</code></pre>
|
|
94
|
+
|
|
95
|
+
<h4>HTML:</h4>
|
|
96
|
+
<pre><code><core-generic-switch
|
|
97
|
+
[options]="viewOptions"
|
|
98
|
+
[selectedValue]="viewMode()"
|
|
99
|
+
(valueChange)="onViewChange($event)" /></code></pre>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="api-docs">
|
|
103
|
+
<h4>API:</h4>
|
|
104
|
+
<ul>
|
|
105
|
+
<li><strong>@Input() options:</strong> Array de SwitchOption (requerido)</li>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Demo snippet (TS)
|
|
109
|
+
|
|
110
|
+
Source: `projects/core-ui-demo/src/app/admin/components/switch/switch-example.component.ts`
|
|
111
|
+
|
|
112
|
+
Lines: 85-109
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
{
|
|
116
|
+
value: 'size',
|
|
117
|
+
icon: 'icon-list',
|
|
118
|
+
tooltip: 'Ordenar por tamaño',
|
|
119
|
+
disabled: true // This option is disabled
|
|
120
|
+
}
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
onViewChange(value: 'list' | 'calendar'): void {
|
|
124
|
+
this.viewMode.set(value);
|
|
125
|
+
console.log('View mode changed to:', value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
onDisplayChange(value: 'calendar' | 'list' | 'start'): void {
|
|
129
|
+
this.displayMode.set(value);
|
|
130
|
+
console.log('Display mode changed to:', value);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
onFilterChange(value: 'all' | 'active' | 'archived'): void {
|
|
134
|
+
this.filterMode.set(value);
|
|
135
|
+
console.log('Filter mode changed to:', value);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
onSortChange(value: 'search' | 'star' | 'size'): void {
|
|
139
|
+
this.sortMode.set(value);
|
|
140
|
+
```
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# core-generic-table
|
|
2
|
+
|
|
3
|
+
- Class: `GenericTableComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-table/generic-table.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `columns`: `ColumnConfig<T>[]` (required)
|
|
8
|
+
- `modalFields`: `ModalFieldConfig<T>[]`
|
|
9
|
+
- `modalTabs`: `ModalTabConfig<T>[]`
|
|
10
|
+
- `actions`: `TableActionConfig<T>[]` (required)
|
|
11
|
+
- `customActions`: `CustomAction<T>[]`
|
|
12
|
+
- `globalActions`: `GlobalAction<T>[]`
|
|
13
|
+
- `pageSizeOptions`: `number[] | undefined`
|
|
14
|
+
- `showFilter`: `boolean`
|
|
15
|
+
- `showSelection`: `boolean`
|
|
16
|
+
- `showActions`: `boolean`
|
|
17
|
+
- `showCreateButton`: `boolean`
|
|
18
|
+
- `filterButtonConfig`: `Partial<ButtonConfig> | undefined`
|
|
19
|
+
- `createButtonConfig`: `Partial<ButtonConfig> | undefined`
|
|
20
|
+
- `createButtonText`: `string | undefined`
|
|
21
|
+
- `dataInput`: `T[]`
|
|
22
|
+
- `customFilters`: `FilterConfig<T>[]`
|
|
23
|
+
- `enablePagination`: `boolean`
|
|
24
|
+
- `modelFactory`: `((data: any) => T) | undefined`
|
|
25
|
+
- `endpoint`: `string | undefined`
|
|
26
|
+
- `customParams`: `Record<string, any> | undefined`
|
|
27
|
+
- `customArrayKey`: `string | undefined`
|
|
28
|
+
- `listTitle`: `string | undefined`
|
|
29
|
+
- `listSubTitle`: `string | undefined`
|
|
30
|
+
- `moreData`: `MoreDataConfig<any>[]`
|
|
31
|
+
- `inModal`: `boolean`
|
|
32
|
+
- `expansionConfig`: `ExpansionConfig<T> | undefined`
|
|
33
|
+
- `fileUploadConfig`: `FileUploadConfig | undefined`
|
|
34
|
+
- `rowStyleConfigs`: `RowStyleConfig<T>[]`
|
|
35
|
+
- `columnDisabledConfigs`: `ColumnDisabledConfig<T>[]`
|
|
36
|
+
- `rowVisibilityConfigs`: `RowVisibilityConfig<T>[]`
|
|
37
|
+
- `headerOrder`: `HeaderOrderConfig | undefined`
|
|
38
|
+
- `showActiveFilters`: `boolean`
|
|
39
|
+
- `activeFiltersConfig`: `ActiveFiltersConfig`
|
|
40
|
+
- `sortConfig`: `TableSortConfig | undefined`
|
|
41
|
+
- `showManualRefresh`: `boolean`
|
|
42
|
+
- `manualRefreshConfig`: `Partial<ManualRefreshConfig> | undefined`
|
|
43
|
+
- `refreshButtonConfig`: `Partial<ButtonConfig> | undefined`
|
|
44
|
+
- `fixedActionsConfig`: `TableFixedActionsConfig<T> | undefined`
|
|
45
|
+
- `deletedFilterKey`: `string`
|
|
46
|
+
- `scrollTable`: `boolean`
|
|
47
|
+
- `customEdit`: `(item: T) => void`
|
|
48
|
+
- `customDelete`: `(item: T) => void`
|
|
49
|
+
- `customView`: `(item: T) => void`
|
|
50
|
+
- `customSave`: `(item: T, mode: ModalMode) => void`
|
|
51
|
+
- `useCustomSave`: `boolean`
|
|
52
|
+
- `onApiError`: `(error: any, defaultMessage: string, operation: string) => string`
|
|
53
|
+
- `inlineEditConfig`: `InlineEditConfig<T> | undefined`
|
|
54
|
+
|
|
55
|
+
## Outputs
|
|
56
|
+
- `actionTriggered`: `{ action: TableAction; row?: T }`
|
|
57
|
+
- `selectionChanged`: `T[]`
|
|
58
|
+
- `dataCreated`: `T`
|
|
59
|
+
- `dataUpdated`: `T`
|
|
60
|
+
- `dataDeleted`: `T[]`
|
|
61
|
+
- `dataFetched`: `T[]`
|
|
62
|
+
- `onMoreDataLoaded`: `Map<string, any[]>`
|
|
63
|
+
- `globalActionTriggered`: `{ action: GlobalAction<T>; selectedRows: T[] }`
|
|
64
|
+
- `modalData`: `T`
|
|
65
|
+
- `beforeSave`: `{ data: T; mode: ModalMode }`
|
|
66
|
+
- `onFilterChange`: `Map<string, any>`
|
|
67
|
+
- `onClearFilters`: `void`
|
|
68
|
+
- `activeFilterRemoved`: `ActiveFilterItem`
|
|
69
|
+
- `activeFiltersCleared`: `void`
|
|
70
|
+
- `dataRefreshed`: `void`
|
|
71
|
+
- `inlineEditSave`: `{ row: T; column: string; value: any; allChanges: Map<string, any> }`
|
|
72
|
+
- `inlineEditModeChanged`: `boolean`
|
|
73
|
+
- `inlineEditValidationError`: `{ rowId: number; column: string; errors: string[] }`
|
|
74
|
+
|
|
75
|
+
## Usage notes
|
|
76
|
+
- Use `columns` + `actions` as the minimal required config.
|
|
77
|
+
- Data source can be `dataInput` (local) or `endpoint` + `modelFactory` (remote).
|
|
78
|
+
- Supports filters, inline edit, row styling/visibility, expandable rows, and fixed actions.
|
|
79
|
+
|
|
80
|
+
## Example
|
|
81
|
+
```html
|
|
82
|
+
<core-generic-table
|
|
83
|
+
[columns]="columns"
|
|
84
|
+
[actions]="actions"
|
|
85
|
+
[dataInput]="rows"
|
|
86
|
+
[showFilter]="true"
|
|
87
|
+
[enablePagination]="true"
|
|
88
|
+
(actionTriggered)="onAction($event)"
|
|
89
|
+
(dataCreated)="onCreated($event)"
|
|
90
|
+
(dataUpdated)="onUpdated($event)"
|
|
91
|
+
></core-generic-table>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Demo usage
|
|
95
|
+
|
|
96
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.ts`:1083 — `<core-generic-table [columns]="columns" [actions]="[]"></core-generic-table>`
|
|
97
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:12 — `<core-generic-table`
|
|
98
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:23 — `</core-generic-table>`
|
|
99
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:30 — `<core-generic-table`
|
|
100
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:41 — `</core-generic-table>`
|
|
101
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:48 — `<core-generic-table`
|
|
102
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:55 — `</core-generic-table>`
|
|
103
|
+
- `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:62 — `<core-generic-table`
|
|
104
|
+
- …and 41 more matches
|
|
105
|
+
|
|
106
|
+
## Demo snippet (HTML)
|
|
107
|
+
|
|
108
|
+
Source: `projects/core-ui-demo/src/app/admin/components/tables/tables.html`:12-23
|
|
109
|
+
|
|
110
|
+
```html
|
|
111
|
+
<core-generic-table
|
|
112
|
+
[columns]="basicColumns"
|
|
113
|
+
[actions]="basicActions"
|
|
114
|
+
[dataInput]="sampleData()"
|
|
115
|
+
[modalFields]="modalFields()"
|
|
116
|
+
[modelFactory]="documentationModelFactory"
|
|
117
|
+
[enablePagination]="false"
|
|
118
|
+
[showFilter]="true"
|
|
119
|
+
(dataCreated)="onDataCreated($event)"
|
|
120
|
+
(dataUpdated)="onDataUpdated($event)"
|
|
121
|
+
(dataDeleted)="onDataDeleted($event)">
|
|
122
|
+
</core-generic-table>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Demo snippet (TS)
|
|
126
|
+
|
|
127
|
+
Source: `projects/core-ui-demo/src/app/admin/components/tables/tables.ts`
|
|
128
|
+
|
|
129
|
+
Lines: 1295-1319
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
console.log('Selección cambiada:', selectedRows);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
onDataCreated(data: DocumentationModel): void {
|
|
136
|
+
console.log('Datos creados:', data);
|
|
137
|
+
const currentData = this.sampleData();
|
|
138
|
+
data.id = Date.now().toString();
|
|
139
|
+
this.sampleData.set([...currentData, data]);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
onDataUpdated(data: DocumentationModel): void {
|
|
143
|
+
console.log('Datos actualizados:', data);
|
|
144
|
+
const currentData = this.sampleData();
|
|
145
|
+
const index = currentData.findIndex(item => item.id === data.id);
|
|
146
|
+
if (index !== -1) {
|
|
147
|
+
currentData[index] = data;
|
|
148
|
+
this.sampleData.set([...currentData]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
onDataDeleted(deletedRows: DocumentationModel[]): void {
|
|
153
|
+
console.log('Datos eliminados:', deletedRows);
|
|
154
|
+
const currentData = this.sampleData();
|
|
155
|
+
const idsToDelete = deletedRows.map(row => row.id);
|
|
156
|
+
this.sampleData.set(currentData.filter(item => !idsToDelete.includes(item.id)));
|
|
157
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# core-generic-timeline
|
|
2
|
+
|
|
3
|
+
- Class: `GenericTimelineComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-timeline/generic-timeline.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `items`: `TimelineItem[]`
|
|
8
|
+
- `dateFormat`: `string`
|
|
9
|
+
- `showDate`: `boolean`
|
|
10
|
+
- `showStatus`: `boolean`
|
|
11
|
+
- `enableActions`: `boolean`
|
|
12
|
+
- `customClass`: `string`
|
|
13
|
+
- `emptyMessage`: `string`
|
|
14
|
+
- `sortAscending`: `boolean`
|
|
15
|
+
- `filterStatuses`: `string[]`
|
|
16
|
+
- `type`: `TimelineType`
|
|
17
|
+
|
|
18
|
+
## Outputs
|
|
19
|
+
- `itemClicked`: `TimelineItem`
|
|
20
|
+
- `actionClicked`: `{ item: TimelineItem, action: string }`
|
|
21
|
+
|
|
22
|
+
## Demo usage
|
|
23
|
+
|
|
24
|
+
- `projects/core-ui-demo/src/app/admin/components/timeline/timeline.html`:3 — `<core-generic-timeline class="u-push-t--xl"`
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/timeline/timeline.html`:6 — `</core-generic-timeline>`
|
|
26
|
+
|
|
27
|
+
## Demo snippet (HTML)
|
|
28
|
+
|
|
29
|
+
Source: `projects/core-ui-demo/src/app/admin/components/timeline/timeline.html`:3-6
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<core-generic-timeline class="u-push-t--xl"
|
|
33
|
+
[items]="mockTimelineItems()"
|
|
34
|
+
[config]="timelineConfig()">
|
|
35
|
+
</core-generic-timeline>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Demo snippet (TS)
|
|
39
|
+
|
|
40
|
+
Source: `projects/core-ui-demo/src/app/admin/components/timeline/timeline.ts`
|
|
41
|
+
|
|
42
|
+
Lines: 1-25
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { Component, computed } from '@angular/core';
|
|
46
|
+
import { ComponentsGrid } from '../../../shared/components/components-grid/components-grid';
|
|
47
|
+
import { ComponentsGridRow } from '../../../shared/components/components-grid-row/components-grid-row';
|
|
48
|
+
import {
|
|
49
|
+
GenericButtonComponent,
|
|
50
|
+
GenericTimelineComponent,
|
|
51
|
+
TimelineConfig,
|
|
52
|
+
TimelineItem,
|
|
53
|
+
} from '@solcre-org/core-ui';
|
|
54
|
+
|
|
55
|
+
@Component({
|
|
56
|
+
selector: 'app-timeline',
|
|
57
|
+
imports: [
|
|
58
|
+
ComponentsGrid,
|
|
59
|
+
ComponentsGridRow,
|
|
60
|
+
GenericTimelineComponent,
|
|
61
|
+
],
|
|
62
|
+
templateUrl: './timeline.html',
|
|
63
|
+
})
|
|
64
|
+
export class Timeline {
|
|
65
|
+
mockTimelineItems = computed<TimelineItem[]>(() => [
|
|
66
|
+
{
|
|
67
|
+
id: 1,
|
|
68
|
+
text: 'Matías Fuster creó la solicitud',
|
|
69
|
+
date: new Date('2024-04-30T10:54:00'),
|
|
70
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# core-header
|
|
2
|
+
|
|
3
|
+
- Class: `HeaderComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/header/header.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `filterRequested`: `void`
|
|
11
|
+
- `createRequested`: `void`
|
|
12
|
+
- `globalActionTriggered`: `GlobalAction<any>`
|
|
13
|
+
|
|
14
|
+
## Usage notes
|
|
15
|
+
- Reads header configuration from `HeaderService` (title, buttons, actions).
|
|
16
|
+
- Emits filter/create/global actions; `core-layout` listens and dispatches window events.
|
|
17
|
+
- Theme toggle is local to the header (adds/removes `dark-mode` on `body`).
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
```html
|
|
21
|
+
<core-header
|
|
22
|
+
(filterRequested)="openFilters()"
|
|
23
|
+
(createRequested)="openCreateModal()"
|
|
24
|
+
(globalActionTriggered)="handleGlobalAction($event)"
|
|
25
|
+
></core-header>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Demo usage
|
|
29
|
+
|
|
30
|
+
- No demo usage found in `core-ui-demo`.
|
|
31
|
+
|
|
32
|
+
## Demo snippet (HTML)
|
|
33
|
+
|
|
34
|
+
- No demo snippet found in `core-ui-demo`.
|
|
35
|
+
|
|
36
|
+
## Demo snippet (TS)
|
|
37
|
+
|
|
38
|
+
- No demo snippet found in `core-ui-demo`.
|
|
39
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# core-image-modal
|
|
2
|
+
|
|
3
|
+
- Class: `ImageModalComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/image-modal/image-modal.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `modalClosed`: `void`
|
|
11
|
+
|
|
12
|
+
## Demo usage
|
|
13
|
+
|
|
14
|
+
- No demo usage found in `core-ui-demo`.
|
|
15
|
+
|
|
16
|
+
## Demo snippet (HTML)
|
|
17
|
+
|
|
18
|
+
- No demo snippet found in `core-ui-demo`.
|
|
19
|
+
|
|
20
|
+
## Demo snippet (TS)
|
|
21
|
+
|
|
22
|
+
- No demo snippet found in `core-ui-demo`.
|
|
23
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# core-image-preview
|
|
2
|
+
|
|
3
|
+
- Class: `ImagePreviewComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/image-preview/image-preview.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `src`: `string` (required)
|
|
8
|
+
- `alt`: `string`
|
|
9
|
+
- `title`: `string`
|
|
10
|
+
- `width`: `string`
|
|
11
|
+
- `height`: `string`
|
|
12
|
+
- `objectFit`: `'cover' | 'contain' | 'fill' | 'scale-down' | 'none'`
|
|
13
|
+
- `borderRadius`: `string`
|
|
14
|
+
- `cursor`: `string`
|
|
15
|
+
- `loading`: `'lazy' | 'eager'`
|
|
16
|
+
- `isRelative`: `boolean`
|
|
17
|
+
- `showSkeleton`: `boolean`
|
|
18
|
+
- `skeletonAnimation`: `SkeletonAnimation`
|
|
19
|
+
|
|
20
|
+
## Outputs
|
|
21
|
+
- none
|
|
22
|
+
|
|
23
|
+
## Demo usage
|
|
24
|
+
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:7 — `<core-image-preview`
|
|
26
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:11 — `</core-image-preview>`
|
|
27
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:27 — `<core-image-preview`
|
|
28
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:32 — `</core-image-preview>`
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:39 — `<core-image-preview`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:44 — `</core-image-preview>`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:51 — `<core-image-preview`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:56 — `</core-image-preview>`
|
|
33
|
+
- …and 10 more matches
|
|
34
|
+
|
|
35
|
+
## Demo snippet (HTML)
|
|
36
|
+
|
|
37
|
+
Source: `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.html`:7-11
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<core-image-preview
|
|
41
|
+
[src]="image.src"
|
|
42
|
+
[alt]="image.alt"
|
|
43
|
+
[title]="image.title">
|
|
44
|
+
</core-image-preview>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Demo snippet (TS)
|
|
48
|
+
|
|
49
|
+
Source: `projects/core-ui-demo/src/app/admin/components/image-preview/image-preview.ts`
|
|
50
|
+
|
|
51
|
+
Lines: 78-102
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
alt: '${imageData.alt}',
|
|
55
|
+
title: '${imageData.title}',
|
|
56
|
+
description: '${imageData.description || ''}'
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}`;
|
|
60
|
+
|
|
61
|
+
const templateCode = `<!-- Uso básico -->
|
|
62
|
+
<core-image-preview
|
|
63
|
+
[src]="imageData.src"
|
|
64
|
+
[alt]="imageData.alt"
|
|
65
|
+
[title]="imageData.title"
|
|
66
|
+
width="300px"
|
|
67
|
+
height="200px">
|
|
68
|
+
</core-image-preview>
|
|
69
|
+
|
|
70
|
+
<!-- Con estilos personalizados -->
|
|
71
|
+
<core-image-preview
|
|
72
|
+
[src]="imageData.src"
|
|
73
|
+
[alt]="imageData.alt"
|
|
74
|
+
[objectFit]="'cover'"
|
|
75
|
+
[borderRadius]="'8px'"
|
|
76
|
+
width="100%"
|
|
77
|
+
height="250px">
|
|
78
|
+
</core-image-preview>
|
|
79
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Components (generated)
|
|
2
|
+
|
|
3
|
+
Auto-generated from @Component files.
|
|
4
|
+
|
|
5
|
+
- `core-active-filters` -> `projects/core-ui-library/src/llm/components/active-filters.md`
|
|
6
|
+
- `core-ad-login-button` -> `projects/core-ui-library/src/llm/components/ad-login-button.md`
|
|
7
|
+
- `core-alert-container` -> `projects/core-ui-library/src/llm/components/alert-container.md`
|
|
8
|
+
- `core-alert` -> `projects/core-ui-library/src/llm/components/alert.md`
|
|
9
|
+
- `core-base-field` -> `projects/core-ui-library/src/llm/components/base-field.md`
|
|
10
|
+
- `core-card` -> `projects/core-ui-library/src/llm/components/card.md`
|
|
11
|
+
- `core-carousel` -> `projects/core-ui-library/src/llm/components/carousel.md`
|
|
12
|
+
- `core-checkbox-field` -> `projects/core-ui-library/src/llm/components/checkbox-field.md`
|
|
13
|
+
- `core-color-picker-field` -> `projects/core-ui-library/src/llm/components/color-picker-field.md`
|
|
14
|
+
- `core-confirmation-dialog` -> `projects/core-ui-library/src/llm/components/confirmation-dialog.md`
|
|
15
|
+
- `core-data-list-item` -> `projects/core-ui-library/src/llm/components/data-list-item.md`
|
|
16
|
+
- `core-data-list` -> `projects/core-ui-library/src/llm/components/data-list.md`
|
|
17
|
+
- `core-date-field` -> `projects/core-ui-library/src/llm/components/date-field.md`
|
|
18
|
+
- `core-daterange-field` -> `projects/core-ui-library/src/llm/components/daterange-field.md`
|
|
19
|
+
- `core-datetime-field` -> `projects/core-ui-library/src/llm/components/datetime-field.md`
|
|
20
|
+
- `core-document-field` -> `projects/core-ui-library/src/llm/components/document-field.md`
|
|
21
|
+
- `core-dropdown` -> `projects/core-ui-library/src/llm/components/dropdown.md`
|
|
22
|
+
- `core-field-errors` -> `projects/core-ui-library/src/llm/components/field-errors.md`
|
|
23
|
+
- `core-file-field` -> `projects/core-ui-library/src/llm/components/file-field.md`
|
|
24
|
+
- `core-file-preview` -> `projects/core-ui-library/src/llm/components/file-preview.md`
|
|
25
|
+
- `core-filter-modal` -> `projects/core-ui-library/src/llm/components/filter-modal.md`
|
|
26
|
+
- `core-fixed-actions-mobile-modal` -> `projects/core-ui-library/src/llm/components/fixed-actions-mobile-modal.md`
|
|
27
|
+
- `core-gallery-modal` -> `projects/core-ui-library/src/llm/components/gallery-modal.md`
|
|
28
|
+
- `core-generic-button` -> `projects/core-ui-library/src/llm/components/generic-button.md`
|
|
29
|
+
- `core-generic-calendar` -> `projects/core-ui-library/src/llm/components/generic-calendar.md`
|
|
30
|
+
- `core-generic-chat` -> `projects/core-ui-library/src/llm/components/generic-chat.md`
|
|
31
|
+
- `core-generic-documentation` -> `projects/core-ui-library/src/llm/components/generic-documentation.md`
|
|
32
|
+
- `core-generic-fixed-actions` -> `projects/core-ui-library/src/llm/components/generic-fixed-actions.md`
|
|
33
|
+
- `core-generic-gallery` -> `projects/core-ui-library/src/llm/components/generic-gallery.md`
|
|
34
|
+
- `core-generic-modal` -> `projects/core-ui-library/src/llm/components/generic-modal.md`
|
|
35
|
+
- `core-generic-pagination` -> `projects/core-ui-library/src/llm/components/generic-pagination.md`
|
|
36
|
+
- `core-generic-rating` -> `projects/core-ui-library/src/llm/components/generic-rating.md`
|
|
37
|
+
- `core-generic-scheduler` -> `projects/core-ui-library/src/llm/components/generic-scheduler.md`
|
|
38
|
+
- `core-generic-sidebar` -> `projects/core-ui-library/src/llm/components/generic-sidebar.md`
|
|
39
|
+
- `core-generic-skeleton` -> `projects/core-ui-library/src/llm/components/generic-skeleton.md`
|
|
40
|
+
- `core-generic-steps` -> `projects/core-ui-library/src/llm/components/generic-steps.md`
|
|
41
|
+
- `core-generic-switch` -> `projects/core-ui-library/src/llm/components/generic-switch.md`
|
|
42
|
+
- `core-generic-table` -> `projects/core-ui-library/src/llm/components/generic-table.md`
|
|
43
|
+
- `core-generic-timeline` -> `projects/core-ui-library/src/llm/components/generic-timeline.md`
|
|
44
|
+
- `core-header` -> `projects/core-ui-library/src/llm/components/header.md`
|
|
45
|
+
- `core-image-modal` -> `projects/core-ui-library/src/llm/components/image-modal.md`
|
|
46
|
+
- `core-image-preview` -> `projects/core-ui-library/src/llm/components/image-preview.md`
|
|
47
|
+
- `core-layout-auth` -> `projects/core-ui-library/src/llm/components/layout-auth.md`
|
|
48
|
+
- `core-layout` -> `projects/core-ui-library/src/llm/components/layout.md`
|
|
49
|
+
- `core-loader` -> `projects/core-ui-library/src/llm/components/loader.md`
|
|
50
|
+
- `core-main-nav` -> `projects/core-ui-library/src/llm/components/main-nav.md`
|
|
51
|
+
- `core-manual-refresh` -> `projects/core-ui-library/src/llm/components/manual-refresh.md`
|
|
52
|
+
- `core-mobile-header` -> `projects/core-ui-library/src/llm/components/mobile-header.md`
|
|
53
|
+
- `core-multi-entry-field` -> `projects/core-ui-library/src/llm/components/multi-entry-field.md`
|
|
54
|
+
- `nav[core-generic-tabs]` -> `projects/core-ui-library/src/llm/components/nav[core-generic-tabs].md`
|
|
55
|
+
- `core-number-field` -> `projects/core-ui-library/src/llm/components/number-field.md`
|
|
56
|
+
- `core-password-field` -> `projects/core-ui-library/src/llm/components/password-field.md`
|
|
57
|
+
- `core-phone-field` -> `projects/core-ui-library/src/llm/components/phone-field.md`
|
|
58
|
+
- `core-progress-bar` -> `projects/core-ui-library/src/llm/components/progress-bar.md`
|
|
59
|
+
- `core-select-field` -> `projects/core-ui-library/src/llm/components/select-field.md`
|
|
60
|
+
- `core-server-select-field` -> `projects/core-ui-library/src/llm/components/server-select-field.md`
|
|
61
|
+
- `core-sidebar-custom-modal` -> `projects/core-ui-library/src/llm/components/sidebar-custom-modal.md`
|
|
62
|
+
- `core-smart-field` -> `projects/core-ui-library/src/llm/components/smart-field.md`
|
|
63
|
+
- `core-switch-field` -> `projects/core-ui-library/src/llm/components/switch-field.md`
|
|
64
|
+
- `core-text-area-field` -> `projects/core-ui-library/src/llm/components/text-area-field.md`
|
|
65
|
+
- `core-text-field` -> `projects/core-ui-library/src/llm/components/text-field.md`
|
|
66
|
+
- `core-time-field` -> `projects/core-ui-library/src/llm/components/time-field.md`
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# core-layout-auth
|
|
2
|
+
|
|
3
|
+
- Class: `LayoutAuth`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/layout-auth/layout-auth.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `LayoutAuthConfig` (required)
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Demo usage
|
|
13
|
+
|
|
14
|
+
- `projects/core-ui-demo/src/app/auth/auth.html`:1 — `<core-layout-auth [config]="{}">`
|
|
15
|
+
- `projects/core-ui-demo/src/app/auth/auth.html`:26 — `</core-layout-auth>`
|
|
16
|
+
|
|
17
|
+
## Demo snippet (HTML)
|
|
18
|
+
|
|
19
|
+
Source: `projects/core-ui-demo/src/app/auth/auth.html`:1-26
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<core-layout-auth [config]="{}">
|
|
23
|
+
@for (field of authFields; track field.key) {
|
|
24
|
+
<ng-container
|
|
25
|
+
coreDynamicField
|
|
26
|
+
[mode]="ModalMode.EDIT"
|
|
27
|
+
[field]="field"
|
|
28
|
+
[value]="model[field.key]"
|
|
29
|
+
(valueChange)="onFieldValueChange(field.key.toString(), $event)"
|
|
30
|
+
/>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
<button
|
|
34
|
+
type="submit"
|
|
35
|
+
class="c-login__submit c-btn"
|
|
36
|
+
[class.is-loading]="loading()"
|
|
37
|
+
(click)="onFormSubmit()"
|
|
38
|
+
>
|
|
39
|
+
{{ 'login.btnLogin' | translate }}
|
|
40
|
+
</button>
|
|
41
|
+
|
|
42
|
+
<div class="auth-divider">
|
|
43
|
+
<span>o continúa con</span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<core-ad-login-button (authEvent)="handleAdAuthEvent($event)" />
|
|
47
|
+
</core-layout-auth>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Demo snippet (TS)
|
|
51
|
+
|
|
52
|
+
Source: `projects/core-ui-demo/src/app/auth/auth.ts`
|
|
53
|
+
|
|
54
|
+
Lines: 54-78
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
prefixIcon: 'icon-locked',
|
|
58
|
+
validators: [Validators.required],
|
|
59
|
+
readonly: false
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
model: AuthLogin = {}
|
|
63
|
+
|
|
64
|
+
ngOnInit(): void {
|
|
65
|
+
this.renderer.addClass(this.document.documentElement, 's-auth-page');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
ngOnDestroy(): void {
|
|
69
|
+
this.renderer.removeClass(this.document.documentElement, 's-auth-page');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
onFieldValueChange(fieldKey: string, value: string): void {
|
|
73
|
+
this.model[fieldKey] = value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
onFormSubmit(): void {
|
|
77
|
+
if (this.model.username && this.model.password) {
|
|
78
|
+
let username = this.model.username;
|
|
79
|
+
let password = this.model.password;
|
|
80
|
+
|
|
81
|
+
this.loading.set(true);
|
|
82
|
+
```
|