@masterteam/components 0.0.210 → 0.0.212
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 +70 -70
- package/fesm2022/masterteam-components-business-fields.mjs +7 -6
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-drawer.mjs +2 -2
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +14 -14
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
- package/fesm2022/masterteam-components-formula.mjs +2 -2
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +2 -2
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-multi-select-field.mjs +16 -5
- package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +2 -2
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +2 -2
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +16 -5
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +17 -4
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +5 -5
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +2 -2
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +2 -2
- package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-treeselect-field.mjs +2 -2
- package/fesm2022/masterteam-components-treeselect-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +9 -3
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +5 -3
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +4 -2
- package/types/masterteam-components-multi-select-field.d.ts +5 -3
- package/types/masterteam-components-select-field.d.ts +5 -3
- package/types/masterteam-components-slider-field.d.ts +3 -0
- package/types/masterteam-components-user-search-field.d.ts +7 -1
- package/types/masterteam-components.d.ts +2 -0
package/README.md
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
# Components
|
|
2
|
-
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.0.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building / Checking
|
|
20
|
-
|
|
21
|
-
For local validation, run the lightweight no-output Angular compiler check:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
pnpm build
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
To build distributable package artifacts and generated CSS, run the full build:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
pnpm build:full
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Full build artifacts are placed in `dist/masterteam/components`.
|
|
34
|
-
|
|
35
|
-
### Publishing the Library
|
|
36
|
-
|
|
37
|
-
Once the project is built, you can publish your library by following these steps:
|
|
38
|
-
|
|
39
|
-
1. Navigate to the `dist` directory:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
cd dist/components
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
46
|
-
```bash
|
|
47
|
-
npm publish
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Running unit tests
|
|
51
|
-
|
|
52
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
ng test
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Running end-to-end tests
|
|
59
|
-
|
|
60
|
-
For end-to-end (e2e) testing, run:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
ng e2e
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
67
|
-
|
|
68
|
-
## Additional Resources
|
|
69
|
-
|
|
70
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.0.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building / Checking
|
|
20
|
+
|
|
21
|
+
For local validation, run the lightweight no-output Angular compiler check:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
To build distributable package artifacts and generated CSS, run the full build:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm build:full
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Full build artifacts are placed in `dist/masterteam/components`.
|
|
34
|
+
|
|
35
|
+
### Publishing the Library
|
|
36
|
+
|
|
37
|
+
Once the project is built, you can publish your library by following these steps:
|
|
38
|
+
|
|
39
|
+
1. Navigate to the `dist` directory:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cd dist/components
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
46
|
+
```bash
|
|
47
|
+
npm publish
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Running unit tests
|
|
51
|
+
|
|
52
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ng test
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Running end-to-end tests
|
|
59
|
+
|
|
60
|
+
For end-to-end (e2e) testing, run:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
ng e2e
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
67
|
+
|
|
68
|
+
## Additional Resources
|
|
69
|
+
|
|
70
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -361,8 +361,9 @@ class SchemaConnectionField {
|
|
|
361
361
|
for (const state of states) {
|
|
362
362
|
const sourceId = this.getSourceId(state.source);
|
|
363
363
|
const ids = (payload?.sources ?? [])
|
|
364
|
-
.filter((s) => s.sourceLevelId === sourceId)
|
|
365
|
-
.map((s) => s.sourceLevelDataId)
|
|
364
|
+
.filter((s) => (s.sourceLevelId ?? s.sourceModuleId) === sourceId)
|
|
365
|
+
.map((s) => s.sourceLevelDataId ?? s.sourceModuleDataId)
|
|
366
|
+
.filter((id) => id != null);
|
|
366
367
|
this.selections[sourceId] = state.source.allowManyToMany
|
|
367
368
|
? ids
|
|
368
369
|
: (ids[0] ?? null);
|
|
@@ -1194,13 +1195,13 @@ class ScheduleItemSelectorField {
|
|
|
1194
1195
|
return ids;
|
|
1195
1196
|
}
|
|
1196
1197
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ScheduleItemSelectorField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1197
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ScheduleItemSelectorField, isStandalone: true, selector: "mt-schedule-item-selector-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, propertyKey: { classPropertyName: "propertyKey", publicName: "propertyKey", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: "@if (isMultiple()) {\
|
|
1198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ScheduleItemSelectorField, isStandalone: true, selector: "mt-schedule-item-selector-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, propertyKey: { classPropertyName: "propertyKey", publicName: "propertyKey", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: "@if (isMultiple()) {\n <mt-multi-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiChange($event)\"\n />\n} @else {\n <mt-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [loading]=\"loading()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"singleValue()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSingleChange($event)\"\n />\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1198
1199
|
}
|
|
1199
1200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ScheduleItemSelectorField, decorators: [{
|
|
1200
1201
|
type: Component,
|
|
1201
1202
|
args: [{ selector: 'mt-schedule-item-selector-field', standalone: true, imports: [FormsModule, MultiSelectField, SelectField], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1202
1203
|
class: 'block',
|
|
1203
|
-
}, template: "@if (isMultiple()) {\
|
|
1204
|
+
}, template: "@if (isMultiple()) {\n <mt-multi-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"value()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onMultiChange($event)\"\n />\n} @else {\n <mt-select-field\n [label]=\"label()\"\n [placeholder]=\"placeholder()\"\n [options]=\"options()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [filter]=\"options().length > 10\"\n [showClear]=\"!required()\"\n [loading]=\"loading()\"\n [required]=\"required()\"\n [readonly]=\"readonly() || disabled()\"\n [ngModel]=\"singleValue()\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"onSingleChange($event)\"\n />\n}\n" }]
|
|
1204
1205
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], propertyKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyKey", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
1205
1206
|
|
|
1206
1207
|
/**
|
|
@@ -1434,7 +1435,7 @@ class LookupModuleCheckListField {
|
|
|
1434
1435
|
return [];
|
|
1435
1436
|
}
|
|
1436
1437
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1437
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LookupModuleCheckListField, isStandalone: true, selector: "mt-lookup-module-check-list-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, lookupOptions: { classPropertyName: "lookupOptions", publicName: "lookupOptions", isSignal: true, isRequired: false, transformFunction: null }, propertyFields: { classPropertyName: "propertyFields", publicName: "propertyFields", isSignal: true, isRequired: false, transformFunction: null }, scopeId: { classPropertyName: "scopeId", publicName: "scopeId", isSignal: true, isRequired: false, transformFunction: null }, propertyKeys: { classPropertyName: "propertyKeys", publicName: "propertyKeys", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "grid gap-2" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\
|
|
1438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LookupModuleCheckListField, isStandalone: true, selector: "mt-lookup-module-check-list-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, lookupOptions: { classPropertyName: "lookupOptions", publicName: "lookupOptions", isSignal: true, isRequired: false, transformFunction: null }, propertyFields: { classPropertyName: "propertyFields", publicName: "propertyFields", isSignal: true, isRequired: false, transformFunction: null }, scopeId: { classPropertyName: "scopeId", publicName: "scopeId", isSignal: true, isRequired: false, transformFunction: null }, propertyKeys: { classPropertyName: "propertyKeys", publicName: "propertyKeys", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "grid gap-2" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n @if (label()) {\n <label class=\"font-medium text-color\">\n {{ label() }}\n @if (required()) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n @if (useRichForm()) {\n <ng-container\n [ngComponentOutlet]=\"formComponent!\"\n [ngComponentOutletInputs]=\"formInputs()\"\n />\n } @else if (sections().length) {\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\n <div class=\"flex flex-col gap-2\">\n @for (section of sections(); track section.lookupKey) {\n <div class=\"overflow-hidden rounded-lg border border-surface-200\">\n <button\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\"\n [attr.aria-expanded]=\"isExpanded(section.lookupKey)\"\n (click)=\"toggle(section.lookupKey)\"\n >\n <span class=\"flex min-w-0 items-center gap-2\">\n <mt-icon\n [icon]=\"\n isExpanded(section.lookupKey)\n ? 'arrow.chevron-down'\n : 'arrow.chevron-right'\n \"\n size=\"sm\"\n class=\"shrink-0 text-muted-color rtl:-scale-x-100\"\n />\n <span class=\"truncate text-sm font-medium text-color\">\n {{ section.label }}\n </span>\n </span>\n @if (hasValues(section.lookupKey)) {\n <span\n class=\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\"\n >\n {{ \"components.lookupModuleCheckListField.filled\" | transloco }}\n </span>\n }\n </button>\n\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\n <div class=\"border-t border-surface-200 p-3\">\n <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (field of propertyFields(); track field.key) {\n <label class=\"flex min-w-0 flex-col gap-1\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ field.label }}\n </span>\n @if (isReadonly()) {\n <span class=\"truncate text-sm text-color\">\n {{ fieldValue(section.lookupKey, field.key) || \"_\" }}\n </span>\n } @else {\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"fieldValue(section.lookupKey, field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"\n setFieldValue(section.lookupKey, field.key, $event)\n \"\n />\n }\n </label>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <div\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\n >\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\n </div>\n }\n\n @if (ngControl?.control) {\n <mt-field-validation\n [control]=\"ngControl?.control!\"\n [touched]=\"ngControl?.touched ?? false\"\n />\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1438
1439
|
}
|
|
1439
1440
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, decorators: [{
|
|
1440
1441
|
type: Component,
|
|
@@ -1445,7 +1446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1445
1446
|
Icon,
|
|
1446
1447
|
FieldValidation,
|
|
1447
1448
|
TranslocoPipe,
|
|
1448
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: "<div class=\"flex flex-col gap-2\">\
|
|
1449
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: "<div class=\"flex flex-col gap-2\">\n @if (label()) {\n <label class=\"font-medium text-color\">\n {{ label() }}\n @if (required()) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n @if (useRichForm()) {\n <ng-container\n [ngComponentOutlet]=\"formComponent!\"\n [ngComponentOutletInputs]=\"formInputs()\"\n />\n } @else if (sections().length) {\n <!-- Fallback: plain text inputs per property (no rich form registered) -->\n <div class=\"flex flex-col gap-2\">\n @for (section of sections(); track section.lookupKey) {\n <div class=\"overflow-hidden rounded-lg border border-surface-200\">\n <button\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center justify-between gap-2 bg-surface-50 px-3 py-2 text-start hover:bg-surface-100\"\n [attr.aria-expanded]=\"isExpanded(section.lookupKey)\"\n (click)=\"toggle(section.lookupKey)\"\n >\n <span class=\"flex min-w-0 items-center gap-2\">\n <mt-icon\n [icon]=\"\n isExpanded(section.lookupKey)\n ? 'arrow.chevron-down'\n : 'arrow.chevron-right'\n \"\n size=\"sm\"\n class=\"shrink-0 text-muted-color rtl:-scale-x-100\"\n />\n <span class=\"truncate text-sm font-medium text-color\">\n {{ section.label }}\n </span>\n </span>\n @if (hasValues(section.lookupKey)) {\n <span\n class=\"shrink-0 rounded-full bg-primary-50 px-2 py-0.5 text-xs font-semibold text-primary-700\"\n >\n {{ \"components.lookupModuleCheckListField.filled\" | transloco }}\n </span>\n }\n </button>\n\n @if (isExpanded(section.lookupKey) && propertyFields().length) {\n <div class=\"border-t border-surface-200 p-3\">\n <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (field of propertyFields(); track field.key) {\n <label class=\"flex min-w-0 flex-col gap-1\">\n <span class=\"truncate text-xs text-muted-color\">\n {{ field.label }}\n </span>\n @if (isReadonly()) {\n <span class=\"truncate text-sm text-color\">\n {{ fieldValue(section.lookupKey, field.key) || \"_\" }}\n </span>\n } @else {\n <input\n pInputText\n class=\"w-full\"\n [ngModel]=\"fieldValue(section.lookupKey, field.key)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"\n setFieldValue(section.lookupKey, field.key, $event)\n \"\n />\n }\n </label>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n } @else {\n <div\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\n >\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\n </div>\n }\n\n @if (ngControl?.control) {\n <mt-field-validation\n [control]=\"ngControl?.control!\"\n [touched]=\"ngControl?.touched ?? false\"\n />\n }\n</div>\n" }]
|
|
1449
1450
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], lookupOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookupOptions", required: false }] }], propertyFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyFields", required: false }] }], scopeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "scopeId", required: false }] }], propertyKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyKeys", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }] } });
|
|
1450
1451
|
|
|
1451
1452
|
/**
|