@opencrvs/toolkit 2.0.0-rc.1aa040b → 2.0.0-rc.1aa4d8a
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 +255 -93
- package/dist/cli.js +10 -4
- package/dist/commons/api/router.d.ts +107 -21
- 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/ActionConfig.d.ts +28 -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 +378 -50
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
- 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 +52 -1
- package/dist/events/index.js +1047 -232
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
- package/dist/migrations/v2.0/index.js +10 -4
- package/dist/notification/index.js +881 -130
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +9 -3
- package/opencrvs-toolkit-2.0.0-rc.1aa4d8a.tgz +0 -0
- package/package.json +6 -2
- package/opencrvs-toolkit-2.0.0-rc.1aa040b.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",
|
|
@@ -986,8 +995,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
986
995
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
987
996
|
z13.object({
|
|
988
997
|
type: z13.literal(ActionType.APPROVE_CORRECTION),
|
|
989
|
-
requestId: z13.string()
|
|
998
|
+
requestId: z13.string(),
|
|
990
999
|
// TODO move into 'content' property
|
|
1000
|
+
content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
|
|
991
1001
|
}).shape
|
|
992
1002
|
);
|
|
993
1003
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -1079,6 +1089,9 @@ var FlagConfig = z14.object({
|
|
|
1079
1089
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1080
1090
|
),
|
|
1081
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."
|
|
1082
1095
|
});
|
|
1083
1096
|
var ActionFlagConfig = z14.object({
|
|
1084
1097
|
id: Flag,
|
|
@@ -1086,6 +1099,9 @@ var ActionFlagConfig = z14.object({
|
|
|
1086
1099
|
conditional: Conditional.optional().describe(
|
|
1087
1100
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1088
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."
|
|
1089
1105
|
});
|
|
1090
1106
|
|
|
1091
1107
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1398,14 +1414,31 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1398
1414
|
}
|
|
1399
1415
|
}).describe("Unique identifier for the field");
|
|
1400
1416
|
var FieldReference = import_v43.default.object({
|
|
1401
|
-
$$field: FieldId,
|
|
1417
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1402
1418
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1403
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."
|
|
1404
1423
|
)
|
|
1405
|
-
}).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.");
|
|
1406
1432
|
var ValidationConfig = import_v43.default.object({
|
|
1407
|
-
validator: Conditional
|
|
1408
|
-
|
|
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."
|
|
1409
1442
|
});
|
|
1410
1443
|
var requiredSchema = import_v43.default.union([
|
|
1411
1444
|
import_v43.default.boolean(),
|
|
@@ -1436,7 +1469,7 @@ var BaseField = import_v43.default.object({
|
|
|
1436
1469
|
"Indicates whether the field can be modified during record correction."
|
|
1437
1470
|
),
|
|
1438
1471
|
value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
|
|
1439
|
-
"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."
|
|
1440
1473
|
),
|
|
1441
1474
|
analytics: import_v43.default.boolean().default(false).optional().describe(
|
|
1442
1475
|
"Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
|
|
@@ -1444,30 +1477,40 @@ var BaseField = import_v43.default.object({
|
|
|
1444
1477
|
}).describe("Common properties shared across all field types.");
|
|
1445
1478
|
var Divider = BaseField.extend({
|
|
1446
1479
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1480
|
+
}).meta({
|
|
1481
|
+
description: "A horizontal line divider",
|
|
1482
|
+
id: "Divider"
|
|
1447
1483
|
});
|
|
1448
1484
|
var TextField = BaseField.extend({
|
|
1449
1485
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
1450
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1486
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1451
1487
|
configuration: import_v43.default.object({
|
|
1452
1488
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1453
1489
|
type: import_v43.default.enum(["text", "password"]).optional(),
|
|
1454
1490
|
prefix: TranslationConfig.optional(),
|
|
1455
1491
|
postfix: TranslationConfig.optional()
|
|
1456
1492
|
}).default({ type: "text" }).optional()
|
|
1457
|
-
}).
|
|
1493
|
+
}).meta({
|
|
1494
|
+
description: "A text input field",
|
|
1495
|
+
id: "TextField"
|
|
1496
|
+
});
|
|
1458
1497
|
var NumberField = BaseField.extend({
|
|
1459
1498
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1460
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1499
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1461
1500
|
configuration: import_v43.default.object({
|
|
1462
1501
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1463
1502
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1503
|
+
integer: import_v43.default.boolean().optional().describe("When true, only whole numbers are allowed"),
|
|
1464
1504
|
prefix: TranslationConfig.optional(),
|
|
1465
1505
|
postfix: TranslationConfig.optional()
|
|
1466
1506
|
}).optional()
|
|
1467
|
-
}).
|
|
1507
|
+
}).meta({
|
|
1508
|
+
description: "A number input field",
|
|
1509
|
+
id: "NumberField"
|
|
1510
|
+
});
|
|
1468
1511
|
var TextAreaField = BaseField.extend({
|
|
1469
1512
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1470
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1513
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1471
1514
|
configuration: import_v43.default.object({
|
|
1472
1515
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1473
1516
|
rows: import_v43.default.number().optional().describe("Number of visible text lines"),
|
|
@@ -1475,7 +1518,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1475
1518
|
prefix: TranslationConfig.optional(),
|
|
1476
1519
|
postfix: TranslationConfig.optional()
|
|
1477
1520
|
}).default({ rows: 4 }).optional()
|
|
1478
|
-
}).
|
|
1521
|
+
}).meta({
|
|
1522
|
+
description: "A multiline text input",
|
|
1523
|
+
id: "TextAreaField"
|
|
1524
|
+
});
|
|
1479
1525
|
var ImageMimeType = import_v43.default.enum([
|
|
1480
1526
|
"image/png",
|
|
1481
1527
|
"image/jpg",
|
|
@@ -1498,58 +1544,76 @@ var SignatureField = BaseField.extend({
|
|
|
1498
1544
|
signaturePromptLabel: TranslationConfig.describe(
|
|
1499
1545
|
"Title of the signature modal"
|
|
1500
1546
|
),
|
|
1501
|
-
defaultValue:
|
|
1547
|
+
defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
|
|
1502
1548
|
configuration: import_v43.default.object({
|
|
1503
1549
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1504
1550
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
1505
1551
|
}).default({
|
|
1506
1552
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1507
1553
|
})
|
|
1508
|
-
}).
|
|
1554
|
+
}).meta({
|
|
1555
|
+
description: "A signature input field",
|
|
1556
|
+
id: "SignatureField"
|
|
1557
|
+
});
|
|
1509
1558
|
var EmailField = BaseField.extend({
|
|
1510
1559
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1511
1560
|
configuration: import_v43.default.object({
|
|
1512
1561
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1513
1562
|
}).default({ maxLength: 255 }).optional(),
|
|
1514
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1563
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
|
|
1564
|
+
}).meta({
|
|
1565
|
+
description: "An email input field",
|
|
1566
|
+
id: "EmailField"
|
|
1515
1567
|
});
|
|
1516
1568
|
var DateField = BaseField.extend({
|
|
1517
1569
|
type: import_v43.default.literal(FieldType.DATE),
|
|
1518
|
-
defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1570
|
+
defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1519
1571
|
configuration: import_v43.default.object({
|
|
1520
1572
|
notice: TranslationConfig.describe(
|
|
1521
1573
|
"Text to display above the date input"
|
|
1522
1574
|
).optional()
|
|
1523
1575
|
}).optional()
|
|
1524
|
-
}).
|
|
1576
|
+
}).meta({
|
|
1577
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1578
|
+
id: "DateField"
|
|
1579
|
+
});
|
|
1525
1580
|
var AgeField = BaseField.extend({
|
|
1526
1581
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1527
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1582
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1528
1583
|
configuration: import_v43.default.object({
|
|
1529
1584
|
asOfDate: FieldReference,
|
|
1530
1585
|
prefix: TranslationConfig.optional(),
|
|
1531
1586
|
postfix: TranslationConfig.optional()
|
|
1532
1587
|
})
|
|
1533
|
-
}).
|
|
1588
|
+
}).meta({
|
|
1589
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1590
|
+
id: "AgeField"
|
|
1591
|
+
});
|
|
1534
1592
|
var TimeField = BaseField.extend({
|
|
1535
1593
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1536
|
-
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
1594
|
+
defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
|
|
1537
1595
|
configuration: import_v43.default.object({
|
|
1538
1596
|
use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
|
|
1539
1597
|
notice: TranslationConfig.describe(
|
|
1540
1598
|
"Text to display above the time input"
|
|
1541
1599
|
).optional()
|
|
1542
1600
|
}).optional()
|
|
1543
|
-
}).
|
|
1601
|
+
}).meta({
|
|
1602
|
+
description: "A single time input (HH-mm)",
|
|
1603
|
+
id: "TimeField"
|
|
1604
|
+
});
|
|
1544
1605
|
var DateRangeField = BaseField.extend({
|
|
1545
1606
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1546
|
-
defaultValue: DateRangeFieldValue.optional(),
|
|
1607
|
+
defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
|
|
1547
1608
|
configuration: import_v43.default.object({
|
|
1548
1609
|
notice: TranslationConfig.describe(
|
|
1549
1610
|
"Text to display above the date input"
|
|
1550
1611
|
).optional()
|
|
1551
1612
|
}).optional()
|
|
1552
|
-
}).
|
|
1613
|
+
}).meta({
|
|
1614
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1615
|
+
id: "DateRangeField"
|
|
1616
|
+
});
|
|
1553
1617
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1554
1618
|
"reg12",
|
|
1555
1619
|
"reg14",
|
|
@@ -1593,21 +1657,33 @@ var ImageViewField = BaseField.extend({
|
|
|
1593
1657
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1594
1658
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1595
1659
|
configuration: ImageConfiguration
|
|
1596
|
-
}).
|
|
1660
|
+
}).meta({
|
|
1661
|
+
description: "A read-only image component for form pages",
|
|
1662
|
+
id: "ImageViewField"
|
|
1663
|
+
});
|
|
1597
1664
|
var Paragraph = BaseField.extend({
|
|
1598
1665
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1599
1666
|
configuration: ParagraphConfiguration
|
|
1600
|
-
}).
|
|
1667
|
+
}).meta({
|
|
1668
|
+
description: "A read-only HTML <p> paragraph",
|
|
1669
|
+
id: "Paragraph"
|
|
1670
|
+
});
|
|
1601
1671
|
var Heading = BaseField.extend({
|
|
1602
1672
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1603
1673
|
configuration: HeadingConfiguration
|
|
1604
|
-
}).
|
|
1674
|
+
}).meta({
|
|
1675
|
+
description: "A read-only heading component for form pages",
|
|
1676
|
+
id: "Heading"
|
|
1677
|
+
});
|
|
1605
1678
|
var PageHeader = BaseField.extend({
|
|
1606
1679
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1607
|
-
}).
|
|
1680
|
+
}).meta({
|
|
1681
|
+
description: "A read-only header component for form pages",
|
|
1682
|
+
id: "PageHeader"
|
|
1683
|
+
});
|
|
1608
1684
|
var File = BaseField.extend({
|
|
1609
1685
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1610
|
-
defaultValue: FileFieldValue.optional(),
|
|
1686
|
+
defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
|
|
1611
1687
|
configuration: import_v43.default.object({
|
|
1612
1688
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1613
1689
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
@@ -1623,7 +1699,10 @@ var File = BaseField.extend({
|
|
|
1623
1699
|
}).default({
|
|
1624
1700
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1625
1701
|
})
|
|
1626
|
-
}).
|
|
1702
|
+
}).meta({
|
|
1703
|
+
description: "A file upload field",
|
|
1704
|
+
id: "File"
|
|
1705
|
+
});
|
|
1627
1706
|
var SelectOption = import_v43.default.object({
|
|
1628
1707
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1629
1708
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1631,7 +1710,7 @@ var SelectOption = import_v43.default.object({
|
|
|
1631
1710
|
});
|
|
1632
1711
|
var NumberWithUnitField = BaseField.extend({
|
|
1633
1712
|
type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1634
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1713
|
+
defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
|
|
1635
1714
|
options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
|
|
1636
1715
|
configuration: import_v43.default.object({
|
|
1637
1716
|
min: import_v43.default.number().optional().describe("Minimum value of the number field"),
|
|
@@ -1640,17 +1719,23 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1640
1719
|
"Placeholder for the number field"
|
|
1641
1720
|
)
|
|
1642
1721
|
}).optional()
|
|
1643
|
-
}).
|
|
1722
|
+
}).meta({
|
|
1723
|
+
description: "A number with unit input field",
|
|
1724
|
+
id: "NumberWithUnitField"
|
|
1725
|
+
});
|
|
1644
1726
|
var RadioGroup = BaseField.extend({
|
|
1645
1727
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1646
|
-
defaultValue: TextValue.optional(),
|
|
1728
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1647
1729
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1648
1730
|
configuration: import_v43.default.object({
|
|
1649
1731
|
styles: import_v43.default.object({
|
|
1650
1732
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1651
1733
|
}).optional()
|
|
1652
1734
|
}).optional()
|
|
1653
|
-
}).
|
|
1735
|
+
}).meta({
|
|
1736
|
+
description: "A grouped radio button field",
|
|
1737
|
+
id: "RadioGroup"
|
|
1738
|
+
});
|
|
1654
1739
|
var BulletList = BaseField.extend({
|
|
1655
1740
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1656
1741
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1659,10 +1744,13 @@ var BulletList = BaseField.extend({
|
|
|
1659
1744
|
fontVariant: HtmlFontVariant.optional()
|
|
1660
1745
|
}).optional()
|
|
1661
1746
|
}).default({})
|
|
1662
|
-
}).
|
|
1747
|
+
}).meta({
|
|
1748
|
+
description: "A list of bullet points",
|
|
1749
|
+
id: "BulletList"
|
|
1750
|
+
});
|
|
1663
1751
|
var Select = BaseField.extend({
|
|
1664
1752
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1665
|
-
defaultValue: TextValue.optional(),
|
|
1753
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1666
1754
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1667
1755
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1668
1756
|
`
|
|
@@ -1674,16 +1762,22 @@ var Select = BaseField.extend({
|
|
|
1674
1762
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1675
1763
|
`
|
|
1676
1764
|
)
|
|
1677
|
-
}).
|
|
1765
|
+
}).meta({
|
|
1766
|
+
description: "A select input field",
|
|
1767
|
+
id: "Select"
|
|
1768
|
+
});
|
|
1678
1769
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1679
1770
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1680
1771
|
label: TranslationConfig.describe("The label of the option")
|
|
1681
1772
|
});
|
|
1682
1773
|
var SelectDateRangeField = BaseField.extend({
|
|
1683
1774
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1684
|
-
defaultValue: SelectDateRangeValue.optional(),
|
|
1775
|
+
defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
|
|
1685
1776
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1686
|
-
}).
|
|
1777
|
+
}).meta({
|
|
1778
|
+
description: "A date range selection field",
|
|
1779
|
+
id: "SelectDateRangeField"
|
|
1780
|
+
});
|
|
1687
1781
|
var NameConfig = import_v43.default.object({
|
|
1688
1782
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1689
1783
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1695,7 +1789,7 @@ var NameField = BaseField.extend({
|
|
|
1695
1789
|
firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1696
1790
|
middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1697
1791
|
surname: SerializedUserField.or(NonEmptyTextValue).optional()
|
|
1698
|
-
}).optional(),
|
|
1792
|
+
}).or(ComputedDefaultValue).optional(),
|
|
1699
1793
|
configuration: import_v43.default.object({
|
|
1700
1794
|
name: NameConfig.default({
|
|
1701
1795
|
firstname: { required: true },
|
|
@@ -1714,26 +1808,41 @@ var NameField = BaseField.extend({
|
|
|
1714
1808
|
surname: { required: true }
|
|
1715
1809
|
}
|
|
1716
1810
|
}).optional()
|
|
1717
|
-
}).
|
|
1811
|
+
}).meta({
|
|
1812
|
+
description: "A field for entering a persons name",
|
|
1813
|
+
id: "NameField"
|
|
1814
|
+
});
|
|
1718
1815
|
var PhoneField = BaseField.extend({
|
|
1719
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1816
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1720
1817
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1721
|
-
}).
|
|
1818
|
+
}).meta({
|
|
1819
|
+
description: "A field for entering a phone number",
|
|
1820
|
+
id: "PhoneField"
|
|
1821
|
+
});
|
|
1722
1822
|
var IdField = BaseField.extend({
|
|
1723
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1823
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1724
1824
|
type: import_v43.default.literal(FieldType.ID)
|
|
1725
|
-
}).
|
|
1825
|
+
}).meta({
|
|
1826
|
+
description: "A field for entering an ID",
|
|
1827
|
+
id: "IdField"
|
|
1828
|
+
});
|
|
1726
1829
|
var Checkbox = BaseField.extend({
|
|
1727
1830
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1728
|
-
defaultValue: CheckboxFieldValue.default(false)
|
|
1729
|
-
}).
|
|
1831
|
+
defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
|
|
1832
|
+
}).meta({
|
|
1833
|
+
description: "A boolean checkbox field",
|
|
1834
|
+
id: "Checkbox"
|
|
1835
|
+
});
|
|
1730
1836
|
var Country = BaseField.extend({
|
|
1731
1837
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1732
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1838
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1733
1839
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1734
1840
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1735
1841
|
)
|
|
1736
|
-
}).
|
|
1842
|
+
}).meta({
|
|
1843
|
+
description: "A field for selecting a country",
|
|
1844
|
+
id: "Country"
|
|
1845
|
+
});
|
|
1737
1846
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
1738
1847
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
1739
1848
|
);
|
|
@@ -1742,28 +1851,33 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
1742
1851
|
"HEALTH_FACILITY",
|
|
1743
1852
|
"CRVS_OFFICE"
|
|
1744
1853
|
]);
|
|
1745
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
1746
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
1747
|
-
type: AdministrativeAreas,
|
|
1748
|
-
allowedLocations: AllowedLocations
|
|
1749
|
-
}).describe("Administrative area options");
|
|
1750
1854
|
var AdministrativeAreaField = BaseField.extend({
|
|
1751
1855
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
1752
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1753
|
-
configuration:
|
|
1754
|
-
|
|
1856
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1857
|
+
configuration: import_v43.default.object({
|
|
1858
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
1859
|
+
type: AdministrativeAreas,
|
|
1860
|
+
allowedLocations: AllowedLocations
|
|
1861
|
+
}).describe("Administrative area options")
|
|
1862
|
+
}).meta({
|
|
1863
|
+
description: "Administrative area input field",
|
|
1864
|
+
id: "AdministrativeAreaField"
|
|
1865
|
+
});
|
|
1755
1866
|
var LocationInput = BaseField.extend({
|
|
1756
1867
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
1757
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1868
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1758
1869
|
configuration: import_v43.default.object({
|
|
1759
1870
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
1760
1871
|
allowedLocations: AllowedLocations
|
|
1761
1872
|
}).optional()
|
|
1762
|
-
}).
|
|
1873
|
+
}).meta({
|
|
1874
|
+
description: "A field for selecting a location",
|
|
1875
|
+
id: "LocationInput"
|
|
1876
|
+
});
|
|
1763
1877
|
var FileUploadWithOptions = BaseField.extend({
|
|
1764
1878
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
1765
1879
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1766
|
-
defaultValue: FileFieldWithOptionValue.optional(),
|
|
1880
|
+
defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
|
|
1767
1881
|
configuration: import_v43.default.object({
|
|
1768
1882
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1769
1883
|
maxImageSize: import_v43.default.object({
|
|
@@ -1773,15 +1887,18 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1773
1887
|
}).default({
|
|
1774
1888
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1775
1889
|
})
|
|
1890
|
+
}).meta({
|
|
1891
|
+
description: "A field for uploading files with file type options",
|
|
1892
|
+
id: "FileUploadWithOptions"
|
|
1776
1893
|
});
|
|
1777
1894
|
var Facility = BaseField.extend({
|
|
1778
1895
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
1779
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1896
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1780
1897
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1781
1898
|
}).describe("Input field for a facility");
|
|
1782
1899
|
var Office = BaseField.extend({
|
|
1783
1900
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
1784
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1901
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1785
1902
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1786
1903
|
}).describe("Input field for an office");
|
|
1787
1904
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
@@ -1817,8 +1934,11 @@ var Address = BaseField.extend({
|
|
|
1817
1934
|
).optional(),
|
|
1818
1935
|
allowedLocations: AllowedLocations
|
|
1819
1936
|
}).optional(),
|
|
1820
|
-
defaultValue: DefaultAddressFieldValue.optional()
|
|
1821
|
-
}).
|
|
1937
|
+
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
1938
|
+
}).meta({
|
|
1939
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
1940
|
+
id: "Address"
|
|
1941
|
+
});
|
|
1822
1942
|
var StaticDataEntry = import_v43.default.object({
|
|
1823
1943
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
1824
1944
|
label: TranslationConfig,
|
|
@@ -1833,7 +1953,10 @@ var DataField = BaseField.extend({
|
|
|
1833
1953
|
subtitle: TranslationConfig.optional(),
|
|
1834
1954
|
data: import_v43.default.array(DataEntry)
|
|
1835
1955
|
})
|
|
1836
|
-
}).
|
|
1956
|
+
}).meta({
|
|
1957
|
+
description: "A field for displaying a table of read-only data",
|
|
1958
|
+
id: "DataField"
|
|
1959
|
+
});
|
|
1837
1960
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
1838
1961
|
var ButtonType = import_v43.default.enum([
|
|
1839
1962
|
"primary",
|
|
@@ -1858,13 +1981,19 @@ var ButtonConfiguration = import_v43.default.object({
|
|
|
1858
1981
|
});
|
|
1859
1982
|
var ButtonField = BaseField.extend({
|
|
1860
1983
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
1861
|
-
defaultValue: ButtonFieldValue.optional(),
|
|
1984
|
+
defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
|
|
1862
1985
|
configuration: ButtonConfiguration
|
|
1863
|
-
}).
|
|
1986
|
+
}).meta({
|
|
1987
|
+
description: "A generic button that can be used to trigger an action",
|
|
1988
|
+
id: "ButtonField"
|
|
1989
|
+
});
|
|
1864
1990
|
var FieldGroup = BaseField.extend({
|
|
1865
1991
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
1866
1992
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1867
1993
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
1994
|
+
}).meta({
|
|
1995
|
+
description: "A group of fields that are displayed together",
|
|
1996
|
+
id: "FieldGroup"
|
|
1868
1997
|
});
|
|
1869
1998
|
var AlphaPrintButton = BaseField.extend({
|
|
1870
1999
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -1874,10 +2003,13 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
1874
2003
|
"Label for the print button"
|
|
1875
2004
|
)
|
|
1876
2005
|
})
|
|
1877
|
-
}).
|
|
2006
|
+
}).meta({
|
|
2007
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2008
|
+
id: "AlphaPrintButton"
|
|
2009
|
+
});
|
|
1878
2010
|
var HttpField = BaseField.extend({
|
|
1879
2011
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
1880
|
-
defaultValue: HttpFieldValue.optional(),
|
|
2012
|
+
defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
|
|
1881
2013
|
configuration: import_v43.default.object({
|
|
1882
2014
|
trigger: FieldReference.optional().describe(
|
|
1883
2015
|
"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."
|
|
@@ -1890,20 +2022,30 @@ var HttpField = BaseField.extend({
|
|
|
1890
2022
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
1891
2023
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
1892
2024
|
})
|
|
1893
|
-
}).
|
|
2025
|
+
}).meta({
|
|
2026
|
+
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.",
|
|
2027
|
+
id: "HttpField"
|
|
2028
|
+
});
|
|
1894
2029
|
var AutocompleteField = BaseField.extend({
|
|
1895
2030
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
1896
2031
|
configuration: import_v43.default.object({
|
|
1897
|
-
url: import_v43.default.string().describe(
|
|
2032
|
+
url: import_v43.default.string().describe(
|
|
2033
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2034
|
+
).optional(),
|
|
1898
2035
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
1899
2036
|
defaultOptions: import_v43.default.array(
|
|
1900
2037
|
import_v43.default.object({
|
|
1901
2038
|
label: import_v43.default.string(),
|
|
1902
2039
|
value: import_v43.default.string()
|
|
1903
2040
|
})
|
|
1904
|
-
).optional()
|
|
2041
|
+
).optional().describe(
|
|
2042
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2043
|
+
)
|
|
1905
2044
|
})
|
|
1906
|
-
}).
|
|
2045
|
+
}).meta({
|
|
2046
|
+
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.",
|
|
2047
|
+
id: "AutocompleteField"
|
|
2048
|
+
});
|
|
1907
2049
|
var SearchField = HttpField.extend({
|
|
1908
2050
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
1909
2051
|
configuration: SearchQuery.pick({
|
|
@@ -1936,6 +2078,9 @@ var SearchField = HttpField.extend({
|
|
|
1936
2078
|
ok: TranslationConfig.optional()
|
|
1937
2079
|
}).optional()
|
|
1938
2080
|
})
|
|
2081
|
+
}).meta({
|
|
2082
|
+
description: "A search input field",
|
|
2083
|
+
id: "SearchField"
|
|
1939
2084
|
});
|
|
1940
2085
|
var LinkButtonField = BaseField.extend({
|
|
1941
2086
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -1944,28 +2089,35 @@ var LinkButtonField = BaseField.extend({
|
|
|
1944
2089
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
1945
2090
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
1946
2091
|
})
|
|
1947
|
-
}).
|
|
2092
|
+
}).meta({
|
|
2093
|
+
description: "A button that opens a URL link",
|
|
2094
|
+
id: "LinkButtonField"
|
|
2095
|
+
});
|
|
1948
2096
|
var VerificationStatus = BaseField.extend({
|
|
1949
2097
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
1950
|
-
defaultValue: VerificationStatusValue.optional(),
|
|
2098
|
+
defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
|
|
1951
2099
|
configuration: import_v43.default.object({
|
|
1952
2100
|
status: TranslationConfig.describe("Text to display on the status pill."),
|
|
1953
2101
|
description: TranslationConfig.describe(
|
|
1954
2102
|
"Explaining text on the banner in form."
|
|
1955
2103
|
)
|
|
1956
2104
|
})
|
|
2105
|
+
}).meta({
|
|
2106
|
+
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.",
|
|
2107
|
+
id: "VerificationStatus"
|
|
1957
2108
|
});
|
|
1958
2109
|
var QueryParamReaderField = BaseField.extend({
|
|
1959
2110
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
1960
2111
|
configuration: import_v43.default.object({
|
|
1961
2112
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
1962
2113
|
})
|
|
1963
|
-
}).
|
|
1964
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
1965
|
-
|
|
2114
|
+
}).meta({
|
|
2115
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2116
|
+
id: "QueryParamReaderField"
|
|
2117
|
+
});
|
|
1966
2118
|
var QrReaderField = BaseField.extend({
|
|
1967
2119
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
1968
|
-
defaultValue: QrReaderFieldValue.optional(),
|
|
2120
|
+
defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
1969
2121
|
configuration: import_v43.default.object({
|
|
1970
2122
|
validator: import_v43.default.any().meta({
|
|
1971
2123
|
description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
|
|
@@ -1973,21 +2125,27 @@ var QrReaderField = BaseField.extend({
|
|
|
1973
2125
|
})
|
|
1974
2126
|
}).optional()
|
|
1975
2127
|
}).meta({
|
|
1976
|
-
description: "
|
|
2128
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
1977
2129
|
id: "QrReaderField"
|
|
1978
2130
|
});
|
|
1979
2131
|
var IdReaderField = BaseField.extend({
|
|
1980
2132
|
type: import_v43.default.literal(FieldType.ID_READER),
|
|
1981
|
-
defaultValue: IdReaderFieldValue.optional(),
|
|
2133
|
+
defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
1982
2134
|
methods: import_v43.default.array(
|
|
1983
2135
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
1984
2136
|
)
|
|
2137
|
+
}).meta({
|
|
2138
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2139
|
+
id: "IdReaderField"
|
|
1985
2140
|
});
|
|
1986
2141
|
var CustomField = BaseField.extend({
|
|
1987
2142
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
1988
2143
|
defaultValue: CustomFieldValue.optional(),
|
|
1989
2144
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
1990
2145
|
configuration: import_v43.default.unknown().optional()
|
|
2146
|
+
}).meta({
|
|
2147
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2148
|
+
id: "CustomField"
|
|
1991
2149
|
});
|
|
1992
2150
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
1993
2151
|
var LoaderField = BaseField.extend({
|
|
@@ -1997,22 +2155,25 @@ var LoaderField = BaseField.extend({
|
|
|
1997
2155
|
configuration: import_v43.default.object({
|
|
1998
2156
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
1999
2157
|
})
|
|
2000
|
-
}).
|
|
2001
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2002
|
-
|
|
2158
|
+
}).meta({
|
|
2159
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2160
|
+
id: "LoaderField"
|
|
2161
|
+
});
|
|
2003
2162
|
var HiddenField = BaseField.extend({
|
|
2004
2163
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2005
2164
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2006
2165
|
defaultValue: TextValue.optional()
|
|
2007
|
-
}).
|
|
2008
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2009
|
-
|
|
2166
|
+
}).meta({
|
|
2167
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2168
|
+
id: "HiddenField"
|
|
2169
|
+
});
|
|
2010
2170
|
var UserRoleField = BaseField.extend({
|
|
2011
2171
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2012
2172
|
defaultValue: TextValue.optional()
|
|
2013
|
-
}).
|
|
2014
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2015
|
-
|
|
2173
|
+
}).meta({
|
|
2174
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2175
|
+
id: "UserRoleField"
|
|
2176
|
+
});
|
|
2016
2177
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2017
2178
|
FieldGroup,
|
|
2018
2179
|
Address,
|
|
@@ -2130,6 +2291,7 @@ var ClientConfig = z20.object({
|
|
|
2130
2291
|
COUNTRY: z20.string(),
|
|
2131
2292
|
LANGUAGES: z20.array(z20.string()),
|
|
2132
2293
|
SENTRY: z20.string().optional(),
|
|
2294
|
+
LOGIN_URL: z20.string().optional(),
|
|
2133
2295
|
REGISTER_BACKGROUND: BackgroundConfig,
|
|
2134
2296
|
DASHBOARDS: z20.array(
|
|
2135
2297
|
z20.object({
|