ballerina-core 1.0.233 → 1.0.235
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/package.json +1 -1
- package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/record/template.tsx +10 -0
- package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/template.tsx +11 -0
- package/src/forms/domains/parser/domains/predicates/state.ts +7 -1
package/package.json
CHANGED
package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/record/template.tsx
CHANGED
|
@@ -265,6 +265,16 @@ export const RecordAbstractRenderer = <
|
|
|
265
265
|
return <></>;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
visibleFieldKeys.value.map((field) => {
|
|
269
|
+
if (field != null && !FieldTemplates.has(field)) {
|
|
270
|
+
console.warn(
|
|
271
|
+
`Field ${field} is defined in the visible fields, but not in the FieldTemplates. A renderer in the record fields is missing for this field.
|
|
272
|
+
\n...When rendering \n...${domNodeId}
|
|
273
|
+
`,
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
268
278
|
const visibleFieldKeysSet = Set(
|
|
269
279
|
visibleFieldKeys.value.filter((fieldName) => fieldName != null),
|
|
270
280
|
);
|
package/src/forms/domains/dispatched-forms/runner/domains/abstract-renderers/table/template.tsx
CHANGED
|
@@ -552,6 +552,17 @@ export const TableAbstractRenderer = <
|
|
|
552
552
|
/>
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
|
+
|
|
556
|
+
visibleColumns.value.columns.map((column) => {
|
|
557
|
+
if (!CellTemplates.has(column)) {
|
|
558
|
+
console.warn(
|
|
559
|
+
`Column ${column} is defined in the visible columns, but not in the CellTemplates. A renderer in the table columns is missing for this column.
|
|
560
|
+
\n...When rendering \n...${domNodeId}
|
|
561
|
+
`,
|
|
562
|
+
);
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
|
|
555
566
|
// TODO we currently only calculated disabled status on a column basis, predicates will break if we
|
|
556
567
|
// try to use their local binding (the local is the table).
|
|
557
568
|
// Later we need to then calculate the disabled on a CELL level, by giving the calculations
|
|
@@ -575,12 +575,18 @@ export type BinaryOperator = (typeof BinaryOperators)[number];
|
|
|
575
575
|
|
|
576
576
|
export type Bindings = Map<string, PredicateValue>;
|
|
577
577
|
|
|
578
|
+
const defaultPredicateDate = () => {
|
|
579
|
+
const d = new Date();
|
|
580
|
+
d.setUTCHours(0, 0, 0, 0);
|
|
581
|
+
return d;
|
|
582
|
+
};
|
|
583
|
+
|
|
578
584
|
export const PredicateValue = {
|
|
579
585
|
Default: {
|
|
580
586
|
string: () => "",
|
|
581
587
|
number: () => 0,
|
|
582
588
|
boolean: () => false,
|
|
583
|
-
date: () =>
|
|
589
|
+
date: () => defaultPredicateDate(),
|
|
584
590
|
unit: (): ValueUnit => ({ kind: "unit" }),
|
|
585
591
|
tuple: (values: List<PredicateValue>): ValueTuple => ({
|
|
586
592
|
kind: "tuple",
|