@mmlogic/components 0.1.29 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/mrd-boolean-field_19.cjs.entry.js +150 -167
- package/dist/collection/components/mrd-field/mrd-field.js +18 -20
- package/dist/collection/components/mrd-form/mrd-form.js +38 -46
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +52 -61
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +16 -1
- package/dist/collection/components/mrd-table/mrd-table.js +34 -34
- package/dist/collection/dev/api.js +9 -97
- package/dist/collection/dev/app.js +34 -17
- package/dist/collection/dev/example-data.js +111 -298
- package/dist/collection/utils/cell-renderer.js +7 -5
- package/dist/components/mrd-field2.js +1 -1
- package/dist/components/mrd-form.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/mrd-boolean-field_19.entry.js +150 -167
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-61ef0232.entry.js +1 -0
- package/dist/types/types/client-layout.d.ts +25 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-3aacd101.entry.js +0 -1
|
@@ -6,57 +6,25 @@ window.EXAMPLE_LAYOUT = {
|
|
|
6
6
|
type: "SECTION",
|
|
7
7
|
label: "Basic Information",
|
|
8
8
|
items: [
|
|
9
|
+
{ type: "FIELD", name: "projectName", label: "Project Name", dataType: "TEXT", required: true, placeholder: "Enter project name" },
|
|
10
|
+
{ type: "FIELD", name: "description", label: "Description", dataType: "TEXTBLOCK", required: false, placeholder: "Describe the project..." },
|
|
9
11
|
{
|
|
10
|
-
type: "FIELD",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
label: "
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
12
|
+
type: "FIELD", name: "status", label: "Status", dataType: "LIST", required: true, multiple: false,
|
|
13
|
+
listItems: [
|
|
14
|
+
{ key: "active", label: "Active", color: "#16a34a" },
|
|
15
|
+
{ key: "pending", label: "Pending", color: "#d97706" },
|
|
16
|
+
{ key: "on_hold", label: "On Hold", color: "#dc2626" },
|
|
17
|
+
{ key: "completed", label: "Completed", color: "#2563eb" }
|
|
18
|
+
]
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
|
-
type: "FIELD",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
label: "
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: "FIELD",
|
|
31
|
-
field: {
|
|
32
|
-
name: "status",
|
|
33
|
-
label: "Status",
|
|
34
|
-
dataType: "LIST",
|
|
35
|
-
required: true,
|
|
36
|
-
multiple: false,
|
|
37
|
-
listItems: [
|
|
38
|
-
{ key: "active", label: "Active", color: "#16a34a" },
|
|
39
|
-
{ key: "pending", label: "Pending", color: "#d97706" },
|
|
40
|
-
{ key: "on_hold", label: "On Hold", color: "#dc2626" },
|
|
41
|
-
{ key: "completed", label: "Completed", color: "#2563eb" }
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: "FIELD",
|
|
47
|
-
field: {
|
|
48
|
-
name: "tags",
|
|
49
|
-
label: "Tags (Multi-select)",
|
|
50
|
-
dataType: "LIST",
|
|
51
|
-
required: false,
|
|
52
|
-
multiple: true,
|
|
53
|
-
listItems: [
|
|
54
|
-
{ key: "frontend", label: "Frontend", color: "#7c3aed" },
|
|
55
|
-
{ key: "backend", label: "Backend", color: "#db2777" },
|
|
56
|
-
{ key: "design", label: "Design", color: "#0891b2" },
|
|
57
|
-
{ key: "devops", label: "DevOps", color: "#65a30d" }
|
|
58
|
-
]
|
|
59
|
-
}
|
|
21
|
+
type: "FIELD", name: "tags", label: "Tags (Multi-select)", dataType: "LIST", required: false, multiple: true,
|
|
22
|
+
listItems: [
|
|
23
|
+
{ key: "frontend", label: "Frontend", color: "#7c3aed" },
|
|
24
|
+
{ key: "backend", label: "Backend", color: "#db2777" },
|
|
25
|
+
{ key: "design", label: "Design", color: "#0891b2" },
|
|
26
|
+
{ key: "devops", label: "DevOps", color: "#65a30d" }
|
|
27
|
+
]
|
|
60
28
|
}
|
|
61
29
|
]
|
|
62
30
|
},
|
|
@@ -64,184 +32,54 @@ window.EXAMPLE_LAYOUT = {
|
|
|
64
32
|
type: "SECTION",
|
|
65
33
|
label: "Financial Details",
|
|
66
34
|
items: [
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label: "Budget",
|
|
72
|
-
dataType: "CURRENCY",
|
|
73
|
-
required: true,
|
|
74
|
-
currencyCode: "EUR"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
type: "FIELD",
|
|
79
|
-
field: {
|
|
80
|
-
name: "completion",
|
|
81
|
-
label: "Completion (%)",
|
|
82
|
-
dataType: "PERCENTAGE",
|
|
83
|
-
required: false,
|
|
84
|
-
decimalPrecision: 1
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: "FIELD",
|
|
89
|
-
field: {
|
|
90
|
-
name: "headcount",
|
|
91
|
-
label: "Headcount",
|
|
92
|
-
dataType: "INTEGER",
|
|
93
|
-
required: false
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
type: "FIELD",
|
|
98
|
-
field: {
|
|
99
|
-
name: "hourlyRate",
|
|
100
|
-
label: "Hourly Rate",
|
|
101
|
-
dataType: "DECIMAL",
|
|
102
|
-
required: false,
|
|
103
|
-
decimalPrecision: 2
|
|
104
|
-
}
|
|
105
|
-
}
|
|
35
|
+
{ type: "FIELD", name: "budget", label: "Budget", dataType: "CURRENCY", required: true, currencyCode: "EUR" },
|
|
36
|
+
{ type: "FIELD", name: "completion", label: "Completion (%)", dataType: "PERCENTAGE", required: false, decimalPrecision: 1 },
|
|
37
|
+
{ type: "FIELD", name: "headcount", label: "Headcount", dataType: "INTEGER", required: false },
|
|
38
|
+
{ type: "FIELD", name: "hourlyRate", label: "Hourly Rate", dataType: "DECIMAL", required: false, decimalPrecision: 2 }
|
|
106
39
|
]
|
|
107
40
|
},
|
|
108
41
|
{
|
|
109
42
|
type: "SECTION",
|
|
110
43
|
label: "Dates & Time",
|
|
111
44
|
items: [
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
name: "startDate",
|
|
116
|
-
label: "Start Date",
|
|
117
|
-
dataType: "DATE",
|
|
118
|
-
required: true
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
type: "FIELD",
|
|
123
|
-
field: {
|
|
124
|
-
name: "deadline",
|
|
125
|
-
label: "Deadline",
|
|
126
|
-
dataType: "DATETIME",
|
|
127
|
-
required: false
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
type: "FIELD",
|
|
132
|
-
field: {
|
|
133
|
-
name: "dailyStandup",
|
|
134
|
-
label: "Daily Standup Time",
|
|
135
|
-
dataType: "TIME",
|
|
136
|
-
required: false
|
|
137
|
-
}
|
|
138
|
-
}
|
|
45
|
+
{ type: "FIELD", name: "startDate", label: "Start Date", dataType: "DATE", required: true },
|
|
46
|
+
{ type: "FIELD", name: "deadline", label: "Deadline", dataType: "DATETIME", required: false },
|
|
47
|
+
{ type: "FIELD", name: "dailyStandup", label: "Daily Standup Time", dataType: "TIME", required: false }
|
|
139
48
|
]
|
|
140
49
|
},
|
|
141
50
|
{
|
|
142
51
|
type: "SECTION",
|
|
143
52
|
label: "Contact & Links",
|
|
144
53
|
items: [
|
|
145
|
-
{
|
|
146
|
-
|
|
147
|
-
field: {
|
|
148
|
-
name: "contactEmail",
|
|
149
|
-
label: "Contact Email",
|
|
150
|
-
dataType: "EMAIL",
|
|
151
|
-
required: true,
|
|
152
|
-
placeholder: "project@company.com"
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
type: "FIELD",
|
|
157
|
-
field: {
|
|
158
|
-
name: "repositoryUrl",
|
|
159
|
-
label: "Repository URL",
|
|
160
|
-
dataType: "HYPERLINK",
|
|
161
|
-
required: false,
|
|
162
|
-
placeholder: "https://github.com/..."
|
|
163
|
-
}
|
|
164
|
-
}
|
|
54
|
+
{ type: "FIELD", name: "contactEmail", label: "Contact Email", dataType: "EMAIL", required: true, placeholder: "project@company.com" },
|
|
55
|
+
{ type: "FIELD", name: "repositoryUrl", label: "Repository URL", dataType: "HYPERLINK", required: false, placeholder: "https://github.com/..." }
|
|
165
56
|
]
|
|
166
57
|
},
|
|
167
58
|
{
|
|
168
59
|
type: "SECTION",
|
|
169
60
|
label: "Settings",
|
|
170
61
|
items: [
|
|
171
|
-
{
|
|
172
|
-
|
|
173
|
-
field: {
|
|
174
|
-
name: "isPublic",
|
|
175
|
-
label: "Public project",
|
|
176
|
-
dataType: "BOOLEAN",
|
|
177
|
-
required: false
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
type: "FIELD",
|
|
182
|
-
field: {
|
|
183
|
-
name: "isArchived",
|
|
184
|
-
label: "Archived",
|
|
185
|
-
dataType: "BOOLEAN",
|
|
186
|
-
required: false
|
|
187
|
-
}
|
|
188
|
-
}
|
|
62
|
+
{ type: "FIELD", name: "isPublic", label: "Public project", dataType: "BOOLEAN", required: false },
|
|
63
|
+
{ type: "FIELD", name: "isArchived", label: "Archived", dataType: "BOOLEAN", required: false }
|
|
189
64
|
]
|
|
190
65
|
},
|
|
191
66
|
{
|
|
192
67
|
type: "SECTION",
|
|
193
68
|
label: "Assets",
|
|
194
69
|
items: [
|
|
195
|
-
{
|
|
196
|
-
|
|
197
|
-
field: {
|
|
198
|
-
name: "projectLogo",
|
|
199
|
-
label: "Project Logo",
|
|
200
|
-
dataType: "IMAGE",
|
|
201
|
-
required: false,
|
|
202
|
-
accept: "image/*",
|
|
203
|
-
maxSize: 5242880
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
type: "FIELD",
|
|
208
|
-
field: {
|
|
209
|
-
name: "attachments",
|
|
210
|
-
label: "Attachments",
|
|
211
|
-
dataType: "FILE",
|
|
212
|
-
required: false,
|
|
213
|
-
accept: ".pdf,.doc,.docx,.zip",
|
|
214
|
-
maxSize: 10485760
|
|
215
|
-
}
|
|
216
|
-
}
|
|
70
|
+
{ type: "FIELD", name: "projectLogo", label: "Project Logo", dataType: "IMAGE", required: false, accept: "image/*", maxSize: 5242880 },
|
|
71
|
+
{ type: "FIELD", name: "attachments", label: "Attachments", dataType: "FILE", required: false, accept: ".pdf,.doc,.docx,.zip", maxSize: 10485760 }
|
|
217
72
|
]
|
|
218
73
|
},
|
|
74
|
+
{ type: "RELATION", name: "projectManager", label: "Project Manager", relatedClass: "Employee", displayType: "SEARCH", required: true, multiple: false },
|
|
219
75
|
{
|
|
220
|
-
type: "RELATION",
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
label: "
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
multiple: false
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
type: "RELATION",
|
|
232
|
-
relation: {
|
|
233
|
-
name: "projectCategory",
|
|
234
|
-
label: "Category",
|
|
235
|
-
relatedClass: "Category",
|
|
236
|
-
displayType: "DROPDOWN",
|
|
237
|
-
required: false,
|
|
238
|
-
dropdownValues: [
|
|
239
|
-
{ value: "product", label: "Product Development" },
|
|
240
|
-
{ value: "internal", label: "Internal Tool" },
|
|
241
|
-
{ value: "client", label: "Client Project" },
|
|
242
|
-
{ value: "research", label: "Research & Innovation" }
|
|
243
|
-
]
|
|
244
|
-
}
|
|
76
|
+
type: "RELATION", name: "projectCategory", label: "Category", relatedClass: "Category", displayType: "DROPDOWN", required: false,
|
|
77
|
+
dropdownValues: [
|
|
78
|
+
{ value: "product", label: "Product Development" },
|
|
79
|
+
{ value: "internal", label: "Internal Tool" },
|
|
80
|
+
{ value: "client", label: "Client Project" },
|
|
81
|
+
{ value: "research", label: "Research & Innovation" }
|
|
82
|
+
]
|
|
245
83
|
}
|
|
246
84
|
]
|
|
247
85
|
};
|
|
@@ -259,11 +97,11 @@ window.EXAMPLE_VALUES = {
|
|
|
259
97
|
|
|
260
98
|
/** Column definitions for the companies list table. */
|
|
261
99
|
window.EXAMPLE_COMPANY_COLUMNS = [
|
|
262
|
-
{ type: 'FIELD', label: 'Company name',
|
|
263
|
-
{ type: 'FIELD', label: 'Reg. number',
|
|
264
|
-
{ type: 'FIELD', label: 'Legal form',
|
|
265
|
-
{ type: 'FIELD', label: 'Start date',
|
|
266
|
-
{ type: 'FIELD', label: 'Employees',
|
|
100
|
+
{ type: 'FIELD', label: 'Company name', name: 'name', dataType: 'TEXT', required: true },
|
|
101
|
+
{ type: 'FIELD', label: 'Reg. number', name: 'registrationNumber', dataType: 'TEXT', required: false },
|
|
102
|
+
{ type: 'FIELD', label: 'Legal form', name: 'legalForm', dataType: 'TEXT', required: false },
|
|
103
|
+
{ type: 'FIELD', label: 'Start date', name: 'startDate', dataType: 'DATE', required: false },
|
|
104
|
+
{ type: 'FIELD', label: 'Employees', name: 'totalEmployees', dataType: 'INTEGER', required: false },
|
|
267
105
|
];
|
|
268
106
|
|
|
269
107
|
/** Rows for the companies list table. */
|
|
@@ -342,10 +180,10 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
342
180
|
label: '',
|
|
343
181
|
tabPage: false,
|
|
344
182
|
items: [
|
|
345
|
-
{ type: 'FIELD', label: 'company name',
|
|
346
|
-
{ type: 'FIELD', label: 'legal name',
|
|
347
|
-
{ type: 'FIELD', label: 'registration number',
|
|
348
|
-
{ type: 'FIELD', label: 'registration date',
|
|
183
|
+
{ type: 'FIELD', label: 'company name', name: 'name', dataType: 'TEXT', required: true, header: true },
|
|
184
|
+
{ type: 'FIELD', label: 'legal name', name: 'legalName', dataType: 'TEXT', required: true },
|
|
185
|
+
{ type: 'FIELD', label: 'registration number', name: 'registrationNumber', dataType: 'TEXT', required: false },
|
|
186
|
+
{ type: 'FIELD', label: 'registration date', name: 'registrationDate', dataType: 'DATE', required: false },
|
|
349
187
|
// ACTION items are silently ignored by mrd-layout-section
|
|
350
188
|
{ type: 'ACTION', label: 'company register', name: 'CompanyRegister' },
|
|
351
189
|
],
|
|
@@ -355,16 +193,16 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
355
193
|
label: 'Registration details',
|
|
356
194
|
tabPage: true,
|
|
357
195
|
items: [
|
|
358
|
-
{ type: 'FIELD', label: 'legal form',
|
|
359
|
-
{ type: 'FIELD', label: 'legal form extended',
|
|
360
|
-
{ type: 'FIELD', label: 'rsin',
|
|
361
|
-
{ type: 'FIELD', label: 'start date',
|
|
362
|
-
{ type: 'FIELD', label: 'end date',
|
|
363
|
-
{ type: 'FIELD', label: 'primary activity description',
|
|
364
|
-
{ type: 'FIELD', label: 'primary activity code',
|
|
365
|
-
{ type: 'FIELD', label: 'total employees',
|
|
366
|
-
{ type: 'FIELD', label: 'no mailing',
|
|
367
|
-
{ type: 'FIELD', label: 'verification date',
|
|
196
|
+
{ type: 'FIELD', label: 'legal form', name: 'legalForm', dataType: 'TEXT', required: false },
|
|
197
|
+
{ type: 'FIELD', label: 'legal form extended', name: 'legalFormExtended', dataType: 'TEXT', required: false },
|
|
198
|
+
{ type: 'FIELD', label: 'rsin', name: 'rsin', dataType: 'TEXT', required: false },
|
|
199
|
+
{ type: 'FIELD', label: 'start date', name: 'startDate', dataType: 'DATE', required: false },
|
|
200
|
+
{ type: 'FIELD', label: 'end date', name: 'endDate', dataType: 'DATE', required: false },
|
|
201
|
+
{ type: 'FIELD', label: 'primary activity description', name: 'primaryActivityDescription', dataType: 'TEXT', required: false },
|
|
202
|
+
{ type: 'FIELD', label: 'primary activity code', name: 'primaryActivityCode', dataType: 'TEXT', required: false },
|
|
203
|
+
{ type: 'FIELD', label: 'total employees', name: 'totalEmployees', dataType: 'INTEGER', required: false },
|
|
204
|
+
{ type: 'FIELD', label: 'no mailing', name: 'noMailing', dataType: 'BOOLEAN', required: false },
|
|
205
|
+
{ type: 'FIELD', label: 'verification date', name: 'verificationDate', dataType: 'DATETIME', required: false },
|
|
368
206
|
],
|
|
369
207
|
},
|
|
370
208
|
{
|
|
@@ -372,17 +210,13 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
372
210
|
label: 'Contact information',
|
|
373
211
|
tabPage: true,
|
|
374
212
|
items: [
|
|
375
|
-
{ type: 'FIELD', label: 'visit address',
|
|
376
|
-
{ type: 'FIELD', label: 'visit postal code',
|
|
377
|
-
{ type: 'FIELD', label: 'visit city',
|
|
378
|
-
{ type: 'FIELD', label: 'mailing address',
|
|
379
|
-
{ type: 'FIELD', label: 'mailing postal code',
|
|
380
|
-
{ type: 'FIELD', label: 'mailing city',
|
|
381
|
-
{
|
|
382
|
-
type: 'RELATION',
|
|
383
|
-
label: 'country',
|
|
384
|
-
relation: { name: 'country', label: 'country', relatedClass: 'commons.country', mostSignificantClass: 'countries', required: false },
|
|
385
|
-
},
|
|
213
|
+
{ type: 'FIELD', label: 'visit address', name: 'visitAddress', dataType: 'TEXT', required: false },
|
|
214
|
+
{ type: 'FIELD', label: 'visit postal code', name: 'visitPostalCode', dataType: 'TEXT', required: false },
|
|
215
|
+
{ type: 'FIELD', label: 'visit city', name: 'visitCity', dataType: 'TEXT', required: false },
|
|
216
|
+
{ type: 'FIELD', label: 'mailing address', name: 'mailingAddress', dataType: 'TEXT', required: false },
|
|
217
|
+
{ type: 'FIELD', label: 'mailing postal code', name: 'mailingPostalCode', dataType: 'TEXT', required: false },
|
|
218
|
+
{ type: 'FIELD', label: 'mailing city', name: 'mailingCity', dataType: 'TEXT', required: false },
|
|
219
|
+
{ type: 'RELATION', label: 'country', name: 'country', relatedClass: 'commons.country', mostSignificantClass: 'countries', required: false },
|
|
386
220
|
],
|
|
387
221
|
},
|
|
388
222
|
{
|
|
@@ -390,12 +224,7 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
390
224
|
label: 'Appointments',
|
|
391
225
|
tabPage: true,
|
|
392
226
|
items: [
|
|
393
|
-
{
|
|
394
|
-
type: 'RELATED_VIEW',
|
|
395
|
-
label: 'Appointments',
|
|
396
|
-
name: 'view0',
|
|
397
|
-
relatedView: { name: 'view0', relatedClass: 'appointments', showTitle: false },
|
|
398
|
-
},
|
|
227
|
+
{ type: 'RELATED_VIEW', label: 'Appointments', name: 'view0', relatedClass: 'appointments', showTitle: false },
|
|
399
228
|
],
|
|
400
229
|
},
|
|
401
230
|
{
|
|
@@ -403,12 +232,7 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
403
232
|
label: 'Share classes',
|
|
404
233
|
tabPage: true,
|
|
405
234
|
items: [
|
|
406
|
-
{
|
|
407
|
-
type: 'RELATED_VIEW',
|
|
408
|
-
label: 'Share classes',
|
|
409
|
-
name: 'view1',
|
|
410
|
-
relatedView: { name: 'view1', relatedClass: 'shareClasses', showTitle: false },
|
|
411
|
-
},
|
|
235
|
+
{ type: 'RELATED_VIEW', label: 'Share classes', name: 'view1', relatedClass: 'shareClasses', showTitle: false },
|
|
412
236
|
],
|
|
413
237
|
},
|
|
414
238
|
],
|
|
@@ -418,23 +242,17 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
418
242
|
defaultView: true,
|
|
419
243
|
defaultSort: 'name',
|
|
420
244
|
values: [
|
|
421
|
-
{ type: 'FIELD', label: 'name',
|
|
422
|
-
{
|
|
423
|
-
type: 'RELATION', label: 'Officer',
|
|
424
|
-
relation: { name: 'officer', label: 'Officer', relatedClass: 'housekeeping.officer', mostSignificantClass: 'entities', required: true },
|
|
425
|
-
},
|
|
245
|
+
{ type: 'FIELD', label: 'name', name: 'name', dataType: 'TEXT', required: true },
|
|
246
|
+
{ type: 'RELATION', label: 'Officer', name: 'officer', relatedClass: 'housekeeping.officer', mostSignificantClass: 'entities', required: true },
|
|
426
247
|
{
|
|
427
|
-
type: 'FIELD', label: 'Authority',
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
{ key: 'JOINT', label: 'Joint authority' },
|
|
433
|
-
],
|
|
434
|
-
},
|
|
248
|
+
type: 'FIELD', label: 'Authority', name: 'authority', dataType: 'LIST', required: false,
|
|
249
|
+
listItems: [
|
|
250
|
+
{ key: 'SOLE', label: 'Sole authority' },
|
|
251
|
+
{ key: 'JOINT', label: 'Joint authority' },
|
|
252
|
+
],
|
|
435
253
|
},
|
|
436
|
-
{ type: 'FIELD', label: 'start date',
|
|
437
|
-
{ type: 'FIELD', label: 'end date',
|
|
254
|
+
{ type: 'FIELD', label: 'start date', name: 'activeDate', dataType: 'DATE', required: false },
|
|
255
|
+
{ type: 'FIELD', label: 'end date', name: 'inactiveDate', dataType: 'DATE', required: false },
|
|
438
256
|
],
|
|
439
257
|
type: 'appointments',
|
|
440
258
|
singularLabel: 'Appointment',
|
|
@@ -445,10 +263,10 @@ window.EXAMPLE_COMPANY_METADATA = {
|
|
|
445
263
|
defaultView: true,
|
|
446
264
|
defaultSort: 'name',
|
|
447
265
|
values: [
|
|
448
|
-
{ type: 'FIELD', label: 'name',
|
|
449
|
-
{ type: 'FIELD', label: 'Nominal value',
|
|
450
|
-
{ type: 'FIELD', label: 'Currency',
|
|
451
|
-
{ type: 'FIELD', label: 'Authorised shares',
|
|
266
|
+
{ type: 'FIELD', label: 'name', name: 'name', dataType: 'TEXT', required: true },
|
|
267
|
+
{ type: 'FIELD', label: 'Nominal value', name: 'nominalValue', dataType: 'TEXT', required: false },
|
|
268
|
+
{ type: 'FIELD', label: 'Currency', name: 'currency', dataType: 'TEXT', required: false },
|
|
269
|
+
{ type: 'FIELD', label: 'Authorised shares', name: 'authorizedShares', dataType: 'INTEGER', required: false },
|
|
452
270
|
],
|
|
453
271
|
type: 'shareClasses',
|
|
454
272
|
singularLabel: 'Share class',
|
|
@@ -506,50 +324,45 @@ window.EXAMPLE_SHARE_CLASSES = [
|
|
|
506
324
|
// ─── Field Types demo ─────────────────────────────────────────────────────────
|
|
507
325
|
|
|
508
326
|
window.EXAMPLE_FIELD_TYPES_ITEMS = [
|
|
509
|
-
{ type: 'FIELD', label: 'Name (header)',
|
|
510
|
-
{ type: 'FIELD', label: 'Text',
|
|
511
|
-
{ type: 'FIELD', label: 'Email',
|
|
512
|
-
{ type: 'FIELD', label: 'Hyperlink',
|
|
513
|
-
{ type: 'FIELD', label: 'Integer',
|
|
514
|
-
{ type: 'FIELD', label: 'Decimal',
|
|
515
|
-
{ type: 'FIELD', label: 'Percentage',
|
|
516
|
-
{ type: 'FIELD', label: 'Currency',
|
|
517
|
-
{ type: 'FIELD', label: 'Boolean (true)',
|
|
518
|
-
{ type: 'FIELD', label: 'Boolean (false)',
|
|
519
|
-
{ type: 'FIELD', label: 'Date',
|
|
520
|
-
{ type: 'FIELD', label: 'DateTime',
|
|
521
|
-
{ type: 'FIELD', label: 'Time',
|
|
327
|
+
{ type: 'FIELD', label: 'Name (header)', name: 'fHeader', dataType: 'TEXT', required: false, header: true },
|
|
328
|
+
{ type: 'FIELD', label: 'Text', name: 'fText', dataType: 'TEXT', required: false },
|
|
329
|
+
{ type: 'FIELD', label: 'Email', name: 'fEmail', dataType: 'EMAIL', required: false },
|
|
330
|
+
{ type: 'FIELD', label: 'Hyperlink', name: 'fHyperlink', dataType: 'HYPERLINK', required: false },
|
|
331
|
+
{ type: 'FIELD', label: 'Integer', name: 'fInteger', dataType: 'INTEGER', required: false },
|
|
332
|
+
{ type: 'FIELD', label: 'Decimal', name: 'fDecimal', dataType: 'DECIMAL', required: false },
|
|
333
|
+
{ type: 'FIELD', label: 'Percentage', name: 'fPercentage', dataType: 'PERCENTAGE', required: false },
|
|
334
|
+
{ type: 'FIELD', label: 'Currency', name: 'fCurrency', dataType: 'CURRENCY', required: false },
|
|
335
|
+
{ type: 'FIELD', label: 'Boolean (true)', name: 'fBoolTrue', dataType: 'BOOLEAN', required: false },
|
|
336
|
+
{ type: 'FIELD', label: 'Boolean (false)', name: 'fBoolFalse', dataType: 'BOOLEAN', required: false },
|
|
337
|
+
{ type: 'FIELD', label: 'Date', name: 'fDate', dataType: 'DATE', required: false },
|
|
338
|
+
{ type: 'FIELD', label: 'DateTime', name: 'fDatetime', dataType: 'DATETIME', required: false },
|
|
339
|
+
{ type: 'FIELD', label: 'Time', name: 'fTime', dataType: 'TIME', required: false },
|
|
522
340
|
{
|
|
523
|
-
type: 'FIELD', label: 'List (no color)',
|
|
524
|
-
|
|
525
|
-
listItems: [{ key: 'a', label: 'Option A' }, { key: 'b', label: 'Option B' }],
|
|
526
|
-
},
|
|
341
|
+
type: 'FIELD', label: 'List (no color)', name: 'fListPlain', dataType: 'LIST', required: false,
|
|
342
|
+
listItems: [{ key: 'a', label: 'Option A' }, { key: 'b', label: 'Option B' }],
|
|
527
343
|
},
|
|
528
344
|
{
|
|
529
|
-
type: 'FIELD', label: 'List (color only)',
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
],
|
|
535
|
-
},
|
|
345
|
+
type: 'FIELD', label: 'List (color only)', name: 'fListColor', dataType: 'LIST', required: false,
|
|
346
|
+
listItems: [
|
|
347
|
+
{ key: 'active', label: 'Active', color: '#16a34a' },
|
|
348
|
+
{ key: 'inactive', label: 'Inactive', color: '#dc2626' },
|
|
349
|
+
],
|
|
536
350
|
},
|
|
537
351
|
{
|
|
538
|
-
type: 'FIELD', label: 'List (color + bg)',
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
],
|
|
545
|
-
},
|
|
352
|
+
type: 'FIELD', label: 'List (color + bg)', name: 'fListBadge', dataType: 'LIST', required: false,
|
|
353
|
+
listItems: [
|
|
354
|
+
{ key: 'approved', label: 'Approved', color: '#14532d', backgroundColor: '#dcfce7' },
|
|
355
|
+
{ key: 'rejected', label: 'Rejected', color: '#7f1d1d', backgroundColor: '#fee2e2' },
|
|
356
|
+
{ key: 'pending', label: 'Pending', color: '#78350f', backgroundColor: '#fef3c7' },
|
|
357
|
+
],
|
|
546
358
|
},
|
|
547
|
-
{ type: '
|
|
548
|
-
{ type: '
|
|
549
|
-
{ type: 'FIELD', label: '
|
|
550
|
-
{ type: 'FIELD', label: '
|
|
551
|
-
{ type: 'FIELD', label: '
|
|
552
|
-
{ type: 'FIELD', label: '
|
|
359
|
+
{ type: 'SEARCH', label: 'Zoeken', dataClass: 'demo.entity' },
|
|
360
|
+
{ type: 'RELATION', label: 'Relation (single)', name: 'fRelation', relatedClass: 'demo.entity', required: false },
|
|
361
|
+
{ type: 'FIELD', label: 'File', name: 'fFile', dataType: 'FILE', required: false },
|
|
362
|
+
{ type: 'FIELD', label: 'Image', name: 'fImage', dataType: 'IMAGE', required: false },
|
|
363
|
+
{ type: 'FIELD', label: 'Textblock', name: 'fTextblock', dataType: 'TEXTBLOCK', required: false },
|
|
364
|
+
{ type: 'FIELD', label: 'Longtext', name: 'fLongtext', dataType: 'LONGTEXT', required: false },
|
|
365
|
+
{ type: 'FIELD', label: 'JSON', name: 'fJson', dataType: 'JSON', required: false },
|
|
553
366
|
];
|
|
554
367
|
|
|
555
368
|
window.EXAMPLE_FIELD_TYPES_DATA = {
|
|
@@ -4,17 +4,19 @@ export class CellRenderer {
|
|
|
4
4
|
static render(column, row, locale) {
|
|
5
5
|
var _a, _b, _c, _d;
|
|
6
6
|
if (column.type === ClientLayoutItemType.RELATION) {
|
|
7
|
-
const name = (
|
|
8
|
-
const link = (
|
|
7
|
+
const name = (_a = column.name) !== null && _a !== void 0 ? _a : '';
|
|
8
|
+
const link = (_b = row === null || row === void 0 ? void 0 : row._links) === null || _b === void 0 ? void 0 : _b[name];
|
|
9
9
|
if (!link)
|
|
10
10
|
return '';
|
|
11
11
|
if (Array.isArray(link))
|
|
12
12
|
return link.map((l) => { var _a; return (_a = l.name) !== null && _a !== void 0 ? _a : ''; }).filter(Boolean).join(', ');
|
|
13
|
-
return (
|
|
13
|
+
return (_c = link.name) !== null && _c !== void 0 ? _c : '';
|
|
14
14
|
}
|
|
15
|
-
if (column.type !== ClientLayoutItemType.FIELD
|
|
15
|
+
if (column.type !== ClientLayoutItemType.FIELD)
|
|
16
16
|
return '';
|
|
17
|
-
const
|
|
17
|
+
const name = (_d = column.name) !== null && _d !== void 0 ? _d : '';
|
|
18
|
+
const dataType = column.dataType;
|
|
19
|
+
const listItems = column.listItems;
|
|
18
20
|
const raw = row === null || row === void 0 ? void 0 : row[name];
|
|
19
21
|
if (raw == null || raw === '')
|
|
20
22
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as l,createEvent as d,h as r,Host as i,transformTag as t}from"@stencil/core/internal/client";import{a as m,c as a,b as s}from"./client-layout.js";import{d as n}from"./mrd-boolean-field2.js";import{d as o}from"./mrd-currency-field2.js";import{d as u}from"./mrd-date-field2.js";import{d as c}from"./mrd-datetime-field2.js";import{d as f}from"./mrd-email-field2.js";import{d as v}from"./mrd-file-field2.js";import{d as h}from"./mrd-hyperlink-field2.js";import{d as b}from"./mrd-image-field2.js";import{d as p}from"./mrd-list-field2.js";import{d as j}from"./mrd-longtext-field2.js";import{d as k}from"./mrd-number-field2.js";import{d as E}from"./mrd-relation-field2.js";import{d as x}from"./mrd-text-field2.js";import{d as g}from"./mrd-textarea-field2.js";import{d as y}from"./mrd-time-field2.js";const O=e(class extends l{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=d(this,"mrdChange",7),this.mrdBlur=d(this,"mrdBlur",7),this.mrdSearch=d(this,"mrdSearch",7),this.mrdFetchAll=d(this,"mrdFetchAll",7),this.mrdUpload=d(this,"mrdUpload",7),this.locale=navigator.language,this.handleChange=e=>{e.stopPropagation(),this.mrdChange.emit(e.detail)},this.handleBlur=e=>{e.stopPropagation(),this.mrdBlur.emit(e.detail)},this.handleSearch=e=>{e.stopPropagation(),this.mrdSearch.emit(e.detail)},this.handleFetchAll=e=>{e.stopPropagation(),this.mrdFetchAll.emit(e.detail)},this.handleUpload=e=>{e.stopPropagation(),this.mrdUpload.emit(e.detail)}}render(){var e,l,d,t,n,o,u,c,f,v,h,b,p,j,k,E,x,g,y,O,M,C,S,B,U,w,q,z,A,F,R,T,I;const{item:P,locale:V,value:D}=this;if(P.type===m.RELATION
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as l,createEvent as d,h as r,Host as i,transformTag as t}from"@stencil/core/internal/client";import{a as m,c as a,b as s}from"./client-layout.js";import{d as n}from"./mrd-boolean-field2.js";import{d as o}from"./mrd-currency-field2.js";import{d as u}from"./mrd-date-field2.js";import{d as c}from"./mrd-datetime-field2.js";import{d as f}from"./mrd-email-field2.js";import{d as v}from"./mrd-file-field2.js";import{d as h}from"./mrd-hyperlink-field2.js";import{d as b}from"./mrd-image-field2.js";import{d as p}from"./mrd-list-field2.js";import{d as j}from"./mrd-longtext-field2.js";import{d as k}from"./mrd-number-field2.js";import{d as E}from"./mrd-relation-field2.js";import{d as x}from"./mrd-text-field2.js";import{d as g}from"./mrd-textarea-field2.js";import{d as y}from"./mrd-time-field2.js";const O=e(class extends l{constructor(e){super(),!1!==e&&this.__registerHost(),this.mrdChange=d(this,"mrdChange",7),this.mrdBlur=d(this,"mrdBlur",7),this.mrdSearch=d(this,"mrdSearch",7),this.mrdFetchAll=d(this,"mrdFetchAll",7),this.mrdUpload=d(this,"mrdUpload",7),this.locale=navigator.language,this.handleChange=e=>{e.stopPropagation(),this.mrdChange.emit(e.detail)},this.handleBlur=e=>{e.stopPropagation(),this.mrdBlur.emit(e.detail)},this.handleSearch=e=>{e.stopPropagation(),this.mrdSearch.emit(e.detail)},this.handleFetchAll=e=>{e.stopPropagation(),this.mrdFetchAll.emit(e.detail)},this.handleUpload=e=>{e.stopPropagation(),this.mrdUpload.emit(e.detail)}}render(){var e,l,d,t,n,o,u,c,f,v,h,b,p,j,k,E,x,g,y,O,M,C,S,B,U,w,q,z,A,F,R,T,I;const{item:P,locale:V,value:D}=this;if(P.type===m.RELATION)return r(i,null,r("mrd-relation-field",{name:P.name,label:P.label,required:P.required,disabled:null!==(e=P.disabled)&&void 0!==e&&e,locale:V,relatedClass:P.relatedClass,mostSignificantClass:null!==(l=P.mostSignificantClass)&&void 0!==l?l:"",displayType:null!==(d=P.displayType)&&void 0!==d?d:a.SEARCH,editBehavior:null!==(t=P.editBehavior)&&void 0!==t?t:null,commonRelation:P.commonRelation,multiple:null!==(n=P.multiple)&&void 0!==n&&n,dropdownValues:null!==(o=P.dropdownValues)&&void 0!==o?o:[],value:D,onMrdChange:this.handleChange,onMrdBlur:this.handleBlur,onMrdSearch:this.handleSearch,onMrdFetchAll:this.handleFetchAll}));if(P.type!==m.FIELD)return r(i,null);const G={name:P.name,label:P.label,required:P.required,disabled:null!==(u=P.disabled)&&void 0!==u&&u,locale:V,onMrdChange:this.handleChange,onMrdBlur:this.handleBlur};switch(P.dataType){case s.TEXT:return r(i,null,r("mrd-text-field",Object.assign({},G,{value:null!==(c=D)&&void 0!==c?c:"",placeholder:null!==(f=P.placeholder)&&void 0!==f?f:""})));case s.TEXTBLOCK:return r(i,null,r("mrd-textarea-field",Object.assign({},G,{value:null!==(v=D)&&void 0!==v?v:"",placeholder:null!==(h=P.placeholder)&&void 0!==h?h:""})));case s.INTEGER:case s.DECIMAL:case s.PERCENTAGE:return r(i,null,r("mrd-number-field",Object.assign({},G,{value:null!==(b=D)&&void 0!==b?b:null,dataType:P.dataType,decimalPrecision:null!==(p=P.decimalPrecision)&&void 0!==p?p:2,placeholder:null!==(j=P.placeholder)&&void 0!==j?j:""})));case s.CURRENCY:return r(i,null,r("mrd-currency-field",Object.assign({},G,{value:null!==(k=D)&&void 0!==k?k:{amount:null,currency:null!==(E=P.currencyCode)&&void 0!==E?E:"EUR"}})));case s.BOOLEAN:return r(i,null,r("mrd-boolean-field",Object.assign({},G,{value:null!==(x=D)&&void 0!==x&&x})));case s.DATE:return r(i,null,r("mrd-date-field",Object.assign({},G,{value:null!==(g=D)&&void 0!==g?g:""})));case s.DATETIME:return r(i,null,r("mrd-datetime-field",Object.assign({},G,{value:null!==(y=D)&&void 0!==y?y:""})));case s.TIME:return r(i,null,r("mrd-time-field",Object.assign({},G,{value:null!==(O=D)&&void 0!==O?O:""})));case s.EMAIL:return r(i,null,r("mrd-email-field",Object.assign({},G,{value:null!==(M=D)&&void 0!==M?M:"",placeholder:null!==(C=P.placeholder)&&void 0!==C?C:""})));case s.HYPERLINK:return r(i,null,r("mrd-hyperlink-field",Object.assign({},G,{value:null!==(S=D)&&void 0!==S?S:"",placeholder:null!==(B=P.placeholder)&&void 0!==B?B:""})));case s.LIST:return r(i,null,r("mrd-list-field",Object.assign({},G,{value:null!==(U=D)&&void 0!==U?U:"",multiple:null!==(w=P.multiple)&&void 0!==w&&w,listItems:null!==(q=P.listItems)&&void 0!==q?q:[]})));case s.FILE:return r(i,null,r("mrd-file-field",Object.assign({},G,{value:D,accept:null!==(z=P.accept)&&void 0!==z?z:"",maxSize:null!==(A=P.maxSize)&&void 0!==A?A:0,onMrdUpload:this.handleUpload})));case s.IMAGE:return r(i,null,r("mrd-image-field",Object.assign({},G,{value:D,accept:null!==(F=P.accept)&&void 0!==F?F:"image/*",maxSize:null!==(R=P.maxSize)&&void 0!==R?R:0,onMrdUpload:this.handleUpload})));case s.LONGTEXT:return r(i,null,r("mrd-longtext-field",Object.assign({},G,{value:null!==(T=D)&&void 0!==T?T:"",placeholder:null!==(I=P.placeholder)&&void 0!==I?I:""})));default:return r(i,null)}}},[2,"mrd-field",{item:[16],locale:[1],value:[16]}]);function M(){"undefined"!=typeof customElements&&["mrd-field","mrd-boolean-field","mrd-currency-field","mrd-date-field","mrd-datetime-field","mrd-email-field","mrd-file-field","mrd-hyperlink-field","mrd-image-field","mrd-list-field","mrd-longtext-field","mrd-number-field","mrd-relation-field","mrd-text-field","mrd-textarea-field","mrd-time-field"].forEach((e=>{switch(e){case"mrd-field":customElements.get(t(e))||customElements.define(t(e),O);break;case"mrd-boolean-field":customElements.get(t(e))||n();break;case"mrd-currency-field":customElements.get(t(e))||o();break;case"mrd-date-field":customElements.get(t(e))||u();break;case"mrd-datetime-field":customElements.get(t(e))||c();break;case"mrd-email-field":customElements.get(t(e))||f();break;case"mrd-file-field":customElements.get(t(e))||v();break;case"mrd-hyperlink-field":customElements.get(t(e))||h();break;case"mrd-image-field":customElements.get(t(e))||b();break;case"mrd-list-field":customElements.get(t(e))||p();break;case"mrd-longtext-field":customElements.get(t(e))||j();break;case"mrd-number-field":customElements.get(t(e))||k();break;case"mrd-relation-field":customElements.get(t(e))||E();break;case"mrd-text-field":customElements.get(t(e))||x();break;case"mrd-textarea-field":customElements.get(t(e))||g();break;case"mrd-time-field":customElements.get(t(e))||y()}}))}export{O as M,M as d}
|