@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,61 @@
|
|
|
1
|
+
# core-datetime-field
|
|
2
|
+
|
|
3
|
+
- Class: `DatetimeFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/datetime-field/datetime-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `value`: `Date | null`
|
|
8
|
+
- `mode`: `ModalMode` (required)
|
|
9
|
+
- `errors`: `string[]`
|
|
10
|
+
- `rowData`: `T | null`
|
|
11
|
+
- `formValue`: `any`
|
|
12
|
+
|
|
13
|
+
## Outputs
|
|
14
|
+
- `valueChange`: `Date | null`
|
|
15
|
+
- `onBlurEvent`: `keyof T`
|
|
16
|
+
- `onEnterEvent`: `keyof T`
|
|
17
|
+
|
|
18
|
+
## Usage notes
|
|
19
|
+
|
|
20
|
+
- Inherits inputs/outputs from `core-base-field`: `field`, `value`, `mode`, `errors`, `rowData`, `formValue` and emits `valueChange`, `onBlurEvent`, `onEnterEvent`.
|
|
21
|
+
- Provide `field` using the matching config interface from `projects/core-ui-library/src/lib/interfaces/field-configs` and `FieldType`.
|
|
22
|
+
- Use `mode` (`ModalMode`) to control readonly/validators and view behavior.
|
|
23
|
+
|
|
24
|
+
## Config sketch
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
const meetingField: ModalFieldConfig<User> = {
|
|
29
|
+
key: 'meetingAt',
|
|
30
|
+
label: 'Meeting time',
|
|
31
|
+
type: FieldType.DATETIME,
|
|
32
|
+
readonly: false,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<core-datetime-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-datetime-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,60 @@
|
|
|
1
|
+
# core-document-field
|
|
2
|
+
|
|
3
|
+
- Class: `DocumentFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/document-field/document-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 documentField: DocumentFieldConfig<User> = {
|
|
23
|
+
key: 'document',
|
|
24
|
+
label: 'Document',
|
|
25
|
+
type: FieldType.DOCUMENT,
|
|
26
|
+
documentTypeOptions: [
|
|
27
|
+
{ value: 'id', label: 'ID' },
|
|
28
|
+
{ value: 'passport', label: 'Passport' },
|
|
29
|
+
],
|
|
30
|
+
payloadMode: DocumentPayloadMode.OBJECT,
|
|
31
|
+
readonly: false,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<core-document-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-document-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,73 @@
|
|
|
1
|
+
# core-dropdown
|
|
2
|
+
|
|
3
|
+
- Class: `DropdownComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-table/components/dropdown/dropdown.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `rowId`: `number`
|
|
8
|
+
- `triggerElementId`: `string`
|
|
9
|
+
- `extraDefaultActions`: `any[]`
|
|
10
|
+
- `row`: `T | null`
|
|
11
|
+
|
|
12
|
+
## Outputs
|
|
13
|
+
- `actionTriggered`: `{ action: TableAction; row: T }`
|
|
14
|
+
|
|
15
|
+
## Demo usage
|
|
16
|
+
|
|
17
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.html`:42 — `<core-dropdown`
|
|
18
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.html`:49 — `</core-dropdown>`
|
|
19
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:119 — `<core-dropdown`
|
|
20
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:125 — `</core-dropdown>``
|
|
21
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:184 — `<core-dropdown`
|
|
22
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:192 — `</core-dropdown>``
|
|
23
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:239 — `<core-dropdown`
|
|
24
|
+
- `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`:247 — `</core-dropdown>`
|
|
25
|
+
|
|
26
|
+
## Demo snippet (HTML)
|
|
27
|
+
|
|
28
|
+
Source: `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.html`:42-49
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<core-dropdown
|
|
32
|
+
[rowId]="item.id"
|
|
33
|
+
[triggerElementId]="'dropdown-trigger-' + item.id"
|
|
34
|
+
[extraDefaultActions]="getDefaultActions()"
|
|
35
|
+
[row]="item"
|
|
36
|
+
(actionTriggered)="onDefaultAction($event.action, $event.row)"
|
|
37
|
+
(customActionTriggered)="$event.action.callback($event.row)">
|
|
38
|
+
</core-dropdown>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Demo snippet (TS)
|
|
42
|
+
|
|
43
|
+
Source: `projects/core-ui-demo/src/app/admin/components/dropdown/dropdown.ts`
|
|
44
|
+
|
|
45
|
+
Lines: 100-124
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
this.dropdownService.closeDropdown();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
onDefaultAction(action: string, item: any): void {
|
|
52
|
+
switch (action) {
|
|
53
|
+
case 'view': this.viewItem(item); break;
|
|
54
|
+
case 'edit': this.editItem(item); break;
|
|
55
|
+
case 'delete': this.deleteItem(item); break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}`,
|
|
59
|
+
templateCode: `
|
|
60
|
+
<core-generic-button
|
|
61
|
+
[config]="getTriggerConfig()"
|
|
62
|
+
[data]="item"
|
|
63
|
+
[id]="'dropdown-trigger-' + item.id"
|
|
64
|
+
(buttonClick)="onMoreActionsClick($event, item.id)">
|
|
65
|
+
</core-generic-button>
|
|
66
|
+
|
|
67
|
+
<core-dropdown
|
|
68
|
+
[rowId]="item.id"
|
|
69
|
+
[triggerElementId]="'dropdown-trigger-' + item.id"
|
|
70
|
+
[extraDefaultActions]="getDefaultActions()"
|
|
71
|
+
[row]="item"
|
|
72
|
+
(actionTriggered)="onDefaultAction($event.action, $event.row)">
|
|
73
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# core-field-errors
|
|
2
|
+
|
|
3
|
+
- Class: `FieldErrorsComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/field-errors/field-errors.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `errors`: `string[]` (required)
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
|
|
14
|
+
- Use to render validation messages for a field.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<core-field-errors [errors]="errors.name || []"></core-field-errors>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Demo usage
|
|
23
|
+
|
|
24
|
+
- No demo usage found in `core-ui-demo`.
|
|
25
|
+
|
|
26
|
+
## Demo snippet (HTML)
|
|
27
|
+
|
|
28
|
+
- No demo snippet found in `core-ui-demo`.
|
|
29
|
+
|
|
30
|
+
## Demo snippet (TS)
|
|
31
|
+
|
|
32
|
+
- No demo snippet found in `core-ui-demo`.
|
|
33
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# core-file-field
|
|
2
|
+
|
|
3
|
+
- Class: `FileFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/file-field/file-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 fileField: FileFieldConfig<User> = {
|
|
23
|
+
key: 'attachments',
|
|
24
|
+
label: 'Attachments',
|
|
25
|
+
type: FieldType.FILE,
|
|
26
|
+
accept: '.pdf,.png,.jpg',
|
|
27
|
+
multiple: true,
|
|
28
|
+
maxFiles: 3,
|
|
29
|
+
showPreview: true,
|
|
30
|
+
acceptString: 'pdf,png,jpg',
|
|
31
|
+
readonly: false,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Example
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<core-file-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-file-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,25 @@
|
|
|
1
|
+
# core-file-preview
|
|
2
|
+
|
|
3
|
+
- Class: `FilePreviewComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/file-preview/file-preview.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `fileModels`: `FileModel[]`
|
|
8
|
+
- `files`: `FilePreviewItem[]`
|
|
9
|
+
- `config`: `FilePreviewConfig`
|
|
10
|
+
|
|
11
|
+
## Outputs
|
|
12
|
+
- `actionTriggered`: `FilePreviewAction`
|
|
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-filter-modal
|
|
2
|
+
|
|
3
|
+
- Class: `FilterModalComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-table/components/filter-modal/filter-modal.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `isOpen`: `unknown`
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- `close`: `void`
|
|
11
|
+
- `clearFilters`: `void`
|
|
12
|
+
- `globalFilterChange`: `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,23 @@
|
|
|
1
|
+
# core-fixed-actions-mobile-modal
|
|
2
|
+
|
|
3
|
+
- Class: `FixedActionsMobileModalComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-fixed-actions/fixed-actions-mobile-modal.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
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,23 @@
|
|
|
1
|
+
# core-gallery-modal
|
|
2
|
+
|
|
3
|
+
- Class: `GalleryModalComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/gallery-modal/gallery-modal.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
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,82 @@
|
|
|
1
|
+
# core-generic-button
|
|
2
|
+
|
|
3
|
+
- Class: `GenericButtonComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-button/generic-button.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `ButtonConfig` (required)
|
|
8
|
+
- `data`: `any`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `buttonClick`: `ButtonActionEvent`
|
|
12
|
+
|
|
13
|
+
## Usage notes
|
|
14
|
+
- Use `ButtonConfig` to control type, size, icon, tooltip, permissions, and custom classes.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
```html
|
|
18
|
+
<core-generic-button
|
|
19
|
+
[config]="buttonConfig"
|
|
20
|
+
(buttonClick)="handleClick($event)"
|
|
21
|
+
></core-generic-button>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Demo usage
|
|
25
|
+
|
|
26
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.html`:4 — `<core-generic-button`
|
|
27
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.html`:10 — `</core-generic-button>`
|
|
28
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.html`:17 — `<core-generic-button`
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.html`:20 — `</core-generic-button>`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:53 — `<core-generic-button`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:56 — `</core-generic-button>`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:77 — `<core-generic-button`
|
|
33
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:80 — `</core-generic-button>`
|
|
34
|
+
- …and 96 more matches
|
|
35
|
+
|
|
36
|
+
## Demo snippet (HTML)
|
|
37
|
+
|
|
38
|
+
Source: `projects/core-ui-demo/src/app/admin/components/alerts/alerts.html`:4-10
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<core-generic-button
|
|
42
|
+
(buttonClick)="onOpenAlert(alertConfig)"
|
|
43
|
+
[config]="{
|
|
44
|
+
type: ButtonType.PRIMARY,
|
|
45
|
+
text: alertConfig.message
|
|
46
|
+
}">
|
|
47
|
+
</core-generic-button>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Demo snippet (TS)
|
|
51
|
+
|
|
52
|
+
Source: `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`
|
|
53
|
+
|
|
54
|
+
Lines: 5-29
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
|
|
58
|
+
@Component({
|
|
59
|
+
selector: 'app-alerts',
|
|
60
|
+
standalone: true,
|
|
61
|
+
imports: [ComponentsGrid, ComponentsGridRow, GenericButtonComponent],
|
|
62
|
+
templateUrl: './alerts.html',
|
|
63
|
+
styleUrls: ['./alerts.css']
|
|
64
|
+
})
|
|
65
|
+
export class Alerts {
|
|
66
|
+
@ViewChild('codeTemplate', { read: TemplateRef }) codeTemplate!: TemplateRef<any>;
|
|
67
|
+
|
|
68
|
+
ButtonType = ButtonType;
|
|
69
|
+
alertService = inject(AlertService);
|
|
70
|
+
dialog = inject(ConfirmationDialogService);
|
|
71
|
+
|
|
72
|
+
alerts = signal<Alert[]>([
|
|
73
|
+
{ type: AlertType.SUCCESS, message: 'Alerta de éxito', duration: 3000, inBottom: true },
|
|
74
|
+
{ type: AlertType.ERROR, message: 'Alerta de error', duration: 3000, inBottom: true },
|
|
75
|
+
{ type: AlertType.WAITING, message: 'Alerta de espera', duration: 3000, inBottom: true },
|
|
76
|
+
{ type: AlertType.HIGHLIGHTED, message: 'Alerta destacada', duration: 3000, inBottom: true },
|
|
77
|
+
{ type: AlertType.DEFAULT, message: 'Alerta por defecto', duration: 3000, inBottom: true },
|
|
78
|
+
{ type: AlertType.DEFAULT, message: 'Alerta con icono customizado', duration: 3000, icon: 'icon-star-filled', inBottom: true }
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
onOpenAlert(config: Alert): void {
|
|
82
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# core-generic-calendar
|
|
2
|
+
|
|
3
|
+
- Class: `GenericCalendarComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-calendar/generic-calendar.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `currentDate`: `Date`
|
|
8
|
+
- `selectedDate`: `Date | null`
|
|
9
|
+
- `config`: `CalendarConfig`
|
|
10
|
+
- `showNavigation`: `boolean`
|
|
11
|
+
- `showHeader`: `boolean`
|
|
12
|
+
- `locale`: `string`
|
|
13
|
+
|
|
14
|
+
## Outputs
|
|
15
|
+
- `dateSelected`: `DateSelectionEvent`
|
|
16
|
+
- `monthChanged`: `DateNavigationEvent`
|
|
17
|
+
|
|
18
|
+
## Demo usage
|
|
19
|
+
|
|
20
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:127 — `<core-generic-calendar`
|
|
21
|
+
- `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:134 — `</core-generic-calendar>`
|
|
22
|
+
|
|
23
|
+
## Demo snippet (HTML)
|
|
24
|
+
|
|
25
|
+
Source: `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.html`:127-134
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<core-generic-calendar
|
|
29
|
+
[currentDate]="currentDate"
|
|
30
|
+
[selectedDate]="selectedDate()"
|
|
31
|
+
[config]="calendarConfig"
|
|
32
|
+
(dateSelected)="onDateSelected($event)"
|
|
33
|
+
(monthChanged)="onMonthChanged($event)"
|
|
34
|
+
>
|
|
35
|
+
</core-generic-calendar>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Demo snippet (TS)
|
|
39
|
+
|
|
40
|
+
Source: `projects/core-ui-demo/src/app/admin/components/calendar/calendar-demo.component.ts`
|
|
41
|
+
|
|
42
|
+
Lines: 374-398
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
today.getFullYear(),
|
|
46
|
+
today.getMonth(),
|
|
47
|
+
today.getDate()
|
|
48
|
+
));
|
|
49
|
+
this.selectedDate.set(todayUTC);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onPreviousDay(date: Date): void {
|
|
53
|
+
this.selectedDate.set(date);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
onNextDay(date: Date): void {
|
|
57
|
+
this.selectedDate.set(date);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
onPreviousMonth(): void {
|
|
61
|
+
const current = this.selectedDate();
|
|
62
|
+
const newDate = new Date(current.getFullYear(), current.getMonth() - 1, 1);
|
|
63
|
+
this.selectedDate.set(newDate);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
onNextMonth(): void {
|
|
67
|
+
const current = this.selectedDate();
|
|
68
|
+
const newDate = new Date(current.getFullYear(), current.getMonth() + 1, 1);
|
|
69
|
+
this.selectedDate.set(newDate);
|
|
70
|
+
```
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# core-generic-chat
|
|
2
|
+
|
|
3
|
+
- Class: `GenericChatComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-chat/generic-chat.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `messages`: `ChatMessage[]`
|
|
8
|
+
- `config`: `ChatConfig`
|
|
9
|
+
- `isTyping`: `boolean`
|
|
10
|
+
|
|
11
|
+
## Outputs
|
|
12
|
+
- `messagesSent`: `ChatMessage`
|
|
13
|
+
- `imageClicked`: `ChatMessage`
|
|
14
|
+
- `fileClicked`: `ChatMessage`
|
|
15
|
+
- `fileSelected`: `File`
|
|
16
|
+
- `filesSelected`: `File[]`
|
|
17
|
+
- `typingStatusChanged`: `boolean`
|
|
18
|
+
- `modalClosed`: `void`
|
|
19
|
+
- `attachmentAction`: `{action: string, file: any, message: ChatMessage}`
|
|
20
|
+
- `sendingStatusChanged`: `boolean`
|
|
21
|
+
- `loadMoreMessages`: `void`
|
|
22
|
+
|
|
23
|
+
## Demo usage
|
|
24
|
+
|
|
25
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:7 — `<core-generic-chat`
|
|
26
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:13 — `</core-generic-chat>`
|
|
27
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:28 — `<core-generic-chat`
|
|
28
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:34 — `</core-generic-chat>`
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:53 — `<core-generic-chat`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:60 — `</core-generic-chat>`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:75 — `<core-generic-chat`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:81 — `</core-generic-chat>`
|
|
33
|
+
- …and 2 more matches
|
|
34
|
+
|
|
35
|
+
## Demo snippet (HTML)
|
|
36
|
+
|
|
37
|
+
Source: `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.html`:7-13
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<core-generic-chat
|
|
41
|
+
[messages]="sampleMessages()"
|
|
42
|
+
[config]="basicConfig()"
|
|
43
|
+
(messagesSent)="onMessageSent($event)"
|
|
44
|
+
(imageClicked)="onImageClicked($event)"
|
|
45
|
+
(fileClicked)="onFileClicked($event)">
|
|
46
|
+
</core-generic-chat>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Demo snippet (TS)
|
|
50
|
+
|
|
51
|
+
Source: `projects/core-ui-demo/src/app/admin/components/generic-chat/generic-chat.ts`
|
|
52
|
+
|
|
53
|
+
Lines: 182-206
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
onMessageSent(message: ChatMessage): void {
|
|
57
|
+
console.log('Mensaje enviado:', message);
|
|
58
|
+
// Simular respuesta automática
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
const response: ChatMessage = {
|
|
61
|
+
id: Date.now().toString(),
|
|
62
|
+
content: 'Mensaje recibido correctamente',
|
|
63
|
+
type: ChatMessageType.TEXT,
|
|
64
|
+
position: ChatMessagePosition.LEFT,
|
|
65
|
+
timestamp: new Date(),
|
|
66
|
+
sender: {
|
|
67
|
+
id: 'user1',
|
|
68
|
+
name: 'Ana García',
|
|
69
|
+
avatar: 'https://via.placeholder.com/40x40/4CAF50/white?text=A'
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.sampleMessages.update(messages => [...messages, response]);
|
|
73
|
+
}, 1000);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
onImageClicked(message: ChatMessage): void {
|
|
77
|
+
console.log('Imagen clickeada:', message);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
onFileClicked(message: ChatMessage): void {
|
|
81
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# core-generic-documentation
|
|
2
|
+
|
|
3
|
+
- Class: `GenericDocumentationComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-documentation/generic-documentation.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `documents`: `DocumentItem[]`
|
|
8
|
+
- `config`: `DocumentConfig`
|
|
9
|
+
- `loading`: `boolean`
|
|
10
|
+
- `permissions`: `{
|
|
11
|
+
canDownload?: boolean;
|
|
12
|
+
canDelete?: boolean;
|
|
13
|
+
canHelp?: boolean;
|
|
14
|
+
canUpload?: boolean;
|
|
15
|
+
}`
|
|
16
|
+
|
|
17
|
+
## Outputs
|
|
18
|
+
- `actionTriggered`: `DocumentActionEvent`
|
|
19
|
+
- `uploadRequested`: `Event`
|
|
20
|
+
|
|
21
|
+
## Demo usage
|
|
22
|
+
|
|
23
|
+
- No demo usage found in `core-ui-demo`.
|
|
24
|
+
|
|
25
|
+
## Demo snippet (HTML)
|
|
26
|
+
|
|
27
|
+
- No demo snippet found in `core-ui-demo`.
|
|
28
|
+
|
|
29
|
+
## Demo snippet (TS)
|
|
30
|
+
|
|
31
|
+
- No demo snippet found in `core-ui-demo`.
|
|
32
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# core-generic-fixed-actions
|
|
2
|
+
|
|
3
|
+
- Class: `GenericFixedActionsComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/generic-fixed-actions/generic-fixed-actions.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `externalActions`: `FixedActionConfig[]`
|
|
8
|
+
- `tableId`: `string | undefined`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- none
|
|
12
|
+
|
|
13
|
+
## Demo usage
|
|
14
|
+
|
|
15
|
+
- No demo usage found in `core-ui-demo`.
|
|
16
|
+
|
|
17
|
+
## Demo snippet (HTML)
|
|
18
|
+
|
|
19
|
+
- No demo snippet found in `core-ui-demo`.
|
|
20
|
+
|
|
21
|
+
## Demo snippet (TS)
|
|
22
|
+
|
|
23
|
+
- No demo snippet found in `core-ui-demo`.
|
|
24
|
+
|