@solcre-org/core-ui 2.19.2 → 2.20.1
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/assets/css/inc/components/area-code.css +3 -2
- 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,75 @@
|
|
|
1
|
+
# core-generic-gallery
|
|
2
|
+
|
|
3
|
+
- Class: `GenericGalleryComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-gallery/generic-gallery.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `images`: `GalleryImage[]` (required)
|
|
8
|
+
- `config`: `GalleryConfig`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `imageClick`: `{ image: GalleryImage; index: number }`
|
|
12
|
+
- `modalOpen`: `{ images: GalleryImage[]; index: number }`
|
|
13
|
+
- `modalClose`: `void`
|
|
14
|
+
- `imageChange`: `{ image: GalleryImage; index: number }`
|
|
15
|
+
|
|
16
|
+
## Demo usage
|
|
17
|
+
|
|
18
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery-test.component.ts`:20 — `<core-generic-gallery`
|
|
19
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery-test.component.ts`:32 — `</core-generic-gallery>`
|
|
20
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:12 — `<core-generic-gallery`
|
|
21
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:19 — `</core-generic-gallery>`
|
|
22
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:31 — `<core-generic-gallery`
|
|
23
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:35 — `</core-generic-gallery>`
|
|
24
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:47 — `<core-generic-gallery`
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:51 — `</core-generic-gallery>`
|
|
26
|
+
- …and 6 more matches
|
|
27
|
+
|
|
28
|
+
## Demo snippet (HTML)
|
|
29
|
+
|
|
30
|
+
Source: `projects/core-ui-demo/src/app/admin/components/gallery/gallery.html`:12-19
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<core-generic-gallery
|
|
34
|
+
[images]="sampleImages()"
|
|
35
|
+
[config]="basicConfig"
|
|
36
|
+
(imageClick)="onImageClick($event)"
|
|
37
|
+
(modalOpen)="onModalOpen($event)"
|
|
38
|
+
(modalClose)="onModalClose()"
|
|
39
|
+
(imageChange)="onImageChange($event)">
|
|
40
|
+
</core-generic-gallery>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Demo snippet (TS)
|
|
44
|
+
|
|
45
|
+
Source: `projects/core-ui-demo/src/app/admin/components/gallery/gallery.ts`
|
|
46
|
+
|
|
47
|
+
Lines: 158-182
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
|
|
51
|
+
onModalOpen(event: { images: GalleryImage[]; index: number }): void {
|
|
52
|
+
this.galleryModalService.openModal(event.images, event.index);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
onModalClose(): void {
|
|
56
|
+
console.log('Modal closed');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
onImageChange(event: { image: GalleryImage; index: number }): void {
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Dynamic configuration methods
|
|
63
|
+
updateLayoutType(type: GalleryLayoutType): void {
|
|
64
|
+
this.basicConfig = { ...this.basicConfig, layoutType: type };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
updateAnimationType(type: GalleryAnimationType): void {
|
|
68
|
+
this.basicConfig = { ...this.basicConfig, animationType: type };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
toggleFeature(feature: keyof GalleryConfig): void {
|
|
72
|
+
this.basicConfig = {
|
|
73
|
+
...this.basicConfig,
|
|
74
|
+
[feature]: !this.basicConfig[feature]
|
|
75
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# core-generic-modal
|
|
2
|
+
|
|
3
|
+
- Class: `GenericModalComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-modal/generic-modal.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `isOpen`: `boolean` (required)
|
|
8
|
+
- `mode`: `ModalMode` (required)
|
|
9
|
+
- `data`: `T | null`
|
|
10
|
+
- `title`: `string` (required)
|
|
11
|
+
- `isMultiple`: `boolean`
|
|
12
|
+
- `errors`: `string[]`
|
|
13
|
+
- `customHasChanges`: `boolean`
|
|
14
|
+
- `stepValidationEnabled`: `boolean`
|
|
15
|
+
- `allowFreeNavigation`: `boolean`
|
|
16
|
+
- `autoMarkCompleted`: `boolean`
|
|
17
|
+
|
|
18
|
+
## Outputs
|
|
19
|
+
- `save`: `T`
|
|
20
|
+
- `close`: `void`
|
|
21
|
+
- `modalData`: `T`
|
|
22
|
+
|
|
23
|
+
## Usage notes
|
|
24
|
+
- Designed for create/edit flows with `ModalMode` and `ModalFieldConfig`/`ModalTabConfig` inputs.
|
|
25
|
+
- Use with `generic-table` or standalone forms.
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
```html
|
|
29
|
+
<core-generic-modal
|
|
30
|
+
[isOpen]="isOpen"
|
|
31
|
+
[mode]="mode"
|
|
32
|
+
[title]="title"
|
|
33
|
+
[data]="formData"
|
|
34
|
+
(save)="save($event)"
|
|
35
|
+
(close)="close()"
|
|
36
|
+
></core-generic-modal>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Demo usage
|
|
40
|
+
|
|
41
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:5 — `<core-generic-modal`
|
|
42
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:9 — `(close)="closeBasicModal()"></core-generic-modal>`
|
|
43
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:17 — `<core-generic-modal`
|
|
44
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:24 — `(close)="closeBasicModalWithFields()"></core-generic-modal>`
|
|
45
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:32 — `<core-generic-modal`
|
|
46
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:39 — `(close)="closeBasicModalWithModeSelector()"></core-generic-modal>`
|
|
47
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:51 — `<core-generic-modal`
|
|
48
|
+
- `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:56 — `(close)="closeMediumModalWithCustomTemplate()"></core-generic-modal>`
|
|
49
|
+
- …and 38 more matches
|
|
50
|
+
|
|
51
|
+
## Demo snippet (HTML)
|
|
52
|
+
|
|
53
|
+
Source: `projects/core-ui-demo/src/app/admin/components/modals/modals.html`:5-9
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<core-generic-modal
|
|
57
|
+
[isOpen]="isOpenBasicModal()"
|
|
58
|
+
[title]="'Modal básico'"
|
|
59
|
+
[mode]="ModalMode.VIEW"
|
|
60
|
+
(close)="closeBasicModal()"></core-generic-modal>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Demo snippet (TS)
|
|
64
|
+
|
|
65
|
+
Source: `projects/core-ui-demo/src/app/admin/components/modals/modals.ts`
|
|
66
|
+
|
|
67
|
+
Lines: 976-1000
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
[data]="factory({ name: 'John Doe' })"
|
|
71
|
+
(close)="close()">
|
|
72
|
+
</core-generic-modal>
|
|
73
|
+
`
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Modal con selector de modo',
|
|
77
|
+
key: 'mode-selector',
|
|
78
|
+
extraImports: ['ModalFieldConfig', 'FieldType'],
|
|
79
|
+
componentCode: `
|
|
80
|
+
export class MyComponent {
|
|
81
|
+
isOpen = signal(false);
|
|
82
|
+
modalMode = signal<ModalMode>(ModalMode.CREATE);
|
|
83
|
+
ModalMode = ModalMode;
|
|
84
|
+
|
|
85
|
+
fields = computed<ModalFieldConfig<any>[]>(() => [
|
|
86
|
+
{
|
|
87
|
+
key: 'mode',
|
|
88
|
+
label: 'Mode',
|
|
89
|
+
type: FieldType.SELECT,
|
|
90
|
+
options: [
|
|
91
|
+
{ value: ModalMode.VIEW, label: 'View' },
|
|
92
|
+
{ value: ModalMode.EDIT, label: 'Edit' },
|
|
93
|
+
{ value: ModalMode.CREATE, label: 'Create' },
|
|
94
|
+
{ value: ModalMode.FILTER, label: 'Filter' }
|
|
95
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# core-generic-pagination
|
|
2
|
+
|
|
3
|
+
- Class: `GenericPaginationComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-pagination/generic-pagination.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `tableId`: `string`
|
|
8
|
+
- `isServerSide`: `boolean`
|
|
9
|
+
- `showPagination`: `boolean`
|
|
10
|
+
- `showPageSizeSelector`: `boolean`
|
|
11
|
+
|
|
12
|
+
## Outputs
|
|
13
|
+
- none
|
|
14
|
+
|
|
15
|
+
## Usage notes
|
|
16
|
+
- Typically used inside `core-generic-table` with `PaginationService`.
|
|
17
|
+
|
|
18
|
+
## Demo usage
|
|
19
|
+
|
|
20
|
+
- No demo usage found in `core-ui-demo`.
|
|
21
|
+
|
|
22
|
+
## Demo snippet (HTML)
|
|
23
|
+
|
|
24
|
+
- No demo snippet found in `core-ui-demo`.
|
|
25
|
+
|
|
26
|
+
## Demo snippet (TS)
|
|
27
|
+
|
|
28
|
+
- No demo snippet found in `core-ui-demo`.
|
|
29
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# core-generic-rating
|
|
2
|
+
|
|
3
|
+
- Class: `GenericRatingComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-rating/generic-rating.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `RatingConfig` (required)
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `ratingChange`: `RatingSubmitEvent`
|
|
11
|
+
|
|
12
|
+
## Demo usage
|
|
13
|
+
|
|
14
|
+
- `projects/core-ui-demo/src/app/admin/components/rating/rating.html`:3 — `<core-generic-rating`
|
|
15
|
+
|
|
16
|
+
## Demo snippet (HTML)
|
|
17
|
+
|
|
18
|
+
Source: `projects/core-ui-demo/src/app/admin/components/rating/rating.html`:3-3
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<core-generic-rating
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Demo snippet (TS)
|
|
25
|
+
|
|
26
|
+
Source: `projects/core-ui-demo/src/app/admin/components/rating/rating.ts` (no matching bindings found)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# core-generic-scheduler
|
|
2
|
+
|
|
3
|
+
- Class: `GenericSchedulerComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-scheduler/generic-scheduler.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `selectedDate`: `Date`
|
|
8
|
+
- `columns`: `SchedulerColumn[]`
|
|
9
|
+
- `events`: `CalendarEvent[]`
|
|
10
|
+
- `showTimeColumn`: `boolean`
|
|
11
|
+
- `showHeader`: `boolean`
|
|
12
|
+
- `timeColumnLabel`: `string`
|
|
13
|
+
- `emptySlotLabel`: `string`
|
|
14
|
+
- `disabledSlotLabel`: `string`
|
|
15
|
+
- `todayLabel`: `string`
|
|
16
|
+
- `locale`: `string`
|
|
17
|
+
- `weekLabel`: `string`
|
|
18
|
+
- `dayLabel`: `string`
|
|
19
|
+
- `monthLabel`: `string`
|
|
20
|
+
- `disabledDates`: `string[]`
|
|
21
|
+
|
|
22
|
+
## Outputs
|
|
23
|
+
- `slotClick`: `SlotClickEvent`
|
|
24
|
+
- `eventClick`: `EventClickEvent`
|
|
25
|
+
- `eventHover`: `EventHoverEvent`
|
|
26
|
+
- `eventLeave`: `void`
|
|
27
|
+
- `todayClick`: `void`
|
|
28
|
+
- `previousDay`: `Date`
|
|
29
|
+
- `nextDay`: `Date`
|
|
30
|
+
- `previousWeek`: `Date`
|
|
31
|
+
- `nextWeek`: `Date`
|
|
32
|
+
- `previousMonth`: `Date`
|
|
33
|
+
- `nextMonth`: `Date`
|
|
34
|
+
- `viewModeChange`: `SchedulerViewMode`
|
|
35
|
+
|
|
36
|
+
## Demo usage
|
|
37
|
+
|
|
38
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:106 — `<core-generic-scheduler`
|
|
39
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:115 — `></core-generic-scheduler>`
|
|
40
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:145 — `<core-generic-scheduler`
|
|
41
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:162 — `</core-generic-scheduler>`
|
|
42
|
+
|
|
43
|
+
## Demo snippet (HTML)
|
|
44
|
+
|
|
45
|
+
Source: `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:106-115
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<core-generic-scheduler
|
|
49
|
+
[selectedDate]="selectedDate()"
|
|
50
|
+
[events]="monthlyLicenseEvents()"
|
|
51
|
+
[config]="monthlySchedulerConfig"
|
|
52
|
+
[showHeader]="false"
|
|
53
|
+
[showTimeColumn]="false"
|
|
54
|
+
[disabledDates]="holidayDates"
|
|
55
|
+
(eventClick)="onEventClick($event)"
|
|
56
|
+
(slotClick)="onSlotClick($event)"
|
|
57
|
+
></core-generic-scheduler>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Demo snippet (TS)
|
|
61
|
+
|
|
62
|
+
Source: `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.ts`
|
|
63
|
+
|
|
64
|
+
Lines: 374-398
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
today.getFullYear(),
|
|
68
|
+
today.getMonth(),
|
|
69
|
+
today.getDate()
|
|
70
|
+
));
|
|
71
|
+
this.selectedDate.set(todayUTC);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
onPreviousDay(date: Date): void {
|
|
75
|
+
this.selectedDate.set(date);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
onNextDay(date: Date): void {
|
|
79
|
+
this.selectedDate.set(date);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
onPreviousMonth(): void {
|
|
83
|
+
const current = this.selectedDate();
|
|
84
|
+
const newDate = new Date(current.getFullYear(), current.getMonth() - 1, 1);
|
|
85
|
+
this.selectedDate.set(newDate);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
onNextMonth(): void {
|
|
89
|
+
const current = this.selectedDate();
|
|
90
|
+
const newDate = new Date(current.getFullYear(), current.getMonth() + 1, 1);
|
|
91
|
+
this.selectedDate.set(newDate);
|
|
92
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# core-generic-sidebar
|
|
2
|
+
|
|
3
|
+
- Class: `GenericSidebarComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-sidebar/generic-sidebar.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `SidebarComponentConfig | null`
|
|
8
|
+
- `position`: `SidebarPosition`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `itemClicked`: `SidebarItem`
|
|
12
|
+
- `subItemClicked`: `SidebarSubItem`
|
|
13
|
+
|
|
14
|
+
## Usage notes
|
|
15
|
+
- Sidebar content and behavior is driven by `SidebarComponentConfig`.
|
|
16
|
+
- Use `SidebarTemplateRegistryService` for custom templates.
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
```html
|
|
20
|
+
<core-generic-sidebar
|
|
21
|
+
[config]="leftSidebarConfig"
|
|
22
|
+
[position]="SidebarPosition.LEFT"
|
|
23
|
+
(itemClicked)="onSidebarItem($event)"
|
|
24
|
+
></core-generic-sidebar>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Demo usage
|
|
28
|
+
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.html`:27 — `<core-generic-sidebar`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.html`:33 — `</core-generic-sidebar>`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.ts`:609 — `let template = '<core-generic-sidebar\n [config]="sidebarConfig"';`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.ts`:619 — `template += '\n (itemClicked)="onItemClick($event)"\n (subItemClicked)="onSubItemClick($event)">\n</core-generic-sidebar>';`
|
|
33
|
+
|
|
34
|
+
## Demo snippet (HTML)
|
|
35
|
+
|
|
36
|
+
Source: `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.html`:27-33
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<core-generic-sidebar
|
|
40
|
+
[config]="useCase.config"
|
|
41
|
+
[position]="useCase.position || SidebarPosition.LEFT"
|
|
42
|
+
[customTemplate]="useCase.customTemplate || null"
|
|
43
|
+
(itemClicked)="onItemClick($event)"
|
|
44
|
+
(subItemClicked)="onSubItemClick($event)">
|
|
45
|
+
</core-generic-sidebar>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Demo snippet (TS)
|
|
49
|
+
|
|
50
|
+
Source: `projects/core-ui-demo/src/app/admin/components/sidebar/sidebar.ts`
|
|
51
|
+
|
|
52
|
+
Lines: 595-619
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
result = `// Nota: Para usar template personalizado, asignar después del ViewChild
|
|
56
|
+
@ViewChild('customSidebarTemplate', { static: true }) customTemplate!: TemplateRef<any>;
|
|
57
|
+
|
|
58
|
+
${result}
|
|
59
|
+
|
|
60
|
+
ngAfterViewInit(): void {
|
|
61
|
+
this.sidebarConfig.customTemplate = this.customTemplate;
|
|
62
|
+
}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private generateTemplateCode(useCase: SidebarUseCaseDoc): string {
|
|
69
|
+
let template = '<core-generic-sidebar\n [config]="sidebarConfig"';
|
|
70
|
+
|
|
71
|
+
if (useCase.position) {
|
|
72
|
+
template += `\n [position]="SidebarPosition.${useCase.position}"`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (useCase.customTemplate) {
|
|
76
|
+
template += '\n [customTemplate]="customTemplate"';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
template += '\n (itemClicked)="onItemClick($event)"\n (subItemClicked)="onSubItemClick($event)">\n</core-generic-sidebar>';
|
|
80
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# core-generic-skeleton
|
|
2
|
+
|
|
3
|
+
- Class: `GenericSkeletonComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-skeleton/generic-skeleton.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `SkeletonConfig`
|
|
8
|
+
- `items`: `SkeletonItemConfig[]`
|
|
9
|
+
- `type`: `SkeletonType`
|
|
10
|
+
- `size`: `SkeletonSize`
|
|
11
|
+
- `width`: `string`
|
|
12
|
+
- `height`: `string`
|
|
13
|
+
- `animated`: `boolean`
|
|
14
|
+
- `animation`: `SkeletonAnimation`
|
|
15
|
+
- `lines`: `number`
|
|
16
|
+
- `customClass`: `string`
|
|
17
|
+
- `ariaLabel`: `string`
|
|
18
|
+
|
|
19
|
+
## Outputs
|
|
20
|
+
- none
|
|
21
|
+
|
|
22
|
+
## Demo usage
|
|
23
|
+
|
|
24
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:5 — `<core-generic-skeleton`
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:11 — `</core-generic-skeleton>`
|
|
26
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:19 — `<core-generic-skeleton`
|
|
27
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:24 — `</core-generic-skeleton>`
|
|
28
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:32 — `<core-generic-skeleton`
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:38 — `</core-generic-skeleton>`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:46 — `<core-generic-skeleton`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:49 — `</core-generic-skeleton>`
|
|
32
|
+
- …and 8 more matches
|
|
33
|
+
|
|
34
|
+
## Demo snippet (HTML)
|
|
35
|
+
|
|
36
|
+
Source: `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.html`:5-11
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<core-generic-skeleton
|
|
40
|
+
[type]="config.type"
|
|
41
|
+
[width]="config.width ?? undefined"
|
|
42
|
+
[height]="config.height ?? undefined"
|
|
43
|
+
[lines]="config.lines ?? 1"
|
|
44
|
+
[ariaLabel]="config.ariaLabel ?? 'Loading content'">
|
|
45
|
+
</core-generic-skeleton>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Demo snippet (TS)
|
|
49
|
+
|
|
50
|
+
Source: `projects/core-ui-demo/src/app/admin/components/skeleton/skeleton.ts`
|
|
51
|
+
|
|
52
|
+
Lines: 102-126
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
|
|
56
|
+
// Presets del servicio
|
|
57
|
+
presetConfigs = signal<{ name: string; config: SkeletonConfig }[]>([]);
|
|
58
|
+
|
|
59
|
+
constructor(
|
|
60
|
+
private dialogService: ConfirmationDialogService,
|
|
61
|
+
private skeletonService: SkeletonService
|
|
62
|
+
) {
|
|
63
|
+
// Inicializar presets
|
|
64
|
+
this.initializePresets();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private initializePresets(): void {
|
|
68
|
+
const presets = [
|
|
69
|
+
{ name: 'Formulario', config: this.skeletonService.getPresetConfig('form') },
|
|
70
|
+
{ name: 'Tarjeta de Usuario', config: this.skeletonService.getPresetConfig('userCard') },
|
|
71
|
+
{ name: 'Lista de Artículos', config: this.skeletonService.getPresetConfig('articleList') },
|
|
72
|
+
{ name: 'Galería de Imágenes', config: this.skeletonService.getPresetConfig('imageGallery') },
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
this.presetConfigs.set(presets);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
showImplementationCode(config: SkeletonItemConfig | SkeletonConfig, isPreset: boolean = false): void {
|
|
79
|
+
const implementation = this.generateImplementationCode(config, isPreset);
|
|
80
|
+
```
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# core-generic-steps
|
|
2
|
+
|
|
3
|
+
- Class: `GenericStepsComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-steps/generic-steps.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `StepsConfig` (required)
|
|
8
|
+
- `useService`: `boolean`
|
|
9
|
+
- `instanceId`: `string`
|
|
10
|
+
|
|
11
|
+
## Outputs
|
|
12
|
+
- `stepClick`: `StepClickEvent`
|
|
13
|
+
- `stepChange`: `{ step: StepItemConfig; index: number }`
|
|
14
|
+
- `serviceStepChange`: `StepChangeEvent`
|
|
15
|
+
|
|
16
|
+
## Demo usage
|
|
17
|
+
|
|
18
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:4 — `<core-generic-steps [config]="basicConfig()" (stepChange)="onBasicStepChange($event)">`
|
|
19
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:35 — `</core-generic-steps>`
|
|
20
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:41 — `<core-generic-steps [config]="iconConfig()" (stepChange)="onIconStepChange($event)">`
|
|
21
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:84 — `</core-generic-steps>`
|
|
22
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:90 — `<core-generic-steps [config]="verticalConfig()" (stepChange)="onVerticalStepChange($event)">`
|
|
23
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:134 — `</core-generic-steps>`
|
|
24
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:140 — `<core-generic-steps [config]="smallConfig()" (stepChange)="onSmallStepChange($event)">`
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:153 — `</core-generic-steps>`
|
|
26
|
+
- …and 14 more matches
|
|
27
|
+
|
|
28
|
+
## Demo snippet (HTML)
|
|
29
|
+
|
|
30
|
+
Source: `projects/core-ui-demo/src/app/admin/components/steps/steps.html`:4-35
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<core-generic-steps [config]="basicConfig()" (stepChange)="onBasicStepChange($event)">
|
|
34
|
+
<!-- Content for Step 1 -->
|
|
35
|
+
<div *ngIf="basicActiveStep()?.id === 'step1'">
|
|
36
|
+
<h3>Step 1: Basic Information</h3>
|
|
37
|
+
<p>This is the content for the first step. Here you can add forms, information, or any content needed for this step.</p>
|
|
38
|
+
<div class="step-content-example">
|
|
39
|
+
<label>Name: <input type="text" placeholder="Enter your name"></label>
|
|
40
|
+
<label>Email: <input type="email" placeholder="Enter your email"></label>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<!-- Content for Step 2 -->
|
|
45
|
+
<div *ngIf="basicActiveStep()?.id === 'step2'">
|
|
46
|
+
<h3>Step 2: Configuration</h3>
|
|
47
|
+
<p>This is the content for the second step. You can configure settings or preferences here.</p>
|
|
48
|
+
<div class="step-content-example">
|
|
49
|
+
<label><input type="checkbox"> Enable notifications</label>
|
|
50
|
+
<label><input type="checkbox"> Enable dark mode</label>
|
|
51
|
+
<label><input type="checkbox"> Enable auto-save</label>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<!-- Content for Step 3 -->
|
|
56
|
+
<div *ngIf="basicActiveStep()?.id === 'step3'">
|
|
57
|
+
<h3>Step 3: Finish</h3>
|
|
58
|
+
<p>This is the content for the final step. You can show a summary or completion message.</p>
|
|
59
|
+
<div class="step-content-example">
|
|
60
|
+
<p>✅ All steps completed successfully!</p>
|
|
61
|
+
<button class="btn btn--primary">Complete Setup</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</core-generic-steps>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Demo snippet (TS)
|
|
68
|
+
|
|
69
|
+
Source: `projects/core-ui-demo/src/app/admin/components/steps/steps.ts`
|
|
70
|
+
|
|
71
|
+
Lines: 35-59
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
templateCode: string;
|
|
75
|
+
fullCode: string;
|
|
76
|
+
}>({
|
|
77
|
+
importStatement: '',
|
|
78
|
+
componentCode: '',
|
|
79
|
+
templateCode: '',
|
|
80
|
+
fullCode: ''
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// Track active step for content projection
|
|
84
|
+
activeStep = signal<StepItemConfig | null>(null);
|
|
85
|
+
|
|
86
|
+
// Separate active steps for each configuration
|
|
87
|
+
basicActiveStep = signal<StepItemConfig | null>(null);
|
|
88
|
+
iconActiveStep = signal<StepItemConfig | null>(null);
|
|
89
|
+
verticalActiveStep = signal<StepItemConfig | null>(null);
|
|
90
|
+
smallActiveStep = signal<StepItemConfig | null>(null);
|
|
91
|
+
largeActiveStep = signal<StepItemConfig | null>(null);
|
|
92
|
+
customColorsActiveStep = signal<StepItemConfig | null>(null);
|
|
93
|
+
disabledActiveStep = signal<StepItemConfig | null>(null);
|
|
94
|
+
textActiveStep = signal<StepItemConfig | null>(null);
|
|
95
|
+
translatedActiveStep = signal<StepItemConfig | null>(null);
|
|
96
|
+
|
|
97
|
+
// Basic horizontal steps
|
|
98
|
+
basicConfig: Signal<StepsConfig> = signal({
|
|
99
|
+
```
|