@masterteam/components 0.0.165 → 0.0.166
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/assets/i18n/ar.json +128 -0
- package/assets/i18n/en.json +128 -0
- package/fesm2022/masterteam-components-business-fields.mjs +40 -20
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-client-page.mjs +6 -4
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
- package/fesm2022/masterteam-components-drawer.mjs +4 -2
- package/fesm2022/masterteam-components-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +9 -4
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +19 -8
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-formula.mjs +52 -14
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/fesm2022/masterteam-components-icon-field.mjs +4 -3
- package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-module-summary-card.mjs +4 -2
- package/fesm2022/masterteam-components-module-summary-card.mjs.map +1 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +5 -3
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-runtime-action.mjs +21 -13
- package/fesm2022/masterteam-components-runtime-action.mjs.map +1 -1
- package/fesm2022/masterteam-components-sidebar.mjs +3 -2
- package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +22 -13
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-tabs.mjs +4 -2
- package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +5 -1
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-topbar.mjs +3 -2
- package/fesm2022/masterteam-components-topbar.mjs.map +1 -1
- package/fesm2022/masterteam-components-upload-field.mjs +4 -3
- package/fesm2022/masterteam-components-upload-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +5 -6
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-business-fields.d.ts +2 -0
- package/types/masterteam-components-client-page.d.ts +2 -1
- package/types/masterteam-components-drawer.d.ts +1 -0
- package/types/masterteam-components-dynamic-drawer.d.ts +2 -0
- package/types/masterteam-components-entities.d.ts +3 -0
- package/types/masterteam-components-formula.d.ts +7 -3
- package/types/masterteam-components-module-summary-card.d.ts +1 -0
- package/types/masterteam-components-pick-list-field.d.ts +1 -0
- package/types/masterteam-components-runtime-action.d.ts +2 -0
- package/types/masterteam-components-table.d.ts +8 -3
- package/types/masterteam-components-tabs.d.ts +1 -0
- package/types/masterteam-components-text-field.d.ts +2 -1
- package/types/masterteam-components-upload-field.d.ts +1 -0
- package/types/masterteam-components-user-search-field.d.ts +0 -1
package/assets/i18n/ar.json
CHANGED
|
@@ -47,6 +47,99 @@
|
|
|
47
47
|
"select": "اختر",
|
|
48
48
|
"you": "أنا"
|
|
49
49
|
},
|
|
50
|
+
"selectPlaceholder": "اختر...",
|
|
51
|
+
"drawer": {
|
|
52
|
+
"expandFullWidth": "توسيع لعرض كامل",
|
|
53
|
+
"restoreSize": "استعادة الحجم"
|
|
54
|
+
},
|
|
55
|
+
"tabs": {
|
|
56
|
+
"more": "المزيد"
|
|
57
|
+
},
|
|
58
|
+
"sidebar": {
|
|
59
|
+
"logoAlt": "الشعار"
|
|
60
|
+
},
|
|
61
|
+
"topbar": {
|
|
62
|
+
"logoAlt": "الشعار"
|
|
63
|
+
},
|
|
64
|
+
"iconField": {
|
|
65
|
+
"selectIcon": "اختر أيقونة"
|
|
66
|
+
},
|
|
67
|
+
"textField": {
|
|
68
|
+
"showPassword": "إظهار كلمة المرور",
|
|
69
|
+
"hidePassword": "إخفاء كلمة المرور"
|
|
70
|
+
},
|
|
71
|
+
"pickListField": {
|
|
72
|
+
"available": "المتاحة",
|
|
73
|
+
"selected": "المحددة"
|
|
74
|
+
},
|
|
75
|
+
"uploadField": {
|
|
76
|
+
"uploadFile": "رفع ملف",
|
|
77
|
+
"clickOrDrop": "انقر أو أسقط ملفًا للرفع"
|
|
78
|
+
},
|
|
79
|
+
"clientPage": {
|
|
80
|
+
"expandMenu": "توسيع القائمة",
|
|
81
|
+
"collapseMenu": "طي القائمة",
|
|
82
|
+
"expandSidebar": "توسيع الشريط الجانبي",
|
|
83
|
+
"collapseSidebar": "طي الشريط الجانبي"
|
|
84
|
+
},
|
|
85
|
+
"moduleSummaryCard": {
|
|
86
|
+
"actionLabel": "إجراء"
|
|
87
|
+
},
|
|
88
|
+
"entitiesPreview": {
|
|
89
|
+
"filterByThis": "انقر للتصفية بهذه القيمة",
|
|
90
|
+
"clearFilter": "انقر لمسح التصفية",
|
|
91
|
+
"attachment": "مرفق"
|
|
92
|
+
},
|
|
93
|
+
"comparisonEntities": {
|
|
94
|
+
"added": "مضاف",
|
|
95
|
+
"updated": "محدّث",
|
|
96
|
+
"removed": "محذوف"
|
|
97
|
+
},
|
|
98
|
+
"entityListField": {
|
|
99
|
+
"add": "إضافة",
|
|
100
|
+
"edit": "تعديل",
|
|
101
|
+
"delete": "حذف",
|
|
102
|
+
"readingNotAllowed": "القراءة غير مسموح بها لهذا الحقل.",
|
|
103
|
+
"saveFormFirst": "احفظ النموذج أولاً لإدارة العناصر المرتبطة.",
|
|
104
|
+
"noRelatedItems": "لا توجد عناصر مرتبطة.",
|
|
105
|
+
"loadFailed": "فشل تحميل العناصر المرتبطة"
|
|
106
|
+
},
|
|
107
|
+
"lookupMatrixField": {
|
|
108
|
+
"xAxisFallback": "س",
|
|
109
|
+
"yAxisFallback": "ص",
|
|
110
|
+
"firstValueFallback": "القيمة الأولى",
|
|
111
|
+
"secondValueFallback": "القيمة الثانية",
|
|
112
|
+
"selectAxesFirst": "اختر {{xAxisLabel}} و {{yAxisLabel}} أولاً.",
|
|
113
|
+
"noMatchingValue": "لا توجد قيمة مطابقة للمجموعة المختارة."
|
|
114
|
+
},
|
|
115
|
+
"formulaEditor": {
|
|
116
|
+
"removeFunction": "إزالة الدالة",
|
|
117
|
+
"remove": "إزالة"
|
|
118
|
+
},
|
|
119
|
+
"runtimeAction": {
|
|
120
|
+
"missingArgs": "تعذر تنفيذ {{action}}. مفقود: {{missing}}",
|
|
121
|
+
"confirmDefault": "تأكيد {{action}} لهذا العنصر.",
|
|
122
|
+
"executeFailed": "فشل تنفيذ {{action}}",
|
|
123
|
+
"notAvailable": "الإجراء {{action}} غير متاح.",
|
|
124
|
+
"noUrl": "الإجراء {{action}} لا يحتوي على رابط.",
|
|
125
|
+
"noHttpMethod": "الإجراء {{action}} لا يحتوي على طريقة HTTP."
|
|
126
|
+
},
|
|
127
|
+
"formulaOperators": {
|
|
128
|
+
"add": { "name": "جمع", "description": "الجمع" },
|
|
129
|
+
"subtract": { "name": "طرح", "description": "الطرح" },
|
|
130
|
+
"multiply": { "name": "ضرب", "description": "الضرب" },
|
|
131
|
+
"divide": { "name": "قسمة", "description": "القسمة" },
|
|
132
|
+
"modulo": { "name": "باقي", "description": "باقي القسمة" },
|
|
133
|
+
"equal": { "name": "يساوي", "description": "يساوي" },
|
|
134
|
+
"notEqual": { "name": "لا يساوي", "description": "لا يساوي" },
|
|
135
|
+
"greater": { "name": "أكبر", "description": "أكبر من" },
|
|
136
|
+
"less": { "name": "أصغر", "description": "أصغر من" },
|
|
137
|
+
"greaterOrEqual": { "name": "أكبر أو يساوي", "description": "أكبر من أو يساوي" },
|
|
138
|
+
"lessOrEqual": { "name": "أصغر أو يساوي", "description": "أصغر من أو يساوي" },
|
|
139
|
+
"and": { "name": "و", "description": "و منطقية" },
|
|
140
|
+
"or": { "name": "أو", "description": "أو منطقية" },
|
|
141
|
+
"not": { "name": "نفي", "description": "نفي منطقي" }
|
|
142
|
+
},
|
|
50
143
|
"tree": {
|
|
51
144
|
"no-data-found": "لا توجد بيانات",
|
|
52
145
|
"search": "بحث",
|
|
@@ -143,6 +236,41 @@
|
|
|
143
236
|
"pattern": "الصيغة غير صحيحة",
|
|
144
237
|
"fileSizeLimited": "حجم الملف يتجاوز الحد المسموح",
|
|
145
238
|
"invalid": "حقل غير صحيح: {{key}}"
|
|
239
|
+
},
|
|
240
|
+
"clientComponents": {
|
|
241
|
+
"instancePreview": {
|
|
242
|
+
"noPreviewData": "لا توجد بيانات معاينة لهذا السجل.",
|
|
243
|
+
"loadFailed": "فشل تحميل معاينة السجل"
|
|
244
|
+
},
|
|
245
|
+
"list": {
|
|
246
|
+
"informativeDashboard": "لوحة معلومات",
|
|
247
|
+
"cards": "البطاقات",
|
|
248
|
+
"table": "الجدول",
|
|
249
|
+
"noCardsFound": "لا توجد بطاقات.",
|
|
250
|
+
"noInformativeDashboard": "لا توجد لوحة معلومات.",
|
|
251
|
+
"errors": {
|
|
252
|
+
"tableRowsLoadFailed": "فشل تحميل صفوف الجدول",
|
|
253
|
+
"rowsLoadFailed": "فشل تحميل الصفوف",
|
|
254
|
+
"cardsLoadFailed": "فشل تحميل البطاقات",
|
|
255
|
+
"informativeLoadFailed": "فشل تحميل لوحة المعلومات",
|
|
256
|
+
"missingModuleId": "معرفات مفقودة: moduleId مطلوب",
|
|
257
|
+
"missingContextKey": "معرفات مفقودة: contextKey مطلوب",
|
|
258
|
+
"missingContextAndInstance": "معرفات مفقودة: contextKey و instanceId مطلوبان"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"escalation": {
|
|
262
|
+
"cancel": "إلغاء",
|
|
263
|
+
"escalationUp": "تصعيد",
|
|
264
|
+
"currentUser": "المستخدم الحالي",
|
|
265
|
+
"escalatedBy": "تم التصعيد بواسطة",
|
|
266
|
+
"startDate": "تاريخ البداية",
|
|
267
|
+
"reason": "السبب",
|
|
268
|
+
"reasonPlaceholder": "اوصف سبب التصعيد",
|
|
269
|
+
"attachments": "المرفقات",
|
|
270
|
+
"uploadHelp": "رفع ملفات داعمة",
|
|
271
|
+
"reasonRequired": "السبب مطلوب.",
|
|
272
|
+
"createFailed": "فشل إنشاء التصعيد."
|
|
273
|
+
}
|
|
146
274
|
}
|
|
147
275
|
}
|
|
148
276
|
}
|
package/assets/i18n/en.json
CHANGED
|
@@ -47,6 +47,99 @@
|
|
|
47
47
|
"select": "Select",
|
|
48
48
|
"you": "Me"
|
|
49
49
|
},
|
|
50
|
+
"selectPlaceholder": "Select...",
|
|
51
|
+
"drawer": {
|
|
52
|
+
"expandFullWidth": "Expand to full width",
|
|
53
|
+
"restoreSize": "Restore size"
|
|
54
|
+
},
|
|
55
|
+
"tabs": {
|
|
56
|
+
"more": "More"
|
|
57
|
+
},
|
|
58
|
+
"sidebar": {
|
|
59
|
+
"logoAlt": "Logo"
|
|
60
|
+
},
|
|
61
|
+
"topbar": {
|
|
62
|
+
"logoAlt": "Logo"
|
|
63
|
+
},
|
|
64
|
+
"iconField": {
|
|
65
|
+
"selectIcon": "Select Icon"
|
|
66
|
+
},
|
|
67
|
+
"textField": {
|
|
68
|
+
"showPassword": "Show password",
|
|
69
|
+
"hidePassword": "Hide password"
|
|
70
|
+
},
|
|
71
|
+
"pickListField": {
|
|
72
|
+
"available": "Available",
|
|
73
|
+
"selected": "Selected"
|
|
74
|
+
},
|
|
75
|
+
"uploadField": {
|
|
76
|
+
"uploadFile": "Upload File",
|
|
77
|
+
"clickOrDrop": "Click or drop a file to upload"
|
|
78
|
+
},
|
|
79
|
+
"clientPage": {
|
|
80
|
+
"expandMenu": "Expand menu",
|
|
81
|
+
"collapseMenu": "Collapse menu",
|
|
82
|
+
"expandSidebar": "Expand sidebar",
|
|
83
|
+
"collapseSidebar": "Collapse sidebar"
|
|
84
|
+
},
|
|
85
|
+
"moduleSummaryCard": {
|
|
86
|
+
"actionLabel": "Action"
|
|
87
|
+
},
|
|
88
|
+
"entitiesPreview": {
|
|
89
|
+
"filterByThis": "Click to filter by this value",
|
|
90
|
+
"clearFilter": "Click to clear filter",
|
|
91
|
+
"attachment": "Attachment"
|
|
92
|
+
},
|
|
93
|
+
"comparisonEntities": {
|
|
94
|
+
"added": "Added",
|
|
95
|
+
"updated": "Updated",
|
|
96
|
+
"removed": "Removed"
|
|
97
|
+
},
|
|
98
|
+
"entityListField": {
|
|
99
|
+
"add": "Add",
|
|
100
|
+
"edit": "Edit",
|
|
101
|
+
"delete": "Delete",
|
|
102
|
+
"readingNotAllowed": "Reading is not allowed for this field.",
|
|
103
|
+
"saveFormFirst": "Save the form first to manage related items.",
|
|
104
|
+
"noRelatedItems": "No related items.",
|
|
105
|
+
"loadFailed": "Failed to load related items"
|
|
106
|
+
},
|
|
107
|
+
"lookupMatrixField": {
|
|
108
|
+
"xAxisFallback": "X",
|
|
109
|
+
"yAxisFallback": "Y",
|
|
110
|
+
"firstValueFallback": "the first value",
|
|
111
|
+
"secondValueFallback": "the second value",
|
|
112
|
+
"selectAxesFirst": "Select {{xAxisLabel}} and {{yAxisLabel}} first.",
|
|
113
|
+
"noMatchingValue": "No matching value for the selected combination."
|
|
114
|
+
},
|
|
115
|
+
"formulaEditor": {
|
|
116
|
+
"removeFunction": "Remove function",
|
|
117
|
+
"remove": "Remove"
|
|
118
|
+
},
|
|
119
|
+
"runtimeAction": {
|
|
120
|
+
"missingArgs": "Cannot execute {{action}}. Missing: {{missing}}",
|
|
121
|
+
"confirmDefault": "Confirm {{action}} for this item.",
|
|
122
|
+
"executeFailed": "Failed to execute {{action}}",
|
|
123
|
+
"notAvailable": "Action {{action}} is not available.",
|
|
124
|
+
"noUrl": "Action {{action}} has no url.",
|
|
125
|
+
"noHttpMethod": "Action {{action}} has no http method."
|
|
126
|
+
},
|
|
127
|
+
"formulaOperators": {
|
|
128
|
+
"add": { "name": "Add", "description": "Addition" },
|
|
129
|
+
"subtract": { "name": "Subtract", "description": "Subtraction" },
|
|
130
|
+
"multiply": { "name": "Multiply", "description": "Multiplication" },
|
|
131
|
+
"divide": { "name": "Divide", "description": "Division" },
|
|
132
|
+
"modulo": { "name": "Modulo", "description": "Modulo" },
|
|
133
|
+
"equal": { "name": "Equal", "description": "Equal to" },
|
|
134
|
+
"notEqual": { "name": "Not Equal", "description": "Not equal to" },
|
|
135
|
+
"greater": { "name": "Greater", "description": "Greater than" },
|
|
136
|
+
"less": { "name": "Less", "description": "Less than" },
|
|
137
|
+
"greaterOrEqual": { "name": "Greater or Equal", "description": "Greater than or equal" },
|
|
138
|
+
"lessOrEqual": { "name": "Less or Equal", "description": "Less than or equal" },
|
|
139
|
+
"and": { "name": "And", "description": "Logical AND" },
|
|
140
|
+
"or": { "name": "Or", "description": "Logical OR" },
|
|
141
|
+
"not": { "name": "Not", "description": "Logical NOT" }
|
|
142
|
+
},
|
|
50
143
|
"tree": {
|
|
51
144
|
"no-data-found": "No data found",
|
|
52
145
|
"search": "Search",
|
|
@@ -122,6 +215,41 @@
|
|
|
122
215
|
"pattern": "The format is invalid",
|
|
123
216
|
"fileSizeLimited": "File size exceeds the limit",
|
|
124
217
|
"invalid": "Invalid field: {{key}}"
|
|
218
|
+
},
|
|
219
|
+
"clientComponents": {
|
|
220
|
+
"instancePreview": {
|
|
221
|
+
"noPreviewData": "No preview data is available for this instance.",
|
|
222
|
+
"loadFailed": "Failed to load instance preview"
|
|
223
|
+
},
|
|
224
|
+
"list": {
|
|
225
|
+
"informativeDashboard": "Informative Dashboard",
|
|
226
|
+
"cards": "Cards",
|
|
227
|
+
"table": "Table",
|
|
228
|
+
"noCardsFound": "No cards found.",
|
|
229
|
+
"noInformativeDashboard": "No informative dashboard found.",
|
|
230
|
+
"errors": {
|
|
231
|
+
"tableRowsLoadFailed": "Failed to load table rows",
|
|
232
|
+
"rowsLoadFailed": "Failed to load rows",
|
|
233
|
+
"cardsLoadFailed": "Failed to load cards",
|
|
234
|
+
"informativeLoadFailed": "Failed to load informative dashboard",
|
|
235
|
+
"missingModuleId": "Missing identifiers: moduleId is required",
|
|
236
|
+
"missingContextKey": "Missing identifiers: contextKey is required",
|
|
237
|
+
"missingContextAndInstance": "Missing identifiers: contextKey and instanceId are required"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"escalation": {
|
|
241
|
+
"cancel": "Cancel",
|
|
242
|
+
"escalationUp": "Escalation Up",
|
|
243
|
+
"currentUser": "Current User",
|
|
244
|
+
"escalatedBy": "Escalated By",
|
|
245
|
+
"startDate": "Start Date",
|
|
246
|
+
"reason": "Reason",
|
|
247
|
+
"reasonPlaceholder": "Describe the escalation reason",
|
|
248
|
+
"attachments": "Attachments",
|
|
249
|
+
"uploadHelp": "Upload supporting files",
|
|
250
|
+
"reasonRequired": "Reason is required.",
|
|
251
|
+
"createFailed": "Failed to create escalation."
|
|
252
|
+
}
|
|
125
253
|
}
|
|
126
254
|
}
|
|
127
255
|
}
|
|
@@ -5,6 +5,8 @@ import { input, inject, DestroyRef, signal, computed, ChangeDetectionStrategy, C
|
|
|
5
5
|
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i1$1 from '@angular/forms';
|
|
7
7
|
import { ControlContainer, Validators, NgControl, FormsModule } from '@angular/forms';
|
|
8
|
+
import * as i2 from '@jsverse/transloco';
|
|
9
|
+
import { TranslocoService, TranslocoPipe, TranslocoModule } from '@jsverse/transloco';
|
|
8
10
|
import { startWith, finalize, catchError, of, take } from 'rxjs';
|
|
9
11
|
import { Tooltip } from '@masterteam/components/tooltip';
|
|
10
12
|
import { Icon } from '@masterteam/icons';
|
|
@@ -12,8 +14,6 @@ import { SelectField } from '@masterteam/components/select-field';
|
|
|
12
14
|
import { MultiSelectField } from '@masterteam/components/multi-select-field';
|
|
13
15
|
import { FieldValidation } from '@masterteam/components/field-validation';
|
|
14
16
|
import { HttpClient } from '@angular/common/http';
|
|
15
|
-
import * as i2 from '@jsverse/transloco';
|
|
16
|
-
import { TranslocoService, TranslocoModule } from '@jsverse/transloco';
|
|
17
17
|
import { Button } from '@masterteam/components/button';
|
|
18
18
|
import { NumberField } from '@masterteam/components/number-field';
|
|
19
19
|
import { Table } from '@masterteam/components/table';
|
|
@@ -27,6 +27,7 @@ class LookupMatrixField {
|
|
|
27
27
|
optional: true,
|
|
28
28
|
});
|
|
29
29
|
destroyRef = inject(DestroyRef);
|
|
30
|
+
transloco = inject(TranslocoService);
|
|
30
31
|
valueVersion = signal(0, ...(ngDevMode ? [{ debugName: "valueVersion" }] : /* istanbul ignore next */ []));
|
|
31
32
|
xOptions = computed(() => this.config().xOptions ?? [], ...(ngDevMode ? [{ debugName: "xOptions" }] : /* istanbul ignore next */ []));
|
|
32
33
|
yOptions = computed(() => this.config().yOptions ?? [], ...(ngDevMode ? [{ debugName: "yOptions" }] : /* istanbul ignore next */ []));
|
|
@@ -53,8 +54,10 @@ class LookupMatrixField {
|
|
|
53
54
|
}, ...(ngDevMode ? [{ debugName: "activeCell" }] : /* istanbul ignore next */ []));
|
|
54
55
|
selectionSummary = computed(() => {
|
|
55
56
|
const parts = [];
|
|
56
|
-
const xAxisLabel = this.config().xAxisLabel.trim() ||
|
|
57
|
-
|
|
57
|
+
const xAxisLabel = this.config().xAxisLabel.trim() ||
|
|
58
|
+
this.transloco.translate('components.lookupMatrixField.xAxisFallback');
|
|
59
|
+
const yAxisLabel = this.config().yAxisLabel.trim() ||
|
|
60
|
+
this.transloco.translate('components.lookupMatrixField.yAxisFallback');
|
|
58
61
|
const selectedX = this.selectedXOption();
|
|
59
62
|
const selectedY = this.selectedYOption();
|
|
60
63
|
if (selectedX) {
|
|
@@ -66,15 +69,17 @@ class LookupMatrixField {
|
|
|
66
69
|
return parts.join(' / ');
|
|
67
70
|
}, ...(ngDevMode ? [{ debugName: "selectionSummary" }] : /* istanbul ignore next */ []));
|
|
68
71
|
pendingMessage = computed(() => {
|
|
69
|
-
const xAxisLabel = this.config().xAxisLabel.trim() ||
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
const xAxisLabel = this.config().xAxisLabel.trim() ||
|
|
73
|
+
this.transloco.translate('components.lookupMatrixField.firstValueFallback');
|
|
74
|
+
const yAxisLabel = this.config().yAxisLabel.trim() ||
|
|
75
|
+
this.transloco.translate('components.lookupMatrixField.secondValueFallback');
|
|
76
|
+
return this.transloco.translate('components.lookupMatrixField.selectAxesFirst', { xAxisLabel, yAxisLabel });
|
|
72
77
|
}, ...(ngDevMode ? [{ debugName: "pendingMessage" }] : /* istanbul ignore next */ []));
|
|
73
78
|
missingResultMessage = computed(() => {
|
|
74
79
|
if (!this.selectedXOption() || !this.selectedYOption()) {
|
|
75
80
|
return this.pendingMessage();
|
|
76
81
|
}
|
|
77
|
-
return '
|
|
82
|
+
return this.transloco.translate('components.lookupMatrixField.noMatchingValue');
|
|
78
83
|
}, ...(ngDevMode ? [{ debugName: "missingResultMessage" }] : /* istanbul ignore next */ []));
|
|
79
84
|
constructor() {
|
|
80
85
|
const control = this.controlContainer?.control;
|
|
@@ -127,13 +132,13 @@ class LookupMatrixField {
|
|
|
127
132
|
return `var(--p-${color}-500)`;
|
|
128
133
|
}
|
|
129
134
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupMatrixField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
130
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LookupMatrixField, isStandalone: true, selector: "mt-lookup-matrix-field", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "grid gap-2" }, ngImport: i0, template: "@if (config().label) {\r\n <label class=\"
|
|
135
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LookupMatrixField, isStandalone: true, selector: "mt-lookup-matrix-field", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "grid gap-2" }, ngImport: i0, template: "@if (config().label) {\r\n <label class=\"font-medium text-color\">\r\n {{ config().label }}\r\n </label>\r\n}\r\n\r\n<div\r\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\"\r\n>\r\n @if (activeCell(); as cell) {\r\n <div class=\"flex flex-1 min-h-6 items-center gap-2 justify-between\">\r\n <span\r\n class=\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\"\r\n [ngStyle]=\"getSwatchStyle(cell.color)\"\r\n ></span>\r\n\r\n <div class=\"min-w-0 flex-1 py-2 flex items-center justify-between\">\r\n <div class=\"truncate font-semibold text-gray-500\">\r\n {{ cell.label }}\r\n </div>\r\n\r\n @if (selectionSummary()) {\r\n <div class=\"font-bold text-gray-500\">\r\n <mt-icon\r\n [mtTooltip]=\"selectionSummary()\"\r\n icon=\"general.info-circle\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"flex min-h-6 items-center text-muted-color py-2\">\r\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
131
136
|
}
|
|
132
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LookupMatrixField, decorators: [{
|
|
133
138
|
type: Component,
|
|
134
139
|
args: [{ selector: 'mt-lookup-matrix-field', standalone: true, imports: [CommonModule, Tooltip, Icon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
135
140
|
class: 'grid gap-2',
|
|
136
|
-
}, template: "@if (config().label) {\r\n <label class=\"
|
|
141
|
+
}, template: "@if (config().label) {\r\n <label class=\"font-medium text-color\">\r\n {{ config().label }}\r\n </label>\r\n}\r\n\r\n<div\r\n class=\"rounded-lg border border-surface-200 bg-surface-50 px-3 flex items-center\"\r\n>\r\n @if (activeCell(); as cell) {\r\n <div class=\"flex flex-1 min-h-6 items-center gap-2 justify-between\">\r\n <span\r\n class=\"h-6 w-2 shrink-0 rounded-[2px] border border-surface-200\"\r\n [ngStyle]=\"getSwatchStyle(cell.color)\"\r\n ></span>\r\n\r\n <div class=\"min-w-0 flex-1 py-2 flex items-center justify-between\">\r\n <div class=\"truncate font-semibold text-gray-500\">\r\n {{ cell.label }}\r\n </div>\r\n\r\n @if (selectionSummary()) {\r\n <div class=\"font-bold text-gray-500\">\r\n <mt-icon\r\n [mtTooltip]=\"selectionSummary()\"\r\n icon=\"general.info-circle\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n } @else {\r\n <div class=\"flex min-h-6 items-center text-muted-color py-2\">\r\n {{ hasMatrix() ? missingResultMessage() : config().emptyMessage }}\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
137
142
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
138
143
|
|
|
139
144
|
class SchemaConnectionField {
|
|
@@ -352,13 +357,19 @@ class SchemaConnectionField {
|
|
|
352
357
|
this.disabled.set(disabled);
|
|
353
358
|
}
|
|
354
359
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchemaConnectionField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
355
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SchemaConnectionField, isStandalone: true, selector: "mt-schema-connection-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 }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "grid gap-1" }, ngImport: i0, template: "<!-- @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n} -->\r\n\r\n<div class=\"flex gap-4 w-full\">\r\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\r\n <div [style.width]=\"dropdownWidth()\" class=\"min-w-0\">\r\n @if (sourceLevelStates().length > 0) {\r\n <span class=\"text-sm text-muted-color mb-1 block truncate\">\r\n {{\r\n state.source.name?.en ||\r\n state.source.levelKey ||\r\n state.source.moduleKey\r\n }}\r\n </span>\r\n }\r\n\r\n @if (state.source.allowManyToMany) {\r\n <mt-multi-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"placeholder()
|
|
360
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SchemaConnectionField, isStandalone: true, selector: "mt-schema-connection-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 }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "grid gap-1" }, ngImport: i0, template: "<!-- @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n} -->\r\n\r\n<div class=\"flex gap-4 w-full\">\r\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\r\n <div [style.width]=\"dropdownWidth()\" class=\"min-w-0\">\r\n @if (sourceLevelStates().length > 0) {\r\n <span class=\"text-sm text-muted-color mb-1 block truncate\">\r\n {{\r\n state.source.name?.en ||\r\n state.source.levelKey ||\r\n state.source.moduleKey\r\n }}\r\n </span>\r\n }\r\n\r\n @if (state.source.allowManyToMany) {\r\n <mt-multi-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"\r\n placeholder() ||\r\n state.source.name?.en ||\r\n ('components.selectPlaceholder' | transloco)\r\n \"\r\n [readonly]=\"disabled() || readonly()\"\r\n [filter]=\"filter()\"\r\n [showClear]=\"true\"\r\n display=\"chip\"\r\n />\r\n } @else {\r\n <mt-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"\r\n placeholder() ||\r\n state.source.name?.en ||\r\n ('components.selectPlaceholder' | transloco)\r\n \"\r\n [readonly]=\"disabled() || readonly()\"\r\n [filter]=\"filter()\"\r\n [loading]=\"state.loading\"\r\n [showClear]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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"] }, { 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", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
356
361
|
}
|
|
357
362
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SchemaConnectionField, decorators: [{
|
|
358
363
|
type: Component,
|
|
359
|
-
args: [{ selector: 'mt-schema-connection-field', standalone: true, imports: [
|
|
364
|
+
args: [{ selector: 'mt-schema-connection-field', standalone: true, imports: [
|
|
365
|
+
FormsModule,
|
|
366
|
+
SelectField,
|
|
367
|
+
MultiSelectField,
|
|
368
|
+
FieldValidation,
|
|
369
|
+
TranslocoPipe,
|
|
370
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
360
371
|
class: 'grid gap-1',
|
|
361
|
-
}, template: "<!-- @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n} -->\r\n\r\n<div class=\"flex gap-4 w-full\">\r\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\r\n <div [style.width]=\"dropdownWidth()\" class=\"min-w-0\">\r\n @if (sourceLevelStates().length > 0) {\r\n <span class=\"text-sm text-muted-color mb-1 block truncate\">\r\n {{\r\n state.source.name?.en ||\r\n state.source.levelKey ||\r\n state.source.moduleKey\r\n }}\r\n </span>\r\n }\r\n\r\n @if (state.source.allowManyToMany) {\r\n <mt-multi-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"placeholder()
|
|
372
|
+
}, template: "<!-- @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >\r\n {{ label() }}\r\n </label>\r\n} -->\r\n\r\n<div class=\"flex gap-4 w-full\">\r\n @for (state of sourceLevelStates(); track getSourceId(state.source)) {\r\n <div [style.width]=\"dropdownWidth()\" class=\"min-w-0\">\r\n @if (sourceLevelStates().length > 0) {\r\n <span class=\"text-sm text-muted-color mb-1 block truncate\">\r\n {{\r\n state.source.name?.en ||\r\n state.source.levelKey ||\r\n state.source.moduleKey\r\n }}\r\n </span>\r\n }\r\n\r\n @if (state.source.allowManyToMany) {\r\n <mt-multi-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"\r\n placeholder() ||\r\n state.source.name?.en ||\r\n ('components.selectPlaceholder' | transloco)\r\n \"\r\n [readonly]=\"disabled() || readonly()\"\r\n [filter]=\"filter()\"\r\n [showClear]=\"true\"\r\n display=\"chip\"\r\n />\r\n } @else {\r\n <mt-select-field\r\n [field]=\"false\"\r\n [(ngModel)]=\"selections[getSourceId(state.source)]\"\r\n (ngModelChange)=\"syncValue()\"\r\n [options]=\"state.options\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [placeholder]=\"\r\n placeholder() ||\r\n state.source.name?.en ||\r\n ('components.selectPlaceholder' | transloco)\r\n \"\r\n [readonly]=\"disabled() || readonly()\"\r\n [filter]=\"filter()\"\r\n [loading]=\"state.loading\"\r\n [showClear]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n" }]
|
|
362
373
|
}], 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 }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "configuration", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
363
374
|
|
|
364
375
|
const PREDECESSOR_TYPE_BY_TOKEN = {
|
|
@@ -697,6 +708,7 @@ class EntityListField {
|
|
|
697
708
|
http = inject(HttpClient);
|
|
698
709
|
destroyRef = inject(DestroyRef);
|
|
699
710
|
modal = inject(ModalService);
|
|
711
|
+
transloco = inject(TranslocoService);
|
|
700
712
|
/**
|
|
701
713
|
* Optional rich add-row dialog (provided by `@masterteam/forms` via
|
|
702
714
|
* `provideEntityListAddForm()`). When available, used instead of the local
|
|
@@ -763,12 +775,12 @@ class EntityListField {
|
|
|
763
775
|
writeRowActions = computed(() => [
|
|
764
776
|
{
|
|
765
777
|
icon: 'custom.pencil',
|
|
766
|
-
tooltip: '
|
|
778
|
+
tooltip: this.transloco.translate('components.entityListField.edit'),
|
|
767
779
|
action: (row) => this.openEditDialog(row),
|
|
768
780
|
},
|
|
769
781
|
{
|
|
770
782
|
icon: 'general.trash-01',
|
|
771
|
-
tooltip: '
|
|
783
|
+
tooltip: this.transloco.translate('components.entityListField.delete'),
|
|
772
784
|
color: 'danger',
|
|
773
785
|
confirmation: {
|
|
774
786
|
type: 'popup',
|
|
@@ -784,7 +796,7 @@ class EntityListField {
|
|
|
784
796
|
if (!component)
|
|
785
797
|
return;
|
|
786
798
|
const ref = this.modal.openModal(component, 'dialog', {
|
|
787
|
-
header: '
|
|
799
|
+
header: this.transloco.translate('components.entityListField.add'),
|
|
788
800
|
styleClass: '!w-[48rem] max-w-[96vw]',
|
|
789
801
|
dismissableMask: true,
|
|
790
802
|
inputValues: {
|
|
@@ -813,7 +825,7 @@ class EntityListField {
|
|
|
813
825
|
return;
|
|
814
826
|
const originalValues = row['__values'] ?? {};
|
|
815
827
|
const ref = this.modal.openModal(component, 'dialog', {
|
|
816
|
-
header: '
|
|
828
|
+
header: this.transloco.translate('components.entityListField.edit'),
|
|
817
829
|
styleClass: '!w-[48rem] max-w-[96vw]',
|
|
818
830
|
dismissableMask: true,
|
|
819
831
|
inputValues: {
|
|
@@ -891,7 +903,7 @@ class EntityListField {
|
|
|
891
903
|
.post('fetch/query', body, ctx ? { context: ctx } : {})
|
|
892
904
|
.pipe(takeUntilDestroyed(this.destroyRef), finalize(() => this.loading.set(false)), catchError((err) => {
|
|
893
905
|
console.error('EntityList fetch/query failed', err);
|
|
894
|
-
this.errorMessage.set('
|
|
906
|
+
this.errorMessage.set(this.transloco.translate('components.entityListField.loadFailed'));
|
|
895
907
|
return of({});
|
|
896
908
|
}))
|
|
897
909
|
.subscribe((response) => {
|
|
@@ -965,11 +977,19 @@ class EntityListField {
|
|
|
965
977
|
};
|
|
966
978
|
}
|
|
967
979
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListField, isStandalone: true, selector: "mt-entity-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 }, propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", 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: "grid gap-1" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\r\n @if (label()) {\r\n <label class=\"
|
|
980
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityListField, isStandalone: true, selector: "mt-entity-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 }, propertyId: { classPropertyName: "propertyId", publicName: "propertyId", isSignal: true, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", 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: "grid gap-1" }, 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 @if (errorMessage(); as err) {\r\n <p-message severity=\"error\" [text]=\"err\" styleClass=\"w-full\" />\r\n } @else if (canWrite()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"'components.entityListField.add' | transloco\"\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n [disabled]=\"disabled()\"\r\n (onClick)=\"openAddDialog()\"\r\n />\r\n </div>\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"displayRows()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"writeRowActions()\"\r\n dataKey=\"Id\"\r\n [loading]=\"loading()\"\r\n />\r\n } @else if (!canRead()) {\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.entityListField.readingNotAllowed\" | transloco }}\r\n </div>\r\n } @else if (!hasRequiredContext()) {\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.entityListField.saveFormFirst\" | transloco }}\r\n </div>\r\n } @else if (loading() && !hasRows()) {\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"100%\" height=\"3rem\" />\r\n <p-skeleton width=\"100%\" height=\"3rem\" />\r\n </div>\r\n } @else if (!hasRows()) {\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.entityListField.noRelatedItems\" | transloco }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"rows()\"\r\n [columns]=\"columns()\"\r\n dataKey=\"Id\"\r\n [loading]=\"loading()\"\r\n />\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", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "exportable", "printable", "groupable", "cellClickFilter", "freezeActions", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange"] }, { 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: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
969
981
|
}
|
|
970
982
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityListField, decorators: [{
|
|
971
983
|
type: Component,
|
|
972
|
-
args: [{ selector: 'mt-entity-list-field', standalone: true, imports: [
|
|
984
|
+
args: [{ selector: 'mt-entity-list-field', standalone: true, imports: [
|
|
985
|
+
CommonModule,
|
|
986
|
+
FieldValidation,
|
|
987
|
+
Skeleton,
|
|
988
|
+
Message,
|
|
989
|
+
Table,
|
|
990
|
+
Button,
|
|
991
|
+
TranslocoPipe,
|
|
992
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'grid gap-1' }, 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 @if (errorMessage(); as err) {\r\n <p-message severity=\"error\" [text]=\"err\" styleClass=\"w-full\" />\r\n } @else if (canWrite()) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"'components.entityListField.add' | transloco\"\r\n icon=\"general.plus\"\r\n size=\"small\"\r\n [disabled]=\"disabled()\"\r\n (onClick)=\"openAddDialog()\"\r\n />\r\n </div>\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"displayRows()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"writeRowActions()\"\r\n dataKey=\"Id\"\r\n [loading]=\"loading()\"\r\n />\r\n } @else if (!canRead()) {\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.entityListField.readingNotAllowed\" | transloco }}\r\n </div>\r\n } @else if (!hasRequiredContext()) {\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.entityListField.saveFormFirst\" | transloco }}\r\n </div>\r\n } @else if (loading() && !hasRows()) {\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"100%\" height=\"3rem\" />\r\n <p-skeleton width=\"100%\" height=\"3rem\" />\r\n </div>\r\n } @else if (!hasRows()) {\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.entityListField.noRelatedItems\" | transloco }}\r\n </div>\r\n } @else {\r\n <mt-table\r\n [noCard]=\"true\"\r\n [data]=\"rows()\"\r\n [columns]=\"columns()\"\r\n dataKey=\"Id\"\r\n [loading]=\"loading()\"\r\n />\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", styles: [":host{display:block}\n"] }]
|
|
973
993
|
}], 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 }] }], propertyId: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertyId", required: false }] }], configuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "configuration", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: false }] }] } });
|
|
974
994
|
|
|
975
995
|
/**
|