@opencrvs/toolkit 2.0.0-rc.06a0baa → 2.0.0-rc.07776ed
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/create-countryconfig/index.js +50 -20
- package/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +257 -94
- package/dist/cli.js +12 -4
- package/dist/commons/api/router.d.ts +440 -20
- package/dist/commons/application-config/index.d.ts +1 -0
- package/dist/commons/conditionals/conditionals.d.ts +354 -4
- package/dist/commons/conditionals/validate.d.ts +51 -2
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +42 -36
- package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/FieldConfig.d.ts +377 -50
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldValue.d.ts +6 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/field.d.ts +53 -1
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/utils.d.ts +12 -287
- package/dist/commons/events/utils.d.ts +12 -1
- package/dist/conditionals/index.js +55 -2
- package/dist/events/index.js +945 -212
- package/dist/migrations/v2.0/index.js +12 -4
- package/dist/notification/index.js +802 -130
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +12 -4
- package/opencrvs-toolkit-2.0.0-rc.07776ed.tgz +0 -0
- package/package.json +6 -2
- package/opencrvs-toolkit-2.0.0-rc.06a0baa.tgz +0 -0
|
@@ -75,7 +75,10 @@ var ActionConditional = z.discriminatedUnion("type", [
|
|
|
75
75
|
ShowConditional,
|
|
76
76
|
// Action can be shown to the user in the list but as disabled
|
|
77
77
|
EnableConditional
|
|
78
|
-
])
|
|
78
|
+
]).meta({
|
|
79
|
+
id: "ActionConditional",
|
|
80
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
81
|
+
});
|
|
79
82
|
var DisplayOnReviewConditional = z.object({
|
|
80
83
|
type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
81
84
|
conditional: Conditional
|
|
@@ -90,8 +93,8 @@ var FieldConditional = z.discriminatedUnion("type", [
|
|
|
90
93
|
// Field output can be shown / hidden on the review page
|
|
91
94
|
DisplayOnReviewConditional
|
|
92
95
|
]).meta({
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
id: "FieldConditional",
|
|
97
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
95
98
|
});
|
|
96
99
|
|
|
97
100
|
// ../commons/src/events/TranslationConfig.ts
|
|
@@ -203,6 +206,11 @@ var FieldTypesToHideInReview = [
|
|
|
203
206
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
204
207
|
FieldType.ALPHA_HIDDEN
|
|
205
208
|
];
|
|
209
|
+
var HiddenFieldTypes = [
|
|
210
|
+
FieldType.HTTP,
|
|
211
|
+
FieldType.QUERY_PARAM_READER,
|
|
212
|
+
FieldType.ALPHA_HIDDEN
|
|
213
|
+
];
|
|
206
214
|
|
|
207
215
|
// ../commons/src/events/FieldValue.ts
|
|
208
216
|
var z7 = __toESM(require("zod/v4"));
|
|
@@ -321,7 +329,7 @@ var PlainDate = import_zod.z.string().date().brand("PlainDate").describe("Date i
|
|
|
321
329
|
// ../commons/src/events/FieldValue.ts
|
|
322
330
|
var TextValue = z7.string();
|
|
323
331
|
var HiddenFieldValue = z7.string();
|
|
324
|
-
var NonEmptyTextValue =
|
|
332
|
+
var NonEmptyTextValue = z7.string().trim().min(1);
|
|
325
333
|
var DateValue = z7.iso.date().describe("Date in the format YYYY-MM-DD");
|
|
326
334
|
var AgeValue = z7.object({
|
|
327
335
|
age: z7.number(),
|
|
@@ -350,6 +358,7 @@ var DateRangeFieldValue = z7.object({
|
|
|
350
358
|
var EmailValue = z7.email();
|
|
351
359
|
var CheckboxFieldValue = z7.boolean();
|
|
352
360
|
var NumberFieldValue = z7.number();
|
|
361
|
+
var SignatureFieldValue = FileFieldValue;
|
|
353
362
|
var ButtonFieldValue = z7.number();
|
|
354
363
|
var VerificationStatusValue = z7.enum([
|
|
355
364
|
"verified",
|
|
@@ -831,7 +840,9 @@ var ScopeType = z11.enum([
|
|
|
831
840
|
var EncodedScope = z11.string().brand("EncodedScope");
|
|
832
841
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
833
842
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
834
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
843
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
844
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
845
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
835
846
|
};
|
|
836
847
|
|
|
837
848
|
// ../commons/src/authentication.ts
|
|
@@ -984,8 +995,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
984
995
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
985
996
|
z13.object({
|
|
986
997
|
type: z13.literal(ActionType.APPROVE_CORRECTION),
|
|
987
|
-
requestId: z13.string()
|
|
998
|
+
requestId: z13.string(),
|
|
988
999
|
// TODO move into 'content' property
|
|
1000
|
+
content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
|
|
989
1001
|
}).shape
|
|
990
1002
|
);
|
|
991
1003
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -1077,6 +1089,9 @@ var FlagConfig = z14.object({
|
|
|
1077
1089
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1078
1090
|
),
|
|
1079
1091
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1092
|
+
}).meta({
|
|
1093
|
+
id: "FlagConfig",
|
|
1094
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1080
1095
|
});
|
|
1081
1096
|
var ActionFlagConfig = z14.object({
|
|
1082
1097
|
id: Flag,
|
|
@@ -1084,6 +1099,9 @@ var ActionFlagConfig = z14.object({
|
|
|
1084
1099
|
conditional: Conditional.optional().describe(
|
|
1085
1100
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1086
1101
|
)
|
|
1102
|
+
}).meta({
|
|
1103
|
+
id: "ActionFlagConfig",
|
|
1104
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1087
1105
|
});
|
|
1088
1106
|
|
|
1089
1107
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1396,14 +1414,31 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1396
1414
|
}
|
|
1397
1415
|
}).describe("Unique identifier for the field");
|
|
1398
1416
|
var FieldReference = import_v43.default.object({
|
|
1399
|
-
$$field: FieldId,
|
|
1417
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1400
1418
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1401
1419
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1420
|
+
),
|
|
1421
|
+
$$code: import_v43.default.string().optional().describe(
|
|
1422
|
+
"Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
|
|
1402
1423
|
)
|
|
1403
|
-
}).describe(
|
|
1424
|
+
}).describe(
|
|
1425
|
+
"Reference to a field value, with an optional client-side computation applied."
|
|
1426
|
+
);
|
|
1427
|
+
var ComputedDefaultValue = import_v43.default.object({
|
|
1428
|
+
$$code: import_v43.default.string().describe(
|
|
1429
|
+
"Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
|
|
1430
|
+
)
|
|
1431
|
+
}).describe("A context-only computation used as a field default value.");
|
|
1404
1432
|
var ValidationConfig = import_v43.default.object({
|
|
1405
|
-
validator: Conditional
|
|
1406
|
-
|
|
1433
|
+
validator: Conditional.describe(
|
|
1434
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1435
|
+
),
|
|
1436
|
+
message: TranslationConfig.describe(
|
|
1437
|
+
"Error message displayed when the validator does not hold."
|
|
1438
|
+
)
|
|
1439
|
+
}).meta({
|
|
1440
|
+
id: "ValidationConfig",
|
|
1441
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
1407
1442
|
});
|
|
1408
1443
|
var requiredSchema = import_v43.default.union([
|
|
1409
1444
|
import_v43.default.boolean(),
|
|
@@ -1434,7 +1469,7 @@ var BaseField = import_v43.default.object({
|
|
|
1434
1469
|
"Indicates whether the field can be modified during record correction."
|
|
1435
1470
|
),
|
|
1436
1471
|
value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
|
|
1437
|
-
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used."
|
|
1472
|
+
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used. A FieldReference with $$code computes the value via a custom client-side function."
|
|
1438
1473
|
),
|
|
1439
1474
|
analytics: import_v43.default.boolean().default(false).optional().describe(
|
|
1440
1475
|
"Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
|
|
@@ -1442,30 +1477,39 @@ var BaseField = import_v43.default.object({
|
|
|
1442
1477
|
}).describe("Common properties shared across all field types.");
|
|
1443
1478
|
var Divider = BaseField.extend({
|
|
1444
1479
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1480
|
+
}).meta({
|
|
1481
|
+
description: "A horizontal line divider",
|
|
1482
|
+
id: "Divider"
|
|
1445
1483
|
});
|
|
1446
1484
|
var TextField = BaseField.extend({
|
|
1447
1485
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
1448
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1486
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1449
1487
|
configuration: import_v43.default.object({
|
|
1450
1488
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1451
1489
|
type: import_v43.default.enum(["text", "password"]).optional(),
|
|
1452
1490
|
prefix: TranslationConfig.optional(),
|
|
1453
1491
|
postfix: TranslationConfig.optional()
|
|
1454
1492
|
}).default({ type: "text" }).optional()
|
|
1455
|
-
}).
|
|
1493
|
+
}).meta({
|
|
1494
|
+
description: "A text input field",
|
|
1495
|
+
id: "TextField"
|
|
1496
|
+
});
|
|
1456
1497
|
var NumberField = BaseField.extend({
|
|
1457
1498
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1458
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1499
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1459
1500
|
configuration: import_v43.default.object({
|
|
1460
1501
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1461
1502
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1462
1503
|
prefix: TranslationConfig.optional(),
|
|
1463
1504
|
postfix: TranslationConfig.optional()
|
|
1464
1505
|
}).optional()
|
|
1465
|
-
}).
|
|
1506
|
+
}).meta({
|
|
1507
|
+
description: "A number input field",
|
|
1508
|
+
id: "NumberField"
|
|
1509
|
+
});
|
|
1466
1510
|
var TextAreaField = BaseField.extend({
|
|
1467
1511
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1468
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1512
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1469
1513
|
configuration: import_v43.default.object({
|
|
1470
1514
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1471
1515
|
rows: import_v43.default.number().optional().describe("Number of visible text lines"),
|
|
@@ -1473,7 +1517,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1473
1517
|
prefix: TranslationConfig.optional(),
|
|
1474
1518
|
postfix: TranslationConfig.optional()
|
|
1475
1519
|
}).default({ rows: 4 }).optional()
|
|
1476
|
-
}).
|
|
1520
|
+
}).meta({
|
|
1521
|
+
description: "A multiline text input",
|
|
1522
|
+
id: "TextAreaField"
|
|
1523
|
+
});
|
|
1477
1524
|
var ImageMimeType = import_v43.default.enum([
|
|
1478
1525
|
"image/png",
|
|
1479
1526
|
"image/jpg",
|
|
@@ -1496,58 +1543,76 @@ var SignatureField = BaseField.extend({
|
|
|
1496
1543
|
signaturePromptLabel: TranslationConfig.describe(
|
|
1497
1544
|
"Title of the signature modal"
|
|
1498
1545
|
),
|
|
1499
|
-
defaultValue:
|
|
1546
|
+
defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
|
|
1500
1547
|
configuration: import_v43.default.object({
|
|
1501
1548
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1502
1549
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
1503
1550
|
}).default({
|
|
1504
1551
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1505
1552
|
})
|
|
1506
|
-
}).
|
|
1553
|
+
}).meta({
|
|
1554
|
+
description: "A signature input field",
|
|
1555
|
+
id: "SignatureField"
|
|
1556
|
+
});
|
|
1507
1557
|
var EmailField = BaseField.extend({
|
|
1508
1558
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1509
1559
|
configuration: import_v43.default.object({
|
|
1510
1560
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1511
1561
|
}).default({ maxLength: 255 }).optional(),
|
|
1512
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1562
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
|
|
1563
|
+
}).meta({
|
|
1564
|
+
description: "An email input field",
|
|
1565
|
+
id: "EmailField"
|
|
1513
1566
|
});
|
|
1514
1567
|
var DateField = BaseField.extend({
|
|
1515
1568
|
type: import_v43.default.literal(FieldType.DATE),
|
|
1516
|
-
defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1569
|
+
defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1517
1570
|
configuration: import_v43.default.object({
|
|
1518
1571
|
notice: TranslationConfig.describe(
|
|
1519
1572
|
"Text to display above the date input"
|
|
1520
1573
|
).optional()
|
|
1521
1574
|
}).optional()
|
|
1522
|
-
}).
|
|
1575
|
+
}).meta({
|
|
1576
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1577
|
+
id: "DateField"
|
|
1578
|
+
});
|
|
1523
1579
|
var AgeField = BaseField.extend({
|
|
1524
1580
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1525
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1581
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1526
1582
|
configuration: import_v43.default.object({
|
|
1527
1583
|
asOfDate: FieldReference,
|
|
1528
1584
|
prefix: TranslationConfig.optional(),
|
|
1529
1585
|
postfix: TranslationConfig.optional()
|
|
1530
1586
|
})
|
|
1531
|
-
}).
|
|
1587
|
+
}).meta({
|
|
1588
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1589
|
+
id: "AgeField"
|
|
1590
|
+
});
|
|
1532
1591
|
var TimeField = BaseField.extend({
|
|
1533
1592
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1534
|
-
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
1593
|
+
defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
|
|
1535
1594
|
configuration: import_v43.default.object({
|
|
1536
1595
|
use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
|
|
1537
1596
|
notice: TranslationConfig.describe(
|
|
1538
1597
|
"Text to display above the time input"
|
|
1539
1598
|
).optional()
|
|
1540
1599
|
}).optional()
|
|
1541
|
-
}).
|
|
1600
|
+
}).meta({
|
|
1601
|
+
description: "A single time input (HH-mm)",
|
|
1602
|
+
id: "TimeField"
|
|
1603
|
+
});
|
|
1542
1604
|
var DateRangeField = BaseField.extend({
|
|
1543
1605
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1544
|
-
defaultValue: DateRangeFieldValue.optional(),
|
|
1606
|
+
defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
|
|
1545
1607
|
configuration: import_v43.default.object({
|
|
1546
1608
|
notice: TranslationConfig.describe(
|
|
1547
1609
|
"Text to display above the date input"
|
|
1548
1610
|
).optional()
|
|
1549
1611
|
}).optional()
|
|
1550
|
-
}).
|
|
1612
|
+
}).meta({
|
|
1613
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1614
|
+
id: "DateRangeField"
|
|
1615
|
+
});
|
|
1551
1616
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1552
1617
|
"reg12",
|
|
1553
1618
|
"reg14",
|
|
@@ -1591,21 +1656,33 @@ var ImageViewField = BaseField.extend({
|
|
|
1591
1656
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1592
1657
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1593
1658
|
configuration: ImageConfiguration
|
|
1594
|
-
}).
|
|
1659
|
+
}).meta({
|
|
1660
|
+
description: "A read-only image component for form pages",
|
|
1661
|
+
id: "ImageViewField"
|
|
1662
|
+
});
|
|
1595
1663
|
var Paragraph = BaseField.extend({
|
|
1596
1664
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1597
1665
|
configuration: ParagraphConfiguration
|
|
1598
|
-
}).
|
|
1666
|
+
}).meta({
|
|
1667
|
+
description: "A read-only HTML <p> paragraph",
|
|
1668
|
+
id: "Paragraph"
|
|
1669
|
+
});
|
|
1599
1670
|
var Heading = BaseField.extend({
|
|
1600
1671
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1601
1672
|
configuration: HeadingConfiguration
|
|
1602
|
-
}).
|
|
1673
|
+
}).meta({
|
|
1674
|
+
description: "A read-only heading component for form pages",
|
|
1675
|
+
id: "Heading"
|
|
1676
|
+
});
|
|
1603
1677
|
var PageHeader = BaseField.extend({
|
|
1604
1678
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1605
|
-
}).
|
|
1679
|
+
}).meta({
|
|
1680
|
+
description: "A read-only header component for form pages",
|
|
1681
|
+
id: "PageHeader"
|
|
1682
|
+
});
|
|
1606
1683
|
var File = BaseField.extend({
|
|
1607
1684
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1608
|
-
defaultValue: FileFieldValue.optional(),
|
|
1685
|
+
defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
|
|
1609
1686
|
configuration: import_v43.default.object({
|
|
1610
1687
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1611
1688
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
@@ -1621,7 +1698,10 @@ var File = BaseField.extend({
|
|
|
1621
1698
|
}).default({
|
|
1622
1699
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1623
1700
|
})
|
|
1624
|
-
}).
|
|
1701
|
+
}).meta({
|
|
1702
|
+
description: "A file upload field",
|
|
1703
|
+
id: "File"
|
|
1704
|
+
});
|
|
1625
1705
|
var SelectOption = import_v43.default.object({
|
|
1626
1706
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1627
1707
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1629,7 +1709,7 @@ var SelectOption = import_v43.default.object({
|
|
|
1629
1709
|
});
|
|
1630
1710
|
var NumberWithUnitField = BaseField.extend({
|
|
1631
1711
|
type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1632
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1712
|
+
defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
|
|
1633
1713
|
options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
|
|
1634
1714
|
configuration: import_v43.default.object({
|
|
1635
1715
|
min: import_v43.default.number().optional().describe("Minimum value of the number field"),
|
|
@@ -1638,17 +1718,23 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1638
1718
|
"Placeholder for the number field"
|
|
1639
1719
|
)
|
|
1640
1720
|
}).optional()
|
|
1641
|
-
}).
|
|
1721
|
+
}).meta({
|
|
1722
|
+
description: "A number with unit input field",
|
|
1723
|
+
id: "NumberWithUnitField"
|
|
1724
|
+
});
|
|
1642
1725
|
var RadioGroup = BaseField.extend({
|
|
1643
1726
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1644
|
-
defaultValue: TextValue.optional(),
|
|
1727
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1645
1728
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1646
1729
|
configuration: import_v43.default.object({
|
|
1647
1730
|
styles: import_v43.default.object({
|
|
1648
1731
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1649
1732
|
}).optional()
|
|
1650
1733
|
}).optional()
|
|
1651
|
-
}).
|
|
1734
|
+
}).meta({
|
|
1735
|
+
description: "A grouped radio button field",
|
|
1736
|
+
id: "RadioGroup"
|
|
1737
|
+
});
|
|
1652
1738
|
var BulletList = BaseField.extend({
|
|
1653
1739
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1654
1740
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1657,10 +1743,13 @@ var BulletList = BaseField.extend({
|
|
|
1657
1743
|
fontVariant: HtmlFontVariant.optional()
|
|
1658
1744
|
}).optional()
|
|
1659
1745
|
}).default({})
|
|
1660
|
-
}).
|
|
1746
|
+
}).meta({
|
|
1747
|
+
description: "A list of bullet points",
|
|
1748
|
+
id: "BulletList"
|
|
1749
|
+
});
|
|
1661
1750
|
var Select = BaseField.extend({
|
|
1662
1751
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1663
|
-
defaultValue: TextValue.optional(),
|
|
1752
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1664
1753
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1665
1754
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1666
1755
|
`
|
|
@@ -1672,16 +1761,22 @@ var Select = BaseField.extend({
|
|
|
1672
1761
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1673
1762
|
`
|
|
1674
1763
|
)
|
|
1675
|
-
}).
|
|
1764
|
+
}).meta({
|
|
1765
|
+
description: "A select input field",
|
|
1766
|
+
id: "Select"
|
|
1767
|
+
});
|
|
1676
1768
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1677
1769
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1678
1770
|
label: TranslationConfig.describe("The label of the option")
|
|
1679
1771
|
});
|
|
1680
1772
|
var SelectDateRangeField = BaseField.extend({
|
|
1681
1773
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1682
|
-
defaultValue: SelectDateRangeValue.optional(),
|
|
1774
|
+
defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
|
|
1683
1775
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1684
|
-
}).
|
|
1776
|
+
}).meta({
|
|
1777
|
+
description: "A date range selection field",
|
|
1778
|
+
id: "SelectDateRangeField"
|
|
1779
|
+
});
|
|
1685
1780
|
var NameConfig = import_v43.default.object({
|
|
1686
1781
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1687
1782
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1693,7 +1788,7 @@ var NameField = BaseField.extend({
|
|
|
1693
1788
|
firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1694
1789
|
middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1695
1790
|
surname: SerializedUserField.or(NonEmptyTextValue).optional()
|
|
1696
|
-
}).optional(),
|
|
1791
|
+
}).or(ComputedDefaultValue).optional(),
|
|
1697
1792
|
configuration: import_v43.default.object({
|
|
1698
1793
|
name: NameConfig.default({
|
|
1699
1794
|
firstname: { required: true },
|
|
@@ -1712,26 +1807,41 @@ var NameField = BaseField.extend({
|
|
|
1712
1807
|
surname: { required: true }
|
|
1713
1808
|
}
|
|
1714
1809
|
}).optional()
|
|
1715
|
-
}).
|
|
1810
|
+
}).meta({
|
|
1811
|
+
description: "A field for entering a persons name",
|
|
1812
|
+
id: "NameField"
|
|
1813
|
+
});
|
|
1716
1814
|
var PhoneField = BaseField.extend({
|
|
1717
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1815
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1718
1816
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1719
|
-
}).
|
|
1817
|
+
}).meta({
|
|
1818
|
+
description: "A field for entering a phone number",
|
|
1819
|
+
id: "PhoneField"
|
|
1820
|
+
});
|
|
1720
1821
|
var IdField = BaseField.extend({
|
|
1721
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1822
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1722
1823
|
type: import_v43.default.literal(FieldType.ID)
|
|
1723
|
-
}).
|
|
1824
|
+
}).meta({
|
|
1825
|
+
description: "A field for entering an ID",
|
|
1826
|
+
id: "IdField"
|
|
1827
|
+
});
|
|
1724
1828
|
var Checkbox = BaseField.extend({
|
|
1725
1829
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1726
|
-
defaultValue: CheckboxFieldValue.default(false)
|
|
1727
|
-
}).
|
|
1830
|
+
defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
|
|
1831
|
+
}).meta({
|
|
1832
|
+
description: "A boolean checkbox field",
|
|
1833
|
+
id: "Checkbox"
|
|
1834
|
+
});
|
|
1728
1835
|
var Country = BaseField.extend({
|
|
1729
1836
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1730
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1837
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1731
1838
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1732
1839
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1733
1840
|
)
|
|
1734
|
-
}).
|
|
1841
|
+
}).meta({
|
|
1842
|
+
description: "A field for selecting a country",
|
|
1843
|
+
id: "Country"
|
|
1844
|
+
});
|
|
1735
1845
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
1736
1846
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
1737
1847
|
);
|
|
@@ -1740,28 +1850,33 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
1740
1850
|
"HEALTH_FACILITY",
|
|
1741
1851
|
"CRVS_OFFICE"
|
|
1742
1852
|
]);
|
|
1743
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
1744
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
1745
|
-
type: AdministrativeAreas,
|
|
1746
|
-
allowedLocations: AllowedLocations
|
|
1747
|
-
}).describe("Administrative area options");
|
|
1748
1853
|
var AdministrativeAreaField = BaseField.extend({
|
|
1749
1854
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
1750
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1751
|
-
configuration:
|
|
1752
|
-
|
|
1855
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1856
|
+
configuration: import_v43.default.object({
|
|
1857
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
1858
|
+
type: AdministrativeAreas,
|
|
1859
|
+
allowedLocations: AllowedLocations
|
|
1860
|
+
}).describe("Administrative area options")
|
|
1861
|
+
}).meta({
|
|
1862
|
+
description: "Administrative area input field",
|
|
1863
|
+
id: "AdministrativeAreaField"
|
|
1864
|
+
});
|
|
1753
1865
|
var LocationInput = BaseField.extend({
|
|
1754
1866
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
1755
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1867
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1756
1868
|
configuration: import_v43.default.object({
|
|
1757
1869
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
1758
1870
|
allowedLocations: AllowedLocations
|
|
1759
1871
|
}).optional()
|
|
1760
|
-
}).
|
|
1872
|
+
}).meta({
|
|
1873
|
+
description: "A field for selecting a location",
|
|
1874
|
+
id: "LocationInput"
|
|
1875
|
+
});
|
|
1761
1876
|
var FileUploadWithOptions = BaseField.extend({
|
|
1762
1877
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
1763
1878
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1764
|
-
defaultValue: FileFieldWithOptionValue.optional(),
|
|
1879
|
+
defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
|
|
1765
1880
|
configuration: import_v43.default.object({
|
|
1766
1881
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1767
1882
|
maxImageSize: import_v43.default.object({
|
|
@@ -1771,15 +1886,18 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1771
1886
|
}).default({
|
|
1772
1887
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1773
1888
|
})
|
|
1889
|
+
}).meta({
|
|
1890
|
+
description: "A field for uploading files with file type options",
|
|
1891
|
+
id: "FileUploadWithOptions"
|
|
1774
1892
|
});
|
|
1775
1893
|
var Facility = BaseField.extend({
|
|
1776
1894
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
1777
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1895
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1778
1896
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1779
1897
|
}).describe("Input field for a facility");
|
|
1780
1898
|
var Office = BaseField.extend({
|
|
1781
1899
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
1782
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1900
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1783
1901
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1784
1902
|
}).describe("Input field for an office");
|
|
1785
1903
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
@@ -1815,8 +1933,11 @@ var Address = BaseField.extend({
|
|
|
1815
1933
|
).optional(),
|
|
1816
1934
|
allowedLocations: AllowedLocations
|
|
1817
1935
|
}).optional(),
|
|
1818
|
-
defaultValue: DefaultAddressFieldValue.optional()
|
|
1819
|
-
}).
|
|
1936
|
+
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
1937
|
+
}).meta({
|
|
1938
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
1939
|
+
id: "Address"
|
|
1940
|
+
});
|
|
1820
1941
|
var StaticDataEntry = import_v43.default.object({
|
|
1821
1942
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
1822
1943
|
label: TranslationConfig,
|
|
@@ -1831,7 +1952,10 @@ var DataField = BaseField.extend({
|
|
|
1831
1952
|
subtitle: TranslationConfig.optional(),
|
|
1832
1953
|
data: import_v43.default.array(DataEntry)
|
|
1833
1954
|
})
|
|
1834
|
-
}).
|
|
1955
|
+
}).meta({
|
|
1956
|
+
description: "A field for displaying a table of read-only data",
|
|
1957
|
+
id: "DataField"
|
|
1958
|
+
});
|
|
1835
1959
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
1836
1960
|
var ButtonType = import_v43.default.enum([
|
|
1837
1961
|
"primary",
|
|
@@ -1856,13 +1980,19 @@ var ButtonConfiguration = import_v43.default.object({
|
|
|
1856
1980
|
});
|
|
1857
1981
|
var ButtonField = BaseField.extend({
|
|
1858
1982
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
1859
|
-
defaultValue: ButtonFieldValue.optional(),
|
|
1983
|
+
defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
|
|
1860
1984
|
configuration: ButtonConfiguration
|
|
1861
|
-
}).
|
|
1985
|
+
}).meta({
|
|
1986
|
+
description: "A generic button that can be used to trigger an action",
|
|
1987
|
+
id: "ButtonField"
|
|
1988
|
+
});
|
|
1862
1989
|
var FieldGroup = BaseField.extend({
|
|
1863
1990
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
1864
1991
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1865
1992
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
1993
|
+
}).meta({
|
|
1994
|
+
description: "A group of fields that are displayed together",
|
|
1995
|
+
id: "FieldGroup"
|
|
1866
1996
|
});
|
|
1867
1997
|
var AlphaPrintButton = BaseField.extend({
|
|
1868
1998
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -1872,10 +2002,13 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
1872
2002
|
"Label for the print button"
|
|
1873
2003
|
)
|
|
1874
2004
|
})
|
|
1875
|
-
}).
|
|
2005
|
+
}).meta({
|
|
2006
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2007
|
+
id: "AlphaPrintButton"
|
|
2008
|
+
});
|
|
1876
2009
|
var HttpField = BaseField.extend({
|
|
1877
2010
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
1878
|
-
defaultValue: HttpFieldValue.optional(),
|
|
2011
|
+
defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
|
|
1879
2012
|
configuration: import_v43.default.object({
|
|
1880
2013
|
trigger: FieldReference.optional().describe(
|
|
1881
2014
|
"Reference to the field that triggers the HTTP request when its value changes. If not provided, the HTTP request is triggered once on component mount."
|
|
@@ -1888,20 +2021,30 @@ var HttpField = BaseField.extend({
|
|
|
1888
2021
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
1889
2022
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
1890
2023
|
})
|
|
1891
|
-
}).
|
|
2024
|
+
}).meta({
|
|
2025
|
+
description: "Makes a background HTTP request to an external service and stores the response so other fields can use it. Has no visible UI \u2014 pair with LOADER to show request status.",
|
|
2026
|
+
id: "HttpField"
|
|
2027
|
+
});
|
|
1892
2028
|
var AutocompleteField = BaseField.extend({
|
|
1893
2029
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
1894
2030
|
configuration: import_v43.default.object({
|
|
1895
|
-
url: import_v43.default.string().describe(
|
|
2031
|
+
url: import_v43.default.string().describe(
|
|
2032
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2033
|
+
).optional(),
|
|
1896
2034
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
1897
2035
|
defaultOptions: import_v43.default.array(
|
|
1898
2036
|
import_v43.default.object({
|
|
1899
2037
|
label: import_v43.default.string(),
|
|
1900
2038
|
value: import_v43.default.string()
|
|
1901
2039
|
})
|
|
1902
|
-
).optional()
|
|
2040
|
+
).optional().describe(
|
|
2041
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2042
|
+
)
|
|
1903
2043
|
})
|
|
1904
|
-
}).
|
|
2044
|
+
}).meta({
|
|
2045
|
+
description: "Generic autocomplete component designed for use with large dictionary-based datasets. The component supports dynamic retrieval of options from configurable data sources and is intended for datasets that may contain tens or hundreds of thousands of records.",
|
|
2046
|
+
id: "AutocompleteField"
|
|
2047
|
+
});
|
|
1905
2048
|
var SearchField = HttpField.extend({
|
|
1906
2049
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
1907
2050
|
configuration: SearchQuery.pick({
|
|
@@ -1934,6 +2077,9 @@ var SearchField = HttpField.extend({
|
|
|
1934
2077
|
ok: TranslationConfig.optional()
|
|
1935
2078
|
}).optional()
|
|
1936
2079
|
})
|
|
2080
|
+
}).meta({
|
|
2081
|
+
description: "A search input field",
|
|
2082
|
+
id: "SearchField"
|
|
1937
2083
|
});
|
|
1938
2084
|
var LinkButtonField = BaseField.extend({
|
|
1939
2085
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -1942,28 +2088,35 @@ var LinkButtonField = BaseField.extend({
|
|
|
1942
2088
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
1943
2089
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
1944
2090
|
})
|
|
1945
|
-
}).
|
|
2091
|
+
}).meta({
|
|
2092
|
+
description: "A button that opens a URL link",
|
|
2093
|
+
id: "LinkButtonField"
|
|
2094
|
+
});
|
|
1946
2095
|
var VerificationStatus = BaseField.extend({
|
|
1947
2096
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
1948
|
-
defaultValue: VerificationStatusValue.optional(),
|
|
2097
|
+
defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
|
|
1949
2098
|
configuration: import_v43.default.object({
|
|
1950
2099
|
status: TranslationConfig.describe("Text to display on the status pill."),
|
|
1951
2100
|
description: TranslationConfig.describe(
|
|
1952
2101
|
"Explaining text on the banner in form."
|
|
1953
2102
|
)
|
|
1954
2103
|
})
|
|
2104
|
+
}).meta({
|
|
2105
|
+
description: "Displays a verification state (e.g. ID verified / pending). Often paired with ID_READER \u2014 it can read its value off an ID_READER rather than holding its own.",
|
|
2106
|
+
id: "VerificationStatus"
|
|
1955
2107
|
});
|
|
1956
2108
|
var QueryParamReaderField = BaseField.extend({
|
|
1957
2109
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
1958
2110
|
configuration: import_v43.default.object({
|
|
1959
2111
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
1960
2112
|
})
|
|
1961
|
-
}).
|
|
1962
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
1963
|
-
|
|
2113
|
+
}).meta({
|
|
2114
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2115
|
+
id: "QueryParamReaderField"
|
|
2116
|
+
});
|
|
1964
2117
|
var QrReaderField = BaseField.extend({
|
|
1965
2118
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
1966
|
-
defaultValue: QrReaderFieldValue.optional(),
|
|
2119
|
+
defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
1967
2120
|
configuration: import_v43.default.object({
|
|
1968
2121
|
validator: import_v43.default.any().meta({
|
|
1969
2122
|
description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
|
|
@@ -1971,21 +2124,27 @@ var QrReaderField = BaseField.extend({
|
|
|
1971
2124
|
})
|
|
1972
2125
|
}).optional()
|
|
1973
2126
|
}).meta({
|
|
1974
|
-
description: "
|
|
2127
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
1975
2128
|
id: "QrReaderField"
|
|
1976
2129
|
});
|
|
1977
2130
|
var IdReaderField = BaseField.extend({
|
|
1978
2131
|
type: import_v43.default.literal(FieldType.ID_READER),
|
|
1979
|
-
defaultValue: IdReaderFieldValue.optional(),
|
|
2132
|
+
defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
1980
2133
|
methods: import_v43.default.array(
|
|
1981
2134
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
1982
2135
|
)
|
|
2136
|
+
}).meta({
|
|
2137
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2138
|
+
id: "IdReaderField"
|
|
1983
2139
|
});
|
|
1984
2140
|
var CustomField = BaseField.extend({
|
|
1985
2141
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
1986
2142
|
defaultValue: CustomFieldValue.optional(),
|
|
1987
2143
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
1988
2144
|
configuration: import_v43.default.unknown().optional()
|
|
2145
|
+
}).meta({
|
|
2146
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2147
|
+
id: "CustomField"
|
|
1989
2148
|
});
|
|
1990
2149
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
1991
2150
|
var LoaderField = BaseField.extend({
|
|
@@ -1995,22 +2154,25 @@ var LoaderField = BaseField.extend({
|
|
|
1995
2154
|
configuration: import_v43.default.object({
|
|
1996
2155
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
1997
2156
|
})
|
|
1998
|
-
}).
|
|
1999
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2000
|
-
|
|
2157
|
+
}).meta({
|
|
2158
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2159
|
+
id: "LoaderField"
|
|
2160
|
+
});
|
|
2001
2161
|
var HiddenField = BaseField.extend({
|
|
2002
2162
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2003
2163
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2004
2164
|
defaultValue: TextValue.optional()
|
|
2005
|
-
}).
|
|
2006
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2007
|
-
|
|
2165
|
+
}).meta({
|
|
2166
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2167
|
+
id: "HiddenField"
|
|
2168
|
+
});
|
|
2008
2169
|
var UserRoleField = BaseField.extend({
|
|
2009
2170
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2010
2171
|
defaultValue: TextValue.optional()
|
|
2011
|
-
}).
|
|
2012
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2013
|
-
|
|
2172
|
+
}).meta({
|
|
2173
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2174
|
+
id: "UserRoleField"
|
|
2175
|
+
});
|
|
2014
2176
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2015
2177
|
FieldGroup,
|
|
2016
2178
|
Address,
|
|
@@ -2128,6 +2290,7 @@ var ClientConfig = z20.object({
|
|
|
2128
2290
|
COUNTRY: z20.string(),
|
|
2129
2291
|
LANGUAGES: z20.array(z20.string()),
|
|
2130
2292
|
SENTRY: z20.string().optional(),
|
|
2293
|
+
LOGIN_URL: z20.string().optional(),
|
|
2131
2294
|
REGISTER_BACKGROUND: BackgroundConfig,
|
|
2132
2295
|
DASHBOARDS: z20.array(
|
|
2133
2296
|
z20.object({
|