@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,129 @@
|
|
|
1
|
+
# Screen blueprints (copy‑paste)
|
|
2
|
+
|
|
3
|
+
These are full, minimal templates to build screens using the library.
|
|
4
|
+
|
|
5
|
+
## CRUD list + modal form
|
|
6
|
+
|
|
7
|
+
### Template (HTML)
|
|
8
|
+
```html
|
|
9
|
+
<core-layout
|
|
10
|
+
[navItems]="navItems"
|
|
11
|
+
[navConfig]="navConfig"
|
|
12
|
+
[logoImagesConfig]="logoImagesConfig"
|
|
13
|
+
(onLogout)="handleLogout()"
|
|
14
|
+
>
|
|
15
|
+
<core-header
|
|
16
|
+
(filterRequested)="openFilterModal()"
|
|
17
|
+
(createRequested)="openCreateModal()"
|
|
18
|
+
></core-header>
|
|
19
|
+
|
|
20
|
+
<section class="page-content">
|
|
21
|
+
<core-generic-table
|
|
22
|
+
[columns]="columns"
|
|
23
|
+
[actions]="actions"
|
|
24
|
+
[dataInput]="rows"
|
|
25
|
+
[modalFields]="modalFields"
|
|
26
|
+
[showFilter]="true"
|
|
27
|
+
[enablePagination]="true"
|
|
28
|
+
(actionTriggered)="onTableAction($event)"
|
|
29
|
+
(dataCreated)="onCreated($event)"
|
|
30
|
+
(dataUpdated)="onUpdated($event)"
|
|
31
|
+
></core-generic-table>
|
|
32
|
+
</section>
|
|
33
|
+
|
|
34
|
+
<core-generic-modal
|
|
35
|
+
[isOpen]="modalOpen"
|
|
36
|
+
[mode]="modalMode"
|
|
37
|
+
[title]="modalTitle"
|
|
38
|
+
[data]="formData"
|
|
39
|
+
(save)="save($event)"
|
|
40
|
+
(close)="closeModal()"
|
|
41
|
+
></core-generic-modal>
|
|
42
|
+
</core-layout>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Component (TS)
|
|
46
|
+
```ts
|
|
47
|
+
import { ModalMode, FieldType } from 'projects/core-ui-library/src/lib/enums';
|
|
48
|
+
import { ModalFieldConfig } from 'projects/core-ui-library/src/lib/interfaces';
|
|
49
|
+
import { TableAction } from 'projects/core-ui-library/src/lib/components/generic-table/components/dropdown/enums/TableAction.enum';
|
|
50
|
+
import { ColumnConfig } from 'projects/core-ui-library/src/lib/components/generic-table/interfaces/ColumnConfig.interface';
|
|
51
|
+
import { TableActionConfig } from 'projects/core-ui-library/src/lib/components/generic-table/interfaces/TableActionConfig.interface';
|
|
52
|
+
|
|
53
|
+
interface User {
|
|
54
|
+
id: number;
|
|
55
|
+
name: string;
|
|
56
|
+
email: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
rows: User[] = [];
|
|
60
|
+
modalOpen = false;
|
|
61
|
+
modalMode: ModalMode = ModalMode.CREATE;
|
|
62
|
+
modalTitle = 'Create user';
|
|
63
|
+
formData: Partial<User> = {};
|
|
64
|
+
|
|
65
|
+
columns: ColumnConfig<User>[] = [
|
|
66
|
+
{ key: 'name', label: 'Name' },
|
|
67
|
+
{ key: 'email', label: 'Email' },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
actions: TableActionConfig<User>[] = [
|
|
71
|
+
{ action: TableAction.VIEW, label: 'View' },
|
|
72
|
+
{ action: TableAction.EDIT, label: 'Edit' },
|
|
73
|
+
{ action: TableAction.DELETE, label: 'Delete' },
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
modalFields: ModalFieldConfig<User>[] = [
|
|
77
|
+
{ key: 'name', label: 'Name', type: FieldType.TEXT, readonly: false },
|
|
78
|
+
{ key: 'email', label: 'Email', type: FieldType.TEXT, readonly: false },
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
openCreateModal() {
|
|
82
|
+
this.modalMode = ModalMode.CREATE;
|
|
83
|
+
this.modalTitle = 'Create user';
|
|
84
|
+
this.formData = {};
|
|
85
|
+
this.modalOpen = true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
openFilterModal() {
|
|
89
|
+
// hook to filter UI if needed
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onTableAction(event: { action: TableAction; row?: User }) {
|
|
93
|
+
if (event.action === TableAction.EDIT && event.row) {
|
|
94
|
+
this.modalMode = ModalMode.EDIT;
|
|
95
|
+
this.modalTitle = 'Edit user';
|
|
96
|
+
this.formData = { ...event.row };
|
|
97
|
+
this.modalOpen = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
save(data: User) {
|
|
102
|
+
// persist data
|
|
103
|
+
this.modalOpen = false;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
closeModal() {
|
|
107
|
+
this.modalOpen = false;
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## CRUD list + server‑side data
|
|
112
|
+
|
|
113
|
+
Use `endpoint` and `modelFactory` on `core-generic-table` to fetch data remotely.
|
|
114
|
+
|
|
115
|
+
```html
|
|
116
|
+
<core-generic-table
|
|
117
|
+
[columns]="columns"
|
|
118
|
+
[actions]="actions"
|
|
119
|
+
[endpoint]="'/api/users'"
|
|
120
|
+
[modelFactory]="userFactory"
|
|
121
|
+
[enablePagination]="true"
|
|
122
|
+
(dataFetched)="rows = $event"
|
|
123
|
+
></core-generic-table>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
userFactory = (data: any) => data as User;
|
|
128
|
+
```
|
|
129
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Screen-building recipes (LLM-friendly)
|
|
2
|
+
|
|
3
|
+
Use these as default composition patterns when asked to create screens.
|
|
4
|
+
|
|
5
|
+
Related docs
|
|
6
|
+
- `form-recipes.md`
|
|
7
|
+
- `screen-blueprints.md`
|
|
8
|
+
|
|
9
|
+
## General recipe
|
|
10
|
+
1) Pick a shell: `layout` for app pages or `layout-auth` for auth flows.
|
|
11
|
+
2) Add navigation: `header` + `main-nav` (desktop) or `mobile-header` (mobile).
|
|
12
|
+
3) Choose a primary content component (table, form, dashboard, etc.).
|
|
13
|
+
4) Use `generic-modal` / `confirmation-dialog` for secondary actions.
|
|
14
|
+
5) Wire services as needed (alerts, loaders, permissions, translations).
|
|
15
|
+
|
|
16
|
+
## CRUD list page
|
|
17
|
+
- Shell: `layout`
|
|
18
|
+
- Primary: `generic-table`
|
|
19
|
+
- Helpers: `generic-pagination`, `active-filters`, `confirmation-dialog`
|
|
20
|
+
- Services: `model-api.service`, `table-* services`, `permission-wrapper.service`
|
|
21
|
+
- Notes: table uses `ColumnConfig`, `TableActionConfig`, `FilterConfig`, etc.
|
|
22
|
+
|
|
23
|
+
## CRUD form page
|
|
24
|
+
- Shell: `layout`
|
|
25
|
+
- Primary: field components under `fields/types/*`
|
|
26
|
+
- Helpers: `field-errors`, `generic-button`
|
|
27
|
+
- Validation: `validators` + custom rules
|
|
28
|
+
- Notes: form field configs live in `interfaces/field-configs`.
|
|
29
|
+
|
|
30
|
+
## Detail page
|
|
31
|
+
- Shell: `layout`
|
|
32
|
+
- Primary: `card`, `data-list`, `generic-tabs`
|
|
33
|
+
- Media: `image-preview`, `file-preview`, `carousel` as needed
|
|
34
|
+
|
|
35
|
+
## Timeline or activity page
|
|
36
|
+
- Shell: `layout`
|
|
37
|
+
- Primary: `generic-timeline`
|
|
38
|
+
- Helpers: `generic-tabs`, `generic-pagination`
|
|
39
|
+
|
|
40
|
+
## Scheduler / calendar page
|
|
41
|
+
- Shell: `layout`
|
|
42
|
+
- Primary: `generic-calendar` or `generic-scheduler`
|
|
43
|
+
- Enums: calendar enums in `lib/enums/calendar`
|
|
44
|
+
|
|
45
|
+
## Documentation / knowledge page
|
|
46
|
+
- Shell: `layout`
|
|
47
|
+
- Primary: `generic-documentation`
|
|
48
|
+
- Notes: uses `DocumentConfig` and related enums.
|
|
49
|
+
|
|
50
|
+
## Chat page
|
|
51
|
+
- Shell: `layout`
|
|
52
|
+
- Primary: `generic-chat`
|
|
53
|
+
- Helpers: `file-preview`, `image-preview`
|