@masterteam/components 0.0.191 → 0.0.193
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/assets/common.css +1 -1
- package/assets/i18n/ar.json +6 -0
- package/assets/i18n/en.json +6 -0
- package/fesm2022/masterteam-components-business-fields.mjs +161 -1
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-client-page-menu.mjs +33 -3
- package/fesm2022/masterteam-components-client-page-menu.mjs.map +1 -1
- package/fesm2022/masterteam-components-client-page.mjs +9 -2
- package/fesm2022/masterteam-components-client-page.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 +90 -15
- package/fesm2022/masterteam-components-entities.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-number-field.mjs +2 -2
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +2 -2
- package/fesm2022/masterteam-components-pick-list-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-table.mjs +4 -4
- 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.mjs +18 -4
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +48 -2
- package/types/masterteam-components-client-page-menu.d.ts +5 -1
- package/types/masterteam-components-client-page.d.ts +1 -1
- package/types/masterteam-components-entities.d.ts +56 -10
- package/types/masterteam-components-table.d.ts +2 -2
- package/types/masterteam-components.d.ts +24 -4
|
@@ -19,6 +19,9 @@ import { Table } from '@masterteam/components/table';
|
|
|
19
19
|
import { Skeleton } from 'primeng/skeleton';
|
|
20
20
|
import { Message } from 'primeng/message';
|
|
21
21
|
import { ModalService } from '@masterteam/components/modal';
|
|
22
|
+
import { Select } from 'primeng/select';
|
|
23
|
+
import * as i2$1 from 'primeng/inputtext';
|
|
24
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
22
25
|
|
|
23
26
|
class LookupMatrixField {
|
|
24
27
|
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
@@ -1183,9 +1186,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1183
1186
|
}, template: "@if (isMultiple()) {\r\n <mt-multi-select-field\r\n [label]=\"label()\"\r\n [placeholder]=\"placeholder()\"\r\n [options]=\"options()\"\r\n [optionLabel]=\"'label'\"\r\n [optionValue]=\"'value'\"\r\n [filter]=\"options().length > 10\"\r\n [showClear]=\"!required()\"\r\n [required]=\"required()\"\r\n [readonly]=\"readonly() || disabled()\"\r\n [ngModel]=\"value()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"onMultiChange($event)\"\r\n />\r\n} @else {\r\n <mt-select-field\r\n [label]=\"label()\"\r\n [placeholder]=\"placeholder()\"\r\n [options]=\"options()\"\r\n [optionLabel]=\"'label'\"\r\n [optionValue]=\"'value'\"\r\n [filter]=\"options().length > 10\"\r\n [showClear]=\"!required()\"\r\n [loading]=\"loading()\"\r\n [required]=\"required()\"\r\n [readonly]=\"readonly() || disabled()\"\r\n [ngModel]=\"singleValue()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"onSingleChange($event)\"\r\n />\r\n}\r\n" }]
|
|
1184
1187
|
}], 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 }] }] } });
|
|
1185
1188
|
|
|
1189
|
+
class LookupModuleCheckListField {
|
|
1190
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
1191
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
1192
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
1193
|
+
/** Lookup items the user can pick for each checklist entry. */
|
|
1194
|
+
lookupOptions = input([], ...(ngDevMode ? [{ debugName: "lookupOptions" }] : /* istanbul ignore next */ []));
|
|
1195
|
+
/** Module property keys/labels captured per checklist entry. */
|
|
1196
|
+
propertyFields = input([], ...(ngDevMode ? [{ debugName: "propertyFields" }] : /* istanbul ignore next */ []));
|
|
1197
|
+
entries = signal([], ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
|
|
1198
|
+
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1199
|
+
ngControl = null;
|
|
1200
|
+
isReadonly = computed(() => this.readonly() || this.disabled(), ...(ngDevMode ? [{ debugName: "isReadonly" }] : /* istanbul ignore next */ []));
|
|
1201
|
+
onTouched = () => { };
|
|
1202
|
+
onModelChange = () => { };
|
|
1203
|
+
constructor() {
|
|
1204
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
1205
|
+
if (this.ngControl) {
|
|
1206
|
+
this.ngControl.valueAccessor = this;
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
// ============================================================================
|
|
1210
|
+
// CVA
|
|
1211
|
+
// ============================================================================
|
|
1212
|
+
writeValue(value) {
|
|
1213
|
+
this.entries.set(this.normalizeIncoming(value));
|
|
1214
|
+
}
|
|
1215
|
+
registerOnChange(fn) {
|
|
1216
|
+
this.onModelChange = fn;
|
|
1217
|
+
}
|
|
1218
|
+
registerOnTouched(fn) {
|
|
1219
|
+
this.onTouched = fn;
|
|
1220
|
+
}
|
|
1221
|
+
setDisabledState(isDisabled) {
|
|
1222
|
+
this.disabled.set(isDisabled);
|
|
1223
|
+
}
|
|
1224
|
+
// ============================================================================
|
|
1225
|
+
// Editing
|
|
1226
|
+
// ============================================================================
|
|
1227
|
+
addEntry() {
|
|
1228
|
+
if (this.isReadonly())
|
|
1229
|
+
return;
|
|
1230
|
+
this.entries.update((current) => [
|
|
1231
|
+
...current,
|
|
1232
|
+
{ lookupKey: '', values: {} },
|
|
1233
|
+
]);
|
|
1234
|
+
this.emit();
|
|
1235
|
+
}
|
|
1236
|
+
removeEntry(index) {
|
|
1237
|
+
if (this.isReadonly())
|
|
1238
|
+
return;
|
|
1239
|
+
this.entries.update((current) => current.filter((_, i) => i !== index));
|
|
1240
|
+
this.emit();
|
|
1241
|
+
}
|
|
1242
|
+
setLookupKey(index, lookupKey) {
|
|
1243
|
+
this.entries.update((current) => current.map((entry, i) => i === index
|
|
1244
|
+
? { ...entry, lookupKey: lookupKey == null ? '' : String(lookupKey) }
|
|
1245
|
+
: entry));
|
|
1246
|
+
this.emit();
|
|
1247
|
+
}
|
|
1248
|
+
setPropValue(index, key, value) {
|
|
1249
|
+
this.entries.update((current) => current.map((entry, i) => i === index
|
|
1250
|
+
? { ...entry, values: { ...entry.values, [key]: value } }
|
|
1251
|
+
: entry));
|
|
1252
|
+
this.emit();
|
|
1253
|
+
}
|
|
1254
|
+
lookupLabel(lookupKey) {
|
|
1255
|
+
const option = this.lookupOptions().find((item) => String(item.value) === lookupKey || item.key === lookupKey);
|
|
1256
|
+
return option?.label ?? lookupKey;
|
|
1257
|
+
}
|
|
1258
|
+
// ============================================================================
|
|
1259
|
+
// Value mapping
|
|
1260
|
+
// ============================================================================
|
|
1261
|
+
emit() {
|
|
1262
|
+
const fields = this.propertyFields();
|
|
1263
|
+
const payload = this.entries()
|
|
1264
|
+
.filter((entry) => entry.lookupKey)
|
|
1265
|
+
.map((entry) => ({
|
|
1266
|
+
lookupKey: entry.lookupKey,
|
|
1267
|
+
props: fields.map((field) => ({
|
|
1268
|
+
key: field.key,
|
|
1269
|
+
value: entry.values[field.key] ?? null,
|
|
1270
|
+
})),
|
|
1271
|
+
}));
|
|
1272
|
+
this.onModelChange(payload.length ? payload : null);
|
|
1273
|
+
this.onTouched();
|
|
1274
|
+
}
|
|
1275
|
+
normalizeIncoming(value) {
|
|
1276
|
+
const raw = this.extractEntries(value);
|
|
1277
|
+
return raw
|
|
1278
|
+
.filter((entry) => entry && typeof entry === 'object')
|
|
1279
|
+
.map((entry) => {
|
|
1280
|
+
const record = entry;
|
|
1281
|
+
const lookupKeyRaw = record['lookupKey'] ?? record['Lookupkey'] ?? record['lookupkey'];
|
|
1282
|
+
const propsRaw = record['props'] ?? record['Props'];
|
|
1283
|
+
const values = {};
|
|
1284
|
+
if (Array.isArray(propsRaw)) {
|
|
1285
|
+
for (const prop of propsRaw) {
|
|
1286
|
+
const propRecord = (prop ?? {});
|
|
1287
|
+
const key = String(propRecord['key'] ?? propRecord['Key'] ?? '');
|
|
1288
|
+
if (!key)
|
|
1289
|
+
continue;
|
|
1290
|
+
values[key] = this.coerceToString(propRecord['value'] ?? propRecord['Value'] ?? null);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
return {
|
|
1294
|
+
lookupKey: lookupKeyRaw == null ? '' : String(lookupKeyRaw),
|
|
1295
|
+
values,
|
|
1296
|
+
};
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
extractEntries(value) {
|
|
1300
|
+
if (Array.isArray(value)) {
|
|
1301
|
+
return value;
|
|
1302
|
+
}
|
|
1303
|
+
const wrapped = value?.items;
|
|
1304
|
+
if (Array.isArray(wrapped)) {
|
|
1305
|
+
return wrapped;
|
|
1306
|
+
}
|
|
1307
|
+
if (typeof value === 'string' && value.trim()) {
|
|
1308
|
+
try {
|
|
1309
|
+
return this.extractEntries(JSON.parse(value));
|
|
1310
|
+
}
|
|
1311
|
+
catch {
|
|
1312
|
+
return [];
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
return [];
|
|
1316
|
+
}
|
|
1317
|
+
coerceToString(value) {
|
|
1318
|
+
if (value === null || value === undefined)
|
|
1319
|
+
return '';
|
|
1320
|
+
if (typeof value === 'object') {
|
|
1321
|
+
try {
|
|
1322
|
+
return JSON.stringify(value);
|
|
1323
|
+
}
|
|
1324
|
+
catch {
|
|
1325
|
+
return String(value);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
return String(value);
|
|
1329
|
+
}
|
|
1330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1331
|
+
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 } }, host: { classAttribute: "grid gap-2" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\r\n @if (label()) {\r\n <label class=\"font-medium text-color\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"text-red-500\">*</span>\r\n }\r\n </label>\r\n }\r\n\r\n @for (entry of entries(); track $index) {\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-50 p-3\">\r\n <div class=\"flex items-start gap-2\">\r\n <div class=\"min-w-0 flex-1\">\r\n @if (isReadonly()) {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\r\n >\r\n {{ lookupLabel(entry.lookupKey) }}\r\n </span>\r\n } @else {\r\n <p-select\r\n [options]=\"lookupOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"lookupOptions().length > 10\"\r\n [showClear]=\"true\"\r\n appendTo=\"body\"\r\n styleClass=\"w-full\"\r\n [placeholder]=\"\r\n 'components.lookupModuleCheckListField.selectLookup' | transloco\r\n \"\r\n [ngModel]=\"entry.lookupKey\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setLookupKey($index, $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (!isReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 rounded-md p-2 text-muted-color hover:bg-surface-100 hover:text-red-600\"\r\n [attr.aria-label]=\"\r\n 'components.lookupModuleCheckListField.removeEntry' | transloco\r\n \"\r\n (click)=\"removeEntry($index)\"\r\n >\r\n <mt-icon icon=\"general.trash-01\" size=\"sm\" />\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (propertyFields().length) {\r\n <div class=\"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (field of propertyFields(); track field.key) {\r\n <label class=\"flex min-w-0 flex-col gap-1\">\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ field.label }}\r\n </span>\r\n @if (isReadonly()) {\r\n <span class=\"truncate text-sm text-color\">\r\n {{ entry.values[field.key] || \"_\" }}\r\n </span>\r\n } @else {\r\n <input\r\n pInputText\r\n class=\"w-full\"\r\n [ngModel]=\"entry.values[field.key] ?? ''\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setPropValue($index, field.key, $event)\"\r\n />\r\n }\r\n </label>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!isReadonly()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"'components.lookupModuleCheckListField.addEntry' | transloco\"\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n variant=\"outlined\"\r\n (onClick)=\"addEntry()\"\r\n />\r\n </div>\r\n } @else if (!entries().length) {\r\n <div\r\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\r\n >\r\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\r\n </div>\r\n }\r\n\r\n @if (ngControl?.control) {\r\n <mt-field-validation\r\n [control]=\"ngControl?.control!\"\r\n [touched]=\"ngControl?.touched ?? false\"\r\n />\r\n }\r\n</div>\r\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: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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 });
|
|
1332
|
+
}
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupModuleCheckListField, decorators: [{
|
|
1334
|
+
type: Component,
|
|
1335
|
+
args: [{ selector: 'mt-lookup-module-check-list-field', standalone: true, imports: [
|
|
1336
|
+
FormsModule,
|
|
1337
|
+
Select,
|
|
1338
|
+
InputTextModule,
|
|
1339
|
+
Button,
|
|
1340
|
+
Icon,
|
|
1341
|
+
FieldValidation,
|
|
1342
|
+
TranslocoPipe,
|
|
1343
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-2' }, template: "<div class=\"flex flex-col gap-2\">\r\n @if (label()) {\r\n <label class=\"font-medium text-color\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"text-red-500\">*</span>\r\n }\r\n </label>\r\n }\r\n\r\n @for (entry of entries(); track $index) {\r\n <div class=\"rounded-lg border border-surface-200 bg-surface-50 p-3\">\r\n <div class=\"flex items-start gap-2\">\r\n <div class=\"min-w-0 flex-1\">\r\n @if (isReadonly()) {\r\n <span\r\n class=\"inline-flex w-fit items-center rounded-md bg-primary-50 px-2 py-1 text-xs font-semibold text-primary-700\"\r\n >\r\n {{ lookupLabel(entry.lookupKey) }}\r\n </span>\r\n } @else {\r\n <p-select\r\n [options]=\"lookupOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"lookupOptions().length > 10\"\r\n [showClear]=\"true\"\r\n appendTo=\"body\"\r\n styleClass=\"w-full\"\r\n [placeholder]=\"\r\n 'components.lookupModuleCheckListField.selectLookup' | transloco\r\n \"\r\n [ngModel]=\"entry.lookupKey\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setLookupKey($index, $event)\"\r\n />\r\n }\r\n </div>\r\n\r\n @if (!isReadonly()) {\r\n <button\r\n type=\"button\"\r\n class=\"shrink-0 rounded-md p-2 text-muted-color hover:bg-surface-100 hover:text-red-600\"\r\n [attr.aria-label]=\"\r\n 'components.lookupModuleCheckListField.removeEntry' | transloco\r\n \"\r\n (click)=\"removeEntry($index)\"\r\n >\r\n <mt-icon icon=\"general.trash-01\" size=\"sm\" />\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (propertyFields().length) {\r\n <div class=\"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (field of propertyFields(); track field.key) {\r\n <label class=\"flex min-w-0 flex-col gap-1\">\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ field.label }}\r\n </span>\r\n @if (isReadonly()) {\r\n <span class=\"truncate text-sm text-color\">\r\n {{ entry.values[field.key] || \"_\" }}\r\n </span>\r\n } @else {\r\n <input\r\n pInputText\r\n class=\"w-full\"\r\n [ngModel]=\"entry.values[field.key] ?? ''\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"setPropValue($index, field.key, $event)\"\r\n />\r\n }\r\n </label>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!isReadonly()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"'components.lookupModuleCheckListField.addEntry' | transloco\"\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n variant=\"outlined\"\r\n (onClick)=\"addEntry()\"\r\n />\r\n </div>\r\n } @else if (!entries().length) {\r\n <div\r\n class=\"rounded border border-dashed border-surface-300 bg-surface-50 p-3 text-sm text-muted-color\"\r\n >\r\n {{ \"components.lookupModuleCheckListField.empty\" | transloco }}\r\n </div>\r\n }\r\n\r\n @if (ngControl?.control) {\r\n <mt-field-validation\r\n [control]=\"ngControl?.control!\"\r\n [touched]=\"ngControl?.touched ?? false\"\r\n />\r\n }\r\n</div>\r\n" }]
|
|
1344
|
+
}], 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 }] }] } });
|
|
1345
|
+
|
|
1186
1346
|
/**
|
|
1187
1347
|
* Generated bundle index. Do not edit.
|
|
1188
1348
|
*/
|
|
1189
1349
|
|
|
1190
|
-
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LookupMatrixField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField };
|
|
1350
|
+
export { ENTITY_LIST_ADD_DIALOG_COMPONENT, EntityListField, LookupMatrixField, LookupModuleCheckListField, ScheduleItemSelectorField, SchedulePredecessorField, SchemaConnectionField };
|
|
1191
1351
|
//# sourceMappingURL=masterteam-components-business-fields.mjs.map
|