@masterteam/form-builder 0.0.51 → 0.0.52
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
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"formBuilder": {
|
|
3
|
-
"save": "حفظ",
|
|
4
|
-
"cancel": "إلغاء",
|
|
5
|
-
"delete": "حذف",
|
|
6
|
-
"name-ar": "الاسم بالعربية",
|
|
7
|
-
"name-en": "الاسم بالإنجليزية",
|
|
8
|
-
"required": "هذا الحقل مطلوب",
|
|
9
|
-
"whitespace-invalid": "أدخل حرفًا واحدًا على الأقل غير المسافة",
|
|
10
|
-
"system": "نظام",
|
|
11
|
-
"custom": "مخصص",
|
|
12
|
-
"layout": "التخطيط",
|
|
13
|
-
"reset": "إعادة تعيين",
|
|
14
|
-
"preview": "معاينة",
|
|
15
|
-
"add-section": "إضافة قسم",
|
|
16
|
-
"edit-section": "تعديل القسم",
|
|
17
|
-
"edit-field": "تعديل الحقل",
|
|
18
|
-
"remove-field": "إزالة الحقل",
|
|
19
|
-
"drag-from-the-side": "اسحب عناصرك من اللوحة الجانبية",
|
|
20
|
-
"change-width": "تغيير العرض",
|
|
21
|
-
"is-required": "مطلوب",
|
|
22
|
-
"size": "الحجم",
|
|
23
|
-
"field-settings": "إعدادات الحقل",
|
|
24
|
-
"form-elements": "عناصر النموذج",
|
|
25
|
-
"no-section": "لنبدأ بإضافة قسم إلى نموذجك، انقر على زر إضافة قسم أعلاه.",
|
|
26
|
-
"hidden-in-creation": "مخفي عند الإنشاء",
|
|
27
|
-
"hidden-in-edit-form": "مخفي في نموذج التعديل",
|
|
28
|
-
"show-hide": "إظهار/إخفاء",
|
|
29
|
-
"show-hide-description": "الإظهار بناءً على قيمة خصائص أخرى",
|
|
30
|
-
"set-conditions": "تعيين الشروط",
|
|
31
|
-
"conditional-display-formula": "معادلة الإظهار الشرطي",
|
|
32
|
-
"enter-formula": "أدخل المعادلة...",
|
|
33
|
-
"validation-rules": "قواعد التحقق",
|
|
34
|
-
"add-validation-rule": "إضافة قاعدة تحقق",
|
|
35
|
-
"edit-validation-rule": "تعديل قاعدة التحقق",
|
|
36
|
-
"validation-formula": "المعادلة",
|
|
37
|
-
"validation-message": "الرسالة",
|
|
38
|
-
"validation-active": "نشط",
|
|
39
|
-
"validation-formula-placeholder": "أنشئ معادلة التحقق...",
|
|
40
|
-
"message-en": "الرسالة (الإنجليزية)",
|
|
41
|
-
"message-ar": "الرسالة (العربية)",
|
|
42
|
-
"severity": "نوع رسالة التحقق",
|
|
43
|
-
"severity-hint": "اختر ما إذا كانت القاعدة ستظهر كخطأ أو تحذير عند فشل التحقق.",
|
|
44
|
-
"severity-error": "خطأ",
|
|
45
|
-
"severity-warning": "تحذير",
|
|
46
|
-
"create-form": "إنشاء نموذج",
|
|
47
|
-
"edit-form": "تعديل النموذج",
|
|
48
|
-
"search-properties": "البحث في الخصائص",
|
|
49
|
-
"no-data-found": "لا توجد بيانات",
|
|
50
|
-
"no-fields-visible": "لا توجد حقول مرئية في هذا الوضع",
|
|
51
|
-
"is-read": "قابل للقراءة",
|
|
52
|
-
"is-read-description": "عند التعطيل، سيتم إخفاء هذا الحقل عن المستخدمين",
|
|
53
|
-
"is-write": "قابل للتعديل",
|
|
54
|
-
"is-write-description": "عند التعطيل، سيكون هذا الحقل للقراءة فقط للمستخدمين",
|
|
55
|
-
"edit-label": "تسمية مخصصة",
|
|
56
|
-
"edit-label-description": "استبدل التسمية الافتراضية للحقل بنص خاص بك لكل لغة",
|
|
57
|
-
"label-en": "التسمية (بالإنجليزية)",
|
|
58
|
-
"label-ar": "التسمية (بالعربية)",
|
|
59
|
-
"hidden": "مخفي",
|
|
60
|
-
"read-only": "للقراءة فقط",
|
|
61
|
-
"sections": "أقسام",
|
|
62
|
-
"steps": "خطوات",
|
|
63
|
-
"tabs": "تبويبات",
|
|
64
|
-
"wizard": "خطوات رأسية",
|
|
65
|
-
"scope-current": "الحالي",
|
|
66
|
-
"scope-host": "المضيف",
|
|
67
|
-
"scope-level": "المستوى",
|
|
68
|
-
"scope-parent": "الأصل",
|
|
69
|
-
"scope-ancestors": "الأسلاف",
|
|
70
|
-
"scope-children": "الأبناء",
|
|
71
|
-
"scope-descendants": "السلالة",
|
|
72
|
-
"scope-related": "المرتبط",
|
|
73
|
-
"scope-siblings": "الإخوة",
|
|
74
|
-
"path": "المسار",
|
|
75
|
-
"no-context": "لا يوجد سياق متاح",
|
|
76
|
-
"select": "اختر",
|
|
77
|
-
"no-options": "لا توجد خيارات",
|
|
78
|
-
"add-segment": "إضافة مقطع",
|
|
79
|
-
"scope-select-placeholder": "اختر...",
|
|
80
|
-
"select-property": "اختر خاصية",
|
|
81
|
-
"no-properties-available": "لا توجد خصائص متاحة",
|
|
82
|
-
"all-items-in-use": "جميع العناصر مستخدمة",
|
|
83
|
-
"toolbar-functions": "الدوال",
|
|
84
|
-
"toolbar-fields": "الحقول",
|
|
85
|
-
"toolbar-operators": "العوامل",
|
|
86
|
-
"toolbar-no-fields": "لا توجد حقول متاحة",
|
|
87
|
-
"toolbar-values": "القيم",
|
|
88
|
-
"toolbar-no-values": "لا توجد قيم متاحة",
|
|
89
|
-
"build-condition-formula": "أنشئ صيغة الشرط..."
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"formBuilder": {
|
|
3
|
+
"save": "حفظ",
|
|
4
|
+
"cancel": "إلغاء",
|
|
5
|
+
"delete": "حذف",
|
|
6
|
+
"name-ar": "الاسم بالعربية",
|
|
7
|
+
"name-en": "الاسم بالإنجليزية",
|
|
8
|
+
"required": "هذا الحقل مطلوب",
|
|
9
|
+
"whitespace-invalid": "أدخل حرفًا واحدًا على الأقل غير المسافة",
|
|
10
|
+
"system": "نظام",
|
|
11
|
+
"custom": "مخصص",
|
|
12
|
+
"layout": "التخطيط",
|
|
13
|
+
"reset": "إعادة تعيين",
|
|
14
|
+
"preview": "معاينة",
|
|
15
|
+
"add-section": "إضافة قسم",
|
|
16
|
+
"edit-section": "تعديل القسم",
|
|
17
|
+
"edit-field": "تعديل الحقل",
|
|
18
|
+
"remove-field": "إزالة الحقل",
|
|
19
|
+
"drag-from-the-side": "اسحب عناصرك من اللوحة الجانبية",
|
|
20
|
+
"change-width": "تغيير العرض",
|
|
21
|
+
"is-required": "مطلوب",
|
|
22
|
+
"size": "الحجم",
|
|
23
|
+
"field-settings": "إعدادات الحقل",
|
|
24
|
+
"form-elements": "عناصر النموذج",
|
|
25
|
+
"no-section": "لنبدأ بإضافة قسم إلى نموذجك، انقر على زر إضافة قسم أعلاه.",
|
|
26
|
+
"hidden-in-creation": "مخفي عند الإنشاء",
|
|
27
|
+
"hidden-in-edit-form": "مخفي في نموذج التعديل",
|
|
28
|
+
"show-hide": "إظهار/إخفاء",
|
|
29
|
+
"show-hide-description": "الإظهار بناءً على قيمة خصائص أخرى",
|
|
30
|
+
"set-conditions": "تعيين الشروط",
|
|
31
|
+
"conditional-display-formula": "معادلة الإظهار الشرطي",
|
|
32
|
+
"enter-formula": "أدخل المعادلة...",
|
|
33
|
+
"validation-rules": "قواعد التحقق",
|
|
34
|
+
"add-validation-rule": "إضافة قاعدة تحقق",
|
|
35
|
+
"edit-validation-rule": "تعديل قاعدة التحقق",
|
|
36
|
+
"validation-formula": "المعادلة",
|
|
37
|
+
"validation-message": "الرسالة",
|
|
38
|
+
"validation-active": "نشط",
|
|
39
|
+
"validation-formula-placeholder": "أنشئ معادلة التحقق...",
|
|
40
|
+
"message-en": "الرسالة (الإنجليزية)",
|
|
41
|
+
"message-ar": "الرسالة (العربية)",
|
|
42
|
+
"severity": "نوع رسالة التحقق",
|
|
43
|
+
"severity-hint": "اختر ما إذا كانت القاعدة ستظهر كخطأ أو تحذير عند فشل التحقق.",
|
|
44
|
+
"severity-error": "خطأ",
|
|
45
|
+
"severity-warning": "تحذير",
|
|
46
|
+
"create-form": "إنشاء نموذج",
|
|
47
|
+
"edit-form": "تعديل النموذج",
|
|
48
|
+
"search-properties": "البحث في الخصائص",
|
|
49
|
+
"no-data-found": "لا توجد بيانات",
|
|
50
|
+
"no-fields-visible": "لا توجد حقول مرئية في هذا الوضع",
|
|
51
|
+
"is-read": "قابل للقراءة",
|
|
52
|
+
"is-read-description": "عند التعطيل، سيتم إخفاء هذا الحقل عن المستخدمين",
|
|
53
|
+
"is-write": "قابل للتعديل",
|
|
54
|
+
"is-write-description": "عند التعطيل، سيكون هذا الحقل للقراءة فقط للمستخدمين",
|
|
55
|
+
"edit-label": "تسمية مخصصة",
|
|
56
|
+
"edit-label-description": "استبدل التسمية الافتراضية للحقل بنص خاص بك لكل لغة",
|
|
57
|
+
"label-en": "التسمية (بالإنجليزية)",
|
|
58
|
+
"label-ar": "التسمية (بالعربية)",
|
|
59
|
+
"hidden": "مخفي",
|
|
60
|
+
"read-only": "للقراءة فقط",
|
|
61
|
+
"sections": "أقسام",
|
|
62
|
+
"steps": "خطوات",
|
|
63
|
+
"tabs": "تبويبات",
|
|
64
|
+
"wizard": "خطوات رأسية",
|
|
65
|
+
"scope-current": "الحالي",
|
|
66
|
+
"scope-host": "المضيف",
|
|
67
|
+
"scope-level": "المستوى",
|
|
68
|
+
"scope-parent": "الأصل",
|
|
69
|
+
"scope-ancestors": "الأسلاف",
|
|
70
|
+
"scope-children": "الأبناء",
|
|
71
|
+
"scope-descendants": "السلالة",
|
|
72
|
+
"scope-related": "المرتبط",
|
|
73
|
+
"scope-siblings": "الإخوة",
|
|
74
|
+
"path": "المسار",
|
|
75
|
+
"no-context": "لا يوجد سياق متاح",
|
|
76
|
+
"select": "اختر",
|
|
77
|
+
"no-options": "لا توجد خيارات",
|
|
78
|
+
"add-segment": "إضافة مقطع",
|
|
79
|
+
"scope-select-placeholder": "اختر...",
|
|
80
|
+
"select-property": "اختر خاصية",
|
|
81
|
+
"no-properties-available": "لا توجد خصائص متاحة",
|
|
82
|
+
"all-items-in-use": "جميع العناصر مستخدمة",
|
|
83
|
+
"toolbar-functions": "الدوال",
|
|
84
|
+
"toolbar-fields": "الحقول",
|
|
85
|
+
"toolbar-operators": "العوامل",
|
|
86
|
+
"toolbar-no-fields": "لا توجد حقول متاحة",
|
|
87
|
+
"toolbar-values": "القيم",
|
|
88
|
+
"toolbar-no-values": "لا توجد قيم متاحة",
|
|
89
|
+
"build-condition-formula": "أنشئ صيغة الشرط..."
|
|
90
|
+
}
|
|
91
|
+
}
|
package/assets/i18n/en.json
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
{
|
|
2
|
-
"formBuilder": {
|
|
3
|
-
"save": "Save",
|
|
4
|
-
"cancel": "Cancel",
|
|
5
|
-
"delete": "Delete",
|
|
6
|
-
"name-ar": "Name (Arabic)",
|
|
7
|
-
"name-en": "Name (English)",
|
|
8
|
-
"required": "This field is required",
|
|
9
|
-
"whitespace-invalid": "Enter at least one non-space character",
|
|
10
|
-
"system": "System",
|
|
11
|
-
"custom": "Custom",
|
|
12
|
-
"layout": "Layout",
|
|
13
|
-
"reset": "Reset",
|
|
14
|
-
"preview": "Preview",
|
|
15
|
-
"add-section": "Add Section",
|
|
16
|
-
"edit-section": "Edit Section",
|
|
17
|
-
"edit-field": "Edit Field",
|
|
18
|
-
"remove-field": "Remove Field",
|
|
19
|
-
"drag-from-the-side": "Drag your elemnents from the side panel",
|
|
20
|
-
"change-width": "Change Width",
|
|
21
|
-
"is-required": "Is Required",
|
|
22
|
-
"size": "Size",
|
|
23
|
-
"field-settings": "Field Settings",
|
|
24
|
-
"form-elements": "Form Elements",
|
|
25
|
-
"no-section": "Let's start by adding a section to your form, click the add section button above.",
|
|
26
|
-
"hidden-in-creation": "Hidden In Creation",
|
|
27
|
-
"hidden-in-edit-form": "Hidden In Edit Form",
|
|
28
|
-
"show-hide": "Show/Hide",
|
|
29
|
-
"show-hide-description": "Show Based On The Value Of Other Properties",
|
|
30
|
-
"set-conditions": "Set Conditions",
|
|
31
|
-
"conditional-display-formula": "Conditional Display Formula",
|
|
32
|
-
"enter-formula": "Enter formula...",
|
|
33
|
-
"validation-rules": "Validation Rules",
|
|
34
|
-
"add-validation-rule": "Add Validation Rule",
|
|
35
|
-
"edit-validation-rule": "Edit Validation Rule",
|
|
36
|
-
"validation-formula": "Formula",
|
|
37
|
-
"validation-message": "Message",
|
|
38
|
-
"validation-active": "Active",
|
|
39
|
-
"validation-formula-placeholder": "Build validation formula...",
|
|
40
|
-
"message-en": "Message (English)",
|
|
41
|
-
"message-ar": "Message (Arabic)",
|
|
42
|
-
"severity": "Validation Message Type",
|
|
43
|
-
"severity-hint": "Choose whether this rule shows an error or a warning when validation fails.",
|
|
44
|
-
"severity-error": "Error",
|
|
45
|
-
"severity-warning": "Warning",
|
|
46
|
-
"create-form": "Create Form",
|
|
47
|
-
"edit-form": "Edit Form",
|
|
48
|
-
"no-data-found": "No data found",
|
|
49
|
-
"search-properties": "Search Properties",
|
|
50
|
-
"no-fields-visible": "No fields visible in this mode",
|
|
51
|
-
"is-read": "Readable",
|
|
52
|
-
"is-read-description": "When disabled, this field will be hidden from users",
|
|
53
|
-
"is-write": "Editable",
|
|
54
|
-
"is-write-description": "When disabled, this field will be read-only for users",
|
|
55
|
-
"edit-label": "Custom Label",
|
|
56
|
-
"edit-label-description": "Override the default field label with your own text per language",
|
|
57
|
-
"label-en": "Label (English)",
|
|
58
|
-
"label-ar": "Label (Arabic)",
|
|
59
|
-
"hidden": "Hidden",
|
|
60
|
-
"read-only": "Read Only",
|
|
61
|
-
"sections": "Sections",
|
|
62
|
-
"steps": "Steps",
|
|
63
|
-
"tabs": "Tabs",
|
|
64
|
-
"wizard": "Wizard",
|
|
65
|
-
"scope-current": "Current",
|
|
66
|
-
"scope-host": "Host",
|
|
67
|
-
"scope-level": "Level",
|
|
68
|
-
"scope-parent": "Parent",
|
|
69
|
-
"scope-ancestors": "Ancestors",
|
|
70
|
-
"scope-children": "Children",
|
|
71
|
-
"scope-descendants": "Descendants",
|
|
72
|
-
"scope-related": "Related",
|
|
73
|
-
"scope-siblings": "Siblings",
|
|
74
|
-
"path": "Path",
|
|
75
|
-
"no-context": "No context available",
|
|
76
|
-
"select": "Select",
|
|
77
|
-
"no-options": "No options",
|
|
78
|
-
"add-segment": "Add Segment",
|
|
79
|
-
"scope-select-placeholder": "Select...",
|
|
80
|
-
"select-property": "Select a property",
|
|
81
|
-
"no-properties-available": "No properties available",
|
|
82
|
-
"all-items-in-use": "All items are in use",
|
|
83
|
-
"toolbar-functions": "Functions",
|
|
84
|
-
"toolbar-fields": "Fields",
|
|
85
|
-
"toolbar-operators": "Operators",
|
|
86
|
-
"toolbar-no-fields": "No fields available",
|
|
87
|
-
"toolbar-values": "Values",
|
|
88
|
-
"toolbar-no-values": "No values available",
|
|
89
|
-
"build-condition-formula": "Build condition formula..."
|
|
90
|
-
}
|
|
91
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"formBuilder": {
|
|
3
|
+
"save": "Save",
|
|
4
|
+
"cancel": "Cancel",
|
|
5
|
+
"delete": "Delete",
|
|
6
|
+
"name-ar": "Name (Arabic)",
|
|
7
|
+
"name-en": "Name (English)",
|
|
8
|
+
"required": "This field is required",
|
|
9
|
+
"whitespace-invalid": "Enter at least one non-space character",
|
|
10
|
+
"system": "System",
|
|
11
|
+
"custom": "Custom",
|
|
12
|
+
"layout": "Layout",
|
|
13
|
+
"reset": "Reset",
|
|
14
|
+
"preview": "Preview",
|
|
15
|
+
"add-section": "Add Section",
|
|
16
|
+
"edit-section": "Edit Section",
|
|
17
|
+
"edit-field": "Edit Field",
|
|
18
|
+
"remove-field": "Remove Field",
|
|
19
|
+
"drag-from-the-side": "Drag your elemnents from the side panel",
|
|
20
|
+
"change-width": "Change Width",
|
|
21
|
+
"is-required": "Is Required",
|
|
22
|
+
"size": "Size",
|
|
23
|
+
"field-settings": "Field Settings",
|
|
24
|
+
"form-elements": "Form Elements",
|
|
25
|
+
"no-section": "Let's start by adding a section to your form, click the add section button above.",
|
|
26
|
+
"hidden-in-creation": "Hidden In Creation",
|
|
27
|
+
"hidden-in-edit-form": "Hidden In Edit Form",
|
|
28
|
+
"show-hide": "Show/Hide",
|
|
29
|
+
"show-hide-description": "Show Based On The Value Of Other Properties",
|
|
30
|
+
"set-conditions": "Set Conditions",
|
|
31
|
+
"conditional-display-formula": "Conditional Display Formula",
|
|
32
|
+
"enter-formula": "Enter formula...",
|
|
33
|
+
"validation-rules": "Validation Rules",
|
|
34
|
+
"add-validation-rule": "Add Validation Rule",
|
|
35
|
+
"edit-validation-rule": "Edit Validation Rule",
|
|
36
|
+
"validation-formula": "Formula",
|
|
37
|
+
"validation-message": "Message",
|
|
38
|
+
"validation-active": "Active",
|
|
39
|
+
"validation-formula-placeholder": "Build validation formula...",
|
|
40
|
+
"message-en": "Message (English)",
|
|
41
|
+
"message-ar": "Message (Arabic)",
|
|
42
|
+
"severity": "Validation Message Type",
|
|
43
|
+
"severity-hint": "Choose whether this rule shows an error or a warning when validation fails.",
|
|
44
|
+
"severity-error": "Error",
|
|
45
|
+
"severity-warning": "Warning",
|
|
46
|
+
"create-form": "Create Form",
|
|
47
|
+
"edit-form": "Edit Form",
|
|
48
|
+
"no-data-found": "No data found",
|
|
49
|
+
"search-properties": "Search Properties",
|
|
50
|
+
"no-fields-visible": "No fields visible in this mode",
|
|
51
|
+
"is-read": "Readable",
|
|
52
|
+
"is-read-description": "When disabled, this field will be hidden from users",
|
|
53
|
+
"is-write": "Editable",
|
|
54
|
+
"is-write-description": "When disabled, this field will be read-only for users",
|
|
55
|
+
"edit-label": "Custom Label",
|
|
56
|
+
"edit-label-description": "Override the default field label with your own text per language",
|
|
57
|
+
"label-en": "Label (English)",
|
|
58
|
+
"label-ar": "Label (Arabic)",
|
|
59
|
+
"hidden": "Hidden",
|
|
60
|
+
"read-only": "Read Only",
|
|
61
|
+
"sections": "Sections",
|
|
62
|
+
"steps": "Steps",
|
|
63
|
+
"tabs": "Tabs",
|
|
64
|
+
"wizard": "Wizard",
|
|
65
|
+
"scope-current": "Current",
|
|
66
|
+
"scope-host": "Host",
|
|
67
|
+
"scope-level": "Level",
|
|
68
|
+
"scope-parent": "Parent",
|
|
69
|
+
"scope-ancestors": "Ancestors",
|
|
70
|
+
"scope-children": "Children",
|
|
71
|
+
"scope-descendants": "Descendants",
|
|
72
|
+
"scope-related": "Related",
|
|
73
|
+
"scope-siblings": "Siblings",
|
|
74
|
+
"path": "Path",
|
|
75
|
+
"no-context": "No context available",
|
|
76
|
+
"select": "Select",
|
|
77
|
+
"no-options": "No options",
|
|
78
|
+
"add-segment": "Add Segment",
|
|
79
|
+
"scope-select-placeholder": "Select...",
|
|
80
|
+
"select-property": "Select a property",
|
|
81
|
+
"no-properties-available": "No properties available",
|
|
82
|
+
"all-items-in-use": "All items are in use",
|
|
83
|
+
"toolbar-functions": "Functions",
|
|
84
|
+
"toolbar-fields": "Fields",
|
|
85
|
+
"toolbar-operators": "Operators",
|
|
86
|
+
"toolbar-no-fields": "No fields available",
|
|
87
|
+
"toolbar-values": "Values",
|
|
88
|
+
"toolbar-no-values": "No values available",
|
|
89
|
+
"build-condition-formula": "Build condition formula..."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -1227,23 +1227,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1227
1227
|
args: [{ providedIn: 'root' }]
|
|
1228
1228
|
}] });
|
|
1229
1229
|
|
|
1230
|
+
/** Lower-case a view type and strip the separators the backend may send. */
|
|
1231
|
+
function normalizeViewType(viewType) {
|
|
1232
|
+
return (viewType ?? '').toLowerCase().replace(/[ _-]/g, '');
|
|
1233
|
+
}
|
|
1230
1234
|
/**
|
|
1231
1235
|
* View types whose values the backend can serve. Matched after lower-casing
|
|
1232
1236
|
* and stripping spaces/underscores/dashes, and kept in step with the backend
|
|
1233
|
-
* gate (`PropertyItemsLookupSourceResolver.IsLookupBacked` plus `Status`
|
|
1234
|
-
* every other view type is rejected with a validation error.
|
|
1237
|
+
* gate (`PropertyItemsLookupSourceResolver.IsLookupBacked` plus `Status` and
|
|
1238
|
+
* `PhaseGate`) — every other view type is rejected with a validation error.
|
|
1235
1239
|
*/
|
|
1236
1240
|
const VALUE_BACKED_VIEW_TYPES = new Set([
|
|
1237
1241
|
'lookup',
|
|
1238
1242
|
'lookupmultiselect',
|
|
1239
1243
|
'lookupmatrix',
|
|
1240
1244
|
'status',
|
|
1245
|
+
'phasegate',
|
|
1241
1246
|
]);
|
|
1247
|
+
/**
|
|
1248
|
+
* View types whose item keys are ids to compare numerically. Only phase values
|
|
1249
|
+
* qualify: lookup items legitimately carry numeric-looking string keys (the
|
|
1250
|
+
* backend falls back to the item id when a lookup item has no key) and compare
|
|
1251
|
+
* as strings, so this must stay keyed on the view type, never on whether a key
|
|
1252
|
+
* happens to parse as a number.
|
|
1253
|
+
*/
|
|
1254
|
+
const NUMERIC_VALUE_VIEW_TYPES = new Set(['phasegate']);
|
|
1242
1255
|
/** Whether a property's values can be picked from a source instead of typed. */
|
|
1243
1256
|
function isValueBackedViewType(viewType) {
|
|
1244
1257
|
if (!viewType)
|
|
1245
1258
|
return false;
|
|
1246
|
-
return VALUE_BACKED_VIEW_TYPES.has(viewType
|
|
1259
|
+
return VALUE_BACKED_VIEW_TYPES.has(normalizeViewType(viewType));
|
|
1247
1260
|
}
|
|
1248
1261
|
class FormBuilderContextService {
|
|
1249
1262
|
http = inject(HttpClient);
|
|
@@ -1285,12 +1298,20 @@ class FormBuilderContextService {
|
|
|
1285
1298
|
return this.resolveContext(contextKey, options).pipe(map((resolved) => resolved?.properties ?? []));
|
|
1286
1299
|
}
|
|
1287
1300
|
/**
|
|
1288
|
-
* Selectable values of a lookup / lookup-matrix / status property,
|
|
1289
|
-
* the condition builder so a compared value is picked rather than
|
|
1301
|
+
* Selectable values of a lookup / lookup-matrix / status / phase property,
|
|
1302
|
+
* used by the condition builder so a compared value is picked rather than
|
|
1303
|
+
* typed.
|
|
1290
1304
|
*
|
|
1291
1305
|
* The backend answers 400 for any other view type, which we swallow into an
|
|
1292
1306
|
* empty list — callers already gate on `isValueBackedViewType`, so empty
|
|
1293
1307
|
* simply means "nothing to pick".
|
|
1308
|
+
*
|
|
1309
|
+
* Deliberately sent **without** the backend's optional `contextKey`. A form's
|
|
1310
|
+
* fields can come from several scopes at once (the builder's Current / Host /
|
|
1311
|
+
* Parent tabs), so a module form legitimately carries level-scoped fields —
|
|
1312
|
+
* and scoping the request to the form's own context 404s every one of them,
|
|
1313
|
+
* because the property is not in that catalog. Resolution by full property
|
|
1314
|
+
* key is unambiguous for persisted properties, which is what fields carry.
|
|
1294
1315
|
*/
|
|
1295
1316
|
getPropertyItems(propertyKey) {
|
|
1296
1317
|
if (!propertyKey)
|
|
@@ -1302,7 +1323,12 @@ class FormBuilderContextService {
|
|
|
1302
1323
|
.get(`formulas/builder/property-items/${encodeURIComponent(propertyKey)}`)
|
|
1303
1324
|
.pipe(map((response) => {
|
|
1304
1325
|
const payload = response && 'data' in response ? response.data : response;
|
|
1305
|
-
|
|
1326
|
+
// The response's own view type decides how a picked value has to
|
|
1327
|
+
// serialize — the item keys look alike, so this is the only signal.
|
|
1328
|
+
const valueType = NUMERIC_VALUE_VIEW_TYPES.has(normalizeViewType(payload?.viewType))
|
|
1329
|
+
? 'number'
|
|
1330
|
+
: 'string';
|
|
1331
|
+
return (payload?.items ?? []).map((item) => ({ ...item, valueType }));
|
|
1306
1332
|
}), tap((items) => this.propertyItemsCache.set(propertyKey, items)), catchError((error) => {
|
|
1307
1333
|
console.warn('Failed to load property items:', error);
|
|
1308
1334
|
return of([]);
|
|
@@ -1470,7 +1496,7 @@ class FBFieldConditions {
|
|
|
1470
1496
|
return raw.trim();
|
|
1471
1497
|
}
|
|
1472
1498
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FBFieldConditions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: FBFieldConditions, isStandalone: true, selector: "mt-fb-field-conditions", inputs: { initialFormula: { classPropertyName: "initialFormula", publicName: "initialFormula", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: "availableFields", publicName: "availableFields", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'formBuilder'\">\n <div\n [class]=\"[\n modalService.contentClass,\n 'min-w-0',\n 'p-4',\n 'overflow-y-hidden!',\n 'max-[640px]:p-3',\n ]\"\n >\n <div class=\"mt-4 flex h-full min-h-0 flex-col gap-3 overflow-y-auto pb-10\">\n <!-- Formula Toolbar -->\n <mt-formula-toolbar\n [knownProperties]=\"propertyItems()\"\n [propertyValues]=\"propertyValues()\"\n [loadingValuesFor]=\"loadingValuesFor()\"\n [functionCategories]=\"functionCategories\"\n [operators]=\"operators\"\n [labels]=\"toolbarLabels()\"\n (onBlockInsert)=\"onBlockInsert($event)\"\n (onPropertyValuesRequest)=\"onPropertyValuesRequest($event)\"\n />\n <!-- Formula Editor -->\n <mt-formula-editor\n #editor\n [placeholder]=\"t('build-condition-formula')\"\n [formControl]=\"formulaControl\"\n />\n </div>\n </div>\n\n <div\n [class]=\"[\n modalService.footerClass,\n '!h-auto',\n 'min-h-0',\n 'flex-col',\n 'gap-2',\n 'sm:flex-row',\n 'sm:items-center',\n 'sm:justify-end',\n ]\"\n >\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n [disabled]=\"submitting()\"\n styleClass=\"w-full sm:w-auto\"\n (onClick)=\"onCancel()\"\n />\n <mt-button\n [label]=\"t('save')\"\n severity=\"primary\"\n [loading]=\"submitting()\"\n styleClass=\"w-full sm:w-auto\"\n (onClick)=\"onSave()\"\n />\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "propertyValues", "loadingValuesFor", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange", "onPropertyValuesRequest"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }] });
|
|
1499
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: FBFieldConditions, isStandalone: true, selector: "mt-fb-field-conditions", inputs: { initialFormula: { classPropertyName: "initialFormula", publicName: "initialFormula", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: "availableFields", publicName: "availableFields", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'formBuilder'\">\r\n <div\r\n [class]=\"[\r\n modalService.contentClass,\r\n 'min-w-0',\r\n 'p-4',\r\n 'overflow-y-hidden!',\r\n 'max-[640px]:p-3',\r\n ]\"\r\n >\r\n <div class=\"mt-4 flex h-full min-h-0 flex-col gap-3 overflow-y-auto pb-10\">\r\n <!-- Formula Toolbar -->\r\n <mt-formula-toolbar\r\n [knownProperties]=\"propertyItems()\"\r\n [propertyValues]=\"propertyValues()\"\r\n [loadingValuesFor]=\"loadingValuesFor()\"\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [labels]=\"toolbarLabels()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n (onPropertyValuesRequest)=\"onPropertyValuesRequest($event)\"\r\n />\r\n <!-- Formula Editor -->\r\n <mt-formula-editor\r\n #editor\r\n [placeholder]=\"t('build-condition-formula')\"\r\n [formControl]=\"formulaControl\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div\r\n [class]=\"[\r\n modalService.footerClass,\r\n '!h-auto',\r\n 'min-h-0',\r\n 'flex-col',\r\n 'gap-2',\r\n 'sm:flex-row',\r\n 'sm:items-center',\r\n 'sm:justify-end',\r\n ]\"\r\n >\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"submitting()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "propertyValues", "loadingValuesFor", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange", "onPropertyValuesRequest"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }] });
|
|
1474
1500
|
}
|
|
1475
1501
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FBFieldConditions, decorators: [{
|
|
1476
1502
|
type: Component,
|
|
@@ -1480,7 +1506,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1480
1506
|
Button,
|
|
1481
1507
|
FormulaToolbar,
|
|
1482
1508
|
FormulaEditor,
|
|
1483
|
-
], template: "<ng-container *transloco=\"let t; prefix: 'formBuilder'\">\n <div\n [class]=\"[\n modalService.contentClass,\n 'min-w-0',\n 'p-4',\n 'overflow-y-hidden!',\n 'max-[640px]:p-3',\n ]\"\n >\n <div class=\"mt-4 flex h-full min-h-0 flex-col gap-3 overflow-y-auto pb-10\">\n <!-- Formula Toolbar -->\n <mt-formula-toolbar\n [knownProperties]=\"propertyItems()\"\n [propertyValues]=\"propertyValues()\"\n [loadingValuesFor]=\"loadingValuesFor()\"\n [functionCategories]=\"functionCategories\"\n [operators]=\"operators\"\n [labels]=\"toolbarLabels()\"\n (onBlockInsert)=\"onBlockInsert($event)\"\n (onPropertyValuesRequest)=\"onPropertyValuesRequest($event)\"\n />\n <!-- Formula Editor -->\n <mt-formula-editor\n #editor\n [placeholder]=\"t('build-condition-formula')\"\n [formControl]=\"formulaControl\"\n />\n </div>\n </div>\n\n <div\n [class]=\"[\n modalService.footerClass,\n '!h-auto',\n 'min-h-0',\n 'flex-col',\n 'gap-2',\n 'sm:flex-row',\n 'sm:items-center',\n 'sm:justify-end',\n ]\"\n >\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n [disabled]=\"submitting()\"\n styleClass=\"w-full sm:w-auto\"\n (onClick)=\"onCancel()\"\n />\n <mt-button\n [label]=\"t('save')\"\n severity=\"primary\"\n [loading]=\"submitting()\"\n styleClass=\"w-full sm:w-auto\"\n (onClick)=\"onSave()\"\n />\n </div>\n</ng-container>\n" }]
|
|
1509
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'formBuilder'\">\r\n <div\r\n [class]=\"[\r\n modalService.contentClass,\r\n 'min-w-0',\r\n 'p-4',\r\n 'overflow-y-hidden!',\r\n 'max-[640px]:p-3',\r\n ]\"\r\n >\r\n <div class=\"mt-4 flex h-full min-h-0 flex-col gap-3 overflow-y-auto pb-10\">\r\n <!-- Formula Toolbar -->\r\n <mt-formula-toolbar\r\n [knownProperties]=\"propertyItems()\"\r\n [propertyValues]=\"propertyValues()\"\r\n [loadingValuesFor]=\"loadingValuesFor()\"\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [labels]=\"toolbarLabels()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n (onPropertyValuesRequest)=\"onPropertyValuesRequest($event)\"\r\n />\r\n <!-- Formula Editor -->\r\n <mt-formula-editor\r\n #editor\r\n [placeholder]=\"t('build-condition-formula')\"\r\n [formControl]=\"formulaControl\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div\r\n [class]=\"[\r\n modalService.footerClass,\r\n '!h-auto',\r\n 'min-h-0',\r\n 'flex-col',\r\n 'gap-2',\r\n 'sm:flex-row',\r\n 'sm:items-center',\r\n 'sm:justify-end',\r\n ]\"\r\n >\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"submitting()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button\r\n [label]=\"t('save')\"\r\n severity=\"primary\"\r\n [loading]=\"submitting()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
1484
1510
|
}], ctorParameters: () => [], propDecorators: { initialFormula: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFormula", required: false }] }], availableFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableFields", required: false }] }], editorRef: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] } });
|
|
1485
1511
|
|
|
1486
1512
|
class FBFieldForm {
|