actions |
Default value : [
"read",
"create",
"update",
"delete",
"manage", // Matches any actions
] as const
|
The list of action strings that can be used for permissions |
ACTIVITY_STATUS_ENUM |
Type : string
|
Default value : "activity-status"
|
defaultActivityStatus |
Type : ConfigurableEnumValue[]
|
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:" + ACTIVITY_STATUS_ENUM,
).values
|
addDefaultNoteDetailsConfig |
Type : ConfigMigration
|
Default value : (
key,
configPart,
) => {
if (configPart?.["_id"] !== "Config:CONFIG_ENTITY" || !configPart?.["data"]) {
// add only at top-level of config
return configPart;
}
if (!configPart?.["data"]["view:note/:id"]) {
configPart["data"]["view:note/:id"] = {
component: "NoteDetails",
config: {},
};
}
if (!configPart?.["data"]["view:eventnote/:id"]) {
configPart["data"]["view:eventnote/:id"] = {
component: "NoteDetails",
config: {
entityType: "EventNote",
},
};
}
return configPart;
}
|
Add default view:note/:id NoteDetails config to avoid breaking note details with a default config from AdminModule |
ATTENDANCE_STATUS_CONFIG_ID |
Type : string
|
Default value : "attendance-status"
|
the id through which the available attendance status types can be loaded from the ConfigService. |
NullAttendanceStatusType |
Type : AttendanceStatusType
|
Default value : {
id: "",
label: "",
shortName: "",
countAs: AttendanceLogicalStatus.IGNORE,
}
|
Null object representing an unknown attendance status. This allows easier handling of attendance status logic because exceptional checks for undefined are not necessary. |
attendanceComponents |
Type : ComponentTuple[]
|
Default value : [
[
"AttendanceManager",
() =>
import("./attendance-manager/attendance-manager.component").then(
(c) => c.AttendanceManagerComponent,
),
],
[
"AddDayAttendance",
() =>
import("./add-day-attendance/add-day-attendance.component").then(
(c) => c.AddDayAttendanceComponent,
),
],
[
"ActivityAttendanceSection",
() =>
import(
"./activity-attendance-section/activity-attendance-section.component"
).then((c) => c.ActivityAttendanceSectionComponent),
],
[
"AttendanceWeekDashboard",
() =>
import(
"./dashboard-widgets/attendance-week-dashboard/attendance-week-dashboard.component"
).then((c) => c.AttendanceWeekDashboardComponent),
],
[
"EditAttendance",
() =>
import("./edit-attendance/edit-attendance.component").then(
(c) => c.EditAttendanceComponent,
),
],
[
"ActivitiesOverview",
() =>
import(
"../attendance/activities-overview/activities-overview.component"
).then((c) => c.ActivitiesOverviewComponent),
],
]
|
LOCALE_ENUM_ID |
Type : string
|
Default value : "locales"
|
centersUnique |
Type : ConfigurableEnumValue[]
|
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:center",
).values
|
centersWithProbability |
Default value : [0, 0, 1, 2].map((i) => centersUnique[i])
|
childrenComponents |
Type : ComponentTuple[]
|
Default value : [
[
"GroupedChildAttendance",
() =>
import(
"./child-details/grouped-child-attendance/grouped-child-attendance.component"
).then((c) => c.GroupedChildAttendanceComponent),
],
[
"RecentAttendanceBlocks",
() =>
import(
"../attendance/recent-attendance-blocks/recent-attendance-blocks.component"
).then((c) => c.RecentAttendanceBlocksComponent),
],
[
"PreviousSchools",
() =>
import("./child-school-overview/child-school-overview.component").then(
(c) => c.ChildSchoolOverviewComponent,
),
],
[
"ChildrenOverview",
() =>
import("./child-school-overview/child-school-overview.component").then(
(c) => c.ChildSchoolOverviewComponent,
),
],
[
"ChildSchoolOverview",
() =>
import("./child-school-overview/child-school-overview.component").then(
(c) => c.ChildSchoolOverviewComponent,
),
],
[
"DisplayParticipantsCount",
() =>
import(
"./display-participants-count/display-participants-count.component"
).then((c) => c.DisplayParticipantsCountComponent),
],
]
|
componentRegistry |
Default value : new ComponentRegistry()
|
CONFIG_SETUP_WIZARD_ID |
Type : string
|
Default value : "Config:SetupWizard"
|
CONFLICT_RESOLUTION_STRATEGY |
Default value : new InjectionToken<ConflictResolutionStrategy>("ConflictResolutionStrategy")
|
Use this token to provide (and thereby register) custom implementations of ConflictResolutionStrategy.
|
conflictResolutionComponents |
Type : ComponentTuple[]
|
Default value : [
[
"ConflictResolution",
() =>
import(
"./conflict-resolution-list/conflict-resolution-list.component"
).then((c) => c.ConflictResolutionListComponent),
],
]
|
coreComponents |
Type : ComponentTuple[]
|
Default value : [
[
"DisplayConfigurableEnum",
() =>
import(
"./basic-datatypes/configurable-enum/display-configurable-enum/display-configurable-enum.component"
).then((c) => c.DisplayConfigurableEnumComponent),
],
[
"EditConfigurableEnum",
() =>
import(
"./basic-datatypes/configurable-enum/edit-configurable-enum/edit-configurable-enum.component"
).then((c) => c.EditConfigurableEnumComponent),
],
[
"Form",
() =>
import("./entity-details/form/form.component").then(
(c) => c.FormComponent,
),
],
[
"EditEntity",
() =>
import("./basic-datatypes/entity/edit-entity/edit-entity.component").then(
(c) => c.EditEntityComponent,
),
],
[
"DisplayEntity",
() =>
import(
"./basic-datatypes/entity/display-entity/display-entity.component"
).then((c) => c.DisplayEntityComponent),
],
[
"EntityBlock",
() =>
import(
"./basic-datatypes/entity/entity-block/entity-block.component"
).then((c) => c.EntityBlockComponent),
],
[
"EditTextWithAutocomplete",
() =>
import(
"./common-components/edit-text-with-autocomplete/edit-text-with-autocomplete.component"
).then((c) => c.EditTextWithAutocompleteComponent),
],
[
"EditAge",
() =>
import(
"./basic-datatypes/date-with-age/edit-age/edit-age.component"
).then((c) => c.EditAgeComponent),
],
[
"EditText",
() =>
import("./basic-datatypes/string/edit-text/edit-text.component").then(
(c) => c.EditTextComponent,
),
],
[
"EditBoolean",
() =>
import(
"./basic-datatypes/boolean/edit-boolean/edit-boolean.component"
).then((c) => c.EditBooleanComponent),
],
[
"EditDate",
() =>
import("./basic-datatypes/date/edit-date/edit-date.component").then(
(c) => c.EditDateComponent,
),
],
[
"EditMonth",
() =>
import("./basic-datatypes/month/edit-month/edit-month.component").then(
(c) => c.EditMonthComponent,
),
],
[
"EditLongText",
() =>
import(
"./basic-datatypes/string/edit-long-text/edit-long-text.component"
).then((c) => c.EditLongTextComponent),
],
[
"EditPhoto",
() =>
import("../features/file/edit-photo/edit-photo.component").then(
(c) => c.EditPhotoComponent,
),
],
[
"EditNumber",
() =>
import("./basic-datatypes/number/edit-number/edit-number.component").then(
(c) => c.EditNumberComponent,
),
],
[
"EditDescriptionOnly",
() =>
import(
"./common-components/description-only/edit-description-only/edit-description-only.component"
).then((c) => c.EditDescriptionOnlyComponent),
],
[
"DisplayCheckmark",
() =>
import(
"./basic-datatypes/boolean/display-checkmark/display-checkmark.component"
).then((c) => c.DisplayCheckmarkComponent),
],
[
"DisplayText",
() =>
import(
"./basic-datatypes/string/display-text/display-text.component"
).then((c) => c.DisplayTextComponent),
],
[
"DisplayLongText",
() =>
import(
"./basic-datatypes/string/display-long-text/display-long-text.component"
).then((c) => c.DisplayLongTextComponent),
],
[
"DisplayDate",
() =>
import("./basic-datatypes/date/display-date/display-date.component").then(
(c) => c.DisplayDateComponent,
),
],
[
"DisplayEntityType",
() =>
import("./entity/display-entity-type/display-entity-type.component").then(
(c) => c.DisplayEntityTypeComponent,
),
],
[
"DisplayMonth",
() =>
import(
"./basic-datatypes/month/display-month/display-month.component"
).then((c) => c.DisplayMonthComponent),
],
[
"ReadonlyFunction",
() =>
import(
"./common-components/display-readonly-function/readonly-function.component"
).then((c) => c.ReadonlyFunctionComponent),
],
[
"DisplayPercentage",
() =>
import(
"./basic-datatypes/number/display-percentage/display-percentage.component"
).then((c) => c.DisplayPercentageComponent),
],
[
"DisplayDynamicPercentage",
() =>
import(
"./basic-datatypes/number/display-dynamic-percentage/display-calculated-value.component"
).then((c) => c.DisplayCalculatedValueComponent),
],
[
"DisplayCalculatedValue",
() =>
import(
"./basic-datatypes/number/display-dynamic-percentage/display-calculated-value.component"
).then((c) => c.DisplayCalculatedValueComponent),
],
[
"DisplayUnit",
() =>
import(
"./basic-datatypes/number/display-unit/display-unit.component"
).then((c) => c.DisplayUnitComponent),
],
[
"DisplayAge",
() =>
import(
"./basic-datatypes/date-with-age/display-age/display-age.component"
).then((c) => c.DisplayAgeComponent),
],
[
"UserSecurity",
() =>
import("./user/user-security/user-security.component").then(
(c) => c.UserSecurityComponent,
),
],
[
"Dashboard",
() =>
import("./dashboard/dashboard/dashboard.component").then(
(c) => c.DashboardComponent,
),
],
[
"EntityList",
() =>
import("./entity-list/entity-list/entity-list.component").then(
(c) => c.EntityListComponent,
),
],
[
"EntityDetails",
() =>
import("./entity-details/entity-details/entity-details.component").then(
(c) => c.EntityDetailsComponent,
),
],
[
"RelatedEntities",
() =>
import(
"./entity-details/related-entities/related-entities.component"
).then((c) => c.RelatedEntitiesComponent),
],
[
"RelatedTimePeriodEntities",
() =>
import(
"./entity-details/related-time-period-entities/related-time-period-entities.component"
).then((c) => c.RelatedTimePeriodEntitiesComponent),
],
[
"RelatedEntitiesWithSummary",
() =>
import(
"./entity-details/related-entities-with-summary/related-entities-with-summary.component"
).then((c) => c.RelatedEntitiesWithSummaryComponent),
],
[
"EditEntityType",
() =>
import("./entity/edit-entity-type/edit-entity-type.component").then(
(c) => c.EditEntityTypeComponent,
),
],
[
"EditUrl",
() =>
import("./basic-datatypes/string/edit-url/edit-url.component").then(
(c) => c.EditUrlComponent,
),
],
[
"DisplayUrl",
() =>
import("./basic-datatypes/string/display-url/display-url.component").then(
(c) => c.DisplayUrlComponent,
),
],
]
|
DATE_FORMATS |
Type : MatDateFormats
|
Default value : {
parse: { dateInput: "l" },
display: MAT_NATIVE_DATE_FORMATS.display,
}
|
Extend MAT_NATIVE_DATE_FORMATS to also support parsing. |
DEFAULT_LANGUAGE |
Type : string
|
Default value : "en-US"
|
LANGUAGE_LOCAL_STORAGE_KEY |
Type : string
|
Default value : "locale"
|
defaultAttendanceStatusTypes |
Default value : enumJson.values as AttendanceStatusType[]
|
defaultInteractionTypes |
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:" + INTERACTION_TYPE_CONFIG_ID,
).values as InteractionType[]
|
dynamicComponents |
Type : []
|
Default value : [
[
"BulkMergeRecordsComponent",
() =>
import("./bulk-merge-records/bulk-merge-records.component").then(
(c) => c.BulkMergeRecordsComponent,
),
],
]
|
viewConfigs |
Type : ViewConfig[]
|
Default value : [
// List View
{
_id: "view:" + PublicFormConfig.route,
component: "EntityList",
config: {
entityType: PublicFormConfig.ENTITY_TYPE,
columns: ["title", "description", "entity"],
filters: [{ id: "entity" }],
} as EntityListConfig,
},
// Details View
{
_id: "view:" + PublicFormConfig.route + "/:id",
component: "EntityDetails",
config: {
entityType: PublicFormConfig.ENTITY_TYPE,
panels: [
{
title: $localize`:PublicFormConfig admin form panel:General Setting`,
components: [
{
component: "Form",
config: {
fieldGroups: [
{
fields: ["route", "title", "description"],
},
{
fields: [
{
id: "permissions_remark",
editComponent: "EditDescriptionOnly",
label: $localize`:PublicFormConfig admin form:If you want external people filling this form without logging in, the _Permission System_ also has to allow **"public"** users to create new records of this type.<br>
If you are seeing problems submitting the form, please contact your **technical support team**.`,
},
"entity",
"logo",
],
},
],
},
},
],
},
{
title: $localize`:PublicFormConfig admin form panel:Configure Fields`,
components: [
{
component: "Form",
config: {
fieldGroups: [
{
fields: ["columns"],
},
],
},
},
],
},
{
title: $localize`:PublicFormConfig admin form panel:Configure Pre-filled Values`,
components: [
{
component: "Form",
config: {
fieldGroups: [
{
fields: ["prefilledFields", "linkedEntity"],
},
],
},
},
],
},
],
} as EntityDetailsConfig,
},
]
|
viewConfigs |
Type : ViewConfig[]
|
Default value : [
// List View
{
_id: "view:" + TemplateExport.route,
component: "EntityList",
config: {
entityType: TemplateExport.ENTITY_TYPE,
columns: ["title", "description", "applicableForEntityTypes"],
filters: [{ id: "applicableForEntityTypes" }],
} as EntityListConfig,
},
// Details View
{
_id: "view:" + TemplateExport.route + "/:id",
component: "EntityDetails",
config: {
entityType: TemplateExport.ENTITY_TYPE,
panels: [
{
components: [
{
component: "Form",
config: {
fieldGroups: [
{
fields: [
"title",
"description",
"applicableForEntityTypes",
],
},
{
fields: [
{
id: "template_explanation",
editComponent: "EditDescriptionOnly",
label: $localize`:TemplateExport:Upload a specially prepared template file here.
The file can contain placeholders that will be replaced with actual data when a file is generated for a selected record.
For example {d.name} will be replaced with the value in the "name" field of the given entity.
See the documentation of the [carbone system](https://carbone.io/documentation.html#substitutions) for more information.
The placeholder keys must match the field "Field ID" of the record data structure in Aam Digital.
You can find this in the Admin UI form builder (Edit Data Structure -> Details View) and edit a specific field to view its details.
Template files can be in most office document formats (odt, docx, ods, xlsx, odp, pptx) or PDF.`,
},
"templateFile",
"targetFileName",
],
},
],
},
},
],
},
],
} as EntityDetailsConfig,
},
]
|
EMPTY |
Type : ConfigurableEnumValue
|
Default value : {
id: "",
label: "",
}
|
entityFormStorybookDefaultParameters |
Type : object
|
Default value : {
controls: {
exclude: ["_columns", "_cols", "enumValueToString"],
},
}
|
environment |
Type : object
|
Default value : {
production: true,
appVersion: "0.0.0", // replaced automatically during docker build
repositoryId: "Aam-Digital/ndb-core",
// add via config.json overwrite. Default DSN value will be removed in future
remoteLoggingDsn:
"https://bd6aba79ca514d35bb06a4b4e0c2a21e@sentry.io/1242399",
demo_mode: true,
session_type: SessionType.mock,
email: undefined,
userAdminApi: undefined,
realm: undefined,
DB_PROXY_PREFIX: "/db",
API_PROXY_PREFIX: "/api",
notificationsConfig: undefined,
}
|
see environment.ts for explanations |
environment |
Type : object
|
Default value : {
production: false,
appVersion: "0.0.0", // replaced automatically during docker build
repositoryId: "Aam-Digital/ndb-core",
remoteLoggingDsn: undefined, // only set for production mode in environment.prod.ts
demo_mode: true,
session_type: SessionType.mock,
email: undefined,
/** Keycloak API for user management */
userAdminApi: undefined, // loaded from `assets/keycloak.json` during bootstrap
/** Keycloak realm for user management */
realm: undefined, // loaded from `assets/keycloak.json` during bootstrap
/** Path for the reverse proxy that forwards to the database - configured in `default.conf` */
DB_PROXY_PREFIX: "/db",
/** Path for the reverse proxy that forwards to backend services APIs - configured in `default.conf` */
API_PROXY_PREFIX: "/api",
/** see FirebaseConfiguration and assets/firebase-config.json */
notificationsConfig: undefined,
}
|
Central environment that allows to configure differences between a "dev" and a "prod" build.
For deployments, the The file contents for the current environment will overwrite these during build.
The build system defaults to the dev environment which uses |
faker |
Default value : new CustomFaker({ locale: [en_IN, en], seed: 1 })
|
(Extended) faker module |
fileComponents |
Type : ComponentTuple[]
|
Default value : [
[
"EditFile",
() =>
import("./edit-file/edit-file.component").then(
(c) => c.EditFileComponent,
),
],
[
"ViewFile",
() =>
import("./view-file/view-file.component").then(
(c) => c.ViewFileComponent,
),
],
]
|
filterCurrentlyActive |
Type : FilterSelectionOption<Todo>
|
Default value : {
key: "current",
label: $localize`:Filter-option for todos:Currently Active`,
filter: {
$and: [
{ completed: undefined },
{
$or: [
{
startDate: {
$exists: false,
},
},
{
startDate: {
$lte: moment().format("YYYY-MM-DD"),
$gt: "",
},
},
{
deadline: {
$lte: moment().format("YYYY-MM-DD"),
$gt: "",
},
},
],
},
],
} as DataFilter<Todo>,
}
|
genders |
Type : ConfigurableEnumValue[]
|
Default value : enumJson.values
|
iconDefault |
Default value : L.icon({
iconRetinaUrl,
iconUrl,
shadowUrl,
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
tooltipAnchor: [16, -28],
shadowSize: [41, 41],
})
|
iconRetinaUrl |
Type : string
|
Default value : "assets/marker-icon-2x.png"
|
iconUrl |
Type : string
|
Default value : "assets/marker-icon.png"
|
shadowUrl |
Type : string
|
Default value : "assets/marker-shadow.png"
|
IMPORT_SAMPLE_ADDITIONAL_ACTIONS |
Type : AdditionalImportAction[]
|
Default value : [
/*{
type: "School",
id: IMPORT_SAMPLE_LINKABLE_DATA.find((e) => e.getType() === "School").getId(
true,
),
},
{
type: "RecurringActivity",
id: IMPORT_SAMPLE_LINKABLE_DATA.find(
(e) => e.getType() === "RecurringActivity",
).getId(),
},*/
]
|
IMPORT_SAMPLE_COLUMN_MAPPING |
Type : ColumnMapping[]
|
Default value : Object.keys(
IMPORT_SAMPLE_RAW_DATA[0],
).map((k) => ({
column: k,
}))
|
IMPORT_SAMPLE_LINKABLE_DATA |
Type : Entity[]
|
Default value : [
Object.assign(createEntityOfType("School"), { name: "Sample School" }),
Object.assign(createEntityOfType("School"), { name: "ABCD School" }),
RecurringActivity.create("Activity X"),
RecurringActivity.create("Activity Y"),
]
|
IMPORT_SAMPLE_PREVIOUS_IMPORTS |
Type : ImportMetadata[]
|
Default value : [
ImportMetadata.create({
created: { by: TEST_USER, at: new Date("2022-12-27") },
createdEntities: ["1", "2", "3"],
config: {
entityType: "Child",
columnMapping: IMPORT_SAMPLE_COLUMN_MAPPING,
},
}),
ImportMetadata.create({
created: { by: TEST_USER, at: new Date("2023-01-04") },
createdEntities: ["1", "3"],
config: { entityType: "School", columnMapping: [] },
}),
]
|
importComponents |
Type : ComponentTuple[]
|
Default value : [
[
"Import",
() => import("./import/import.component").then((c) => c.ImportComponent),
],
[
"DiscreteImportConfig",
() =>
import(
"../basic-datatypes/discrete/discrete-import-config/discrete-import-config.component"
).then((c) => c.DiscreteImportConfigComponent),
],
[
"DateImportConfig",
() =>
import(
"../basic-datatypes/date/date-import-config/date-import-config.component"
).then((c) => c.DateImportConfigComponent),
],
[
"EntityImportConfig",
() =>
import(
"../basic-datatypes/entity/entity-import-config/entity-import-config.component"
).then((c) => c.EntityImportConfigComponent),
],
]
|
INTERACTION_TYPE_CONFIG_ID |
Type : string
|
Default value : "interaction-type"
|
ID of the Note category ConfigurableEnumValue in the config database. |
isActiveIndicator |
Type : FormFieldConfig
|
Default value : {
id: "isActive",
label: $localize`:Label for the currently active status|e.g. Currently active:Currently`,
viewComponent: "ReadonlyFunction",
hideFromTable: true,
description: $localize`:Tooltip for the status of currently active or not:Only added to linked record if active. Change the start or end date to modify this status.`,
additional: (csr: ChildSchoolRelation) =>
csr.isActive
? $localize`:Indication for the currently active status of an entry:active`
: $localize`:Indication for the currently inactive status of an entry:not active`,
}
|
languages |
Type : []
|
Default value : [
// multiple entries for the same value increase its probability
"Hindi",
"Hindi",
"Hindi",
"Urdu",
"Bengali",
"Bengali",
"",
]
|
LG |
Type : string
|
Default value : "992px"
|
MD |
Type : string
|
Default value : "768px"
|
MOBILE_THRESHOLD |
Type : ScreenSize
|
Default value : ScreenSize.sm
|
The screen size where anything smaller and this size itself is considered mobile while anything strictly larger is considered desktop. |
SM |
Type : string
|
Default value : "576px"
|
XL |
Type : string
|
Default value : "1200px"
|
XXL |
Type : string
|
Default value : "1400px"
|
LOCATION_TOKEN |
Default value : new InjectionToken<Location>(
"Window location object",
)
|
NAVIGATOR_TOKEN |
Default value : new InjectionToken<Navigator>(
"Window navigator object",
)
|
WINDOW_TOKEN |
Default value : new InjectionToken<Window>("Window object")
|
Use this instead of directly referencing the window object for better testability |
locationComponents |
Type : ComponentTuple[]
|
Default value : [
[
"EditLocation",
() =>
import("./edit-location/edit-location.component").then(
(c) => c.EditLocationComponent,
),
],
[
"ViewLocation",
() =>
import("./view-location/view-location.component").then(
(c) => c.ViewLocationComponent,
),
],
[
"DisplayDistance",
() =>
import("./view-distance/view-distance.component").then(
(c) => c.ViewDistanceComponent,
),
],
]
|
Logging |
Type : miscellaneous
|
Default value : new LoggingService()
|
MAP_CONFIG_KEY |
Type : string
|
Default value : "appConfig:map"
|
matchingEntitiesComponents |
Type : ComponentTuple[]
|
Default value : [
[
"MatchingEntities",
() =>
import("./matching-entities/matching-entities.component").then(
(c) => c.MatchingEntitiesComponent,
),
],
]
|
materials |
Type : ConfigurableEnumValue[]
|
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:materials",
).values
|
mathLevels |
Type : ConfigurableEnumConfig<SkillLevel>
|
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:math-levels",
).values
|
readingLevels |
Type : ConfigurableEnumConfig<SkillLevel>
|
Default value : enums.find(
(e) => e._id === "ConfigurableEnum:reading-levels",
).values
|
migrateChildrenListConfig |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (
typeof configPart !== "object" ||
configPart?.["component"] !== "ChildrenList"
) {
return configPart;
}
configPart["component"] = "EntityList";
configPart["config"] = configPart["config"] ?? {};
configPart["config"]["entityType"] = "Child";
configPart["config"]["loaderMethod"] = "ChildrenService";
return configPart;
}
|
migrateDefaultValue |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (key !== "defaultValue") {
return configPart;
}
if (configPart?.mode === "inherited") {
configPart.mode = "inherited-from-referenced-entity";
}
if (!configPart.config) {
configPart.config = {};
if (configPart.value) {
configPart.config.value = configPart.value;
delete configPart.value;
}
if (configPart.localAttribute) {
configPart.config.localAttribute = configPart.localAttribute;
delete configPart.localAttribute;
}
if (configPart.field) {
configPart.config.field = configPart.field;
delete configPart.field;
}
}
return configPart;
}
|
The DefaultValueConfig |
migrateEntityArrayDatatype |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (configPart === "DisplayEntityArray") {
return "DisplayEntity";
}
if (!configPart?.hasOwnProperty("dataType")) {
return configPart;
}
const config: EntitySchemaField = configPart;
if (config.dataType === "entity-array") {
config.dataType = EntityDatatype.dataType;
config.isArray = true;
}
if (config.dataType === "array") {
config.dataType = config["innerDataType"];
delete config["innerDataType"];
config.isArray = true;
}
if (config.dataType === "configurable-enum" && config["innerDataType"]) {
config.additional = config["innerDataType"];
delete config["innerDataType"];
}
return configPart;
}
|
Replace custom "entity-array" dataType with dataType="array", innerDatatype="entity" |
migrateEntityBlock |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (configPart?.["blockComponent"] === "ChildBlock") {
delete configPart["blockComponent"];
configPart["toBlockDetailsAttributes"] = {
title: "name",
photo: "photo",
fields: ["phone", "schoolId", "schoolClass"],
};
return configPart;
}
if (key === "viewComponent" && configPart === "ChildBlock") {
return "EntityBlock";
}
return configPart;
}
|
ChildBlockComponent was removed and entity types can instead define a configurable tooltip setting. |
migrateEntityDetailsInputEntityType |
Type : ConfigMigration
|
Default value : (
key,
configPart,
) => {
if (key !== "config") {
return configPart;
}
if (configPart["entity"]) {
configPart["entityType"] = configPart["entity"];
delete configPart["entity"];
}
return configPart;
}
|
Config properties specifying an entityType should be named "entityType" rather than "entity" to avoid confusion with a specific instance of an entity being passed in components. |
migrateEntitySchemaDefaultValue |
Type : ConfigMigration
|
Default value : (
key: string,
configPart: any,
): any => {
if (key !== "defaultValue") {
return configPart;
}
if (typeof configPart == "object") {
return configPart;
}
let placeholderValue: string | undefined = Object.values(PLACEHOLDERS).find(
(value) => value === configPart,
);
if (placeholderValue) {
return {
mode: "dynamic",
value: placeholderValue,
} as DefaultValueConfig;
}
return {
mode: "static",
value: configPart,
} as DefaultValueConfig;
}
|
migrateFormFieldConfigView2ViewComponent |
Type : ConfigMigration
|
Default value : (
key,
configPart,
) => {
if (
!(key === "columns" || key === "fields" || key === "cols") &&
key !== null
) {
return configPart;
}
if (Array.isArray(configPart)) {
return configPart.map((c) =>
migrateFormFieldConfigView2ViewComponent(null, c),
);
}
if (configPart?.view) {
configPart.viewComponent = configPart.view;
delete configPart.view;
}
if (configPart?.edit) {
configPart.editComponent = configPart.edit;
delete configPart.edit;
}
return configPart;
}
|
migrateGroupByConfig |
Type : ConfigMigration
|
Default value : (key, configPart) => {
// Check if we are working with the EntityCountDashboard component and within the 'config' object
if (
configPart?.component === "EntityCountDashboard" &&
typeof configPart?.config?.groupBy === "string"
) {
configPart.config.groupBy = [configPart.config.groupBy]; // Wrap groupBy as an array
return configPart;
}
// Return the unchanged part if no modification is needed
return configPart;
}
|
migrateHistoricalDataComponent |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (
typeof configPart !== "object" ||
configPart?.["component"] !== "HistoricalDataComponent"
) {
return configPart;
}
configPart["component"] = "RelatedEntities";
configPart["config"] = configPart["config"] ?? {};
if (Array.isArray(configPart["config"])) {
configPart["config"] = { columns: configPart["config"] };
}
configPart["config"]["entityType"] = "HistoricalEntityData";
configPart["config"]["loaderMethod"] = LoaderMethod.HistoricalDataService;
return configPart;
}
|
migratePercentageDatatype |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (
configPart?.dataType === "number" &&
configPart?.viewComponent === "DisplayPercentage"
) {
configPart.dataType = "percentage";
delete configPart.viewComponent;
delete configPart.editComponent;
}
return configPart;
}
|
Migrate the number datatype to use the new "percentage" datatype |
migratePhotoDatatype |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (
configPart?.dataType === "file" &&
configPart?.editComponent === "EditPhoto"
) {
configPart.dataType = "photo";
delete configPart.editComponent;
}
return configPart;
}
|
Migrate the "file" datatype to use the new "photo" datatype and remove editComponent if no longer needed |
migrateUserEntityAndPanels |
Type : ConfigMigration
|
Default value : (key, configPart) => {
if (key === "entity:User") {
configPart.enableUserAccounts = true;
}
if (key === "view:user/:id") {
configPart.config.panels = (configPart.config.panels || []).filter(
(panel) =>
!panel.components?.some(
(c: PanelComponent) => c.component === "UserSecurity",
),
);
}
return configPart;
}
|
Migration to enable user account features by setting the |
mockSkillApi |
Type : object
|
Default value : {
getExternalProfiles: (): Observable<ExternalProfileResponseDto> =>
of({
pagination: {
currentPage: 1,
pageSize: 5,
totalPages: 2,
totalElements: 6,
},
results: faker.helpers.multiple(
() => createSkillApiDummyData(faker.string.numeric()),
{ count: { min: 0, max: 5 } },
),
}).pipe(delay(faker.number.int({ min: 500, max: 1500 }))),
generateDefaultSearchParams: () => ({
fullName: "John Doe",
}),
getExternalProfileById: (id: string) =>
of(createSkillApiDummyData(id)).pipe(
delay(faker.number.int({ min: 500, max: 1500 })),
),
}
|
MY_FORMATS |
Type : object
|
Default value : {
parse: {
dateInput: "YYYY-MM",
},
display: {
dateInput: "YYYY-MM",
monthYearLabel: "YYYY MMM",
dateA11yLabel: "LL",
monthYearA11yLabel: "YYYY MMMM",
},
}
|
notesComponents |
Type : ComponentTuple[]
|
Default value : [
[
"NotesManager",
() =>
import("./notes-manager/notes-manager.component").then(
(c) => c.NotesManagerComponent,
),
],
[
"NoteAttendanceCountBlock",
() =>
import(
"./note-attendance-block/note-attendance-count-block.component"
).then((c) => c.NoteAttendanceCountBlockComponent),
],
[
"NotesDashboard",
() =>
import(
"./dashboard-widgets/notes-dashboard/notes-dashboard.component"
).then((c) => c.NotesDashboardComponent),
],
[
"NotesRelatedToEntity",
() =>
import(
"./notes-related-to-entity/notes-related-to-entity.component"
).then((c) => c.NotesRelatedToEntityComponent),
],
[
"ImportantNotesDashboard",
() =>
import(
"./dashboard-widgets/important-notes-dashboard/important-notes-dashboard.component"
).then((c) => c.ImportantNotesDashboardComponent),
],
[
"NoteDetails",
() =>
import("./note-details/note-details.component").then(
(c) => c.NoteDetailsComponent,
),
],
]
|
OkButton |
Type : ConfirmationDialogButton[]
|
Default value : [
{
text: $localize`:Confirmation dialog OK:OK`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: true,
},
]
|
YesNoButtons |
Type : ConfirmationDialogButton[]
|
Default value : [
{
text: $localize`:Confirmation dialog Yes:Yes`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: true,
},
{
text: $localize`:Confirmation dialog No:No`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: false,
},
]
|
YesNoCancelButtons |
Type : ConfirmationDialogButton[]
|
Default value : [
{
text: $localize`:Confirmation dialog Yes:Yes`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: true,
},
{
text: $localize`:Confirmation dialog No:No`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: false,
},
{
text: $localize`:Confirmation dialog Cancel:Cancel`,
click() {
// Intentionally blank
// To react to emissions from this button, use the `MatDialogRef.beforeClosed()` hook
},
dialogResult: undefined,
},
]
|
PREFIX_VIEW_CONFIG |
Type : string
|
Default value : "view:"
|
The prefix which is used to find the ViewConfig's in the config file |
ratingAnswers |
Type : ConfigurableEnumValue[]
|
Default value : enumJson.values
|
ReportEntity |
Default value : ReportConfig as EntityConstructor<ReportEntity>
|
This allows the |
reportingComponents |
Type : ComponentTuple[]
|
Default value : [
[
"Reporting",
() =>
import("./reporting/reporting.component").then(
(c) => c.ReportingComponent,
),
],
]
|
TEST_USER |
Type : string
|
Default value : "demo"
|
todoDefaultConfigs |
Type : object
|
Default value : {
// for "entity:Todo" see todo.ts DatabaseField annotations
"view:todo": {
component: "TodoList",
config: {
entityType: "Todo",
columns: [
"deadline",
"subject",
"assignedTo",
"startDate",
"relatedEntities",
],
filters: [
{ id: "assignedTo" },
{
id: "due-status",
type: "prebuilt",
},
],
},
},
}
|
USAGE_ANALYTICS_CONFIG_ID |
Type : string
|
Default value : "appConfig:usage-analytics"
|
warningLevels |
Type : Ordering.EnumValue[]
|
Default value : enumJson.values
|