@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
package/llm/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Core UI Library — LLM Docs
|
|
2
|
+
|
|
3
|
+
These docs are published with the npm package under `llm/`.
|
|
4
|
+
|
|
5
|
+
## How to use (agents)
|
|
6
|
+
1) Start with `llms.txt` (entry point).
|
|
7
|
+
2) Use `screen-blueprints.md` for full page templates.
|
|
8
|
+
3) Use `form-recipes.md` for ModalFieldConfig patterns.
|
|
9
|
+
4) For each component, see `components/<component>.md` for API + demo snippets.
|
|
10
|
+
|
|
11
|
+
## Prompt bundle script
|
|
12
|
+
From the repo root you can generate a single prompt bundle for any external agent:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm run llm:prompt -- --task "Build a users CRUD screen" --out /tmp/llm_prompt.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
To include only specific components:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run llm:prompt -- --components core-layout,core-generic-table,core-generic-modal
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Update LLM docs from demo
|
|
25
|
+
Regenerate demo mappings and refresh component demo snippets:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm run llm:update
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Key paths
|
|
32
|
+
- Entry: `llms.txt`
|
|
33
|
+
- Component catalog: `components.md`
|
|
34
|
+
- Demo map: `demo-examples.md`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# core-active-filters
|
|
2
|
+
|
|
3
|
+
- Class: `ActiveFiltersComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/active-filters/active-filters.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `activeFilters`: `ActiveFilterItem[]`
|
|
8
|
+
- `config`: `ActiveFiltersConfig`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `onFilterRemove`: `ActiveFilterItem`
|
|
12
|
+
- `onClearAll`: `void`
|
|
13
|
+
|
|
14
|
+
## Demo usage
|
|
15
|
+
|
|
16
|
+
- No demo usage found in `core-ui-demo`.
|
|
17
|
+
|
|
18
|
+
## Demo snippet (HTML)
|
|
19
|
+
|
|
20
|
+
- No demo snippet found in `core-ui-demo`.
|
|
21
|
+
|
|
22
|
+
## Demo snippet (TS)
|
|
23
|
+
|
|
24
|
+
- No demo snippet found in `core-ui-demo`.
|
|
25
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# core-ad-login-button
|
|
2
|
+
|
|
3
|
+
- Class: `AdLoginButtonComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/auth/ad-auth/components/ad-login-button/ad-login-button.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `config`: `AdLoginButtonConfig`
|
|
8
|
+
- `disabled`: `boolean`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `authEvent`: `AdAuthEvent`
|
|
12
|
+
|
|
13
|
+
## Demo usage
|
|
14
|
+
|
|
15
|
+
- `projects/core-ui-demo/src/app/auth/auth.html`:25 — `<core-ad-login-button (authEvent)="handleAdAuthEvent($event)" />`
|
|
16
|
+
|
|
17
|
+
## Demo snippet (HTML)
|
|
18
|
+
|
|
19
|
+
Source: `projects/core-ui-demo/src/app/auth/auth.html`:25-25
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<core-ad-login-button (authEvent)="handleAdAuthEvent($event)" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Demo snippet (TS)
|
|
26
|
+
|
|
27
|
+
Source: `projects/core-ui-demo/src/app/auth/auth.ts`
|
|
28
|
+
|
|
29
|
+
Lines: 96-120
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
duration: 5000,
|
|
33
|
+
inBottom: true,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
this.loading.set(false);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
error: (error: HttpErrorResponse) => {
|
|
40
|
+
const errorMessage: string = `errors.${
|
|
41
|
+
error.status === 401 ? 'invalidCredentials' : 'genericLogin'
|
|
42
|
+
}`;
|
|
43
|
+
|
|
44
|
+
this.alertService.show({
|
|
45
|
+
type: AlertType.ERROR,
|
|
46
|
+
message: errorMessage,
|
|
47
|
+
duration: 5000,
|
|
48
|
+
inBottom: true,
|
|
49
|
+
});
|
|
50
|
+
this.loading.set(false);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
handleAdAuthEvent(event: AdAuthEvent): void {
|
|
57
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# core-alert-container
|
|
2
|
+
|
|
3
|
+
- Class: `AlertContainerComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/alert/alert-container.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- none
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Demo usage
|
|
13
|
+
|
|
14
|
+
- `projects/core-ui-demo/src/app/app.html`:3 — `<core-alert-container></core-alert-container>`
|
|
15
|
+
|
|
16
|
+
## Demo snippet (HTML)
|
|
17
|
+
|
|
18
|
+
Source: `projects/core-ui-demo/src/app/app.html`:3-3
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<core-alert-container></core-alert-container>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Demo snippet (TS)
|
|
25
|
+
|
|
26
|
+
Source: `projects/core-ui-demo/src/app/app.ts` (no matching bindings found)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# core-alert
|
|
2
|
+
|
|
3
|
+
- Class: `AlertComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/alert/alert.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `alert`: `Alert` (required)
|
|
8
|
+
|
|
9
|
+
## Outputs
|
|
10
|
+
- none
|
|
11
|
+
|
|
12
|
+
## Usage notes
|
|
13
|
+
- Rendered by `core-alert-container`; you usually do not place `core-alert` directly.
|
|
14
|
+
- Use `AlertService.show(...)` to display alerts.
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
```ts
|
|
18
|
+
// Demo-derived pattern
|
|
19
|
+
this.alertService.show({
|
|
20
|
+
type: AlertType.SUCCESS,
|
|
21
|
+
message: 'Operation successful',
|
|
22
|
+
duration: 3000,
|
|
23
|
+
inBottom: true
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Demo usage
|
|
28
|
+
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:30 — `this.alertService.show(config);`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:43 — `this.alertService.show({`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:66 — `this.alertService.show({`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:90 — `this.alertService.show({`
|
|
33
|
+
- `projects/core-ui-demo/src/app/admin/components/icons/icons.ts`:93 — `this.alertService.show({`
|
|
34
|
+
- `projects/core-ui-demo/src/app/admin/panel-example/panel-example.ts`:588 — `this.alertService.show({`
|
|
35
|
+
- `projects/core-ui-demo/src/app/admin/panel-example/panel-example.ts`:603 — `this.alertService.show({`
|
|
36
|
+
- `projects/core-ui-demo/src/app/admin/panel-example/panel-example.ts`:618 — `this.alertService.show({`
|
|
37
|
+
- …and 9 more matches
|
|
38
|
+
|
|
39
|
+
## Demo snippet (HTML)
|
|
40
|
+
|
|
41
|
+
- No demo snippet found in `core-ui-demo`.
|
|
42
|
+
|
|
43
|
+
## Demo snippet (TS)
|
|
44
|
+
|
|
45
|
+
- No demo snippet found in `core-ui-demo`.
|
|
46
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# core-base-field
|
|
2
|
+
|
|
3
|
+
- Class: `UnknownClass`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/base/base-field.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `field`: `ModalFieldConfig<T>` (required)
|
|
8
|
+
- `value`: `any` (required)
|
|
9
|
+
- `mode`: `ModalMode` (required)
|
|
10
|
+
- `errors`: `string[]`
|
|
11
|
+
- `rowData`: `T | null`
|
|
12
|
+
- `formValue`: `any`
|
|
13
|
+
|
|
14
|
+
## Outputs
|
|
15
|
+
- `valueChange`: `any`
|
|
16
|
+
- `onBlurEvent`: `keyof T`
|
|
17
|
+
- `onEnterEvent`: `keyof T`
|
|
18
|
+
|
|
19
|
+
## Usage notes
|
|
20
|
+
- Abstract base for all field components; not used directly in templates.
|
|
21
|
+
- `field` defines label, key, validators, and per-mode config.
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
```ts
|
|
25
|
+
// Use BaseField inputs when wiring any concrete field component.
|
|
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-card
|
|
2
|
+
|
|
3
|
+
- Class: `CardComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/card/card.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,68 @@
|
|
|
1
|
+
# core-carousel
|
|
2
|
+
|
|
3
|
+
- Class: `CarouselComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/carousel/carousel.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `images`: `CarouselImage[]`
|
|
8
|
+
- `config`: `CarouselConfig`
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- none
|
|
12
|
+
|
|
13
|
+
## Demo usage
|
|
14
|
+
|
|
15
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:5 — `<core-carousel`
|
|
16
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:8 — `</core-carousel>`
|
|
17
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:19 — `<core-carousel`
|
|
18
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:22 — `</core-carousel>`
|
|
19
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:33 — `<core-carousel`
|
|
20
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:36 — `</core-carousel>`
|
|
21
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:47 — `<core-carousel`
|
|
22
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:50 — `</core-carousel>`
|
|
23
|
+
- …and 8 more matches
|
|
24
|
+
|
|
25
|
+
## Demo snippet (HTML)
|
|
26
|
+
|
|
27
|
+
Source: `projects/core-ui-demo/src/app/admin/components/carousel/carousel.html`:5-8
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<core-carousel
|
|
31
|
+
[images]="basicCarouselImages()"
|
|
32
|
+
[config]="basicConfig()">
|
|
33
|
+
</core-carousel>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Demo snippet (TS)
|
|
37
|
+
|
|
38
|
+
Source: `projects/core-ui-demo/src/app/admin/components/carousel/carousel.ts`
|
|
39
|
+
|
|
40
|
+
Lines: 16-40
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
ComponentsGridRow,
|
|
44
|
+
CommonModule
|
|
45
|
+
],
|
|
46
|
+
styleUrls: ['./carousel.css'],
|
|
47
|
+
templateUrl: './carousel.html'
|
|
48
|
+
})
|
|
49
|
+
export class Carousel {
|
|
50
|
+
@ViewChild('codeTemplate', { read: TemplateRef }) codeTemplate!: TemplateRef<any>;
|
|
51
|
+
|
|
52
|
+
constructor(private dialogService: ConfirmationDialogService) {}
|
|
53
|
+
|
|
54
|
+
currentImplementation = signal<{
|
|
55
|
+
importStatement: string;
|
|
56
|
+
componentCode: string;
|
|
57
|
+
templateCode: string;
|
|
58
|
+
fullCode: string;
|
|
59
|
+
}>({
|
|
60
|
+
importStatement: '',
|
|
61
|
+
componentCode: '',
|
|
62
|
+
templateCode: '',
|
|
63
|
+
fullCode: ''
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Imágenes de ejemplo para los carousels
|
|
67
|
+
basicCarouselImages: Signal<CarouselImage[]> = signal([
|
|
68
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# core-checkbox-field
|
|
2
|
+
|
|
3
|
+
- Class: `CheckboxFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/checkbox-field/checkbox-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 termsField: CheckboxModalFieldConfig<User> = {
|
|
23
|
+
key: 'terms',
|
|
24
|
+
label: 'Terms',
|
|
25
|
+
type: FieldType.CHECKBOX,
|
|
26
|
+
checkboxConfig: {
|
|
27
|
+
options: [
|
|
28
|
+
{ value: true, label: 'I accept the terms' },
|
|
29
|
+
],
|
|
30
|
+
allowMultiple: false,
|
|
31
|
+
},
|
|
32
|
+
readonly: false,
|
|
33
|
+
};
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<core-checkbox-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-checkbox-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,55 @@
|
|
|
1
|
+
# core-color-picker-field
|
|
2
|
+
|
|
3
|
+
- Class: `ColorPickerFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/color-picker-field/color-picker-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 colorField: ModalFieldConfig<User> = {
|
|
23
|
+
key: 'favoriteColor',
|
|
24
|
+
label: 'Favorite color',
|
|
25
|
+
type: FieldType.COLOR,
|
|
26
|
+
readonly: false,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<core-color-picker-field
|
|
35
|
+
[field]="fieldConfig"
|
|
36
|
+
[value]="formData[fieldConfig.key]"
|
|
37
|
+
[mode]="mode"
|
|
38
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
39
|
+
[formValue]="formData"
|
|
40
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
41
|
+
></core-color-picker-field>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Demo usage
|
|
45
|
+
|
|
46
|
+
- No demo usage found in `core-ui-demo`.
|
|
47
|
+
|
|
48
|
+
## Demo snippet (HTML)
|
|
49
|
+
|
|
50
|
+
- No demo snippet found in `core-ui-demo`.
|
|
51
|
+
|
|
52
|
+
## Demo snippet (TS)
|
|
53
|
+
|
|
54
|
+
- No demo snippet found in `core-ui-demo`.
|
|
55
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# core-confirmation-dialog
|
|
2
|
+
|
|
3
|
+
- Class: `ConfirmationDialogComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/confirmation-dialog/confirmation-dialog.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `isOpen`: `boolean` (required)
|
|
8
|
+
- `config`: `ConfirmationDialogConfig` (required)
|
|
9
|
+
|
|
10
|
+
## Outputs
|
|
11
|
+
- `confirm`: `string | boolean | undefined`
|
|
12
|
+
- `cancel`: `void`
|
|
13
|
+
|
|
14
|
+
## Usage notes
|
|
15
|
+
- Usually controlled through `ConfirmationDialogService` from layouts or tables.
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
```html
|
|
19
|
+
<core-confirmation-dialog
|
|
20
|
+
[isOpen]="confirmOpen"
|
|
21
|
+
[config]="confirmConfig"
|
|
22
|
+
(confirm)="onConfirm($event)"
|
|
23
|
+
(cancel)="onCancel()"
|
|
24
|
+
></core-confirmation-dialog>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Demo usage
|
|
28
|
+
|
|
29
|
+
- `projects/core-ui-demo/src/app/admin/components/alerts/alerts.ts`:133 — `this.dialog.openConfirm({`
|
|
30
|
+
- `projects/core-ui-demo/src/app/admin/components/button/button.ts`:151 — `this.dialogService.openConfirm({`
|
|
31
|
+
- `projects/core-ui-demo/src/app/admin/components/carousel/carousel.ts`:228 — `this.dialogService.openConfirm({`
|
|
32
|
+
- `projects/core-ui-demo/src/app/admin/components/dialog/dialog.ts`:53 — `this.confirmService.openConfirm(config).subscribe(confirmed => {`
|
|
33
|
+
- `projects/core-ui-demo/src/app/admin/components/dialog/dialog.ts`:91 — `this.confirmService.openConfirm(config).subscribe(result => {`
|
|
34
|
+
- `projects/core-ui-demo/src/app/admin/components/dialog/dialog.ts`:142 — `this.confirmService.openConfirm(config).subscribe(result => {`
|
|
35
|
+
- `projects/core-ui-demo/src/app/admin/components/dialog/dialog.ts`:187 — `this.confirmService.openConfirm(config).subscribe(result => {`
|
|
36
|
+
- `projects/core-ui-demo/src/app/admin/components/dialog/dialog.ts`:233 — `this.confirmService.openConfirm(dialog).subscribe(confirmed => {`
|
|
37
|
+
- …and 11 more matches
|
|
38
|
+
|
|
39
|
+
## Demo snippet (HTML)
|
|
40
|
+
|
|
41
|
+
- No demo snippet found in `core-ui-demo`.
|
|
42
|
+
|
|
43
|
+
## Demo snippet (TS)
|
|
44
|
+
|
|
45
|
+
- No demo snippet found in `core-ui-demo`.
|
|
46
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# core-data-list-item
|
|
2
|
+
|
|
3
|
+
- Class: `DataListItemComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/data-list-item/data-list-item.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `key`: `string` (required)
|
|
8
|
+
- `label`: `string` (required)
|
|
9
|
+
- `value`: `any`
|
|
10
|
+
- `formattedValue`: `string`
|
|
11
|
+
- `templateContext`: `any`
|
|
12
|
+
- `itemCssClasses`: `string`
|
|
13
|
+
- `keyCssClasses`: `string`
|
|
14
|
+
- `valueCssClasses`: `string`
|
|
15
|
+
- `customCssClasses`: `{
|
|
16
|
+
item?: string;
|
|
17
|
+
key?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
}`
|
|
20
|
+
|
|
21
|
+
## Outputs
|
|
22
|
+
- none
|
|
23
|
+
|
|
24
|
+
## Demo usage
|
|
25
|
+
|
|
26
|
+
- No demo usage found in `core-ui-demo`.
|
|
27
|
+
|
|
28
|
+
## Demo snippet (HTML)
|
|
29
|
+
|
|
30
|
+
- No demo snippet found in `core-ui-demo`.
|
|
31
|
+
|
|
32
|
+
## Demo snippet (TS)
|
|
33
|
+
|
|
34
|
+
- No demo snippet found in `core-ui-demo`.
|
|
35
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# core-data-list
|
|
2
|
+
|
|
3
|
+
- Class: `DataListComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/data-list/data-list.component.ts`
|
|
5
|
+
|
|
6
|
+
## Inputs
|
|
7
|
+
- `items`: `DataListItem[]`
|
|
8
|
+
- `data`: `T | null`
|
|
9
|
+
- `showEmptyMessage`: `boolean`
|
|
10
|
+
- `emptyMessage`: `string`
|
|
11
|
+
- `cssClasses`: `string`
|
|
12
|
+
|
|
13
|
+
## Outputs
|
|
14
|
+
- none
|
|
15
|
+
|
|
16
|
+
## Demo usage
|
|
17
|
+
|
|
18
|
+
- No demo usage found in `core-ui-demo`.
|
|
19
|
+
|
|
20
|
+
## Demo snippet (HTML)
|
|
21
|
+
|
|
22
|
+
- No demo snippet found in `core-ui-demo`.
|
|
23
|
+
|
|
24
|
+
## Demo snippet (TS)
|
|
25
|
+
|
|
26
|
+
- No demo snippet found in `core-ui-demo`.
|
|
27
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# core-date-field
|
|
2
|
+
|
|
3
|
+
- Class: `DateFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/date-field/date-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 startDateField: DateModalFieldConfig<User> = {
|
|
23
|
+
key: 'startDate',
|
|
24
|
+
label: 'Start date',
|
|
25
|
+
type: FieldType.DATE,
|
|
26
|
+
dateConfig: { showCalendarIcon: true },
|
|
27
|
+
readonly: false,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<core-date-field
|
|
36
|
+
[field]="fieldConfig"
|
|
37
|
+
[value]="formData[fieldConfig.key]"
|
|
38
|
+
[mode]="mode"
|
|
39
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
40
|
+
[formValue]="formData"
|
|
41
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
42
|
+
></core-date-field>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Demo usage
|
|
46
|
+
|
|
47
|
+
- No demo usage found in `core-ui-demo`.
|
|
48
|
+
|
|
49
|
+
## Demo snippet (HTML)
|
|
50
|
+
|
|
51
|
+
- No demo snippet found in `core-ui-demo`.
|
|
52
|
+
|
|
53
|
+
## Demo snippet (TS)
|
|
54
|
+
|
|
55
|
+
- No demo snippet found in `core-ui-demo`.
|
|
56
|
+
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# core-daterange-field
|
|
2
|
+
|
|
3
|
+
- Class: `DateRangeFieldComponent`
|
|
4
|
+
- File: `projects/core-ui-library/src/lib/components/fields/types/daterange-field/daterange-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 rangeField: DateRangeFieldConfig<User> = {
|
|
23
|
+
key: 'period',
|
|
24
|
+
label: 'Period',
|
|
25
|
+
type: FieldType.DATERANGE,
|
|
26
|
+
dateRangeConfig: {
|
|
27
|
+
allowPastDates: true,
|
|
28
|
+
allowFutureDates: true,
|
|
29
|
+
},
|
|
30
|
+
readonly: false,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<core-daterange-field
|
|
39
|
+
[field]="fieldConfig"
|
|
40
|
+
[value]="formData[fieldConfig.key]"
|
|
41
|
+
[mode]="mode"
|
|
42
|
+
[errors]="errors[fieldConfig.key] || []"
|
|
43
|
+
[formValue]="formData"
|
|
44
|
+
(valueChange)="onFieldChange(fieldConfig.key, $event)"
|
|
45
|
+
></core-daterange-field>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Demo usage
|
|
49
|
+
|
|
50
|
+
- No demo usage found in `core-ui-demo`.
|
|
51
|
+
|
|
52
|
+
## Demo snippet (HTML)
|
|
53
|
+
|
|
54
|
+
- No demo snippet found in `core-ui-demo`.
|
|
55
|
+
|
|
56
|
+
## Demo snippet (TS)
|
|
57
|
+
|
|
58
|
+
- No demo snippet found in `core-ui-demo`.
|
|
59
|
+
|